obspy.taup.velocity_model.VelocityModel

class VelocityModel(model_name, radius_of_planet, min_radius, max_radius, moho_depth, cmb_depth, iocb_depth, is_spherical, layers=None)[source]

Bases: object

Public Methods

depth_at_bottom

Return the depth at the bottom of the given layer.

depth_at_top

Return the depth at the top of the given layer.

evaluate_above

Return the value of the given material property at the given depth(s).

evaluate_below

Return the value of the given material property at the given depth(s).

fix_discontinuity_depths

Reset depths of major discontinuities.

get_discontinuity_depths

Return the depths of discontinuities within the velocity model.

is_discontinuity

layer_number_above

Find the layer containing the given depth(s).

layer_number_below

Find the layer containing the given depth(s).

read_nd_file

Read in a velocity model from a "nd" ASCII text file.

read_tvel_file

Read in a velocity model from a "tvel" ASCII text file.

read_velocity_file

Read in a velocity file.

validate

Perform internal consistency checks on the velocity model.

Special Methods

VelocityModel.__delattr__(name, /)

Implement delattr(self, name).

VelocityModel.__dir__()

Default dir() implementation.

VelocityModel.__eq__(value, /)

Return self==value.

VelocityModel.__format__(format_spec, /)

Default object formatter.

VelocityModel.__ge__(value, /)

Return self>=value.

VelocityModel.__getattribute__(name, /)

Return getattr(self, name).

VelocityModel.__gt__(value, /)

Return self>value.

VelocityModel.__hash__()

Return hash(self).

VelocityModel.__init__(model_name, radius_of_planet, min_radius, max_radius, moho_depth, cmb_depth, iocb_depth, is_spherical, layers=None)[source]

Object for storing a seismic planet model.

Parameters:
  • model_name (str) – name of the velocity model.

  • radius_of_planet (float) – reference radius (km), usually radius of the planet.

  • min_radius (float) – Minimum radius of the model (km).

  • max_radius (float) – Maximum radius of the model (km).

  • moho_depth (float) – Depth (km) of the Moho. It can be input from velocity model (*.nd) or should be explicitly set. For phase naming, the tau model will choose the closest first order discontinuity.

  • cmb_depth (float) – Depth (km) of the CMB (core mantle boundary). It can be input from velocity model (*.nd) or should be explicitly set.

  • iocb_depth (float) – Depth (km) of the IOCB (inner core-outer core boundary). It can be input from velocity model (*.nd) or should be explicitly set.

  • is_spherical (bool) – Is this a spherical model? Defaults to true.

  • layers (list) – The layers of the model.

VelocityModel.__init_subclass__()

This method is called when a class is subclassed.

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

VelocityModel.__le__(value, /)

Return self<=value.

VelocityModel.__len__()[source]
VelocityModel.__lt__(value, /)

Return self<value.

VelocityModel.__ne__(value, /)

Return self!=value.

VelocityModel.__new__(**kwargs)
VelocityModel.__reduce__()

Helper for pickle.

VelocityModel.__reduce_ex__(protocol, /)

Helper for pickle.

VelocityModel.__repr__()

Return repr(self).

VelocityModel.__setattr__(name, value, /)

Implement setattr(self, name, value).

VelocityModel.__sizeof__()

Size of object in memory, in bytes.

VelocityModel.__str__()[source]
VelocityModel.__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).