pyrocko.model.location

Representation of a geographical location, base class for stations, events, etc.

Classes

Location(**kwargs)

Geographical location.

class Location(**kwargs)[source]

Bases: Object

Geographical location.

The location is given by a reference point at the earth’s surface (lat, lon, elevation) and a cartesian offset from this point (north_shift, east_shift, depth). The offset corrected lat/lon coordinates of the location can be accessed though the effective_latlon, effective_lat, and effective_lon properties.

lat

float, optional, default: 0.0

Latitude of reference point [deg].

lon

float, optional, default: 0.0

Longitude of reference point [deg].

north_shift

float, optional, default: 0.0

Northward cartesian offset from reference point [m].

east_shift

float, optional, default: 0.0

Eastward cartesian offset from reference point [m].

elevation

float, optional, default: 0.0

Surface elevation, above sea level [m].

depth

float, default: 0.0

Depth, below surface [m].

property effective_latlon

Property holding the offset-corrected lat/lon pair of the location.

property effective_lat

Property holding the offset-corrected latitude of the location.

property effective_lon

Property holding the offset-corrected longitude of the location.

same_origin(other)[source]

Check whether other location object has the same reference location.

distance_to(other)[source]

Compute surface distance [m] to other location object.

distance_3d_to(other)[source]

Compute 3D distance [m] to other location object.

All coordinates are transformed to cartesian coordinates if necessary then distance is:

\Delta = \sqrt{\Delta {\bf x}^2 + \Delta {\bf y}^2 +                       \Delta {\bf z}^2}

azibazi_to(other)[source]

Compute azimuth and backazimuth to and from other location object.