taup.time

Module Contents

Classes

TimeQuery

API

class taup.time.TimeQuery

Initialization

calc(taupServer)

Sends all params to the server, returns the result parsed from JSON into dataclasses.

calcJson(taupServer)

Sends all params to the server, returns the result parsed from JSON.

calcHtml(taupServer)

Sends all params to the server, returns the result as a text version of html.

calcCsv(taupServer)

Sends all params to the server, returns the result as a text version of csv.

calcText(taupServer)

Sends all params to the server, returns the result as a text version of text.

get_allindex()

returns current value of allindex as a Boolean

allindex(val)

Sets the allindex parameter, of type Boolean

all arrivals at sampling of model

Known as --allindex in command line.

Parameters:

val – value to set allindex to

get_amp()

returns current value of amp as a Boolean

amp(val)

Sets the amp parameter, of type Boolean

show amplitude factor for each phase

Known as --amp in command line.

Parameters:

val – value to set amp to

get_attenuationfreq()

returns current value of attenuationfreq as a Float

attenuationfreq(val)

Sets the attenuationfreq parameter, of type Float

attenuation frequency for amplitude calculations, default is 1.0

Known as --attenuationfreq in command line.

Parameters:

val – value to set attenuationfreq to

get_az()

returns current value of az as a Double

az(val)

Sets the az parameter, of type Double

azimuth in degrees, source to receiver

Known as --az in command line.

Parameters:

val – value to set az to

get_baz()

returns current value of baz as a Double

baz(val)

Sets the baz parameter, of type Double

backazimuth in degrees, receiver to source

Known as --baz in command line.

Parameters:

val – value to set baz to

get_deg()

returns current value of degree as a List

deg(val)

Sets the degree parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.deg( value ) and params.deg( [ value ] ) are equivalent.

distance in degrees

Known as --deg in command line. Also known as --degree in command line.

Parameters:

val – value to set degree to

andDeg(val)

Append a value to the degree parameter, of type Double

distance in degrees

Known as --deg in command line. Also known as --degree in command line.

Parameters:

val – value to set degree to

get_degree()

returns current value of degree as a List

degree(val)

Sets the degree parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.degree( value ) and params.degree( [ value ] ) are equivalent.

distance in degrees

Known as --degree in command line.

Parameters:

val – value to set degree to

andDegree(val)

Append a value to the degree parameter, of type Double

distance in degrees

Known as --degree in command line.

Parameters:

val – value to set degree to

get_degreerange()

returns current value of degreerange as a List

degreerange(val)

Sets the degreerange parameter, of type List of Double step or min,max or min,max,step

regular distance range in degrees, one of step; min max or min max step. Default min is 0, max is 180 and step is 10.

Known as --degreerange in command line.

Parameters:

val – value to set degreerange to

andDegreerange(val)

Append a value to the degreerange parameter, of type Double

regular distance range in degrees, one of step; min max or min max step. Default min is 0, max is 180 and step is 10.

Known as --degreerange in command line.

Parameters:

val – value to set degreerange to

get_evt()

returns current value of event as a List

evt(lat, lon)

Sets the event parameter, of type List of Double

event latitude and longitude. Creates a distance if station is also given.

Known as --evt in command line. Also known as --event in command line.

Parameters:

val – value to set event to

andEvt(lat, lon)

Sets the event parameter, of type List of Double

event latitude and longitude. Creates a distance if station is also given.

Known as --evt in command line. Also known as --event in command line.

Parameters:

val – value to set event to

get_event()

returns current value of event as a List

event(lat, lon)

Sets the event parameter, of type List of Double

event latitude and longitude. Creates a distance if station is also given.

Known as --event in command line.

Parameters:

val – value to set event to

andEvent(lat, lon)

Sets the event parameter, of type List of Double

event latitude and longitude. Creates a distance if station is also given.

Known as --event in command line.

Parameters:

val – value to set event to

get_exactdegree()

returns current value of exactdegree as a List

exactdegree(val)

Sets the exactdegree parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.exactdegree( value ) and params.exactdegree( [ value ] ) are equivalent.

exact distance traveled in degrees, not 360-d

Known as --exactdegree in command line.

Parameters:

val – value to set exactdegree to

andExactdegree(val)

Append a value to the exactdegree parameter, of type Double

exact distance traveled in degrees, not 360-d

Known as --exactdegree in command line.

Parameters:

val – value to set exactdegree to

get_exactdegreerange()

returns current value of exactdegreerange as a List

exactdegreerange(val)

Sets the exactdegreerange parameter, of type List of Double step or min,max or min,max,step

