RSTT 3.2.1 Regional Seismic Travel Time

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

A UncertaintyPIU object contains the raw data to calculate a modeling error in seconds as a function of distance in radians. More...

`#include <UncertaintyPIU.h>`

## Public Member Functions
| UncertaintyPIU ()
| Default constructor.
| UncertaintyPIU (const int &phase, const int &attribute)
| Parameterized constructor that loads model error from a specified file.
| UncertaintyPIU (const string &phase, const string &attribute)
| Parameterized constructor that loads model error from a specified file.
| UncertaintyPIU (string modelPath, const string &phase, int phasenum)
| UncertaintyPIU (string modelPath, const int &phase, const int &attribute)
| Parameterized constructor that loads model error from a specified file.
| UncertaintyPIU (util::DataBuffer &buffer)
| Parameterized constructor that loads uncertainty data from the input DataBuffer.
| UncertaintyPIU (const UncertaintyPIU &u)
| Copy constructor.
virtual | ~UncertaintyPIU ()
| Destructor.
UncertaintyPIU & | operator= (const UncertaintyPIU &u)
| Assignment operator.
virtual bool | operator== (const UncertaintyPIU &other) const
virtual bool | operator!= (const UncertaintyPIU &other) const
bool | operator!= (const UncertaintyPIU &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.
string | getPhaseStr ()
| A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
int | getAttribute ()
| A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
string | getAttributeStr ()
| A public convenience accessor used to verify the error data for the correct model phase is loaded in memory.
double | getUncertainty (const double &distance, double depth=0.0)
| Returns the model uncertainty as a function of angular distance (radians) and depth.
double | getVariance (const double &distance, double depth=0.0)
| Returns the model variance as a function of angular distance (radians) and depth.
vector< double > & | getDistances ()
| A vector of doubles representing the angular distances (in degrees).
vector< double > & | getDepths ()
| A vector of doubles representing the depths.
vector< vector< double > > & | getValues ()
| A vector of doubles representing the model errors (in seconds).
void | writeFile (const string &directoryName)
string | toStringTable ()
string | toStringFile ()
int | getBufferSize ()
| Returns the model uncertainty DataBuffer size storage requirement.
void | serialize (util::DataBuffer &buffer)
| Writes the uncertainty object into the input DataBuffer.
void | deserialize (util::DataBuffer &buffer)
| Reads the uncertainty object from the input DataBuffer.

## Static Public Member Functions
static UncertaintyPIU * | getUncertaintyPIU (ifstream &input, const int &phase, const int &attribute)
static UncertaintyPIU * | getUncertaintyPIU (ifstream &input, const string &phase, const string &attribute)
static UncertaintyPIU * | getUncertaintyPIU (geotess::IFStreamAscii &input, const int &phase, const int &attribute)
static UncertaintyPIU * | getUncertaintyPIU (geotess::IFStreamAscii &input, const string &phase, const string &attribute)
static UncertaintyPIU * | getUncertaintyPIU (geotess::IFStreamBinary &input, const int &phase, const int &attribute)
static UncertaintyPIU * | getUncertaintyPIU (geotess::IFStreamBinary &input, const string &phase, const string &attribute)
static UncertaintyPIU * | getUncertaintyPIU (util::DataBuffer &input, const int &phase, const int &attribute)
static UncertaintyPIU * | getUncertaintyPIU (util::DataBuffer &input, const string &phase, const string &attribute)
static UncertaintyPIU * | getUncertaintyPIU (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)

## Detailed Description

A UncertaintyPIU object contains the raw data to calculate a modeling error in seconds as a function of distance in radians.

A UncertaintyPIU 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 UncertaintyPIU.h.

## Constructor & Destructor Documentation

## ◆ UncertaintyPIU() [1/7]

slbm::UncertaintyPIU::UncertaintyPIU | ( |  | ) |

Default constructor.

Default constructor.

## ◆ UncertaintyPIU() [2/7]

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

## ◆ UncertaintyPIU() [3/7]

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

## ◆ UncertaintyPIU() [4/7]

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

## ◆ UncertaintyPIU() [5/7]

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

## ◆ UncertaintyPIU() [6/7]

slbm::UncertaintyPIU::UncertaintyPIU | ( | util::DataBuffer & | buffer | ) |

Parameterized constructor that loads uncertainty data from the input DataBuffer.

Parameterized constructor that loads model error data from a file.

## ◆ UncertaintyPIU() [7/7]

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

Copy constructor.

Copy constructor.

## ◆ ~UncertaintyPIU()

virtual slbm::UncertaintyPIU::~UncertaintyPIU | ( |  | ) |
| virtual

Destructor.

Destructor.

## Member Function Documentation

## ◆ deserialize()

void slbm::UncertaintyPIU::deserialize | ( | util::DataBuffer & | buffer | ) |

Reads the uncertainty object from the input DataBuffer.

Reads the uncertainty object from the input DataBuffer.

## ◆ getAttribute() [1/3]

int slbm::UncertaintyPIU::getAttribute | ( |  | ) |
| 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 506 of file UncertaintyPIU.h.

## ◆ getAttribute() [2/3]

string slbm::UncertaintyPIU::getAttribute | ( | const int & | attributeIndex | ) |
| inline static

Definition at line 346 of file UncertaintyPIU.h.

## ◆ getAttribute() [3/3]

int slbm::UncertaintyPIU::getAttribute | ( | const string & | attribute | ) |
| inline static

Definition at line 370 of file UncertaintyPIU.h.

## ◆ getAttributeStr()

string slbm::UncertaintyPIU::getAttributeStr | ( |  | ) |
| 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 516 of file UncertaintyPIU.h.

## ◆ getBufferSize()

int slbm::UncertaintyPIU::getBufferSize | ( |  | ) |

Returns the model uncertainty DataBuffer size storage requirement.

Returns the model uncertainty DataBuffer size storage requirement.

## ◆ getDepths()

vector< double > & slbm::UncertaintyPIU::getDepths | ( |  | ) |
| inline

A vector of doubles representing the depths.

A vector of doubles representing the depths

Definition at line 314 of file UncertaintyPIU.h.

## ◆ getDistances()

vector< double > & slbm::UncertaintyPIU::getDistances | ( |  | ) |
| inline

A vector of doubles representing the angular distances (in degrees).

A vector of doubles representing the angular distances (in degrees)

Definition at line 307 of file UncertaintyPIU.h.

## ◆ getPhase() [1/3]

int slbm::UncertaintyPIU::getPhase | ( |  | ) |
| 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 501 of file UncertaintyPIU.h.

## ◆ getPhase() [2/3]

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

Definition at line 329 of file UncertaintyPIU.h.

## ◆ getPhase() [3/3]

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

Definition at line 361 of file UncertaintyPIU.h.

## ◆ getPhaseStr()

string slbm::UncertaintyPIU::getPhaseStr | ( |  | ) |
| 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 511 of file UncertaintyPIU.h.

## ◆ getUncertainty()

double slbm::UncertaintyPIU::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).

