C1DMTSynthData.h

Go to the documentation of this file.
00001 #ifndef C1DMTSYNTHDATA_H
00002 #define C1DMTSYNTHDATA_H
00003 
00004 #include "MTStation.h"
00005 #include "types.h"
00006 #include <vector>
00007 #include <string>
00008 #include "VecMat.h"
00009 
00010 namespace gplib
00011 {
00012 //! Calculate synthetic MT data for a 1D model using Cagniard's algorithm
00013 class C1DMTSynthData: public MTStation
00014 {
00015 private:
00016         tcompdata Z;
00017         void Calc();
00018         trealdata calc_frequencies;
00019         trealdata resistivity; //
00020         trealdata thickness; // Thickness for each layer
00021         trealdata reserrors; // the errors of the model parameters, only used for plotting
00022         trealdata thickerrors;
00023 public:
00024         //! Read only access to the vector of resistivities for the 1D model from top to bottom in Ohmm
00025         const trealdata &GetResistivities()
00026         {
00027                 return resistivity;
00028         }
00029         //! Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km
00030         const trealdata &GetThicknesses()
00031         {
00032                 return thickness;
00033         }
00034         //! Read-write access to the vector of resistivities for the 1D model from top to bottom in Ohmm
00035         void SetResistivities(const trealdata &res)
00036         {
00037                 resistivity = res;
00038         }
00039         //! Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km
00040         void SetThicknesses(const trealdata &thick)
00041         {
00042                 thickness = thick;
00043         }
00044         //! Set the error on the resistivities this is purely for plotting of inversion results
00045         void SetResistivityErrors(const trealdata &re)
00046         {
00047                 reserrors = re;
00048         }
00049         //! Set the error on the thicknesses this is purely for plotting of inversion results
00050         void SetThicknessErrors(const trealdata &te)
00051         {
00052                 thickerrors = te;
00053         }
00054         //! Return the model as a single vector first log10 of all resistivities, then all thicknesses in km
00055         gplib::rvec GetModelVector();
00056         //! Write model into file for cagniard algorithm
00057         void WriteModel(std::string filename);
00058         //! Read the model from a file
00059         void ReadModel(std::string filename);
00060         //! Write out a file that can be used for plotting with xmgrace first column depth, second column resistivity
00061         void WritePlot(std::string filename);
00062         //! Calculate the synthetic data given the previously set parameters
00063         virtual void CalcSynthetic();
00064         //! Provide a "virtual copy constructor"
00065         virtual C1DMTSynthData *clone() const
00066         {
00067                 return new C1DMTSynthData(*this);
00068         }
00069         C1DMTSynthData(const C1DMTSynthData &old);
00070         C1DMTSynthData();
00071         virtual ~C1DMTSynthData();
00072 
00073 };
00074 }
00075 #endif

Generated on Tue May 4 16:52:14 2010 for GPLIB++ by  doxygen 1.5.8