1 #ifndef CSEISMICMODEL_H
2 #define CSEISMICMODEL_H
27 trealdata ThickErrors;
29 FuzzComp(
const double elem1,
const double elem2,
const double tolerance);
146 const double rdepth,
const double p);
148 virtual void ReadModel(
const std::string filename)=0;
150 virtual void WriteModel(
const std::string filename)=0;
152 virtual void WriteRunFile(
const std::string &filename)=0;
154 void WritePlot(
const std::string &filename);
158 void Init(
const int nlayers);
166 #endif // CSEISMICMODEL_H
double CalcArrival(const tArrivalType mode, const double recdist)
void WritePlot(const std::string &filename)
Write out an ascii file for plotting with xmgrace etc.
int FindLayer(const double depth)
Returns the index of the layer that correponds to depth in km.
trealdata & SetDensity()
Read-write access to the vector of densities in g/cm^3 in each layer.
double GetSourceDepth() const
Get the depth to the seismic source that generates the wavefield.
const trealdata & GetDensity() const
Read-only access to the vector of densities in g/cm^3 in each layer.
virtual void WriteRunFile(const std::string &filename)=0
Write out a script that performs a forward calculation for the current model.
trealdata & SetQs()
Read-write access to the vector of S quality factors for each layer.
const trealdata & GetQp() const
Read-only access to the vector of P quality factors for each layer.
trealdata & SetThickness()
Read-write access to the vector of thicknesses in km in each layer.
trealdata & SetQp()
Read-write access to the vector of P quality factors for each layer.
void SetSVelErrors(const trealdata &sve)
Set error bars on S-velocities for plotting.
void SetNpts(const unsigned int s)
Set the number of points for synthetic seismogram calculation.
tArrivalType
Do we want to calculate the arrival of a direct S-Wave or a P-wave.
void SetThickErrors(const trealdata &te)
Set error bars on Thicknesses for plotting.
trealdata & SetPVelocity()
Read-write access to the vector of P-velocities in km/s in each layer.
The class SeismicModel is the base class for some of the model format for seismic codes...
virtual void ReadModel(const std::string filename)=0
Read the model in its native format from a file.
void SetSourceDepth(const double s)
Set the depth to the seismic source.
double GetDt() const
Get the time between two samples in s, this is for synthetic forward calculations.
SeismicModel & operator=(const SeismicModel &source)
const trealdata & GetSVelocity() const
Read-only access to the vector of S-velocities in km/s in each layer.
void Init(const int nlayers)
Init provides a convenient way to allocate memory in all structures for a given number of layers...
trealdata & SetSVelocity()
Read-write access to the vector of S-velocities in km/s in each layer.
unsigned int GetNpts() const
Get the number of points for synthetic seismogram calculation.
virtual void WriteModel(const std::string filename)=0
Write the model in its native format to a file.
SeismicModel(const int nlayers=0)
void PlotVelWithErrors(const std::string &filename)
Write out an ascii file with error bars for plotting with xmgrace etc.
double CalcTravelTime(const tArrivalType mode, const double sdepth, const double rdepth, const double p)
void SetDt(const double s)
Set the time between two samples in s, this is for synthetic forward calculations.
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...
const trealdata & GetPVelocity() const
Read-only access to the vector of P-velocities in km/s in each layer.
const trealdata & GetThickness() const
Read-only access to the vector of thicknesses in km in each layer.
const trealdata & GetQs() const
Read-only access to the vector of S quality factors for each layer.