regular distance range in exact degrees, not 360-deg, one of step; min max or min max step. Default min is 0, max is 180 and step is 10.

Known as --exactdegreerange in command line.

Parameters:

val – value to set exactdegreerange to

andExactdegreerange(val)

Append a value to the exactdegreerange parameter, of type Double

regular distance range in exact degrees, not 360-deg, one of step; min max or min max step. Default min is 0, max is 180 and step is 10.

Known as --exactdegreerange in command line.

Parameters:

val – value to set exactdegreerange to

get_exactkilometer()

returns current value of exactkilometer as a List

exactkilometer(val)

Sets the exactkilometer parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.exactkilometer( value ) and params.exactkilometer( [ value ] ) are equivalent.

exact distance traveled in kilometers, not 360-k

Known as --exactkilometer in command line.

Parameters:

val – value to set exactkilometer to

andExactkilometer(val)

Append a value to the exactkilometer parameter, of type Double

exact distance traveled in kilometers, not 360-k

Known as --exactkilometer in command line.

Parameters:

val – value to set exactkilometer to

get_exactkilometerrange()

returns current value of exactkilometerrange as a List

exactkilometerrange(val)

Sets the exactkilometerrange parameter, of type List of Double step or min,max or min,max,step

regular distance range in kilometers, not 360-k, one of step; min max or min max step. Default min is 0, max is 1000 and step is 100.

Known as --exactkilometerrange in command line.

Parameters:

val – value to set exactkilometerrange to

andExactkilometerrange(val)

Append a value to the exactkilometerrange parameter, of type Double

regular distance range in kilometers, not 360-k, one of step; min max or min max step. Default min is 0, max is 1000 and step is 100.

Known as --exactkilometerrange in command line.

Parameters:

val – value to set exactkilometerrange to

get_geodetic()

returns current value of geodetic as a Boolean

geodetic(val)

Sets the geodetic parameter, of type Boolean

use geodetic latitude for distance calculations, which implies an ellipticity. Default is spherical. Note this only affects calculation of distance from lat/lon pairs, all travel time calculations are done in a purely spherical model.

Known as --geodetic in command line.

Parameters:

val – value to set geodetic to

get_geodeticflattening()

returns current value of geodeticflattening as a Double

geodeticflattening(val)

Sets the geodeticflattening parameter, of type Double

Inverse Elliptical flattening for distance calculations when –geodetic, defaults to WGS84 ~ 298.257. The distance calculation uses 1/x.

Known as --geodeticflattening in command line.

Parameters:

val – value to set geodeticflattening to

get_incident()

returns current value of incident as a List

incident(val)

Sets the incident parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.incident( value ) and params.incident( [ value ] ) are equivalent.

incident angle in degrees at the receiver, zero is down, 90 horizontal, 180 is up.

Known as --incident in command line.

Parameters:

val – value to set incident to

andIncident(val)

Append a value to the incident parameter, of type Double

incident angle in degrees at the receiver, zero is down, 90 horizontal, 180 is up.

Known as --incident in command line.

Parameters:

val – value to set incident to

get_incidentrange()

returns current value of incidentrange as a List

incidentrange(val)

Sets the incidentrange parameter, of type List of Double step or min,max or min,max,step

regular range in incident angle in degrees, one of step; min max or min max step. Default min is 0 and step is 10.

Known as --incidentrange in command line.

Parameters:

val – value to set incidentrange to

andIncidentrange(val)

Append a value to the incidentrange parameter, of type Double

regular range in incident angle in degrees, one of step; min max or min max step. Default min is 0 and step is 10.

Known as --incidentrange in command line.

Parameters:

val – value to set incidentrange to

get_km()

returns current value of kilometer as a List

km(val)

Sets the kilometer parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.km( value ) and params.km( [ value ] ) are equivalent.

distance in kilometers along surface.

Known as --km in command line. Also known as --kilometer in command line.

Parameters:

val – value to set kilometer to

andKm(val)

Append a value to the kilometer parameter, of type Double

distance in kilometers along surface.

Known as --km in command line. Also known as --kilometer in command line.

Parameters:

val – value to set kilometer to

get_kilometer()

returns current value of kilometer as a List

kilometer(val)

Sets the kilometer parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.kilometer( value ) and params.kilometer( [ value ] ) are equivalent.

distance in kilometers along surface.

Known as --kilometer in command line.

Parameters:

val – value to set kilometer to

andKilometer(val)

Append a value to the kilometer parameter, of type Double

distance in kilometers along surface.

Known as --kilometer in command line.

Parameters:

val – value to set kilometer to

get_kilometerrange()

returns current value of kilometerrange as a List

kilometerrange(val)

Sets the kilometerrange parameter, of type List of Double step or min,max or min,max,step

regular distance range in kilometers, one of step; min max or min max step. Default min is 0, max is 1000 and step is 100.

Known as --kilometerrange in command line.

Parameters:

val – value to set kilometerrange to

andKilometerrange(val)

Append a value to the kilometerrange parameter, of type Double

regular distance range in kilometers, one of step; min max or min max step. Default min is 0, max is 1000 and step is 100.

Known as --kilometerrange in command line.

Parameters:

val – value to set kilometerrange to

get_mod()

returns current value of model as a String

mod(val)

Sets the model parameter, of type String

use velocity model “modelName” for calculations. Default is iasp91. Other builtin models include prem, ak135, ak135fcont, and ak135favg.

Known as --mod in command line. Also known as --model in command line.

Parameters:

val – value to set model to

get_model()

returns current value of model as a String

model(val)

Sets the model parameter, of type String

use velocity model “modelName” for calculations. Default is iasp91. Other builtin models include prem, ak135, ak135fcont, and ak135favg.

Known as --model in command line.

Parameters:

val – value to set model to

get_mw()

returns current value of mw as a Float

mw(val)

Sets the mw parameter, of type Float

scale amplitude by source moment magnitude, default is 4.0

Known as --mw in command line.

Parameters:

val – value to set mw to

get_numattenuationfreq()

returns current value of numattenuationfreq as a Integer

numattenuationfreq(val)

Sets the numattenuationfreq parameter, of type Integer

number attenuation frequencies for amplitude calculations, default is 64

Known as --numattenuationfreq in command line.

Parameters:

val – value to set numattenuationfreq to

get_first()

returns current value of onlyfirst as a Boolean

first(val)

Sets the onlyfirst parameter, of type Boolean

only output the first arrival for each phase, no triplications

Known as --first in command line. Also known as --onlyfirst in command line.

Parameters:

val – value to set onlyfirst to

get_onlyfirst()

returns current value of onlyfirst as a Boolean

onlyfirst(val)

Sets the onlyfirst parameter, of type Boolean

only output the first arrival for each phase, no triplications

Known as --onlyfirst in command line.

Parameters:

val – value to set onlyfirst to

get_rayp()

returns current value of onlyrayp as a Boolean

rayp(val)

Sets the onlyrayp parameter, of type Boolean

only output the ray parameter

Known as --rayp in command line. Also known as --onlyrayp in command line.

Parameters:

val – value to set onlyrayp to

get_onlyrayp()

returns current value of onlyrayp as a Boolean

onlyrayp(val)

Sets the onlyrayp parameter, of type Boolean

only output the ray parameter

Known as --onlyrayp in command line.

Parameters:

val – value to set onlyrayp to

get_time()

returns current value of onlytime as a Boolean

time(val)

Sets the onlytime parameter, of type Boolean

only output travel time

Known as --time in command line. Also known as --onlytime in command line.

Parameters:

val – value to set onlytime to

get_onlytime()

returns current value of onlytime as a Boolean

onlytime(val)

Sets the onlytime parameter, of type Boolean

only output travel time

Known as --onlytime in command line.

Parameters:

val – value to set onlytime to

get_p()

returns current value of phase as a List

p(val)

Sets the phase parameter, of type List of String If a single String is passed in, it is automatically wrapped in a list. So params.p( value ) and params.p( [ value ] ) are equivalent.

seismic phase names

Known as -p in command line. Also known as --phase in command line.

Parameters:

val – value to set phase to

andP(val)

Append a value to the phase parameter, of type String

seismic phase names

Known as -p in command line. Also known as --phase in command line.

Parameters:

val – value to set phase to

get_phase()

returns current value of phase as a List

phase(val)

Sets the phase parameter, of type List of String If a single String is passed in, it is automatically wrapped in a list. So params.phase( value ) and params.phase( [ value ] ) are equivalent.

seismic phase names

Known as --phase in command line.

Parameters:

val – value to set phase to

andPhase(val)

Append a value to the phase parameter, of type String

seismic phase names

Known as --phase in command line.

Parameters:

val – value to set phase to

get_ph()

returns current value of phase as a List

ph(val)

Sets the phase parameter, of type List of String If a single String is passed in, it is automatically wrapped in a list. So params.ph( value ) and params.ph( [ value ] ) are equivalent.

seismic phase names

Known as --ph in command line. Also known as --phase in command line.

Parameters:

val – value to set phase to

