RSTT  3.1.0
Regional Seismic Travel Time
slbm::UncertaintyPathDep Class Reference

A UncertaintyPathDep object contains the raw data to calculate a path dependent modeling error in seconds as a function of distance in radians along a specific source-receiver path traced through the model. More...

#include <UncertaintyPathDep.h>

Public Member Functions

 UncertaintyPathDep ()
 Default constructor. More...
 
 UncertaintyPathDep (int phase)
 Parameterized constructor that defines an empty path path specific model error for the input phase. More...
 
 UncertaintyPathDep (const string &phase)
 Parameterized constructor that that defines an empty path path specific model error for the input phase. More...
 
 UncertaintyPathDep (string modelPath, int phase)
 Parameterized constructor that loads path dependent model error definition from a specified file. More...
 
 UncertaintyPathDep (string modelPath, const string &phase)
 
 UncertaintyPathDep (const UncertaintyPathDep &u)
 Copy constructor. More...
 
 ~UncertaintyPathDep ()
 Destructor. More...
 
UncertaintyPathDepoperator= (const UncertaintyPathDep &u)
 Assignment operator. More...
 
bool operator== (const UncertaintyPathDep &other)
 
bool operator!= (const UncertaintyPathDep &other)
 
void readFile (ifstream &fin)
 
void readFile (geotess::IFStreamAscii &fin)
 
void readFile (geotess::IFStreamBinary &fin)
 
void writeFile (geotess::IFStreamAscii &output)
 
void writeFile (geotess::IFStreamBinary &fout)
 
int getPhase () const
 A public convenience accessor used to verify the error data for the correct model phase is loaded in memory. More...
 
const string getPhaseStr () const
 A public convenience accessor used to verify the error data for the correct model phase is loaded in memory. More...
 
const string & getLoadedFileName () const
 Returns loaded file name or "not specified". More...
 
const string & getGridId () const
 Returns the grid id for which this path dependent uncertainty objects data are defined. More...
 
double getUncertainty (double distance, const vector< int > &crustNodeIds, const vector< double > &crustWeights, const vector< int > &headWaveNodeIds, const vector< double > &headWaveWeights, const vector< vector< int > > &headWaveNodeNeighbors, const bool &calcRandomError=false, bool printDebugInfo=false)
 Returns the model uncertainty as a function of angular distance (degrees), crustal grid vertex indices, crustal grid weights (sec), head wave grid vertex indices, head wave grid weights (km), and head wave node neighbors. An optional argument, calcRandomError, can be provided to enable/disable using the random error component in the uncertainty computation. More...
 
bool isRandomErrorDefined () const
 Returns true if random error is defined. More...
 
string toStringTable ()
 
string toStringFile ()
 
vector< double > & getPathUncCrustError ()
 
const vector< double > & getPathUncCrustError () const
 
vector< vector< double > > & getPathUncRandomError ()
 
const vector< vector< double > > & getPathUncRandomError () const
 
vector< double > & getPathUncDistanceBins ()
 
const vector< double > & getPathUncDistanceBins () const
 
vector< vector< double > > & getPathUncModelError ()
 
const vector< vector< double > > & getPathUncModelError () const
 
vector< vector< double > > & getPathUncBias ()
 
const vector< vector< double > > & getPathUncBias () const
 

Static Public Member Functions

static UncertaintyPathDepgetUncertainty (ifstream &input, int phase)
 
static UncertaintyPathDepgetUncertainty (ifstream &input, const string &phase)
 
static UncertaintyPathDepgetUncertainty (geotess::IFStreamAscii &input, int phase)
 
static UncertaintyPathDepgetUncertainty (geotess::IFStreamAscii &input, const string &phase)
 
static UncertaintyPathDepgetUncertainty (geotess::IFStreamBinary &input, int phase)
 
static UncertaintyPathDepgetUncertainty (geotess::IFStreamBinary &input, const string &phase)
 
static UncertaintyPathDepgetUncertainty (const string &modelPath, int phase)
 
static string getPhase (const int &phaseIndex)
 
static int getPhase (const string &phase)
 

Detailed Description

A UncertaintyPathDep object contains the raw data to calculate a path dependent modeling error in seconds as a function of distance in radians along a specific source-receiver path traced through the model.

A UncertaintyPathDep object contains the raw data to calculate a path dependent modeling error in seconds as a function of distance in radians along a specific source-receiver path traced through the model.

Code includes functionality to store and compute path dependent uncertainty for 3D grid vertex uncertainty tables (grid point and distance specific crustal error, random error, model error, and bias). This object is used by GeoTessModelPathUnc to override the 2D distance/ depth dependent uncertainty (Uncertainty) used by GeotessModelSLBM. The path dependent uncertainty is only defined for the Travel Time attribute and not for azimuth and slowness. The latter two attributes still use the 2D uncertainty definitions.

