RSTT: slbm::CrustalProfile Class Reference

RSTT 3.1.0 Regional Seismic Travel Time

Public Member Functions | Static Public Member Functions | List of all members
slbm::CrustalProfile Class Reference

A profile through the Earth model that stores interface radius, and interval P or S wave velocity information about the crustal stack below either the source or the receiver. More...

`#include <CrustalProfile.h>`

Inheritance diagram for slbm::CrustalProfile:

## Public Member Functions
| CrustalProfile ()
| Default constructor. More...
| CrustalProfile (const CrustalProfile &CrustalProfile)
| Copy constructor. More...
virtual | ~CrustalProfile ()
CrustalProfile & | operator= (const CrustalProfile &other)
| Equal operator. More...
bool | operator== (const CrustalProfile &other)
| Equality operator. More...
bool | operator!= (const CrustalProfile &other)
| Inequality operator. More...
void | setup (Grid &grid, const int &phase, const double &lat, const double &lon, const double &depth)
| Parameterized constructor. More...
const Location & | getLocation () const
| Retrieve a const reference to the Location associated with this Profile. More...
double | getEarthRadius ()
int | getNIntervals ()
| Retrieve the number of intervals associated with this Profile. More...
void | getData (vector< double > &depths, vector< double > &velocities)
| Retrieve all the interval depth and velocity information contained in this CrustalProfile object. More...
double | getInterfaceRadius (const int &k)
| Retrieve the radius of the top of the k'th interval, in km. More...
void | getDepths (double *depths)
| Retrieve the depths of the top of each intervals, in km. More...
double * | getVelocities ()
| Retrieve the P or S wave velocity of each interval, in km/sec. More...
double | getDepth (const int &k)
| Retrieve the depth of the top of the k'th interval, in km. More...
double | getVelocity (const int &k)
| Retrieve the P or S wave velocity of the k'th interval, in km/sec. More...
double | getPCrit (GreatCircle *greatCircle)
| Retrieve the critical spherical ray parameter for this profile, in radians/seconds. More...
void | xtCrust (GreatCircle *greatCircle, const double &rayParameter, double &xTotal, double &zTotal, double &sTotal, double &tTotal)
| Compute the horizontal offset (radians) and the travel time (sec) of the ray through the crust. More...
void | xtCrust (GreatCircle *greatCircle, const double &rayParameter, int layid[], double x[], double r[], double v[], double t[], int &npoints)
| Compute the horizontal offset (radians) and the travel time (sec) of the ray through the crust. More...
const int * | getLayid ()
int | getNLayid ()
int | getTopLayid ()
string | toString (GreatCircle *greatCircle, double rayParameter)
| Returns a formatted string containing detailed information about this Profile. More...
string | toString ()
size_t | memSize ()
void | setTauPSite (taup::TauPSite *tps)
| Set the input TauPSite into this CrustalProfile;. More...
taup::TauPSite * | getTauPSite ()
| Return this CrustalProfiles TauPSite object;. More...
bool | isInCrust ()
| true location radius > moho radius. More...
Public Member Functions inherited from slbm::InterpolatedProfile
| InterpolatedProfile ()
| Default constructor. More...
| InterpolatedProfile (Grid &grid, Location &location)
| Parameterized constructor. More...
| InterpolatedProfile (const InterpolatedProfile &other)
| Copy constructor. More...
virtual | ~InterpolatedProfile ()
| Destructor. More...
InterpolatedProfile & | operator= (const InterpolatedProfile &other)
| Equal operator. More...
bool | operator== (const InterpolatedProfile &other)
| Equality operator. More...
bool | operator!= (const InterpolatedProfile &other)
| Inequality operator. More...
int | getNCoefficients ()
vector< GridProfile * > & | getNodes ()
| Retrieve a list of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
GridProfile * | getNode (const int &i)
vector< int > & | getNodeIds ()
int | getNodeId (const int &i)
vector< double > & | getCoefficients ()
| Retrieve the interpolation coefficients that define the dependency of this InterpolatedProfile on its neighbors. More...
double | getCoefficient (const int &i)
void | getNodeIds (int *nodeIds, int &size)
| Retrieve the ID numbers of the GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. More...
void | getCoefficients (double *coeff, int &size)
| Retrieve the interpolation coefficients that were applied to the neighboring GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. More...
void | getWeights (int *nodeIds, double *coeff, int &size)
void | interpRadius (const int &k, double &radius)
| Calculate a single radius value based on the neighboring GridProfile objects and the interpolation coefficients. More...
void | interpDepth (const int &k, double &depth)
| Calculate a single depth value based on the neighboring GridProfile objects and the interpolation coefficients. More...
void | interpVelocity (const int &type, const int &k, double &velocity)
| Calculate a single velocity value based on the neighboring GridProfile objects and the interpolation coefficients. More...
void | interpGradient (const int &type, double &gradient)
| Calculate a single gradient value based on the neighboring GridProfile objects and the interpolation coefficients. More...
bool | isActiveProfile ()
| Returns true if all of the neighboring GridProfile objects. More...

