GPLIB++
|
This class stores and writes model for the respktn 1D seismic code that we use for receiver function calculations. More...
#include <ResPkModel.h>
Public Types | |
enum | WaveType { SWave, PWave } |
Public Types inherited from gplib::SeismicModel | |
enum | tArrivalType { DirectS, DirectP } |
Do we want to calculate the arrival of a direct S-Wave or a P-wave. More... | |
Public Member Functions | |
void | SetInputWave (WaveType w) |
double | GetSlowness () const |
Get the slowness in s/km for the synthetic forward calculation. More... | |
void | SetSlowness (const double s) |
Set the slowness in s/km for the synthetic forward calculation. More... | |
const trealdata & | GetStrike () const |
Read-only access to the vector of Strikes in each layer. More... | |
trealdata & | SetStrike () |
Read-write access to the vector of Strikes in each layer. More... | |
const trealdata & | GetDip () const |
Read-only access to the vector of Dips in each layer. More... | |
trealdata & | SetDip () |
Read-write access to the vector of Dips in each layer. More... | |
virtual void | ReadModel (const std::string filename) |
Read the model in its native format from a file. More... | |
virtual void | WriteModel (const std::string filename) |
Write the model in its native format to a file. More... | |
virtual void | WriteRunFile (const std::string &filename) |
Write out a script that performs a forward calculation for the current model. More... | |
ResPkModel () | |
ResPkModel (const int nlayers) | |
ResPkModel (const SeismicModel &source) | |
ResPkModel (const ResPkModel &source) | |
ResPkModel & | operator= (const ResPkModel &source) |
virtual | ~ResPkModel () |
Public Member Functions inherited from gplib::SeismicModel | |
unsigned int | GetNpts () const |
Get the number of points for synthetic seismogram calculation. More... | |
void | SetNpts (const unsigned int s) |
Set the number of points for synthetic seismogram calculation. More... | |
double | GetSourceDepth () const |
Get the depth to the seismic source that generates the wavefield. More... | |
void | SetSourceDepth (const double s) |
Set the depth to the seismic source. More... | |
double | GetDt () const |
Get the time between two samples in s, this is for synthetic forward calculations. More... | |
void | SetDt (const double s) |
Set the time between two samples in s, this is for synthetic forward calculations. More... | |
const trealdata & | GetPVelocity () const |
Read-only access to the vector of P-velocities in km/s in each layer. More... | |
trealdata & | SetPVelocity () |
Read-write access to the vector of P-velocities in km/s in each layer. More... | |
const trealdata & | GetSVelocity () const |
Read-only access to the vector of S-velocities in km/s in each layer. More... | |
trealdata & | SetSVelocity () |
Read-write access to the vector of S-velocities in km/s in each layer. More... | |
const trealdata & | GetDensity () const |
Read-only access to the vector of densities in g/cm^3 in each layer. More... | |
trealdata & | SetDensity () |
Read-write access to the vector of densities in g/cm^3 in each layer. More... | |
const trealdata & | GetThickness () const |
Read-only access to the vector of thicknesses in km in each layer. More... | |
trealdata & | SetThickness () |
Read-write access to the vector of thicknesses in km in each layer. More... | |
const trealdata & | GetQp () const |
Read-only access to the vector of P quality factors for each layer. More... | |
trealdata & | SetQp () |
Read-write access to the vector of P quality factors for each layer. More... | |
const trealdata & | GetQs () const |
Read-only access to the vector of S quality factors for each layer. More... | |
trealdata & | SetQs () |
Read-write access to the vector of S quality factors for each layer. More... | |
void | SetSVelErrors (const trealdata &sve) |
Set error bars on S-velocities for plotting. More... | |
void | SetThickErrors (const trealdata &te) |
Set error bars on Thicknesses for plotting. More... | |
int | FindLayer (const double depth) |
Returns the index of the layer that correponds to depth in km. More... | |
double | MatchSlowness (const double slowness, const tArrivalType mode) |
Given a slowness in s/km and a wave type calculate the distance that matches this slowness. More... | |
double | CalcArrival (const tArrivalType mode, const double recdist) |
double | CalcTravelTime (const tArrivalType mode, const double sdepth, const double rdepth, const double p) |
void | WritePlot (const std::string &filename) |
Write out an ascii file for plotting with xmgrace etc. More... | |
void | PlotVelWithErrors (const std::string &filename) |
Write out an ascii file with error bars for plotting with xmgrace etc. More... | |
void | Init (const int nlayers) |
Init provides a convenient way to allocate memory in all structures for a given number of layers. More... | |
SeismicModel (const int nlayers=0) | |
SeismicModel (const SeismicModel &source) | |
SeismicModel & | operator= (const SeismicModel &source) |
virtual | ~SeismicModel () |
This class stores and writes model for the respktn 1D seismic code that we use for receiver function calculations.
Our joint inversion uses respktn from C. Ammon to calculate synthetics for receiver function inversion. This class stores the description of this model and provides methods to read such models, write such models and generate scripts that calculate synthetic for such a model.
Definition at line 18 of file ResPkModel.h.
Enumerator | |
---|---|
SWave | |
PWave |
Definition at line 21 of file ResPkModel.h.
gplib::ResPkModel::ResPkModel | ( | ) |
Definition at line 12 of file ResPkModel.cpp.
gplib::ResPkModel::ResPkModel | ( | const int | nlayers | ) |
Definition at line 20 of file ResPkModel.cpp.
gplib::ResPkModel::ResPkModel | ( | const SeismicModel & | source | ) |
Definition at line 26 of file ResPkModel.cpp.
References gplib::SeismicModel::operator=().
gplib::ResPkModel::ResPkModel | ( | const ResPkModel & | source | ) |
Definition at line 32 of file ResPkModel.cpp.
References gplib::SeismicModel::operator=().
|
virtual |
Definition at line 16 of file ResPkModel.cpp.
|
inline |
Read-only access to the vector of Dips in each layer.
Definition at line 56 of file ResPkModel.h.
Referenced by WriteModel().
|
inline |
Get the slowness in s/km for the synthetic forward calculation.
Definition at line 36 of file ResPkModel.h.
Referenced by WriteRunFile().
|
inline |
Read-only access to the vector of Strikes in each layer.
Definition at line 46 of file ResPkModel.h.
Referenced by WriteModel().
ResPkModel & gplib::ResPkModel::operator= | ( | const ResPkModel & | source | ) |
Definition at line 41 of file ResPkModel.cpp.
References gplib::SeismicModel::operator=().
|
virtual |
Read the model in its native format from a file.
Implements gplib::SeismicModel.
Definition at line 92 of file ResPkModel.cpp.
References gplib::SeismicModel::Init(), gplib::SeismicModel::SetDensity(), SetDip(), gplib::SeismicModel::SetPVelocity(), gplib::SeismicModel::SetQp(), gplib::SeismicModel::SetQs(), SetStrike(), gplib::SeismicModel::SetSVelocity(), and gplib::SeismicModel::SetThickness().
Referenced by main().
|
inline |
Read-write access to the vector of Dips in each layer.
Definition at line 61 of file ResPkModel.h.
Referenced by ReadModel().
|
inline |
Definition at line 31 of file ResPkModel.h.
Referenced by gplib::C1DRecObjective::C1DRecObjective().
|
inline |
Set the slowness in s/km for the synthetic forward calculation.
Definition at line 41 of file ResPkModel.h.
Referenced by gplib::C1DRecObjective::PreParallel().
|
inline |
Read-write access to the vector of Strikes in each layer.
Definition at line 51 of file ResPkModel.h.
Referenced by ReadModel().
|
virtual |
Write the model in its native format to a file.
Implements gplib::SeismicModel.
Definition at line 55 of file ResPkModel.cpp.
References gplib::SeismicModel::GetDensity(), GetDip(), gplib::SeismicModel::GetPVelocity(), gplib::SeismicModel::GetQp(), gplib::SeismicModel::GetQs(), GetStrike(), gplib::SeismicModel::GetSVelocity(), and gplib::SeismicModel::GetThickness().
Referenced by gplib::RecCalc::SynthPreParallel(), and gplib::C1DRecObjective::WriteModel().
|
virtual |
Write out a script that performs a forward calculation for the current model.
Implements gplib::SeismicModel.
Definition at line 122 of file ResPkModel.cpp.
References gplib::SeismicModel::GetDt(), gplib::SeismicModel::GetNpts(), GetSlowness(), and PWave.
Referenced by gplib::RecCalc::SynthPreParallel().