PTensor1DMTObjective.h

Go to the documentation of this file.
00001 #ifndef PTENSOR1DMTOBJECTIVE_H_
00002 #define PTENSOR1DMTOBJECTIVE_H_
00003 
00004 #include "C1DAnisoMTSynthData.h"
00005 #include "PTensorMTStation.h"
00006 #include "PlottableObjective.h"
00007 
00008 namespace gplib
00009   {
00010     //! This is a special objective function to fit phase tensor MT data
00011     /*! We don't have analytical expression for the error of phase tensor elements yet/
00012      * Recalculating them all the time with Jacknife or bootstrap methods is too expensive
00013      * so we calculate them once for the measured data, store it in a special file
00014      * and use this objective function to read the file and fit this data.
00015      */
00016     class PTensor1DMTObjective: public PlottableObjective
00017       {
00018     private:
00019       double errorlevel;
00020       PTensorMTStation MeasuredData;
00021       C1DAnisoMTSynthData AnisoMTSynth;
00022     public:
00023       //! Set the minimum relative error
00024       void SetErrorLevel(const double e)
00025         {
00026           errorlevel = e;
00027         }
00028       //! Calc misfit for a model given by member
00029       virtual void SafeParallel(const ttranscribed &member);
00030       virtual double PostParallel(const ttranscribed &member);
00031       //! write the current model to a file
00032       virtual void WriteModel(const std::string &filename)
00033         {
00034           AnisoMTSynth.WriteModel(filename);
00035         }
00036       //! write the current model for plotting to a file
00037       virtual void WritePlot(const std::string &filename)
00038         {
00039           AnisoMTSynth.WritePlot(filename);
00040         }
00041       //! Write current data to a file
00042       virtual void WriteData(const std::string &filename)
00043         {
00044           AnisoMTSynth.WriteAsMtt(filename);
00045         }
00046       virtual PTensor1DMTObjective *clone() const
00047         {
00048           return new PTensor1DMTObjective(*this);
00049         }
00050       PTensor1DMTObjective(const PTensorMTStation &LocalMTData);
00051       PTensor1DMTObjective(const PTensor1DMTObjective &Old);
00052       virtual ~PTensor1DMTObjective();
00053       PTensor1DMTObjective& operator=(const PTensor1DMTObjective& source);
00054       };
00055   }
00056 #endif /*PTENSOR1DMTOBJECTIVE_H_*/

Generated on Tue Nov 3 13:24:14 2009 for GPLIB++ by  doxygen 1.5.8