taup.distaz

Module Contents

Classes

DistazQuery

API

class taup.distaz.DistazQuery

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.

calcText(taupServer)

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

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_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_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 radius, used when distance given in km.

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 radius, used when distance given in km.

Known as --model in command line.

Parameters:

val – value to set model to

get_radius()

returns current value of radius as a Double

radius(val)

Sets the radius parameter, of type Double

radius of earth in km, used when distance given in km

Known as --radius in command line.

Parameters:

val – value to set radius 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

create_params()

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