## Static Public Member Functions
static int | getClassCount ()
Static Public Member Functions inherited from slbm::InterpolatedProfile
static int | getClassCount ()

## Additional Inherited Members
Protected Attributes inherited from slbm::InterpolatedProfile
vector< GridProfile * > | nodes
| An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
vector< int > | nodeIds
| An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
vector< double > | coefficients
| The interpolation coefficients which should be applied to this InterpolatedProfile's neighbors in order to compute interpolated quantities. More...
Static Protected Attributes inherited from slbm::InterpolatedProfile
static int | interpolatedProfileClassCount

## Detailed Description

A profile through the Earth model that stores interface radius, and interval P or S wave velocity information about the crustal stack below either the source or the receiver.

The CrustalProfile class represents a Profile based on radius and P or S wave velocity values interpolated from values of nearby GridProfile objects. A CrustalProfile object should be acquired by calling Grid::getCrustalProfile().

CrustalProfile owns a Location object which defines a point in the Earth. For CrustalProfile objects that represent a seismic source, the Location object represents the latitude, longitude and depth of the event. For CrustalProfile objects that represent a seismic receiver, the Location object represents the latitude, longitude and depth (negative elevation) of the receiver.

Each instance of a CrustalProfile is populated with only the information needed to compute crustal travel time for a particular phase. Supported phases are Pn, Sn, Pg and Lg. Since mantle velocity gradient information is not required to compute crustal travel times, CrustalProfile objects do not store mantle gradient information. CrustalProfile objects to support Pn or Pg store only P wave velocities while those instantiated to support Sn or Lg only store S wave velocity information.

The xtCrust() function computes the travel time (in seconds) and the horizontal offset (in radians) of the ray as it traverses the crust from the depth of the Location object down to the head wave interface (Moho or top of middle crust). xtCrust takes a ray parameter as an arguement. The function will always return an offset and travel time because if the ray parameter exceeds the critical ray parameter for any of the velocity interfaces that the ray has to interact with, the function will decrease the ray parameter enough to successfully travel from the Location depth to the deepest interface it knows about, using a constant ray parameter over the distance traveled.

CrustalProfile objects can be members of multiple GreatCircle objects. Grid maintains a map that associates a phase/Location combination with a particular instance of a CruatalProfile. The map can be cleared by calling Grid::clearCrustalProfiles(), which is also accessible from SlbmInterface::clear().

Definition at line 63 of file CrustalProfile.h.

## Constructor & Destructor Documentation

## ◆ CrustalProfile() [1/2]

slbm::CrustalProfile::CrustalProfile | ( |  | ) |

Default constructor.

Default constructor.

## ◆ CrustalProfile() [2/2]

slbm::CrustalProfile::CrustalProfile | ( | const CrustalProfile & | CrustalProfile | ) |

Copy constructor.

Copy constructor.

## ◆ ~CrustalProfile()

virtual slbm::CrustalProfile::~CrustalProfile | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ getClassCount()

static int slbm::CrustalProfile::getClassCount | ( |  | ) |
| static

## ◆ getData()

void slbm::CrustalProfile::getData | ( | vector< double > & | depths,
|  | vector< double > & | velocities
| ) |  |
| inline

Retrieve all the interval depth and velocity information contained in this CrustalProfile object.

Retrieve all the interval depth and velocity information contained in this CrustalProfile object.

Definition at line 405 of file CrustalProfile.h.

## ◆ getDepth()

double slbm::CrustalProfile::getDepth | ( | const int & | k | ) |
| inline

Retrieve the depth of the top of the k'th interval, in km.

Retrieve the depth of the top of the k'th interval, in km.

Definition at line 418 of file CrustalProfile.h.

## ◆ getDepths()

void slbm::CrustalProfile::getDepths | ( | double * | depths | ) |
| inline

Retrieve the depths of the top of each intervals, in km.

Retrieve the depths of the top of each intervals, in km.

Definition at line 423 of file CrustalProfile.h.

