38 #ifndef UncertaintyPDU_H
39 #define UncertaintyPDU_H
49 #include "IFStreamAscii.h"
50 #include "IFStreamBinary.h"
143 virtual bool operator != (
const UncertaintyPDU& other)
const {
return !(*
this == other); } ;
224 return getPhase(phaseNum);
257 const vector<int>& crustNodeIds,
const vector<double>& crustWeights,
258 const vector<int>& headWaveNodeIds,
const vector<double>& headWaveWeights,
259 const vector<vector<int> >& headWaveNodeNeighbors,
const bool& calcRandomError =
false,
260 bool printDebugInfo =
false);
266 return (pathUncRandomError.size() > 0);
275 return UncertaintyPIU::getPhase(phaseIndex);
280 return UncertaintyPIU::getPhase(phase);
284 return pathUncCrustError;
288 return pathUncCrustError;
292 return pathUncRandomError;
296 return pathUncRandomError;
300 return pathUncDistanceBins;
304 return pathUncDistanceBins;
308 return pathUncModelError;
312 return pathUncModelError;
339 void readFile(
const string& filename);
365 vector<double> pathUncCrustError;
371 vector<double> pathUncDistanceBins;
379 vector<vector<double> > pathUncRandomError;
386 vector<vector<double> > pathUncModelError;
393 vector<vector<double> > pathUncBias;
A UncertaintyPDU object contains the raw data to calculate a path dependent modeling error in seconds...
void readFile(geotess::IFStreamBinary &fin)
int getPhase() const
A public convenience accessor used to verify the error data for the correct model phase is loaded in ...
vector< double > & getPathUncDistanceBins()
UncertaintyPDU(int phase)
Parameterized constructor that defines an empty path path specific model error for the input phase.
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 indice...
vector< double > & getPathUncCrustError()
UncertaintyPDU(const string &phase)
Parameterized constructor that that defines an empty path path specific model error for the input pha...
const vector< double > & getPathUncCrustError() const
void readFile(geotess::IFStreamAscii &fin)
static UncertaintyPDU * getUncertainty(ifstream &input, const string &phase)
const vector< vector< double > > & getPathUncBias() const
static int getPhase(const string &phase)
const vector< vector< double > > & getPathUncModelError() const
const string & getLoadedFileName() const
Returns loaded file name or "not specified".
const vector< double > & getPathUncDistanceBins() const
void writeFile(geotess::IFStreamBinary &fout)
void writeFile(const string &directoryName)
vector< vector< double > > & getPathUncRandomError()
bool operator!=(const UncertaintyPDU &other)
UncertaintyPDU & operator=(const UncertaintyPDU &u)
Assignment operator.
vector< vector< double > > & getPathUncBias()
static UncertaintyPDU * getUncertainty(ifstream &input, int phase)
UncertaintyPDU(const UncertaintyPDU &u)
Copy constructor.
virtual ~UncertaintyPDU()
Destructor.
void readFile(ifstream &fin)
UncertaintyPDU(string modelPath, int phase)
Parameterized constructor that loads path dependent model error definition from a specified file.
const vector< vector< double > > & getPathUncRandomError() const
static string getPhase(const int &phaseIndex)
UncertaintyPDU(string modelPath, const string &phase)
static UncertaintyPDU * getUncertainty(geotess::IFStreamAscii &input)
const string & getGridId() const
Returns the grid id for which this path dependent uncertainty objects data are defined.
static UncertaintyPDU * getUncertainty(geotess::IFStreamBinary &input)
map< string, string > properties
A map to store metadata like phase, gridId, nBins, nVertices, etc..
vector< vector< double > > & getPathUncModelError()
bool isRandomErrorDefined() const
Returns true if random error is defined.
void writeFile(geotess::IFStreamAscii &output)
static UncertaintyPDU * getUncertainty(const string &modelPath, int phase)
UncertaintyPDU()
Default constructor.
const string getPhaseStr() const
A public convenience accessor used to verify the error data for the correct model phase is loaded in ...