obspy.taup.slowness_model.SlownessModel.layerTimeDist

SlownessModel.layerTimeDist(sphericalRayParam, layerNum, isPWave, check=True)[source]

Calculate time and distance for a ray passing through a layer.

Calculates the time and distance increments accumulated by a ray of spherical ray parameter p when passing through layer layerNum. Note that this gives half of the true range and time increments since there will be both an upgoing and a downgoing path. It also only does the calculation for the simple cases of the centre of the Earth, where the ray parameter is zero, or for constant velocity layers. Otherwise, it calls bullenRadialSlowness().

Either sphericalRayParam or layerNum must be 0-D, or they must have the same shape.

Parameters:
  • sphericalRayParam (float or ndarray) The spherical ray parameter of the ray(s), in s/km.
  • layerNum (float or ndarray) The layer(s) in which the calculation should be done.
  • isPWave (bool) Whether to look at the P (True) or S (False) wave.
  • check (bool) Whether to perform checks of input consistency.
Returns:

The time (in s) and distance (in rad) increments for the specified ray(s) and layer(s).

Return type:

ndarray (dtype = TimeDist, shape = sphericalRayParam.shape or layerNum.shape)

Raises SlownessModelError:
 

If the ray with the given spherical ray parameter cannot propagate within this layer, or if the ray turns within this layer but not at the bottom. These checks may be bypassed by specifying check=False.