RSTT
3.1.0
Regional Seismic Travel Time
|
Go to the documentation of this file.
135 const double& latSource,
136 const double& lonSource,
137 const double& depthSource,
138 const double& latReceiver,
139 const double& lonReceiver,
140 const double& depthReceiver);
187 string getPhaseString();
372 double getTravelTime();
387 void getTravelTime(
double& tTotal,
double& tSource,
double& tReceiver,
388 double& tMantle,
double& tGradient);
449 double& actual_path_increment,
450 double sourceDepth[NLAYERS],
451 double sourceVelocity[NLAYERS],
452 double receiverDepth[NLAYERS],
453 double receiverVelocity[NLAYERS],
455 double headWaveVelocity[],
491 double& actual_path_increment,
492 vector<double>& sourceDepth,
493 vector<double>& sourceVelocity,
494 vector<double>& receiverDepth,
495 vector<double>& receiverVelocity,
496 vector<double>& headWaveVelocity,
497 vector<double>& gradient
529 double** coefficients,
530 const int& maxpoints,
551 void getNodeInfo( vector<vector<int> >& neighbors, vector<vector<double> >& coefficients );
595 void getWeights(vector<int>& nodeids, vector<double>& weights,
bool headWaveWeights =
true);
629 void getWeights(
int nodeids[],
double weights[],
int& nweights);
631 double getFractionActive();
637 virtual void getZhaoParameters(
double& Vm,
double& Gm,
double& H,
double& C,
double& Cm,
int& udSign) = 0;
640 double& tTaup,
double& tHeadwave,
641 double& pTaup,
double& pHeadwave,
642 double& trTaup,
double& trHeadwave)
643 { tT = tTaup = tHeadwave = pTaup = pHeadwave = trTaup = trHeadwave = NA_VALUE; };
645 virtual size_t memSize();
650 static void setDelDistance(
const double& del_distance) { DEL_DISTANCE = del_distance; }
654 static void setDelDepth(
const double& del_depth) { DEL_DEPTH = del_depth; }
658 static void setPathIncrement(
const double& path_increment) { PATH_INCREMENT = path_increment; }
669 void get_dtt_ddist(
double& dtt_ddist);
677 void get_dtt_dlat(
double& dtt_dlat);
685 void get_dtt_dlon(
double& dtt_dlon);
986 double getActualPathIncrement(
const int& i);
995 double sqr(
const double& x) {
return x*x; };
1111 inline double GreatCircle::getTravelTime()
1116 inline void GreatCircle::getTravelTime(
double& tT,
double& tS,
double& tR,
double& tM,
double& tG)
1125 inline size_t GreatCircle::memSize()
1152 +
sizeof(headWaveInterface)
1156 +
sizeof(vtp) + 3 *
sizeof(
double)
1158 +
sizeof(solutionMethod)
1160 +
sizeof(actual_path_increment)
1163 +
sizeof(rayParameter)
1172 +
sizeof(xHorizontal)
1173 +
sizeof(tHorizontal)
1175 +
sizeof(sourceRayParameter)
1176 +
sizeof(receiverRayParameter)
1177 +
sizeof(turningRadius)
1178 +
sizeof(sourceIndex)
1179 +
sizeof(receiverIndex)
1195 inline double GreatCircle::getActualPathIncrement(
const int& i)
1199 if (i > sourceIndex && i < receiverIndex)
1200 return actual_path_increment;
1207 if (i == sourceIndex && i == receiverIndex)
1208 return distance - xSource - xReceiver;
1213 if (i == sourceIndex)
1214 return (sourceIndex+1)*actual_path_increment - xSource;
1221 if (i == receiverIndex)
1222 return distance - xReceiver - receiverIndex*actual_path_increment;
1227 inline string GreatCircle::getPhaseString()
1229 return (phase==Pn ?
"Pn" : (phase==Sn ?
"Sn" : (phase==Pg ?
"Pg" : (phase==Lg ?
"Lg"
1230 :
"unknown phase"))));
1233 inline double GreatCircle::getFractionActive()
1236 for (
int i=0; i<(int)profiles.size(); ++i)
1237 if (getProfile(i)->isActiveProfile())
1239 return ((
double)nactive)/((
double)profiles.size());
1242 inline void GreatCircle::get_dtt_ddist(
double& dtt_ddist)
1244 if (getTravelTime() > -1.)
1245 dtt_ddist = (get_ttHplus() - getTravelTime())/DEL_DISTANCE;
1247 dtt_ddist = NA_VALUE;
1250 inline void GreatCircle::get_dtt_dlat(
double& dtt_dlat)
1252 if (getTravelTime() > -1.)
1253 dtt_dlat = (get_ttNorth() - getTravelTime())/DEL_DISTANCE;
1255 dtt_dlat = NA_VALUE;
1258 inline void GreatCircle::get_dtt_dlon(
double& dtt_dlon)
1260 if (getTravelTime() > -1.)
1261 dtt_dlon = (get_ttEast() - getTravelTime())/DEL_DISTANCE;
1263 dtt_dlon = NA_VALUE;
1303 #endif // GreatCircle.h
double get_ttSouth()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
static void setPathIncrement(const double &path_increment)
static double getDelDepth()
vector< LayerProfile * > profiles
The LayerProfile objects which are positioned on the interface along which the head wave propagates.
double sSource
The ray length from the source Location to the source pierce point, in km.
double tHorizontal
The time spent by the ray traveling horizontally as a head wave, in seconds.
double get_ttZplus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
double getReceiverDistanceX()
Retrieve horizontal offset below the receiver, in radians.
double getTurningRadius()
virtual string toString(const int &verbosity)=0
Retrieve a formatted string providing a detailed description of the information managed by this Great...
double get_ttNorth()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
double get_ttHminus()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
double get_ttZminus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
The Location Class manages a single point in/on the Earth, which is described by the GRS80 ellipsoid.
virtual void computeTravelTime()=0
Method to compute the travel time from source to receiver, in seconds.
double get_ttHZplus()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
double sqr(const double &x)
Location location
A Location object used in a variety of places to manipulate Location information.
double esaz
The source-receiver azimuth, in radians.
void getData(int &phase, double &actual_path_increment, double sourceDepth[NLAYERS], double sourceVelocity[NLAYERS], double receiverDepth[NLAYERS], double receiverVelocity[NLAYERS], int &npoints, double headWaveVelocity[], double gradient[])
Retrieve information about the great circle path including the interface depths at source and receive...
double sourceRayParameter
virtual ~GreatCircle()
Destructor. Deletes LayerProfile objects associated with this GreatCircle object.
static double DEL_DISTANCE
double get_ttNorthZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
double get_ttEast()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
double getSourceRayParameter()
int getNProfiles()
Retrieve the number of LayerProfile object positioned along the head wave interface.
double get_ttHplus()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
CrustalProfile * receiver
The receiver CrustalProfile object.
virtual void getPgLgComponents(double &tT, double &tTaup, double &tHeadwave, double &pTaup, double &pHeadwave, double &trTaup, double &trHeadwave)
static double getPathIncrement()
static double PATH_INCREMENT
the desired spacing of great circle nodes along the head wave interface, in radians.
double tSource
The time required for the ray to travel from the source Location to piercePointSource,...
CrustalProfile * getSourceProfile()
Retrieve a pointer to the source CrustalProfile.
double getSourceDistanceS()
Retrieve the ray length below the source, in km.
void getData(int &phase, double &actual_path_increment, vector< double > &sourceDepth, vector< double > &sourceVelocity, vector< double > &receiverDepth, vector< double > &receiverVelocity, vector< double > &headWaveVelocity, vector< double > &gradient)
Retrieve information about the great circle path including the interface depths at source and receive...
double getReceiverDistance()
Retrieve horizontal offset below the receiver, in radians.
virtual void getZhaoParameters(double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)=0
A profile through the Earth model that stores interface radius, and interval P or S wave velocity inf...
CrustalProfile * source
The source CrustalProfile object.
A 2 dimensional, horizontal grid of GirdProfile objects.
int sourceIndex
The index of the element in the profiles array corresponding to the horizontal increment in which the...
static int greatCircleClassCount
LayerProfile * getProfile(const int &i)
Retrieve a pointer to one of the LayerProfile objects that comprise the head wave portion of the ray ...
double getSourceDistance()
Retrieve horizontal offset below the source, in radians.
int receiverIndex
The index of the element in the profiles array corresponding to the horizontal increment in which the...
void getLayerProfileLocation(const int &i, Location &loc)
Retrieve the Location of a LayerProfile.
A Profile object based on values interpolated from nearby GridProfile objects.
GreatCircle & operator=(const GreatCircle &other)
Equal operator.
double getSourceDistanceZ()
Retrieve vertical offset below the source, in km.
double getReceiverDistanceZ()
Retrieve vertical offset below the receiver, in km.
GreatCircle(const GreatCircle &other)
Copy constructor.
double getReceiverDistanceS()
Retrieve the ray length below the receiver, in km.
double get_ttEastZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
int headWaveInterface
The index of the earth model interface along which head waves propagate. If phase is Pn or Sn,...
void getNodeInfo(int **neighbors, double **coefficients, const int &maxpoints, const int &maxnodes, int &npoints, int *nnodes)
Retrieve information about the interpolated points along the headwave path, including the number of p...
double xSource
The horizontal distance from the source Location to the source pierce point, in radians.
double tTotal
The total travel time from source to receiver, in seconds.
double receiverRayParameter
int getPhase()
Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn,...
double getDistance()
Retrieve source-receiver separation, in radians.
const int & getHeadWaveInterface()
Retrieve the index of the head wave interface (SLBMGlobals::MANTLE for Pn, Sn; SLBMGlobals::MIDDLE_CR...
double tGamma
The gradient correction term of the total travel time, in sec.
double zSource
The vertical distance from the source Location to the source pierce point, in km.
void getNodeInfo(vector< vector< int > > &neighbors, vector< vector< double > > &coefficients)
Retrieve information about the interpolated points along the headwave path, including the number of p...
double zReceiver
The vertical distance from the receiver Location to the receiver pierce point, in km.
double get_ttWest()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
static double getDelDistance()
void getWeights(vector< int > &nodeids, vector< double > &weights, bool headWaveWeights=true)
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
void getWeights(int nodeids[], double weights[], int &nweights)
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
GreatCircle(const int &_phase, Grid &_grid, const double &latSource, const double &lonSource, const double &depthSource, const double &latReceiver, const double &lonReceiver, const double &depthReceiver)
Parameterized constructor.
double xHorizontal
The horizontal distance traveled by the ray as a head wave, in km.
static void setDelDepth(const double &del_depth)
static void setDelDistance(const double &del_distance)
double getSourceDistanceX()
Retrieve horizontal offset below the source, in radians.
int phase
The phase that this GreatCircle object is set up for (Pn, Sn, Pg or Lg).
static double MAX_DISTANCE
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
double getHeadwaveDistance()
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
void getGreatCircleLocation(const double &distance, Location &loc)
Retrieve a location object that is located on the great circle at specified distance from source.
double distance
The horizontal source-receiver separation, in radians.
double sReceiver
The path length from the receiver Location to the receiver pierce point, in km.
double actual_path_increment
The actual spacing between the elements of profiles, in radians.
Grid & getGrid()
Retrieve a reference to the Grid object that this GreatCircle is associated with.
double getHeadwaveDistanceKm()
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
static int getClassCount()
CrustalProfile * getReceiverProfile()
Retrieve a pointer to the receiver CrustalProfile.
double tReceiver
The time required for the ray to travel from the receiver pierce point to the receiver Location,...
double getReceiverRayParameter()
Grid & grid
A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfil...
The GreatCircle class manages information related to a great circle path between two Locations on the...
double xReceiver
The horizontal distance from the receiver Location to the receiver pierce point, in radians.
string solutionMethod
The method used to calculate travel times.
double getActualPathIncrement()
Retrieve horizontal separation of LayerProfiles, in radians.
double getEsaz()
Retrieve source-receiver azimuth, in radians.
void get_dtt_ddepth(double &dtt_ddepth)
Retrieve the derivative of travel time wrt to source depth, in seconds/km.