pyrocko.gato.grid.location¶
Classes
|
Regular Cartesian grid anchored at a reference point with optional rotation. |
|
Base class for location grids. |
|
Representation of a set of scattered locations. |
- class CartesianLocationGrid(**kwargs)[source]¶
Bases:
LocationGrid
Regular Cartesian grid anchored at a reference point with optional rotation.
Unrotated coordinate system is NED (north-east-down).
3D-indexing is ordered from z (slow dimension) to x (fast dimension)
f[iz, iy, ix]
. 1D-indexing usesnumpy.unravel_index()
on(nz, ny, nx)
.If any attribute is changed after initialization,
update()
must be called.- ♦ origin¶
pyrocko.model.location.Location
Anchor point of the grid.
- ♦ azimuth¶
float
, default:0.0
Angle of x against north [deg].
- ♦ dip¶
float
, default:0.0
Angle of y against horizontal [deg], rotation around x
- ♦ x_min¶
float
, default:0.0
X axis minimum [m].
- ♦ x_max¶
float
, default:0.0
X axis maximum [m].
- ♦ y_min¶
float
, default:0.0
Y axis minimum [m].
- ♦ y_max¶
float
, default:0.0
Y axis maximum [m].
- ♦ z_min¶
float
, default:0.0
Z axis minimum [m].
- ♦ z_max¶
float
, default:0.0
Z axis maximum [m].
- ♦ x_delta¶
float
, default:1.0
X axis spacing [m].
- ♦ y_delta¶
float
, default:1.0
Y axis spacing [m].
- ♦ z_delta¶
float
, default:1.0
Z axis spacing [m].
- ♦ snap¶
str
(pyrocko.gato.grid.base.GridSnap
), default:'both'
Flag to indicate how grid inconsistencies are handled.
- property shape¶
Logical shape of the grid.
- property size¶
Number of grid nodes.
- property effective_dimension¶
Number of non-flat dimensions.
- get_nodes(system)[source]¶
Get node coordinates.
- Parameters:
system (str) – Coordinate system:
'latlondepth'
, world coordinates as(latitude, longitude, depth)
,'xyz'
, unrotated coordinate system,'ned'
, rotated coordinate system in(north, east, down)
relative toorigin
.- Returns:
Point coordinates in requested coordinate system.
- Return type:
numpy.ndarray
of shape(size, 3)
, where size is the number of nodes
- class UnstructuredLocationGrid(**kwargs)[source]¶
Bases:
LocationGrid
Representation of a set of scattered locations.
This class is useful to represent e.g. sensor locations in a seismic array or other collections of locations with irregular structure.
- ♦ origin¶
pyrocko.model.location.Location
, optionalAnchor point of the grid.
- ♦ coordinates¶
numpy.ndarray (
pyrocko.guts_array.Array
)6C-Coordinates of grid nodes as
(lat, lon, north_shift, east_shift, depth, elevation)
- property shape¶
Logical shape of the grid.
- property size¶
Number of grid nodes.
- get_nodes(system)[source]¶
Get node coordinates.
- Parameters:
system (str) – Coordinate system:
'latlondepth'
, world coordinates as(latitude, longitude, depth)
,'ned'
, coordinate system in(north, east, down)
relative toorigin
.- Returns:
Point coordinates in requested coordinate system.
- Return type:
numpy.ndarray
of shape(size, 3)
, where size is the number of nodes