andPh(val)

Append a value to the phase parameter, of type String

seismic phase names

Known as --ph in command line. Also known as --phase in command line.

Parameters:

val – value to set phase to

get_rayparamdeg()

returns current value of rayparamdeg as a List

rayparamdeg(val)

Sets the rayparamdeg parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.rayparamdeg( value ) and params.rayparamdeg( [ value ] ) are equivalent.

ray parameter from the source in s/deg, up or down is determined by the phase

Known as --rayparamdeg in command line.

Parameters:

val – value to set rayparamdeg to

andRayparamdeg(val)

Append a value to the rayparamdeg parameter, of type Double

ray parameter from the source in s/deg, up or down is determined by the phase

Known as --rayparamdeg in command line.

Parameters:

val – value to set rayparamdeg to

get_rayparamidx()

returns current value of rayparamidx as a List

rayparamidx(val)

Sets the rayparamidx parameter, of type List of Integer If a single Integer is passed in, it is automatically wrapped in a list. So params.rayparamidx( value ) and params.rayparamidx( [ value ] ) are equivalent.

ray parameter from the source as index into model sampling, up or down is determined by the phase

Known as --rayparamidx in command line.

Parameters:

val – value to set rayparamidx to

andRayparamidx(val)

Append a value to the rayparamidx parameter, of type Integer

ray parameter from the source as index into model sampling, up or down is determined by the phase

Known as --rayparamidx in command line.

Parameters:

val – value to set rayparamidx to

get_rayparamkm()

returns current value of rayparamkm as a List

rayparamkm(val)

Sets the rayparamkm parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.rayparamkm( value ) and params.rayparamkm( [ value ] ) are equivalent.

ray parameter from the source in s/km, up or down is determined by the phase

Known as --rayparamkm in command line.

Parameters:

val – value to set rayparamkm to

andRayparamkm(val)

Append a value to the rayparamkm parameter, of type Double

ray parameter from the source in s/km, up or down is determined by the phase

Known as --rayparamkm in command line.

Parameters:

val – value to set rayparamkm to

get_rayparamrad()

returns current value of rayparamrad as a List

rayparamrad(val)

Sets the rayparamrad parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.rayparamrad( value ) and params.rayparamrad( [ value ] ) are equivalent.

ray parameter from the source in s/rad, up or down is determined by the phase

Known as --rayparamrad in command line.

Parameters:

val – value to set rayparamrad to

andRayparamrad(val)

Append a value to the rayparamrad parameter, of type Double

ray parameter from the source in s/rad, up or down is determined by the phase

Known as --rayparamrad in command line.

Parameters:

val – value to set rayparamrad to

get_stadepth()

returns current value of receiverdepth as a List

stadepth(val)

Sets the receiverdepth parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.stadepth( value ) and params.stadepth( [ value ] ) are equivalent.

the receiver depth in km for stations not at the surface

Known as --stadepth in command line. Also known as --receiverdepth in command line.

Parameters:

val – value to set receiverdepth to

andStadepth(val)

Append a value to the receiverdepth parameter, of type Double

the receiver depth in km for stations not at the surface

Known as --stadepth in command line. Also known as --receiverdepth in command line.

Parameters:

val – value to set receiverdepth to

get_receiverdepth()

returns current value of receiverdepth as a List

receiverdepth(val)

Sets the receiverdepth parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.receiverdepth( value ) and params.receiverdepth( [ value ] ) are equivalent.

the receiver depth in km for stations not at the surface

Known as --receiverdepth in command line.

Parameters:

val – value to set receiverdepth to

andReceiverdepth(val)

Append a value to the receiverdepth parameter, of type Double

the receiver depth in km for stations not at the surface

Known as --receiverdepth in command line.

Parameters:

val – value to set receiverdepth to

get_rel()

returns current value of rel as a List

rel(val)

Sets the rel parameter, of type List of String If a single String is passed in, it is automatically wrapped in a list. So params.rel( value ) and params.rel( [ value ] ) are equivalent.

times relative to the first of the given phases

Known as --rel in command line.

Parameters:

val – value to set rel to

andRel(val)

Append a value to the rel parameter, of type String

times relative to the first of the given phases

Known as --rel in command line.

Parameters:

val – value to set rel to

get_scat()

returns current value of scatter as a List

scat(depth, degree)

Sets the scatter parameter, of type List of Double

scattering depth and distance in degrees, which may be negative. Only effects phases with ‘o’ or ‘O’ in the phase name.

Known as --scat in command line. Also known as --scatter in command line.

Parameters:

val – value to set scatter to