## ◆ getEarthRadius()

double slbm::CrustalProfile::getEarthRadius | ( |  | ) |
| inline

Definition at line 154 of file CrustalProfile.h.

## ◆ getInterfaceRadius()

double slbm::CrustalProfile::getInterfaceRadius | ( | const int & | k | ) |
| inline

Retrieve the radius of the top of the k'th interval, in km.

Retrieve the radius of the top of the k'th interval, in km.

Definition at line 171 of file CrustalProfile.h.

## ◆ getLayid()

const int* slbm::CrustalProfile::getLayid | ( |  | ) |
| inline

Definition at line 290 of file CrustalProfile.h.

## ◆ getLocation()

const Location& slbm::CrustalProfile::getLocation | ( |  | ) | const
| inline

Retrieve a const reference to the Location associated with this Profile.

Retrieve a const reference to the Location associated with this Profile.

Since the Location retrieved is const, the calling application will not be allowed to modify the position of the Location.

Definition at line 152 of file CrustalProfile.h.

## ◆ getNIntervals()

int slbm::CrustalProfile::getNIntervals | ( |  | ) |
| inline

Retrieve the number of intervals associated with this Profile.

Retrieve the number of intervals associated with this Profile.

Definition at line 159 of file CrustalProfile.h.

## ◆ getNLayid()

int slbm::CrustalProfile::getNLayid | ( |  | ) |
| inline

Definition at line 292 of file CrustalProfile.h.

## ◆ getPCrit()

double slbm::CrustalProfile::getPCrit | ( | GreatCircle * | greatCircle | ) |
| inline

Retrieve the critical spherical ray parameter for this profile, in radians/seconds.

Retrieve the critical spherical ray parameter for this profile, in radians/seconds. This is R / V where R is the radius at the top of the bottom interval in this profile and V is the velocity of the bottom interval. For Pn and Sn, R will be the radius of the Moho. For Pg and Lg, R will be the radius of the top of the middle crust. For Pn and Pg, V will be the P wave velocity, for Sn and Lg, V will be the S wave velocity.

Parameters

  greatCircle | the GreatCircle object that knows which head wave interface to use to compute the interface radius.

Definition at line 430 of file CrustalProfile.h.

## ◆ getTauPSite()

taup::TauPSite* slbm::CrustalProfile::getTauPSite | ( |  | ) |

Return this CrustalProfiles TauPSite object;.

## ◆ getTopLayid()

int slbm::CrustalProfile::getTopLayid | ( |  | ) |
| inline

Definition at line 294 of file CrustalProfile.h.

## ◆ getVelocities()

double* slbm::CrustalProfile::getVelocities | ( |  | ) |
| inline

Retrieve the P or S wave velocity of each interval, in km/sec.

Retrieve the P or S wave velocity of each interval, in km/sec.

Definition at line 181 of file CrustalProfile.h.

## ◆ getVelocity()

double slbm::CrustalProfile::getVelocity | ( | const int & | k | ) |
| inline

Retrieve the P or S wave velocity of the k'th interval, in km/sec.

Retrieve the P or S wave velocity of the k'th interval, in km/sec.

Definition at line 191 of file CrustalProfile.h.

## ◆ isInCrust()

bool slbm::CrustalProfile::isInCrust | ( |  | ) |
| inline

true location radius > moho radius.

true if location radius > moho radius.

Definition at line 320 of file CrustalProfile.h.

## ◆ memSize()

size_t slbm::CrustalProfile::memSize | ( |  | ) |
| virtual

Reimplemented from slbm::InterpolatedProfile.

## ◆ operator!=()

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

Inequality operator.

Inequality operator.

Definition at line 130 of file CrustalProfile.h.

## ◆ operator=()

CrustalProfile& slbm::CrustalProfile::operator= | ( | const CrustalProfile & | other | ) |

Equal operator.

Equal operator.

## ◆ operator==()

bool slbm::CrustalProfile::operator== | ( | const CrustalProfile & | other | ) |

Equality operator.

Equality operator.

## ◆ setTauPSite()

void slbm::CrustalProfile::setTauPSite | ( | taup::TauPSite * | tps | ) |

Set the input TauPSite into this CrustalProfile;.

## ◆ setup()

void slbm::CrustalProfile::setup | ( | Grid & | grid,
|  | const int & | phase,
|  | const double & | lat,
|  | const double & | lon,
|  | const double & | depth
| ) |  |

Parameterized constructor.

Parameterized constructor that builds a CrustalProfile object based on values interpolated from nearby GridProfile objects.

