Query Component¶
Do you have some sort of a query? Take it up with the query component.
Contents:
-
class
lasif.components.query.
DataTuple
(data, synthetics, coordinates)¶ -
property
coordinates
¶ Alias for field number 2
-
property
data
¶ Alias for field number 0
-
property
synthetics
¶ Alias for field number 1
-
property
-
class
lasif.components.query.
QueryComponent
(communicator, component_name)[source]¶ This component is responsible for making queries across the different components and integrating them in a meaningful way.
- Parameters
communicator – The communicator instance.
component_name (str) – The name of this component for the communicator.
It should thus be initialized fairly late as it needs access to a number of other components via the communicator.
-
get_all_stations_for_event
(event_name: str, list_only: bool = False, intersection_override: Optional[bool] = None)[source]¶ Returns a dictionary of all stations for one event and their coordinates.
A station is considered to be available for an event if at least one channel has raw data and an associated station file. Furthermore it must be possible to derive coordinates for the station.
- Parameters
event_name (str) – Name of the event.
list_only (bool, optional) – Whether you only want names of stations, defaults to False.
intersection_override (bool, optional) – boolean to require to have the same stations recording all events, i.e. the intersection of receiver sets. The intersection will consider two stations equal i.f.f. the station codes AND coordinates (LAT, LON, Z) are equal.
-
get_coordinates_for_station
(event_name: str, station_id: str)[source]¶ Get the coordinates for one station.
Must be in sync with
get_all_stations_for_event()
.
-
get_matching_waveforms
(event: str, iteration: str, station_or_channel_id: str)[source]¶ Get synthetic and processed waveforms for the same station and same event.
-
get_stations_for_all_events
(intersection_override: Optional[bool] = None)[source]¶ Returns a dictionary with a list of stations per event.
- Parameters
intersection_override (bool, optional) – boolean to require to have the same stations recording all events, i.e. the intersection of receiver sets. The intersection will consider two stations equal i.f.f. the station codes AND coordinates (LAT, LON, Z) are equal.