- SlownessModel.find_depth_from_layers(p, top_critical_layer, bot_critical_layer, is_p_wave)¶
Find depth corresponding to a slowness p between two velocity layers.
Here, slowness is defined as (radius_of_planet-depth) / velocity, and sometimes called ray parameter. Both the top and the bottom velocity layers are included. We also check to see if the slowness is less than the bottom slowness of these layers but greater than the top slowness of the next deeper layer. This corresponds to a total reflection. In this case a check needs to be made to see if this is an S wave reflecting off of a fluid layer, use P velocity below in this case. We assume that slowness is monotonic within these layers and therefore there is only one depth with the given slowness. This means we return the first depth that we find.
Depth (in km) corresponding to the desired slowness.
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.