RSTT
3.1.0
Regional Seismic Travel Time
|
A Uncertainty object contains the raw data to calculate a modeling error in seconds as a function of distance in radians. More...
#include <Uncertainty.h>
Public Member Functions | |
Uncertainty () | |
Default constructor. More... | |
Uncertainty (const int &phase, const int &attribute) | |
Parameterized constructor that loads model error from a specified file. More... | |
Uncertainty (const string &phase, const string &attribute) | |
Parameterized constructor that loads model error from a specified file. More... | |
Uncertainty (string modelPath, const string &phase, int phasenum) | |
Uncertainty (string modelPath, const int &phase, const int &attribute) | |
Parameterized constructor that loads model error from a specified file. More... | |
Uncertainty (util::DataBuffer &buffer) | |
Parameterized constructor that loads uncertainty data from the input DataBuffer. More... | |
Uncertainty (const Uncertainty &u) | |
Copy constructor. More... | |
~Uncertainty () | |
Destructor. More... | |
Uncertainty & | operator= (const Uncertainty &u) |
Assignment operator. More... | |
bool | operator== (const Uncertainty &other) |
bool | operator!= (const Uncertainty &other) |
void | readFile (ifstream &fin) |
void | readFile (geotess::IFStreamAscii &fin) |
void | writeFile (geotess::IFStreamAscii &output) |
void | readFile (geotess::IFStreamBinary &fin) |
void | writeFile (geotess::IFStreamBinary &fout) |
int | getPhase () |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory. More... | |
string | getPhaseStr () |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory. More... | |
int | getAttribute () |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory. More... | |
string | getAttributeStr () |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory. More... | |
double | getUncertainty (const double &distance, double depth=0.0) |
Returns the model uncertainty as a function of angular distance (radians) and depth. More... | |
double | getVariance (const double &distance, double depth=0.0) |
Returns the model variance as a function of angular distance (radians) and depth. More... | |
vector< double > & | getDistances () |
A vector of doubles representing the angular distances (in degrees) More... | |
vector< double > & | getDepths () |
A vector of doubles representing the depths. More... | |
vector< vector< double > > & | getValues () |
A vector of doubles representing the model errors (in seconds) More... | |
void | writeFile (const string &directoryName) |
string | toStringTable () |
string | toStringFile () |
int | getBufferSize () |
Returns the model uncertainty DataBuffer size storage requirement. More... | |
void | serialize (util::DataBuffer &buffer) |
Writes the uncertainty object into the input DataBuffer. More... | |
void | deserialize (util::DataBuffer &buffer) |
Reads the uncertainty object from the input DataBuffer. More... | |
Static Public Member Functions | |
static Uncertainty * | getUncertainty (ifstream &input, const int &phase, const int &attribute) |
static Uncertainty * | getUncertainty (ifstream &input, const string &phase, const string &attribute) |
static Uncertainty * | getUncertainty (geotess::IFStreamAscii &input, const int &phase, const int &attribute) |
static Uncertainty * | getUncertainty (geotess::IFStreamAscii &input, const string &phase, const string &attribute) |
static Uncertainty * | getUncertainty (geotess::IFStreamBinary &input, const int &phase, const int &attribute) |
static Uncertainty * | getUncertainty (geotess::IFStreamBinary &input, const string &phase, const string &attribute) |
static Uncertainty * | getUncertainty (util::DataBuffer &input, const int &phase, const int &attribute) |
static Uncertainty * | getUncertainty (util::DataBuffer &input, const string &phase, const string &attribute) |
static Uncertainty * | getUncertainty (const string &directoryName, const int &phase, const int &attribute) |
static string | getPhase (const int &phaseIndex) |
static string | getAttribute (const int &attributeIndex) |
static int | getPhase (const string &phase) |
static int | getAttribute (const string &attribute) |
A Uncertainty object contains the raw data to calculate a modeling error in seconds as a function of distance in radians.
A Uncertainty object contains the raw data to calculate a modeling error in seconds as a function of distance in radians.
Code includes functionality to store and compute uncertainty for 2D uncertainty tables (distance and depth). But all the tables included with SLBM versions up to and including version 3.0 do not have any depth information. All uncertainties are a function of distance only. Therefore, functionality to handle 2D uncertainty has not been tested and it is considered unlikely that it will work as currently coded.
Definition at line 72 of file Uncertainty.h.
slbm::Uncertainty::Uncertainty | ( | ) |
Default constructor.
Default constructor.
slbm::Uncertainty::Uncertainty | ( | const int & | phase, |
const int & | attribute | ||
) |
Parameterized constructor that loads model error from a specified file.
Parameterized constructor that loads model error data from a file. Uses an SLBM specific phase ordering index.
slbm::Uncertainty::Uncertainty | ( | const string & | phase, |
const string & | attribute | ||
) |
Parameterized constructor that loads model error from a specified file.
Parameterized constructor that loads model error data from a file. Uses an SLBM specific phase ordering index.
slbm::Uncertainty::Uncertainty | ( | string | modelPath, |
const string & | phase, | ||
int | phasenum | ||
) |
from a specified file.
Parameterized constructor that loads model error data from a file. Uses the input phase string to find the uncertainty data file and assigns a phase ordering index.
slbm::Uncertainty::Uncertainty | ( | string | modelPath, |
const int & | phase, | ||
const int & | attribute | ||
) |
Parameterized constructor that loads model error from a specified file.
Parameterized constructor that loads model error data from a file. Uses an SLBM specific phase ordering index.
slbm::Uncertainty::Uncertainty | ( | util::DataBuffer & | buffer | ) |
Parameterized constructor that loads uncertainty data from the input DataBuffer.
Parameterized constructor that loads model error data from a file.
slbm::Uncertainty::Uncertainty | ( | const Uncertainty & | u | ) |
Copy constructor.
Copy constructor.
slbm::Uncertainty::~Uncertainty | ( | ) |
Destructor.
Destructor.
void slbm::Uncertainty::deserialize | ( | util::DataBuffer & | buffer | ) |
Reads the uncertainty object from the input DataBuffer.
Reads the uncertainty object from the input DataBuffer.
|
inline |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
Definition at line 504 of file Uncertainty.h.
|
inlinestatic |
Definition at line 344 of file Uncertainty.h.
|
inlinestatic |
Definition at line 368 of file Uncertainty.h.
|
inline |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
Definition at line 514 of file Uncertainty.h.
int slbm::Uncertainty::getBufferSize | ( | ) |
Returns the model uncertainty DataBuffer size storage requirement.
Returns the model uncertainty DataBuffer size storage requirement.
|
inline |
A vector of doubles representing the depths.
A vector of doubles representing the depths
Definition at line 312 of file Uncertainty.h.
|
inline |
A vector of doubles representing the angular distances (in degrees)
A vector of doubles representing the angular distances (in degrees)
Definition at line 305 of file Uncertainty.h.
|
inline |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
Definition at line 499 of file Uncertainty.h.
|
inlinestatic |
Definition at line 327 of file Uncertainty.h.
|
inlinestatic |
Definition at line 359 of file Uncertainty.h.
|
inline |
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
Definition at line 509 of file Uncertainty.h.
double slbm::Uncertainty::getUncertainty | ( | const double & | distance, |
double | depth = 0.0 |
||
) |
Returns the model uncertainty as a function of angular distance (radians) and depth.
Returns the model uncertainty as a function of angular distance (radians) and depth. Depth defaults to the surface (0.0).
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
directoryName | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
static |
Retrieve a new Uncertainty object for the specified phase and attribute, loaded from specified input source.
input | data source |
phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg |
attribute | 0:TT, 1:SH, 2:AZ |
|
inline |
A vector of doubles representing the model errors (in seconds)
A vector of doubles representing the model errors (in seconds)
Definition at line 319 of file Uncertainty.h.
double slbm::Uncertainty::getVariance | ( | const double & | distance, |
double | depth = 0.0 |
||
) |
Returns the model variance as a function of angular distance (radians) and depth.
Returns the model variance as a function of angular distance (radians) and depth. Depth defaults to the surface (0.0).
|
inline |
Overloaded inequality operator
other | reference to the other Uncertainty object to which this Uncertainty object is to be compared |
Definition at line 246 of file Uncertainty.h.
Uncertainty& slbm::Uncertainty::operator= | ( | const Uncertainty & | u | ) |
Assignment operator.
Assignment operator.
bool slbm::Uncertainty::operator== | ( | const Uncertainty & | other | ) |
Overloaded equality operator
other | reference to the other Uncertainty object to which this Uncertainty object is to be compared |
void slbm::Uncertainty::readFile | ( | geotess::IFStreamAscii & | fin | ) |
void slbm::Uncertainty::readFile | ( | geotess::IFStreamBinary & | fin | ) |
void slbm::Uncertainty::readFile | ( | ifstream & | fin | ) |
void slbm::Uncertainty::serialize | ( | util::DataBuffer & | buffer | ) |
Writes the uncertainty object into the input DataBuffer.
Writes the uncertainty object into the input DataBuffer.
string slbm::Uncertainty::toStringFile | ( | ) |
string slbm::Uncertainty::toStringTable | ( | ) |
void slbm::Uncertainty::writeFile | ( | const string & | directoryName | ) |
void slbm::Uncertainty::writeFile | ( | geotess::IFStreamAscii & | output | ) |
void slbm::Uncertainty::writeFile | ( | geotess::IFStreamBinary & | fout | ) |