Stations¶
Qseek needs the location and the code of every station. Load them from StationXML or Pyrocko station YAML files:
"stations": {
"station_xmls": ["meta/stations.xml", "meta/temporary-network/"],
"blacklist": ["GE.RUE.", "6A.STA*"]
}
station_xmls takes files and directories; Qseek loads all .xml files of a directory. Pyrocko station YAML files go into pyrocko_station_yamls. When the search starts, Qseek removes stations without waveform data.
- Exclude stations with the
blacklist, as station codes. Partial codes and wildcards exclude whole networks or groups of stations. - Limit the network with
max_distancein meters from the center of the stations, e.g. to ignore distant stations of a regional network.
Instrument responses
Magnitudes and ground motions are measured on restituted waveforms. They need the instrument responses from StationXML.
{
"pyrocko_station_yamls": [],
"station_xmls": [],
"blacklist": [],
"stations": [],
"max_distance": null
}
StationInventory
pydantic-model
¶
Bases: Model
The seismic stations used in the search.
Stations are loaded from StationXML or Pyrocko station YAML files. When the search starts, stations without waveform data are removed.
Fields:
-
pyrocko_station_yamls(list[FilePath]) -
station_xmls(list[FilePath | DirectoryPath]) -
blacklist(Blacklist) -
stations(list[Station]) -
max_distance(PositiveFloat | None)
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.
blacklist
pydantic-field
¶
Stations to exclude from the search, as NSL codes, e.g. ["GE.RUE."].
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.
filter_stations
¶
prepare
¶
prepare(location: Location) -> None
Prepare the station inventory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
Location
|
Location to calculate distances from. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no stations are available after preparation. |
mean_interstation_distance
¶
mean_interstation_distance() -> float
Calculate the mean interstation distance.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Mean interstation distance in meters. |
select_from_traces
¶
get_centroid
¶
get_centroid() -> Location
Get centroid location from all stations.
Returns:
| Name | Type | Description |
|---|---|---|
Location |
Location
|
Centroid Location. |
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_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 |
export_csv
¶
export_csv(filename: Path) -> None
Dump stations to CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
Path
|
Path to CSV file. |
required |
get_responses
async
¶
Get station responses from the Squirrel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time
|
datetime
|
Start time of the responses. |
required |
end_time
|
datetime
|
End time of the responses. |
required |
traces
|
list[Trace]
|
List of Pyrocko Traces to get responses for. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Station responses. |