travel time interface class
More...
#include <TTT.h>
|
| | CTTT () |
| | CTTT constructor. More...
|
| |
| | CTTT (const CTTT &ttt) |
| | CTTT copy constructor. More...
|
| |
| | ~CTTT () |
| | CTTT destructor. More...
|
| |
| void | writeToFiles (std::string outDir, double depth) |
| | Write out travel times to files. More...
|
| |
| void | clear () |
| | CTTT clear function. More...
|
| |
| bool | addPhase (std::string phase, double *assocRange=NULL, std::string file="", bool useForLocation=true, double minPublishable=0, double maxPublishable=180) |
| | Add phase to list to be calculated. More...
|
| |
| void | setTTOrigin (double lat, double lon, double z) |
| | Set hypocenter for calculations. More...
|
| |
| void | setTTOrigin (const glass3::util::Geo &geoOrigin) |
| | Set current geographic location. More...
|
| |
| double | T (glass3::util::Geo *geo, std::string phase="P") |
| | Calculate travel time in seconds. More...
|
| |
| double | T (double delta, std::string phase="P") |
| | Calculate travel time in seconds. More...
|
| |
| double | Td (double delta, std::string phase="P", double depth=0.0) |
| | Calculate travel time in seconds, setting depth. More...
|
| |
| double | T (glass3::util::Geo *geo, double tobs) |
| | Calculate best travel time in seconds. More...
|
| |
travel time interface class
The traveltime CTTT class is a class serves as the interface between glass core and a set of phase specific CTravelTime objects. CTTT supports calculating travel times based on distance or geographic location for the phases in the set of CTravelTime objects.
| traveltime::CTTT::CTTT |
( |
| ) |
|
CTTT constructor.
The constructor for the CTTT class.
| traveltime::CTTT::CTTT |
( |
const CTTT & |
ttt | ) |
|
CTTT copy constructor.
The copy constructor for the CTTT class.
| traveltime::CTTT::~CTTT |
( |
| ) |
|
CTTT destructor.
The destructor for the CTTT class.
| bool traveltime::CTTT::addPhase |
( |
std::string |
phase, |
|
|
double * |
assocRange = NULL, |
|
|
std::string |
file = "", |
|
|
bool |
useForLocation = true, |
|
|
double |
minPublishable = 0, |
|
|
double |
maxPublishable = 180 |
|
) |
| |
Add phase to list to be calculated.
Creates a new CTravelTime object using the already set pRay and the provided phase name, and adds the object to the pTrv list.
- Parameters
-
| phase | - A std::string containing the phase name to use |
| assocRange | - An array of 2 double values containing the association range, mutually exclusive with weightRange |
| file | - A std::string representing the file to load, default is "" |
| useForLocation | - A boolen flag indicating whether this phase should be used in generating locations, default is true |
| minPublishable | - A double value containing the minumum distance in degrees to publish this phase. |
| minPublishable | - A double value containing the maximum distance in degrees to publish this phase. |
- Returns
- Returns true if successful, false otherwise
| void traveltime::CTTT::clear |
( |
| ) |
|
| void traveltime::CTTT::setTTOrigin |
( |
double |
lat, |
|
|
double |
lon, |
|
|
double |
z |
|
) |
| |
Set hypocenter for calculations.
Set hypocenter for calculations using the provided latitude, longitude, and depth
- Parameters
-
| lat | - A double value containing the latitude to use |
| lon | - A double value containing the longitude to use |
| z | - A double value containing the depth to use |
Set current geographic location.
Set the current geographic location using the provided CGeo. This will set the source location used for source/receiver traveltime calculations.
- Parameters
-
| geoOrigin | - A CGeo representing the lat/lon and surface depth (or elev) of the source, along with already computed concentric lat/lon and vector coordinates. |
Calculate travel time in seconds.
Calculate travel time in seconds given geographic location and the desired phase
- Parameters
-
| geo | - A pointer to a glass3::util::Geo object representing the location to calculate the travel time from |
| phase | - A std::std::string containing the phase to use in calculating the travel time, default is "P" |
- Returns
- Returns the travel time in seconds, or -1.0 if there is no valid travel time
| double traveltime::CTTT::T |
( |
double |
delta, |
|
|
std::string |
phase = "P" |
|
) |
| |
Calculate travel time in seconds.
Calculate travel time in seconds given distance in degrees and the desired phase
- Parameters
-
| delta | - A double value containing the distance in degrees to calculate travel time from |
| phase | - A std::std::string containing the phase to use in calculating the travel time, default is "P" |
- Returns
- Returns the travel time in seconds, or -1.0 if there is no valid travel time
Calculate best travel time in seconds.
Calculate best travel time in seconds given geographic location and the observed arrival time
- Parameters
-
| geo | - A pointer to a glass3::util::Geo object representing the location to calculate the travel time from |
| tobs | - A double value containing the observed arrival time. |
- Returns
- Returns the travel time in seconds, or -1.0 if there is no valid travel time
| double traveltime::CTTT::Td |
( |
double |
delta, |
|
|
std::string |
phase = "P", |
|
|
double |
depth = 0.0 |
|
) |
| |
Calculate travel time in seconds, setting depth.
Calculate travel time in seconds given distance in degrees and the desired phase
- Parameters
-
| delta | - A double value containing the distance in degrees to calculate travel time from |
| phase | - A std::std::string containing the phase to use in calculating the travel time, default is "P" |
| depth | - A double containing specific depth |
- Returns
- Returns the travel time in seconds, or -1.0 if there is no valid travel time
| void traveltime::CTTT::writeToFiles |
( |
std::string |
outDir, |
|
|
double |
depth |
|
) |
| |
Write out travel times to files.
This function prints the available travel time points for the travel time contained in this TravelTime at a given depth to a given file.
- Parameters
-
| outPath | - A std::string containing the directory to write to. |
| depth | - A double containing the depth to use |
| constexpr double traveltime::CTTT::k_dTTTooLargeToBeValid = 1000.0 |
|
static |
Print Travel Times to File.
Prints travel-times for a phase for testing purposes A value representing a travel time that is too large to be valid
| const int traveltime::CTTT::k_iMaximumNumberOfTravelTimes = 40 |
|
static |
The maximum number of supported travel times.
An array of doubles containing the maximum distance values for association.
An array of doubles containing the minimum distance values for association.
| bool traveltime::CTTT::m_bPublishable |
A temporary boolean flag indicating whether this CTravelTime should be published in output messages.
| bool traveltime::CTTT::m_bUseForLocations |
A temporary boolean flag indicating whether this CTravelTime should be used in generating locations.
glass3::util::Geo object containing current geographic location of source(as in source/receiver). Set by setOrigin()
| int traveltime::CTTT::m_iNumTravelTimes |
An integer variable containing number of CTravelTime objects in pTrv.
An array of pointers to CTravelTime objects for each phase.
| std::string traveltime::CTTT::m_sPhase |
A temporary std::std::string variable containing the phase determinedduring the last call to T()
The documentation for this class was generated from the following files:
- glasscore/traveltime/include/TTT.h
- glasscore/traveltime/src/TTT.cpp