RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
slbm::UncertaintyPDU Class Reference

A UncertaintyPDU 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 <UncertaintyPDU.h>`

## Public Member Functions
| UncertaintyPDU ()
| Default constructor.
| UncertaintyPDU (int phase)
| Parameterized constructor that defines an empty path path specific model error for the input phase.
| UncertaintyPDU (const string &phase)
| Parameterized constructor that that defines an empty path path specific model error for the input phase.
| UncertaintyPDU (string modelPath, int phase)
| Parameterized constructor that loads path dependent model error definition from a specified file.
| UncertaintyPDU (string modelPath, const string &phase)
| UncertaintyPDU (const UncertaintyPDU &u)
| Copy constructor.
virtual | ~UncertaintyPDU ()
| Destructor.
UncertaintyPDU & | operator= (const UncertaintyPDU &u)
| Assignment operator.
virtual bool | operator== (const UncertaintyPDU &other) const
virtual bool | operator!= (const UncertaintyPDU &other) const
bool | operator!= (const UncertaintyPDU &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)
void | writeFile (const string &directoryName)
int | getPhase () const
| A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
const string | getPhaseStr () const
| A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
const string & | getLoadedFileName () const
| Returns loaded file name or "not specified".
const string & | getGridId () const
| Returns the grid id for which this path dependent uncertainty objects data are defined.
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.
bool | isRandomErrorDefined () const
| Returns true if random error is defined.
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
string | toString ()

## Static Public Member Functions
static UncertaintyPDU * | getUncertainty (ifstream &input, int phase)
static UncertaintyPDU * | getUncertainty (ifstream &input, const string &phase)
static UncertaintyPDU * | getUncertainty (geotess::IFStreamAscii &input)
static UncertaintyPDU * | getUncertainty (geotess::IFStreamBinary &input)
static UncertaintyPDU * | getUncertainty (const string &modelPath, int phase)
static string | getPhase (const int &phaseIndex)
static int | getPhase (const string &phase)

## Public Attributes
map< string, string > | properties
| A map to store metadata like phase, gridId, nBins, nVertices, etc..
vector< string > | keys

## Detailed Description

A UncertaintyPDU 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 UncertaintyPDU 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 80 of file UncertaintyPDU.h.

## Constructor & Destructor Documentation

## ◆ UncertaintyPDU() [1/6]

slbm::UncertaintyPDU::UncertaintyPDU | ( |  | ) |

Default constructor.

Default constructor.

## ◆ UncertaintyPDU() [2/6]

slbm::UncertaintyPDU::UncertaintyPDU | ( | 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.

## ◆ UncertaintyPDU() [3/6]

slbm::UncertaintyPDU::UncertaintyPDU | ( | 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.

## ◆ UncertaintyPDU() [4/6]

slbm::UncertaintyPDU::UncertaintyPDU | ( | 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.

## ◆ UncertaintyPDU() [5/6]

slbm::UncertaintyPDU::UncertaintyPDU | ( | 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.

## ◆ UncertaintyPDU() [6/6]

slbm::UncertaintyPDU::UncertaintyPDU | ( | const UncertaintyPDU & | u | ) |

Copy constructor.

Copy constructor.

## ◆ ~UncertaintyPDU()

virtual slbm::UncertaintyPDU::~UncertaintyPDU | ( |  | ) |
| virtual

Destructor.

Destructor.

## Member Function Documentation

## ◆ getGridId()

const string & slbm::UncertaintyPDU::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 239 of file UncertaintyPDU.h.

## ◆ getLoadedFileName()

const string & slbm::UncertaintyPDU::getLoadedFileName | ( |  | ) | const
| inline

Returns loaded file name or "not specified".

Returns loaded file name or "not specified".

Definition at line 230 of file UncertaintyPDU.h.

## ◆ getPathUncBias() [1/2]

vector< vector< double > > & slbm::UncertaintyPDU::getPathUncBias | ( |  | ) |
| inline

Definition at line 315 of file UncertaintyPDU.h.

## ◆ getPathUncBias() [2/2]

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

Definition at line 319 of file UncertaintyPDU.h.

## ◆ getPathUncCrustError() [1/2]

vector< double > & slbm::UncertaintyPDU::getPathUncCrustError | ( |  | ) |
| inline

Definition at line 283 of file UncertaintyPDU.h.

## ◆ getPathUncCrustError() [2/2]

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

Definition at line 287 of file UncertaintyPDU.h.

## ◆ getPathUncDistanceBins() [1/2]

vector< double > & slbm::UncertaintyPDU::getPathUncDistanceBins | ( |  | ) |
| inline

Definition at line 299 of file UncertaintyPDU.h.

## ◆ getPathUncDistanceBins() [2/2]

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

Definition at line 303 of file UncertaintyPDU.h.

## ◆ getPathUncModelError() [1/2]

vector< vector< double > > & slbm::UncertaintyPDU::getPathUncModelError | ( |  | ) |
| inline

Definition at line 307 of file UncertaintyPDU.h.

## ◆ getPathUncModelError() [2/2]

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

Definition at line 311 of file UncertaintyPDU.h.

## ◆ getPathUncRandomError() [1/2]

vector< vector< double > > & slbm::UncertaintyPDU::getPathUncRandomError | ( |  | ) |
| inline

Definition at line 291 of file UncertaintyPDU.h.

## ◆ getPathUncRandomError() [2/2]

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

Definition at line 295 of file UncertaintyPDU.h.

## ◆ getPhase() [1/3]

int slbm::UncertaintyPDU::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 214 of file UncertaintyPDU.h.

## ◆ getPhase() [2/3]

string slbm::UncertaintyPDU::getPhase | ( | const int & | phaseIndex | ) |
| inline static

Definition at line 273 of file UncertaintyPDU.h.

## ◆ getPhase() [3/3]

int slbm::UncertaintyPDU::getPhase | ( | const string & | phase | ) |
| inline static

Definition at line 278 of file UncertaintyPDU.h.

## ◆ getPhaseStr()

const string slbm::UncertaintyPDU::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 223 of file UncertaintyPDU.h.

## ◆ getUncertainty() [1/6]

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

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

Parameters

  modelPath | data source path
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg

Returns
  pointer to an UncertaintyPDU object.

## ◆ getUncertainty() [2/6]

double slbm::UncertaintyPDU::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/6]

UncertaintyPDU * slbm::UncertaintyPDU::getUncertainty | ( | geotess::IFStreamAscii & | input | ) |
| static

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

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg

Returns
  pointer to an UncertaintyPDU object.

## ◆ getUncertainty() [4/6]

UncertaintyPDU * slbm::UncertaintyPDU::getUncertainty | ( | geotess::IFStreamBinary & | input | ) |
| static

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

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg

Returns
  pointer to an UncertaintyPDU object.

## ◆ getUncertainty() [5/6]

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

Retrieve a new UncertaintyPDU object for the specified phase

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg

Returns
  pointer to an UncertaintyPDU object.

## ◆ getUncertainty() [6/6]

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

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

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg

Returns
  pointer to an UncertaintyPDU object.

## ◆ isRandomErrorDefined()

bool slbm::UncertaintyPDU::isRandomErrorDefined | ( |  | ) | const
| inline

Returns true if random error is defined.

Returns true if random error is defined.

Definition at line 265 of file UncertaintyPDU.h.

## ◆ operator!=() [1/2]

bool slbm::UncertaintyPDU::operator!= | ( | const UncertaintyPDU & | other | ) |
| inline

Overloaded inequality operator

Parameters

  other | reference to the other UncertaintyPDU object to which this UncertaintyPDU object is to be compared

Returns
  true if this and other are not equal.

Definition at line 151 of file UncertaintyPDU.h.

## ◆ operator!=() [2/2]

virtual bool slbm::UncertaintyPDU::operator!= | ( | const UncertaintyPDU & | other | ) | const
| inline virtual

Definition at line 143 of file UncertaintyPDU.h.

## ◆ operator=()

UncertaintyPDU & slbm::UncertaintyPDU::operator= | ( | const UncertaintyPDU & | u | ) |

Assignment operator.

Assignment operator.

## ◆ operator==()

virtual bool slbm::UncertaintyPDU::operator== | ( | const UncertaintyPDU & | other | ) | const
| virtual

Overloaded equality operator

Parameters

  other | reference to the other UncertaintyPDU object to which this UncertaintyPDU object is to be compared

Returns
  true if this and other are equal.

## ◆ readFile() [1/3]

void slbm::UncertaintyPDU::readFile | ( | geotess::IFStreamAscii & | fin | ) |

## ◆ readFile() [2/3]

void slbm::UncertaintyPDU::readFile | ( | geotess::IFStreamBinary & | fin | ) |

## ◆ readFile() [3/3]

void slbm::UncertaintyPDU::readFile | ( | ifstream & | fin | ) |

## ◆ toString()

string slbm::UncertaintyPDU::toString | ( |  | ) |

## ◆ toStringFile()

string slbm::UncertaintyPDU::toStringFile | ( |  | ) |

## ◆ toStringTable()

string slbm::UncertaintyPDU::toStringTable | ( |  | ) |

## ◆ writeFile() [1/3]

void slbm::UncertaintyPDU::writeFile | ( | const string & | directoryName | ) |

## ◆ writeFile() [2/3]

void slbm::UncertaintyPDU::writeFile | ( | geotess::IFStreamAscii & | output | ) |

## ◆ writeFile() [3/3]

void slbm::UncertaintyPDU::writeFile | ( | geotess::IFStreamBinary & | fout | ) |

## Member Data Documentation

## ◆ keys

vector<string> slbm::UncertaintyPDU::keys

Definition at line 329 of file UncertaintyPDU.h.

## ◆ properties

map<string, string> slbm::UncertaintyPDU::properties

A map to store metadata like phase, gridId, nBins, nVertices, etc..

Definition at line 327 of file UncertaintyPDU.h.

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

- rstt_v3.2.1/SLBM/include/UncertaintyPDU.h