avni.data.TT module#

avni.data.TT.readTTascii(file, delim='-', required=None, warning=False)[source]#

Reads the AVNI format for analysis and plotting.

file : input file in default AVNI format

delimdelimiter that combines fields into a joint field e.g. network-station

seperate out during I/O.

requiredfields needed as comments (e.g. #CITE: Author et al., YEAR) in the file
defaults: ‘CITE’, ‘SHORTCITE’, ‘REFERENCE MODEL’, ‘PVEL’, ‘CRUST’,

‘MODEL3D’, ‘SIGMATYPE’, ‘WEITYPE’,’EQTYPE’, ‘STATTYPE’, ‘FORMAT’, ‘WRITE’, ‘FIELDS’

TTdata : dictionary with fields data, metadata and comments

avni.data.TT.writeTTascii(TTdata, filename, iflagthreshold=None, delim='-')[source]#

Writes the AVNI format for analysis and plotting

TTdata : dictionary of SW data with metadata and data fields

filename : output file name

delimdelimiter that combines fields into a joint field e.g. network-station

seperate out during I/O.

iflagthresholdthreshold for iflag which corresponds to the processing level

that was cleared

avni.data.TT.writetablehdf5(cagc_rays_outdir, tt_table_name, source_depth, component, verbose=True)[source]#

writes an hdf5 file based on the output of CAGCRAYS

params: cagc_rays <str>: path to output directory of CAGCRAYS tt_table_name <str>: name of hdf5 file to create or add to source_depth <float>: source depth in km component <str>: ‘PSV’, or ‘SH’ verbose <bool>: print extra output, helpful for debugging

avni.data.TT.get_travel_times1D(table, distance_in_degree, source_depth_in_km, phase, component='PSV', branch=None)[source]#

Get 1D travel travel times from a lookup table

params: table <str>: path to hdf5 travel time table distance_in_degree <float>: source/receiver distance in degrees source_depth_in_km <float>: source depth in km phase <str>: seismic phase component <str>: ‘PSV’ or ‘SH’. defaults to ‘PSV’(for now) branch <str>: branch (doesn’t do anything yet)

returns time_in_s <float>: travel time in seconds.