GPLIB++
C1DMTSynthData.h
Go to the documentation of this file.
1 #ifndef C1DMTSYNTHDATA_H
2 #define C1DMTSYNTHDATA_H
3 
4 #include "MTStation.h"
5 #include "types.h"
6 #include <vector>
7 #include <string>
8 #include "VecMat.h"
9 
10 namespace gplib
11  {
12  /** \addtogroup mttools MT data analysis, processing and inversion */
13  /* @{ */
14 //! Calculate synthetic MT data for a 1D model using Cagniard's algorithm
15  class C1DMTSynthData: public MTStation
16  {
17  private:
18  tcompdata Z;
19  void Calc();
20  trealdata calc_frequencies;
21  trealdata resistivity; //
22  trealdata thickness; // Thickness for each layer
23  trealdata reserrors; // the errors of the model parameters, only used for plotting
24  trealdata thickerrors;
25  public:
26  //! Read only access to the vector of resistivities for the 1D model from top to bottom in Ohmm
27  const trealdata &GetResistivities()
28  {
29  return resistivity;
30  }
31  //! Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km
32  const trealdata &GetThicknesses()
33  {
34  return thickness;
35  }
36  //! Read-write access to the vector of resistivities for the 1D model from top to bottom in Ohmm
37  void SetResistivities(const trealdata &res)
38  {
39  resistivity = res;
40  }
41  //! Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km
42  void SetThicknesses(const trealdata &thick)
43  {
44  thickness = thick;
45  }
46  //! Set the error on the resistivities this is purely for plotting of inversion results
47  void SetResistivityErrors(const trealdata &re)
48  {
49  reserrors = re;
50  }
51  //! Set the error on the thicknesses this is purely for plotting of inversion results
52  void SetThicknessErrors(const trealdata &te)
53  {
54  thickerrors = te;
55  }
56  //! Return the model as a single vector first log10 of all resistivities, then all thicknesses in km
57  gplib::rvec GetModelVector();
58  //! Write model into file for cagniard algorithm
59  void WriteModel(std::string filename);
60  //! Read the model from a file
61  void ReadModel(std::string filename);
62  //! Write out a file that can be used for plotting with xmgrace first column depth, second column resistivity
63  void WritePlot(std::string filename);
64  //! Calculate the synthetic data given the previously set parameters
65  virtual void CalcSynthetic();
66  //! Provide a "virtual copy constructor"
67  virtual C1DMTSynthData *clone() const
68  {
69  return new C1DMTSynthData(*this);
70  }
71  C1DMTSynthData(const C1DMTSynthData &old);
73  virtual ~C1DMTSynthData();
74  };
75  /* @} */
76  }
77 #endif
virtual C1DMTSynthData * clone() const
Provide a "virtual copy constructor".
gplib::rvec GetModelVector()
Return the model as a single vector first log10 of all resistivities, then all thicknesses in km...
void WriteModel(std::string filename)
Write model into file for cagniard algorithm.
void ReadModel(std::string filename)
Read the model from a file.
The class MTStation is used to store the transfer functions and related information for a MT-site...
Definition: MTStation.h:17
void SetThicknesses(const trealdata &thick)
Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km...
virtual void CalcSynthetic()
Calculate the synthetic data given the previously set parameters.
const trealdata & GetThicknesses()
Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km...
void SetThicknessErrors(const trealdata &te)
Set the error on the thicknesses this is purely for plotting of inversion results.
void WritePlot(std::string filename)
Write out a file that can be used for plotting with xmgrace first column depth, second column resisti...
Calculate synthetic MT data for a 1D model using Cagniard's algorithm.
const trealdata & GetResistivities()
Read only access to the vector of resistivities for the 1D model from top to bottom in Ohmm...
void SetResistivities(const trealdata &res)
Read-write access to the vector of resistivities for the 1D model from top to bottom in Ohmm...
void SetResistivityErrors(const trealdata &re)
Set the error on the resistivities this is purely for plotting of inversion results.