obspy.taup.slowness_model.SlownessModel

class SlownessModel(v_mod, min_delta_p=0.1, max_delta_p=11, max_depth_interval=115, max_range_interval=0.04363323129985824, max_interp_error=0.05, allow_inner_core_s=True, slowness_tolerance=1e-16, skip_model_creation=False)[source]

Bases: object

Storage and methods for generating slowness-depth pairs.

Public Methods

add_slowness

Add a ray parameter to the slowness sampling for the given wave type.

approx_distance

Approximate distance for ray turning at the bottom of a layer.

coarse_sample

Create a coarse slowness sampling of the velocity model (v_mod).

create_sample

Create slowness-depth layers from a velocity model.

depth_in_fluid

Determine if the given depth is contained within a fluid zone.

depth_in_high_slowness

Determine if depth and slowness are within a high slowness zone.

depth_inc_check

Check that no slowness layer is too thick.

distance_check

Check that no slowness layer is too wide or undersampled.

find_critical_points

Find all critical points within a velocity model.

find_depth_from_depths

Find depth corresponding to a slowness between two given depths.

find_depth_from_layers

Find depth corresponding to a slowness p between two velocity layers.

fix_critical_points

Reset the slowness layers that correspond to critical points.

get_min_ray_param

Find minimum slowness, turning or reflected, at or above a depth.

get_min_turn_ray_param

Find minimum slowness, turning but not reflected, at or above a depth.

get_num_layers

Number of slowness layers.

get_slowness_layer

Return the Slowness_layer of the requested wave type.

interpolate

Interpolate slowness to depth within a layer.

layer_number_above

Find the index of the slowness layer that contains the given depth.

layer_number_below

Find the index of the slowness layer that contains the given depth.

layer_time_dist

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

ray_param_inc_check

Check that no slowness layer's ray parameter interval is too large.

split_layer

Split a slowness layer into two slowness layers.

to_slowness

Convert velocity at some depth to slowness.

validate

Perform consistency check on the slowness model.

Private Methods

Warning

Private methods are mainly for internal/developer use and their API might change without notice.

SlownessModel._fix_other_layers(other_layers, p, changed_layer, new_top_layer, new_bot_layer, critical_depths, is_p_wave)[source]

Fix other wave layers when a split is made.

This performs the second split of the other wave type when a split is made by split_layer().

Special Methods

SlownessModel.__delattr__(name, /)

Implement delattr(self, name).

SlownessModel.__dir__()

Default dir() implementation.

SlownessModel.__eq__(value, /)

Return self==value.

SlownessModel.__format__(format_spec, /)

Default object formatter.

SlownessModel.__ge__(value, /)

Return self>=value.

SlownessModel.__getattribute__(name, /)

Return getattr(self, name).

SlownessModel.__gt__(value, /)

Return self>value.

SlownessModel.__hash__()

Return hash(self).

SlownessModel.__init__(v_mod, min_delta_p=0.1, max_delta_p=11, max_depth_interval=115, max_range_interval=0.04363323129985824, max_interp_error=0.05, allow_inner_core_s=True, slowness_tolerance=1e-16, skip_model_creation=False)[source]
SlownessModel.__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

SlownessModel.__le__(value, /)

Return self<=value.

SlownessModel.__lt__(value, /)

Return self<value.

SlownessModel.__ne__(value, /)

Return self!=value.

SlownessModel.__new__(**kwargs)
SlownessModel.__reduce__()

Helper for pickle.

SlownessModel.__reduce_ex__(protocol, /)

Helper for pickle.

SlownessModel.__repr__()

Return repr(self).

SlownessModel.__setattr__(name, value, /)

Implement setattr(self, name, value).

SlownessModel.__sizeof__()

Size of object in memory, in bytes.

SlownessModel.__str__()[source]
SlownessModel.__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).