Definition at line 77 of file UncertaintyPathDep.h.

Constructor & Destructor Documentation

◆ UncertaintyPathDep() [1/6]

slbm::UncertaintyPathDep::UncertaintyPathDep ( )

Default constructor.

Default constructor.

◆ UncertaintyPathDep() [2/6]

slbm::UncertaintyPathDep::UncertaintyPathDep ( int  phase)

Parameterized constructor that defines an empty path path specific model error for the input phase.

Parameterized constructor that defines an empty path path specific model error for the input phase.

◆ UncertaintyPathDep() [3/6]

slbm::UncertaintyPathDep::UncertaintyPathDep ( const string &  phase)

Parameterized constructor that that defines an empty path path specific model error for the input phase.

Parameterized constructor that that defines an empty path path specific model error for the input phase.

◆ UncertaintyPathDep() [4/6]

slbm::UncertaintyPathDep::UncertaintyPathDep ( string  modelPath,
int  phase 
)

Parameterized constructor that loads path dependent model error definition from a specified file.

Parameterized constructor that loads path dependent model error definition from a specified file. Uses the input phase ordering index to define the file name.

◆ UncertaintyPathDep() [5/6]

slbm::UncertaintyPathDep::UncertaintyPathDep ( string  modelPath,
const string &  phase 
)

definition from a specified file.

Parameterized constructor that loads path dependent model error definition from a specified file. Uses the input phase string to find the uncertainty data file and assigns a phase ordering index.

◆ UncertaintyPathDep() [6/6]

slbm::UncertaintyPathDep::UncertaintyPathDep ( const UncertaintyPathDep u)

Copy constructor.

Copy constructor.

◆ ~UncertaintyPathDep()

slbm::UncertaintyPathDep::~UncertaintyPathDep ( )

Destructor.

Destructor.

Member Function Documentation

◆ getGridId()

const string& slbm::UncertaintyPathDep::getGridId ( ) const
inline

Returns the grid id for which this path dependent uncertainty objects data are defined.

Returns the grid id for which this path dependent uncertainty objects data are defined.

Definition at line 251 of file UncertaintyPathDep.h.

◆ getLoadedFileName()

const string& slbm::UncertaintyPathDep::getLoadedFileName ( ) const
inline

Returns loaded file name or "not specified".

Returns loaded file name or "not specified".

Definition at line 242 of file UncertaintyPathDep.h.

◆ getPathUncBias() [1/2]

vector<vector<double> >& slbm::UncertaintyPathDep::getPathUncBias ( )
inline

Definition at line 327 of file UncertaintyPathDep.h.

◆ getPathUncBias() [2/2]

const vector<vector<double> >& slbm::UncertaintyPathDep::getPathUncBias ( ) const
inline

Definition at line 331 of file UncertaintyPathDep.h.

◆ getPathUncCrustError() [1/2]

vector<double>& slbm::UncertaintyPathDep::getPathUncCrustError ( )
inline

Definition at line 295 of file UncertaintyPathDep.h.

◆ getPathUncCrustError() [2/2]

const vector<double>& slbm::UncertaintyPathDep::getPathUncCrustError ( ) const
inline

Definition at line 299 of file UncertaintyPathDep.h.

◆ getPathUncDistanceBins() [1/2]

vector<double>& slbm::UncertaintyPathDep::getPathUncDistanceBins ( )
inline

Definition at line 311 of file UncertaintyPathDep.h.

◆ getPathUncDistanceBins() [2/2]

const vector<double>& slbm::UncertaintyPathDep::getPathUncDistanceBins ( ) const
inline

Definition at line 315 of file UncertaintyPathDep.h.

◆ getPathUncModelError() [1/2]

vector<vector<double> >& slbm::UncertaintyPathDep::getPathUncModelError ( )
inline

Definition at line 319 of file UncertaintyPathDep.h.

◆ getPathUncModelError() [2/2]

const vector<vector<double> >& slbm::UncertaintyPathDep::getPathUncModelError ( ) const
inline

Definition at line 323 of file UncertaintyPathDep.h.

◆ getPathUncRandomError() [1/2]

vector<vector<double> >& slbm::UncertaintyPathDep::getPathUncRandomError ( )
inline

Definition at line 303 of file UncertaintyPathDep.h.

◆ getPathUncRandomError() [2/2]

const vector<vector<double> >& slbm::UncertaintyPathDep::getPathUncRandomError ( ) const
inline

Definition at line 307 of file UncertaintyPathDep.h.

◆ getPhase() [1/3]

int slbm::UncertaintyPathDep::getPhase ( ) const
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 226 of file UncertaintyPathDep.h.

