obspy.taup.slowness_model.SlownessModel.find_depth_from_depths

SlownessModel.find_depth_from_depths(ray_param, top_depth, bot_depth, is_p_wave)[source]

Find depth corresponding to a slowness between two given depths.

The given depths are converted to layer numbers before calling find_depth_from_layers().

Parameters:
  • ray_param (float) – Slowness (aka ray parameter) to find, in s/km.

  • top_depth (float) – Top depth to search, in km.

  • bot_depth (float) – Bottom depth to search, in km.

  • is_p_wave (bool) – True if P wave or False for S wave.

Returns:

Depth (in km) corresponding to the desired slowness.

Return type:

float

Raises:

SlownessModelError – If top_critical_layer > bot_critical_layer because there are no layers to search, or if there is an increase in slowness, i.e., a negative velocity gradient, that just balances the decrease in slowness due to the spherical planet, or if the ray parameter p is not contained within the specified layer range.