Station Inventory
qseek.models.station.Station
pydantic-model
Bases: Location
Fields:
-
lat(float) -
lon(float) -
east_shift(float) -
north_shift(float) -
elevation(float) -
depth(float) -
_cached_lat_lon(tuple[float, float] | None) -
_cached_origin(Location | None) -
network(str) -
station(str) -
location(str)
east_shift
pydantic-field
east_shift: float = 0.0
East shift towards geographical reference in meters.
effective_lat_lon
property
Shift-corrected lat/lon pair of the location.
north_shift
pydantic-field
north_shift: float = 0.0
North shift towards geographical reference in meters.
nsl
property
Network Station Location code as tuple.
Returns:
| Type | Description |
|---|---|
_NSL
|
tuple[str, str, str]: Network, Station, Location |
azimuth_to
distance_to
offset_from
origin
origin() -> Location
shift
shifted_origin
Shift the origin of the location to the effective lat/lon.
Returns:
| Name | Type | Description |
|---|---|---|
Self |
Self
|
The shifted location. |
qseek.models.station.Stations
pydantic-model
Bases: BaseModel
Fields:
-
pyrocko_station_yamls(list[FilePath]) -
station_xmls(list[FilePath | DirectoryPath]) -
blacklist(Blacklist) -
stations(list[Station]) -
max_distance(PositiveFloat | None)
blacklist
pydantic-field
Blacklist stations and exclude from detecion. Format is ['NET.STA.LOC', ...].
max_distance
pydantic-field
max_distance: PositiveFloat | None = None
Maximum distance in meters from the centroid location to include stations for detection. If None, all stations are included.
pyrocko_station_yamls
pydantic-field
List of Pyrocko station YAML files.
station_xmls
pydantic-field
station_xmls: list[FilePath | DirectoryPath] = []
List of StationXML files or directories containing StationXML (.xml) files.
as_pyrocko_stations
as_pyrocko_stations() -> list[Station]
Convert the stations to PyrockoStation objects.
Returns:
| Type | Description |
|---|---|
list[Station]
|
A list of PyrockoStation objects. |
export_csv
export_csv(filename: Path) -> None
Dump stations to CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
Path
|
Path to CSV file. |
required |
export_pyrocko_stations
export_pyrocko_stations(filename: Path) -> None
Dump stations to pyrocko station yaml file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
Path
|
Path to yaml file. |
required |
get_centroid
get_centroid() -> Location
Get centroid location from all stations.
Returns:
| Name | Type | Description |
|---|---|---|
Location |
Location
|
Centroid Location. |
mean_interstation_distance
mean_interstation_distance() -> float
Calculate the mean interstation distance.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Mean interstation distance in meters. |