Waveforms Component¶
When waveforms are requested and you for example need the same waveform for data and synthetics. The Waveforms component handles your requests.
Contents:
-
class
lasif.components.waveforms.
WaveformsComponent
(data_folder, preproc_data_folder, synthetics_folder, communicator, component_name)[source]¶ Component managing the waveform data.
The LASIF-HP branch can only deal with ASDF files so all waveform data is expected to be in this format.
- Parameters
data_folder (pathlib.Path) – The data folder in a LASIF project.
synthetics_folder (pathlib.Path) – The synthetics folder in a LASIF project.
communicator – The communicator instance.
component_name – The name of this component for the communicator.
-
delete_station_from_raw
(event_name: str, station_id: str)[source]¶ Deletes all information from the raw data file for the given station.
-
get_asdf_filename
(event_name: str, data_type: str, tag_or_iteration: Optional[str] = None)[source]¶ Returns the filename for an ASDF waveform file.
-
get_available_data
(event_name: str, station_id: str)[source]¶ Returns a dictionary with information about the available data.
Information is specific for a given event and station.
-
get_available_synthetics
(event_name: str)[source]¶ Returns the available synthetics for a given event.
- Parameters
event_name (str) – The event name.
-
get_waveforms_processed
(event_name: str, station_id: str, tag: str)[source]¶ Gets the processed waveforms for the given event and station as a
Stream
object.
-
get_waveforms_processed_on_the_fly
(event_name: str, station_id: str)[source]¶ Gets the processed waveforms for the given event and station as a
Stream
object.
-
get_waveforms_raw
(event_name: str, station_id: str)[source]¶ Gets the raw waveforms for the given event and station as a
Stream
object.
-
get_waveforms_synthetic
(event_name: str, station_id: str, long_iteration_name: str)[source]¶ Gets the synthetic waveforms for the given event and station as a
Stream
object.
-
property
preprocessing_tag
¶ Gets the preprocessing tag for the lasif project, since each lasif project assumes a constant frequency this only has to be one tag.
-
process_data
(events: List[str])[source]¶ Processes all data for a given iteration.
This function works with and without MPI.
- Parameters
events (List[str]) – event_ids is a list of events to process in this run. It will process all events if not given.
-
process_data_on_the_fly
(st: obspy.core.stream.Stream, inv: obspy.core.inventory.inventory.Inventory, event_name: str)[source]¶ Process data on the fly
- Parameters
st (obspy.core.stream.Stream) – Stream of waveforms
inv (obspy.core.inventory.inventory.Inventory) – Inventory of station information
event_name (str) – Name of event
- Returns
Processed data
- Return type
-
process_synthetics
(st: obspy.core.stream.Stream, event_name: str, iteration: str)[source]¶ Process synthetics using the project function.
- Parameters
st (obspy.core.stream.Stream) – Stream of waveforms
event_name (str) – Name of event
iteration (str) – Name of iteration
- Returns
Processed stream of waveforms
- Return type