Velocity models

PyOcto integrates two velocity models, homogeneous and 1D layered. As a rule of thumb, the homogeneous model is absolutely sufficient for regions with only shallow (<30 km) seismicity and of limited size (<250 km diameter). Here the approximation of constant velocity is usually good enough. When working in zones with deeper seismicity, e.g., subduction zones, or with a larger seismic network, the 1D model usually performs better. Nonetheless, the homogeneous model usually still is sufficient for a decent catalog.

Warning

PyOcto uses a local coordinate transform to calculate distances. For very large study areas (> 2000 km diameter), this might lead to biases in distance calculation.

class pyocto.associator.VelocityModel0D(p_velocity, s_velocity, tolerance, association_cutoff_distance=None, location_cutoff_distance=None)[source]

Bases: VelocityModel

A homogeneous velocity model

Parameters:
  • p_velocity (float) – P wave velocity in km/s

  • s_velocity (float) – S wave velocity in km/s

  • tolerance (float) – Velocity model tolerance in s

  • association_cutoff_distance (float) – Only use stations up to this distance for space-partitioning association

  • location_cutoff_distance (float) – Only use stations up to this distance for location. Only such picks will be included in the assignments of the associator.

to_cpp(stations)[source]

Converts the Python representation of the object to a cpp representation.

Parameters:

stations (list[Station]) – A list of stations as cpp objects

Return type:

VelocityModel

Returns:

The cpp representation of the object

class pyocto.associator.VelocityModel1D(path, tolerance, association_cutoff_distance=None, location_cutoff_distance=None, surface_p_velocity=None, surface_s_velocity=None)[source]

Bases: VelocityModel

A 1D layered velocity model. PyOcto uses a binary representation of the travel-time tables. To create this representation, please use create_model(). This step only needs to be executed once.

Parameters:
  • path (Union[str, Path]) – Path to the travel-time table

  • tolerance (float) – Velocity model tolerance in s

  • association_cutoff_distance (float) – Only use stations up to this distance for space-partitioning association

  • location_cutoff_distance (float) – Only use stations up to this distance for location. Only such picks will be included in the assignments of the associator.

  • surface_p_velocity (float) – P wave velocity used for elevation correction in km/s

  • surface_s_velocity (float) – S wave velocity used for elevation correction in km/s

Warning

The VelocityModel1D does currently not allow search spaces above the surface, i.e., negative values of z.

static create_model(model, delta, xdist, zdist, path)[source]

Create a velocity model for PyOcto from a data frame

Parameters:
  • model (DataFrame) – DataFrame with columns depth, vp, vs

  • delta (float) – Grid spacing in kilometer

  • xdist (float) – Maximum distance in horizontal direction in km

  • zdist (float) – Maximum distance in vertical direction in km

  • path (Union[str, Path]) – Output path

Return type:

None

to_cpp(stations)[source]

Converts the Python representation of the object to a cpp representation.

Parameters:

stations (list[Station]) – A list of stations as cpp objects

Return type:

VelocityModel

Returns:

The cpp representation of the object