1 #ifndef C1DMTOBJECTIVE_H
2 #define C1DMTOBJECTIVE_H
6 #include <boost/function.hpp>
7 #include <boost/shared_ptr.hpp>
16 typedef boost::function<double(const MTTensor* const )>
datafunc_t;
25 std::vector<double> ErrorLevels;
27 bool FitparametersSet;
31 virtual void CalcSynthData(
const ttranscribed &member) = 0;
38 const std::vector<double> TheErrLevel);
40 const datafunc_t TheErrorFunc,
const double TheErrLevel);
47 return ErrorFunctions;
50 virtual void WriteModel(
const std::string &filename)=0;
52 virtual void WritePlot(
const std::string &filename)=0;
54 virtual void WriteData(
const std::string &filename)=0;
void AppendFitParameters(const datafunc_t TheDataFunc, const datafunc_t TheErrorFunc, const double TheErrLevel)
virtual void WriteModel(const std::string &filename)=0
write the current model to a file
boost::function< double(const MTTensor *const )> datafunc_t
A function that returns a real valued quantity calculated from an MT impedance tensor.
ublas::vector< double > ttranscribed
This only adds a few plotting functions to GeneralObjective to define a common interface.
C1DMTObjective(const MTStation &LocalMTData)
We need data to fit for any objective function, so we want it as constructor parameter, but no implicit conversion.
The class MTStation is used to store the transfer functions and related information for a MT-site...
virtual void WriteData(const std::string &filename)=0
Write current data to a file.
virtual ~C1DMTObjective()
C1DMTObjective & operator=(const C1DMTObjective &source)
std::vector< datafunc_t > datafuncvector_t
A vector of MT data functions. This is used to store the types of data to fit.
virtual void WritePlot(const std::string &filename)=0
write the current model for plotting to a file
void SetFitParameters(const datafuncvector_t TheDataV, const datafuncvector_t TheErrorV, const std::vector< double > TheErrLevel)
function to set the parameters that determine the type of fit
virtual MTStation & GetMTSynth()=0
virtual double PostParallel(const ttranscribed &member)
All calculation has been done in SafeParallel we only return the stored result.
const datafuncvector_t & GetErrorFunctions() const
return a vector with pointers to the functions used to calculate the errors
virtual void SafeParallel(const ttranscribed &member)
Calc misfit for a model given by member.
C1DMTObjective is the base class for MT misfit calculations from 1D models, it provides common functi...