Travel times#

Module to deal with velocity models.

class covseisnet.travel_times.TravelTimes(velocity_model: VelocityModel, stats: Stats | None = None, receiver_coordinates: tuple[float, float, float] | None = None)[source]#

Bases: Regular3DGrid

Three-dimensional travel time grid.

This object is a three-dimensional grid of travel times between sources and a receiver. The sources are defined on the grid coordinates of the velocity model. The receiver is defined by its geographical coordinates, provided by the users. Depeding on the velocity model, the travel times are calculated using appropriate methods:

Parameters:
  • velocity_model (VelocityModel) -- The velocity model used to calculate the travel times.

  • stats (Stats, optional) -- The Stats object of the receiver. If provided, the receiver coordinates are extracted from the stats.

  • receiver_coordinates (tuple, optional) -- The geographical coordinates of the receiver in the form (longitude, latitude, depth). The longitudes and latitudes are in decimal degrees, and the depths in kilometers. If the stats is provided, the receiver coordinates are extracted from the stats and this argument is ignored.

compute_travel_times(receiver_coordinates: tuple[float, float, float])[source]#

Calculate the travel times within a constant velocity model.

Calculates the travel times of waves that travel at a constant velocity on the straight line between the sources and a receiver.

The sources are defined on the grid coordinates of the velocity model. The receiver is defined by its geographical coordinates, provided by the users. The method internally uses the straight_ray_distance() function to calculate the straight ray distance between the sources and the receiver.

class covseisnet.travel_times.DifferentialTravelTimes(travel_times_1: TravelTimes, travel_times_2: TravelTimes)[source]#

Bases: TravelTimes

Three-dimensional differential travel time grid.

This object is a three-dimensional grid of differential travel times between two travel time grids. The sources are defined on the grid coordinates of the velocity model. The two receivers are defined in each of the travel time grids. The differential travel times are calculated by subtracting the travel times of the second grid from the first grid. These differential travel times are useful to perform back-projection on the cross-correlation functions. Note that the differential travel times do not depend on the way the travel times are calculated, as long as the sources are defined on the grid coordinates of the velocity model.

Parameters:
  • travel_times_1 (TravelTimes) -- The first travel time grid.

  • travel_times_2 (TravelTimes) -- The second travel time grid.

covseisnet.travel_times.calculate_travel_times(velocity: VelocityModel, receiver_coordinates: tuple[float, float, float] | None = None, stats: Stats | None = None)[source]#

Calculate the travel times within a constant velocity model.

Calculates the travel times of waves that travel at a constant velocity on the straight line between the sources and a receiver.

The sources are defined on the grid coordinates of the velocity model. The receiver is defined by its geographical coordinates, provided by the users. The method internally uses the straight_ray_distance() function to calculate the straight ray distance between the sources and the receiver.