00001 #ifndef ABSVELRECOBJECTIVE_H_ 00002 #define ABSVELRECOBJECTIVE_H_ 00003 00004 #include "C1DRecObjective.h" 00005 #include "RFVelCalc.h" 00006 #include "SurfaceWaveData.h" 00007 00008 class AbsVelRecObjective : public C1DRecObjective 00009 { 00010 private: 00011 //! The object to perform absolute velocity estimation 00012 RFVelCalc CalcAbsVel; 00013 SurfaceWaveData MeasuredAbsVel; 00014 SurfaceWaveData SynthAbsVel; 00015 double absvelweight; 00016 double recweight; 00017 public: 00018 //! return a pointer to a copy of the current object 00019 virtual AbsVelRecObjective *clone() const 00020 { 00021 return new AbsVelRecObjective(*this); 00022 } 00023 void SetAbsVelWeight(const double w) 00024 { 00025 absvelweight = w; 00026 } 00027 //! Set the relative weight for the pure receiver function 00028 void SetRecWeight(const double w) 00029 { 00030 recweight = w; 00031 } 00032 00033 virtual void WriteData(const std::string &filename) 00034 { 00035 if (recweight > 0.0) 00036 C1DRecObjective::WriteData(filename); 00037 if (absvelweight > 0.0) 00038 SynthAbsVel.WriteAscii(filename+".vel"); 00039 } 00040 virtual void SafeParallel(const ttranscribed &member); 00041 AbsVelRecObjective& operator=(const AbsVelRecObjective& source); 00042 AbsVelRecObjective(const AbsVelRecObjective &Old); 00043 virtual ~AbsVelRecObjective(); 00044 //! This constructor is used for calculating absolute velocity information 00045 /*! @param TheRecData Object containing the measured receiver function as from call RFVelCalc 00046 * @param AbsVel Object containing the measured absolute velocity information 00047 * @param myshift the shift used for calculating the measured receiver function 00048 * @param myomega omega used for calculating the measured receiver function 00049 * @param mysigma sigma used for calculating the measured receiver function 00050 * @param myc water level used for calculating the measured receiver function 00051 * @param myslowness slowness used for calculating the measured receiver function 00052 */ 00053 AbsVelRecObjective(boost::shared_ptr<const SeismicDataComp> TheRecData, SurfaceWaveData &AbsVel, 00054 const int myshift, const double myomega, const double mysigma, 00055 const double myc, const double myslowness, 00056 const RecCalc::trfmethod method = RecCalc::specdiv); 00057 }; 00058 00059 #endif /*ABSVELRECOBJECTIVE_H_*/
1.5.5