## ◆ getUncertaintyPIU() [1/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | const string & | directoryName,
|  | const int & | phase,
|  | const int & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  directoryName | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [2/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | geotess::IFStreamAscii & | input,
|  | const int & | phase,
|  | const int & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [3/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | geotess::IFStreamAscii & | input,
|  | const string & | phase,
|  | const string & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [4/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | geotess::IFStreamBinary & | input,
|  | const int & | phase,
|  | const int & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [5/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | geotess::IFStreamBinary & | input,
|  | const string & | phase,
|  | const string & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [6/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | ifstream & | input,
|  | const int & | phase,
|  | const int & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [7/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | ifstream & | input,
|  | const string & | phase,
|  | const string & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [8/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | util::DataBuffer & | input,
|  | const int & | phase,
|  | const int & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getUncertaintyPIU() [9/9]

UncertaintyPIU * slbm::UncertaintyPIU::getUncertaintyPIU | ( | util::DataBuffer & | input,
|  | const string & | phase,
|  | const string & | attribute )
| static

Retrieve a new UncertaintyPIU object for the specified phase and attribute, loaded from specified input source.

Parameters

  input | data source
  phase | 0:Pn, 1:Sn, 2:Pg, 3:Lg
  attribute | 0:TT, 1:SH, 2:AZ

Returns
  pointer to an UncertaintyPIU object. Will return null if the number of distances in the file is zero.

## ◆ getValues()

vector< vector< double > > & slbm::UncertaintyPIU::getValues | ( |  | ) |
| inline

A vector of doubles representing the model errors (in seconds).

A vector of doubles representing the model errors (in seconds)

Definition at line 321 of file UncertaintyPIU.h.

## ◆ getVariance()

double slbm::UncertaintyPIU::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).

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

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

Overloaded inequality operator

Parameters

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

Returns
  true if this and other are not equal.

Definition at line 248 of file UncertaintyPIU.h.

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

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

Definition at line 240 of file UncertaintyPIU.h.

## ◆ operator=()

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

Assignment operator.

Assignment operator.

## ◆ operator==()

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

Overloaded equality operator

Parameters

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

Returns
  true if this and other are equal.

## ◆ readFile() [1/3]

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

## ◆ readFile() [2/3]

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

## ◆ readFile() [3/3]

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

## ◆ serialize()

void slbm::UncertaintyPIU::serialize | ( | util::DataBuffer & | buffer | ) |

Writes the uncertainty object into the input DataBuffer.

Writes the uncertainty object into the input DataBuffer.

## ◆ toStringFile()

string slbm::UncertaintyPIU::toStringFile | ( |  | ) |

## ◆ toStringTable()

string slbm::UncertaintyPIU::toStringTable | ( |  | ) |

## ◆ writeFile() [1/3]

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

## ◆ writeFile() [2/3]

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

## ◆ writeFile() [3/3]

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

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

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