Parameters

  grid | a reference to the Grid object. Grid::findProfile() will be called to retrieve the neighbors and interpolation coefficients.
  phase | the seismic phase that this CrustalProfile is to support. Must be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg, SLBMGlobals::Lg.
  lat | geographic latitude of the source or receiver in radians.
  lon | geographic longitude of the source or receiver in radians.
  depth | the depth of the source or receiver in km.

## ◆ toString() [1/2]

string slbm::CrustalProfile::toString | ( |  | ) |

## ◆ toString() [2/2]

string slbm::CrustalProfile::toString | ( | GreatCircle * | greatCircle,
|  | double | rayParameter
| ) |  |

Returns a formatted string containing detailed information about this Profile.

Returns a formatted string containing detailed information about this Profile.

Parameters

  greatCircle | the GreatCircle object, of which this CrustalProfile is a member, that is requesting the information.
  rayParameter | the ray parameter to use to compute interval horizontal This method calls xtCrust() to compute horizontal offsets and travel times in each crustal layer.

## ◆ xtCrust() [1/2]

void slbm::CrustalProfile::xtCrust | ( | GreatCircle * | greatCircle,
|  | const double & | rayParameter,
|  | double & | xTotal,
|  | double & | zTotal,
|  | double & | sTotal,
|  | double & | tTotal
| ) |  |

Compute the horizontal offset (radians) and the travel time (sec) of the ray through the crust.

Computes the travel time (in seconds) and the horizontal offset (in radians) of the ray as it traverses the crust from the depth of the Location object down to the head wave interface (Moho for Pn and Sn, top of middle crust for Pg and Lg).

The horizontal offset is the angular separation of the Location object owned by this CrustalProfile and the pierce point of the ray on the head wave interface.

The function will always return an offset and travel time because if the ray parameter exceeds the critical ray parameter for any of the velocity interfaces that the ray has to interact with, the function will decrease the ray parameter enough to successfully travel from the Location depth to the deepest interface it knows about, using a constant ray parameter over the distance traveled.

Parameters

  greatCircle | the GreatCircle object, of which this CrustalProfile is a member, that is requesting the information.
  rayParameter | the spherical ray parameter, in radians/sec.
  xTotal | the total horizontal offset of the ray as it travelled through the crust, in radians.
  zTotal | the total vertical offset of the ray as it traveled through the crust, in km
  sTotal | the total path length of the ray as it traeled through the crust, in km
  tTotal | the total travel time of the ray through the crust, in seconds.

## ◆ xtCrust() [2/2]

void slbm::CrustalProfile::xtCrust | ( | GreatCircle * | greatCircle,
|  | const double & | rayParameter,
|  | int | layid[],
|  | double | x[],
|  | double | r[],
|  | double | v[],
|  | double | t[],
|  | int & | npoints
| ) |  |

Compute the horizontal offset (radians) and the travel time (sec) of the ray through the crust.

Computes the travel time (in seconds) and the horizontal offset (in radians) of the ray as it traverses the crust from the depth of the Location object down to the head wave interface (Moho for Pn and Sn, top of middle crust for Pg and Lg).

Unlike the other version of xtCrust(), this version returns information about the horizontal offset and travel time at each interface of the crust that the ray interacts with.

The horizontal offset is the angular separation of the Location object owned by this CrustalProfile and the pierce point of the ray on the head wave interface.

The function will always return offset and travel time information because if the ray parameter exceeds the critical ray parameter for any of the velocity interfaces that the ray has to interact with, the function will decrease the ray parameter enough to successfully travel from the Location depth to the deepest interface it knows about, using a constant ray parameter over the distance traveled.

Parameters

  greatCircle | the GreatCircle object, of which this CrustalProfile is a member, that is requesting the information.
  rayParameter | the spherical ray parameter, in radians/sec.
  layid | the layerid number of each interface that the ray interacted with. Only includes layers below the depth of the Location object and excludes the layerids of zero thickness layers.
  x | the horizontal offset of the point where the ray intersected each interface, in radians. The first element is zero, and the last element is the same as the value of xTotal returned by the other version of xtCrust().
  r | the radii of the interfaces that the ray interacted with, in km.
  v | the velocities of the layers that the ray interacted with, in km/sec.
  t | the cumulative travel time of the ray across all the preceeding layers. The first element is zero, and the last element is the same as the value of tTotal returned by the other version of xtCrust().
  npoints | the number of elements in arrays layid, x, r, v and t.

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

- rstt/SLBM/include/CrustalProfile.h