GPLIB++
AbsVelRecObjective.h
Go to the documentation of this file.
1 #ifndef ABSVELRECOBJECTIVE_H_
2 #define ABSVELRECOBJECTIVE_H_
3 
4 #include "C1DRecObjective.h"
5 #include "RFVelCalc.h"
6 #include "SurfaceWaveData.h"
7 
8 namespace gplib
9  {
10  //! This objective function calculates the weighted misfit for a receiver function and the corresponding absolute velocity transformation
12  {
13  private:
14  //! The object to perform absolute velocity estimation
15  RFVelCalc CalcAbsVel;
16  SurfaceWaveData MeasuredAbsVel;
17  SurfaceWaveData SynthAbsVel;
18  double absvelweight;
19  double recweight;
20  public:
21  //! return a pointer to a copy of the current object
22  virtual AbsVelRecObjective *clone() const
23  {
24  return new AbsVelRecObjective(*this);
25  }
26  //! Set the relative weight for the absolute velocity information
27  void SetAbsVelWeight(const double w)
28  {
29  absvelweight = w;
30  }
31  //! Set the relative weight for the pure receiver function
32  void SetRecWeight(const double w)
33  {
34  recweight = w;
35  }
36  //! Write out the receiver function and absolute velocity data, the absolute velocity data gets .vel appended
37  virtual void WriteData(const std::string &filename)
38  {
39  if (recweight > 0.0)
41  if (absvelweight > 0.0)
42  SynthAbsVel.WriteAscii(filename + ".vel");
43  }
44  virtual double PostParallel(const ttranscribed &member);
47  virtual ~AbsVelRecObjective();
48  //! This constructor is used for calculating absolute velocity information
49  /*! @param TheRecData Object containing the measured receiver function as from call RFVelCalc
50  * @param AbsVel Object containing the measured absolute velocity information
51  * @param myshift the shift used for calculating the measured receiver function
52  * @param mysigma sigma used for calculating the measured receiver function
53  * @param myc water level used for calculating the measured receiver function
54  * @param myslowness slowness used for calculating the measured receiver function
55  * @param normalized Is the measured data normalized to an initial correlation peak of 1
56  */
57  AbsVelRecObjective(boost::shared_ptr<const SeismicDataComp> TheRecData,
58  SurfaceWaveData &AbsVel, const int myshift, const double mysigma,
59  const double myc, const double myslowness,
60  const RecCalc::trfmethod method = RecCalc::specdiv,
61  const bool normalized = true);
62  };
63  }
64 #endif /*ABSVELRECOBJECTIVE_H_*/
void SetRecWeight(const double w)
Set the relative weight for the pure receiver function.
trfmethod
There are several ways to calculate receiver functions.
Definition: RecCalc.h:18
ublas::vector< double > ttranscribed
Definition: gentypes.h:21
AbsVelRecObjective & operator=(const AbsVelRecObjective &source)
AbsVelRecObjective(const AbsVelRecObjective &Old)
virtual void WriteData(const std::string &filename)
Write out the receiver function and absolute velocity data, the absolute velocity data gets ...
A class to read, write and store fundamental mode surface wave dispersion data.
virtual AbsVelRecObjective * clone() const
return a pointer to a copy of the current object
virtual void WriteData(const std::string &filename)
Write the synthetic data to a sac file with name filename, makes only sense after calculating the mis...
void SetAbsVelWeight(const double w)
Set the relative weight for the absolute velocity information.
This class implements the method to calculate absolute S-Wave velocities from Receiver function data ...
Definition: RFVelCalc.h:13
virtual double PostParallel(const ttranscribed &member)
We also clean up files serially.
This objective function calculates the weighted misfit for a receiver function and the corresponding ...
Calculate the misfit between observed receiver function for a given 1D model by calculating a synthet...
virtual void WriteAscii(const std::string &filename) const
Write the data in simple ascii format.