avni.api.traveltimes module#

travel time api class

class avni.api.traveltimes.TT(client)[source]#

Bases: object

listModels(args={})[source]#

Fetch a list of available models.

Parameters
none
predictPaths(args)[source]#

predicts travel times for the specified model and paths.

Parameters
args dictionary, with required and optional keys as follows:
for model tracing, user must provide one of the following three
(1) ‘start_lat’,’start_lon’,’end_lat’,’end_lon’start and end

coordinates in degrees

(2) ‘start_lat’,’start_lon’,’azimuth’,’dist_deg’: start coordinates with

azimuth and great circle distance in degrees.

(3) ‘dist_deg’ great circle distance in degrees (FOR 1D tracing ONLY)
additional required keys:
‘source_depth_km’ source depth in km
Additional optional parameters
‘type’ tracing type, ‘1D’ or ‘3D’ (default is ‘1D’), string
‘component’ tracing component, default ‘PSV’, string
‘model’ the model to use, default is ‘PREM_tt_table.h5’. Use

listModels() to see available models

‘phase’ seismic phase to trace, default ‘PP’. Use listPhases() to see

available phases

processPathArgs(self, args)[source]#

processes path arguments in args dict, called by predictPaths()

listPhases()[source]#

lists available phases for component of a given model. Use listModels() to see list of available models.

Parameters
args dictionary with optional keys:

‘type’ ‘1D’ or ‘3D’, default ‘1D’ ‘model’ model to check for phases, default is ‘PREM_tt_table.h5’