relmt.angle module#
Functions used to compute take-off angles from 1D velocity model
Copied from SKHASH
Significant portions of the functions in this file are based on the Fortran HASH code originally written by Jeanne L. Hardebeck & Peter M. Shearer, and all of it is inspired by their work. Please cite the appropriate references if you use this code.
- relmt.angle.azimuth(x1, y1, x2, y2)[source]#
Azimuth (degree x -> y) from point (x1, y1) to (x2, y2)
- relmt.angle.azimuth_gap(phase_dict, p_amplitudes, s_amplitudes)[source]#
Azimuthal gap for each event
- Parameters:
p_amplitudes (
list[P_Amplitude_Ratio]) – List of P-wave amplitude ratioss_amplitudes (
list[S_Amplitude_Ratios]) – List of S-wave amplitude ratios
- Returns:
dict[int,list[float]] – Mapping of event number to azimuthal gaps in descending order in degrees
- relmt.angle.clean_vmodel(vmodel)[source]#
Clean velocity model as to adhere to create_takeoff_angle convention
Function courtesy of the SKHASH developers
- relmt.angle.hash_plunge_table(depth_velocity, depths, distances, nray)[source]#
Create tables of takeoff plunge angles given a 1D velocity model.
Modified from Public Domain code SKHASH (Skoumal, Hardebeck & Shearer, 2024; Hardebeck & Shearer, 2002) by courtesey of USGS.
- Parameters:
depth_velocity (
ndarray) –(layers, 2)array of depth and seismic velocity (arbitrary consitent units, e.g. m and m/s or km and km/s)depths (
ndarray) – Array of depths of the seimic source (unit as above)dists – Array of source-receiver distances (unit as above). Must start at 0-range
nray (
int) – Number of rays traceddistances (
ndarray)
- Returns:
(distance, depth)lookup table of takeoff plunge angles