get_scatter()

returns current value of scatter as a List

scatter(depth, degree)

Sets the scatter parameter, of type List of Double

scattering depth and distance in degrees, which may be negative. Only effects phases with ‘o’ or ‘O’ in the phase name.

Known as --scatter in command line.

Parameters:

val – value to set scatter to

get_h()

returns current value of sourcedepth as a List

h(val)

Sets the sourcedepth parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.h( value ) and params.h( [ value ] ) are equivalent.

source depth in km

Known as -h in command line. Also known as --sourcedepth in command line.

Parameters:

val – value to set sourcedepth to

andH(val)

Append a value to the sourcedepth parameter, of type Double

source depth in km

Known as -h in command line. Also known as --sourcedepth in command line.

Parameters:

val – value to set sourcedepth to

get_sourcedepth()

returns current value of sourcedepth as a List

sourcedepth(val)

Sets the sourcedepth parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.sourcedepth( value ) and params.sourcedepth( [ value ] ) are equivalent.

source depth in km

Known as --sourcedepth in command line.

Parameters:

val – value to set sourcedepth to

andSourcedepth(val)

Append a value to the sourcedepth parameter, of type Double

source depth in km

Known as --sourcedepth in command line.

Parameters:

val – value to set sourcedepth to

get_evdepth()

returns current value of sourcedepth as a List

evdepth(val)

Sets the sourcedepth parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.evdepth( value ) and params.evdepth( [ value ] ) are equivalent.

source depth in km

Known as --evdepth in command line. Also known as --sourcedepth in command line.

Parameters:

val – value to set sourcedepth to

andEvdepth(val)

Append a value to the sourcedepth parameter, of type Double

source depth in km

Known as --evdepth in command line. Also known as --sourcedepth in command line.

Parameters:

val – value to set sourcedepth to

get_sta()

returns current value of station as a List

sta(lat, lon)

Sets the station parameter, of type List of Double

station latitude and longitude. Creates a distance if event is also given.

Known as --sta in command line. Also known as --station in command line.

Parameters:

val – value to set station to

andSta(lat, lon)

Sets the station parameter, of type List of Double

station latitude and longitude. Creates a distance if event is also given.

Known as --sta in command line. Also known as --station in command line.

Parameters:

val – value to set station to

get_station()

returns current value of station as a List

station(lat, lon)

Sets the station parameter, of type List of Double

station latitude and longitude. Creates a distance if event is also given.

Known as --station in command line.

Parameters:

val – value to set station to

andStation(lat, lon)

Sets the station parameter, of type List of Double

station latitude and longitude. Creates a distance if event is also given.

Known as --station in command line.

Parameters:

val – value to set station to

get_strikediprake()

returns current value of strikediprake as a List

strikediprake(val)

Sets the strikediprake parameter, of type List of Float

fault strike, dip and rake for amplitude calculations. If not given radiation pattern is unity in all directions.

Known as --strikediprake in command line.

Parameters:

val – value to set strikediprake to

andStrikediprake(val)

Append a value to the strikediprake parameter, of type Float

fault strike, dip and rake for amplitude calculations. If not given radiation pattern is unity in all directions.

Known as --strikediprake in command line.

Parameters:

val – value to set strikediprake to

get_takeoff()

returns current value of takeoff as a List

takeoff(val)

Sets the takeoff parameter, of type List of Double If a single Double is passed in, it is automatically wrapped in a list. So params.takeoff( value ) and params.takeoff( [ value ] ) are equivalent.

takeoff angle in degrees from the source, zero is down, 90 horizontal, 180 is up.

Known as --takeoff in command line.

Parameters:

val – value to set takeoff to

andTakeoff(val)

Append a value to the takeoff parameter, of type Double

takeoff angle in degrees from the source, zero is down, 90 horizontal, 180 is up.

Known as --takeoff in command line.

Parameters:

val – value to set takeoff to

get_takeoffrange()

returns current value of takeoffrange as a List

takeoffrange(val)

Sets the takeoffrange parameter, of type List of Double step or min,max or min,max,step

regular range in takeoff angle in degrees, one of step; min,max or min,max,step. Default min is 0 and step is 10.

Known as --takeoffrange in command line.

Parameters:

val – value to set takeoffrange to

andTakeoffrange(val)

Append a value to the takeoffrange parameter, of type Double

regular range in takeoff angle in degrees, one of step; min,max or min,max,step. Default min is 0 and step is 10.

Known as --takeoffrange in command line.

Parameters:

val – value to set takeoffrange to

create_params()

Create dict of params suitible for passing to requests query call.