◆ getPhase() [2/3]

static string slbm::UncertaintyPathDep::getPhase ( const int &  phaseIndex)
inlinestatic

Definition at line 285 of file UncertaintyPathDep.h.

◆ getPhase() [3/3]

static int slbm::UncertaintyPathDep::getPhase ( const string &  phase)
inlinestatic

Definition at line 290 of file UncertaintyPathDep.h.

◆ getPhaseStr()

const string slbm::UncertaintyPathDep::getPhaseStr ( ) const
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 235 of file UncertaintyPathDep.h.

◆ getUncertainty() [1/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( const string &  modelPath,
int  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase loaded from specified input source.

Parameters
modelPathdata source path
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ getUncertainty() [2/8]

double slbm::UncertaintyPathDep::getUncertainty ( double  distance,
const vector< int > &  crustNodeIds,
const vector< double > &  crustWeights,
const vector< int > &  headWaveNodeIds,
const vector< double > &  headWaveWeights,
const vector< vector< int > > &  headWaveNodeNeighbors,
const bool &  calcRandomError = false,
bool  printDebugInfo = false 
)

Returns the model uncertainty as a function of angular distance (degrees), crustal grid vertex indices, crustal grid weights (sec), head wave grid vertex indices, head wave grid weights (km), and head wave node neighbors. An optional argument, calcRandomError, can be provided to enable/disable using the random error component in the uncertainty computation.

Returns the model uncertainty as a function of angular distance (degrees), crustal grid vertex indices, crustal grid weights (sec), head wave grid vertex indices, head wave grid weights (km), and head wave node neighbors. An optional argument, calcRandomError, can be provided to enable/disable using the random error component in the uncertainty computation.

◆ getUncertainty() [3/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( geotess::IFStreamAscii &  input,
const string &  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase loaded from specified input source.

Parameters
inputdata source
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ getUncertainty() [4/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( geotess::IFStreamAscii &  input,
int  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase loaded from specified input source.

Parameters
inputdata source
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ getUncertainty() [5/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( geotess::IFStreamBinary &  input,
const string &  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase loaded from specified input source.

Parameters
inputdata source
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ getUncertainty() [6/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( geotess::IFStreamBinary &  input,
int  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase loaded from specified input source.

Parameters
inputdata source
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ getUncertainty() [7/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( ifstream &  input,
const string &  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase

Parameters
inputdata source
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ getUncertainty() [8/8]

static UncertaintyPathDep* slbm::UncertaintyPathDep::getUncertainty ( ifstream &  input,
int  phase 
)
static

Retrieve a new UncertaintyPathDep object for the specified phase loaded from specified input source.

Parameters
inputdata source
phase0:Pn, 1:Sn, 2:Pg, 3:Lg
Returns
pointer to an UncertaintyPathDep object.

◆ isRandomErrorDefined()

bool slbm::UncertaintyPathDep::isRandomErrorDefined ( ) const
inline

Returns true if random error is defined.

Returns true if random error is defined.

Definition at line 277 of file UncertaintyPathDep.h.

◆ operator!=()

bool slbm::UncertaintyPathDep::operator!= ( const UncertaintyPathDep other)
inline

Overloaded inequality operator

Parameters
otherreference to the other UncertaintyPathDep object to which this UncertaintyPathDep object is to be compared
Returns
true if this and other are not equal.

Definition at line 147 of file UncertaintyPathDep.h.

◆ operator=()

UncertaintyPathDep& slbm::UncertaintyPathDep::operator= ( const UncertaintyPathDep u)

Assignment operator.

Assignment operator.

◆ operator==()

bool slbm::UncertaintyPathDep::operator== ( const UncertaintyPathDep other)

Overloaded equality operator

Parameters
otherreference to the other UncertaintyPathDep object to which this UncertaintyPathDep object is to be compared
Returns
true if this and other are equal.

◆ readFile() [1/3]

void slbm::UncertaintyPathDep::readFile ( geotess::IFStreamAscii &  fin)

◆ readFile() [2/3]

void slbm::UncertaintyPathDep::readFile ( geotess::IFStreamBinary &  fin)

◆ readFile() [3/3]

void slbm::UncertaintyPathDep::readFile ( ifstream &  fin)

◆ toStringFile()

string slbm::UncertaintyPathDep::toStringFile ( )

◆ toStringTable()

string slbm::UncertaintyPathDep::toStringTable ( )

◆ writeFile() [1/2]

void slbm::UncertaintyPathDep::writeFile ( geotess::IFStreamAscii &  output)

◆ writeFile() [2/2]

void slbm::UncertaintyPathDep::writeFile ( geotess::IFStreamBinary &  fout)

The documentation for this class was generated from the following file: