#include <C1DRecObjective.h>

Public Member Functions | |
| virtual C1DRecObjective * | clone () const |
| return a pointer to a copy of the current object | |
| void | SetTimeWindow (const double start, const double end) |
| Set the time window used for misfit calculations, start and end are in seconds. | |
| void | SetErrorLevel (const double level) |
| Set the errorlevel for fit, this is relative to the maximum amplitude, not for each individual data point. | |
| void | SetPoisson (const double ratio) |
| Set poisson's ratio, at the moment the same for all layers, used for calculating P-velocity. | |
| virtual void | WriteData (const std::string &filename) |
| Write the synthetic data to a sac file with name filename, makes only sense after calculating the misfit. | |
| void | WriteModel (const std::string &filename) |
| Write the current model to ascii file for calculations. | |
| void | WritePlot (const std::string &filename) |
| Write the current model to ascii file for plotting. | |
| virtual void | PreParallel (const ttranscribed &member) |
| We have to write runfiles before parallel execution. | |
| virtual double | PostParallel (const ttranscribed &member) |
| We also clean up files serially. | |
| virtual void | SafeParallel (const ttranscribed &member) |
| Calculate the misfit between the data calculated from model vector member and measured data given in the constructor. | |
| C1DRecObjective (const C1DRecObjective &Old) | |
| C1DRecObjective & | operator= (const C1DRecObjective &source) |
| C1DRecObjective (boost::shared_ptr< const SeismicDataComp > TheRecData, const int myshift, const double mysigma, const double myc, const double myslowness, const RecCalc::trfmethod method=RecCalc::specdiv, const bool normalized=true) | |
| The constructor needs a few essential parameters. | |
| virtual | ~C1DRecObjective () |
Protected Member Functions | |
| const SeismicDataComp & | GetObservedData () |
Friends | |
| class | AbsVelRecObjective |
The constructor takes a few essential parameters that are expected not to change during the program (in most cases inversion), e.g. the data to fit. See also C1DRecObjective for the necessary constructor parameters.
There are two ways to calculate the Misfit for a given model, either calling GeneralObjective::CalcPerformance, or, for parallel programs, calling the three function PreParallel, SafeParallel and PostParallel in that order. In both cases you have to give the parameter member, which is a ttranscribed of size 2n, where n is the number of layers of the model. The first n entries are the layer thicknesses in km and the last n entries are the S-wave velocities in km/s. Densities and P-Wave velocities are calculated from S-Velocities by hard-coded relationships.
Definition at line 19 of file C1DRecObjective.h.
| C1DRecObjective::C1DRecObjective | ( | const C1DRecObjective & | Old | ) |
| C1DRecObjective::C1DRecObjective | ( | boost::shared_ptr< const SeismicDataComp > | TheRecData, | |
| const int | myshift, | |||
| const double | mysigma, | |||
| const double | myc, | |||
| const double | myslowness, | |||
| const RecCalc::trfmethod | method = RecCalc::specdiv, |
|||
| const bool | normalized = true | |||
| ) |
The constructor needs a few essential parameters.
| TheRecData | Shared pointer to the measured receiver function | |
| myshift | the time shift used for calculating the measured receiver function | |
| mysigma | sigma used for calculating the measured receiver function | |
| myc | water level used for calculating the measured receiver function | |
| myslowness | slowness used for calculating the measured receiver function | |
| method | The method used to calculate the observed data. Can be specdiv or iterdecon | |
| normalized | Is the measured data normalized to an initial correlation peak of 1 |
Definition at line 15 of file C1DRecObjective.cpp.
References RecCalc::SetNormalize().
| C1DRecObjective::~C1DRecObjective | ( | ) | [virtual] |
Definition at line 44 of file C1DRecObjective.cpp.
| virtual C1DRecObjective* C1DRecObjective::clone | ( | ) | const [inline, virtual] |
return a pointer to a copy of the current object
Implements GeneralObjective.
Reimplemented in AbsVelRecObjective.
Definition at line 52 of file C1DRecObjective.h.
References C1DRecObjective().
| const SeismicDataComp& C1DRecObjective::GetObservedData | ( | ) | [inline, protected] |
Definition at line 46 of file C1DRecObjective.h.
| C1DRecObjective & C1DRecObjective::operator= | ( | const C1DRecObjective & | source | ) |
Definition at line 74 of file C1DRecObjective.cpp.
References endpoint, errorlevel, errorvalue, Model, ObservedData, poisson, RecCalculator, RecSynthData, slowness, and startpoint.
| double C1DRecObjective::PostParallel | ( | const ttranscribed & | member | ) | [virtual] |
We also clean up files serially.
Implements GeneralObjective.
Reimplemented in AbsVelRecObjective.
Definition at line 116 of file C1DRecObjective.cpp.
References GeneralObjective::CalcMisfit(), SeismicDataComp::CopyHeader(), TimeSeriesComponent::GetData(), GeneralObjective::GetFitExponent(), GeneralObjective::GetParallelID(), GeneralObjective::GetRMS(), GeneralObjective::SetMisfit(), GeneralObjective::SetRMS(), GeneralObjective::SetSynthData(), and RecCalc::SynthPostParallel().
Referenced by Multi1DRecObjective::PostParallel().
| void C1DRecObjective::PreParallel | ( | const ttranscribed & | member | ) | [virtual] |
We have to write runfiles before parallel execution.
Reimplemented from GeneralObjective.
Definition at line 92 of file C1DRecObjective.cpp.
References CollapseModel(), GeneralObjective::GetParallelID(), SeismicModel::Init(), SeismicModel::SetDensity(), SeismicModel::SetDt(), SeismicModel::SetNpts(), SeismicModel::SetPVelocity(), SeismicModel::SetSlowness(), SeismicModel::SetSVelocity(), SeismicModel::SetThickness(), and RecCalc::SynthPreParallel().
Referenced by Multi1DRecObjective::PreParallel().
| void C1DRecObjective::SafeParallel | ( | const ttranscribed & | member | ) | [virtual] |
Calculate the misfit between the data calculated from model vector member and measured data given in the constructor.
Reimplemented from GeneralObjective.
Definition at line 140 of file C1DRecObjective.cpp.
References GeneralObjective::GetParallelID(), and RecCalc::SynthSafeParallel().
Referenced by Multi1DRecObjective::SafeParallel().
| void C1DRecObjective::SetErrorLevel | ( | const double | level | ) | [inline] |
Set the errorlevel for fit, this is relative to the maximum amplitude, not for each individual data point.
Definition at line 59 of file C1DRecObjective.h.
| void C1DRecObjective::SetPoisson | ( | const double | ratio | ) | [inline] |
Set poisson's ratio, at the moment the same for all layers, used for calculating P-velocity.
Definition at line 64 of file C1DRecObjective.h.
Referenced by init(), main(), and Multi1DRecObjective::SetPoisson().
Set the time window used for misfit calculations, start and end are in seconds.
Definition at line 57 of file C1DRecObjective.cpp.
Referenced by init(), main(), and Multi1DRecObjective::SetTimeWindow().
| virtual void C1DRecObjective::WriteData | ( | const std::string & | filename | ) | [inline, virtual] |
Write the synthetic data to a sac file with name filename, makes only sense after calculating the misfit.
Reimplemented from PlottableObjective.
Reimplemented in AbsVelRecObjective.
Definition at line 69 of file C1DRecObjective.h.
References SeismicDataComp::WriteAsSac().
Referenced by main().
| void C1DRecObjective::WriteModel | ( | const std::string & | filename | ) | [inline, virtual] |
Write the current model to ascii file for calculations.
Reimplemented from PlottableObjective.
Definition at line 74 of file C1DRecObjective.h.
References ResPkModel::WriteData().
Referenced by main().
| void C1DRecObjective::WritePlot | ( | const std::string & | filename | ) | [inline, virtual] |
Write the current model to ascii file for plotting.
Reimplemented from PlottableObjective.
Definition at line 79 of file C1DRecObjective.h.
References SeismicModel::WritePlot().
Referenced by main().
friend class AbsVelRecObjective [friend] |
Definition at line 106 of file C1DRecObjective.h.
1.5.8