salvus.modules.waveform_db.waveform_db
Waveform databases for Salvus.
Classes
WaveformDB
WaveformDBclass WaveformDB(builtins.object):
def __init__(self, filename: Union[pathlib.Path, str]):
...Initialize a waveform database object from a database on disc.
Parameters
filenameUnion[pathlib.Path, str] — Path of the database.
Attributes
database_sampling_rate float
database_sampling_rate floatThe sampling rate in Hertz for all waveforms in the database.
database_start_time obspy.core.utcdatetime.UTCDateTime
database_start_time obspy.core.utcdatetime.UTCDateTimeTime of the first sample for all waveforms in the database.
gll_points_per_element int
gll_points_per_element intThe number of GLL points per element.
meta_json Dict
meta_json DictReturn a copy of the meta.json dictionary of the Salvus run creating the original volume data.
ndim int
ndim intThe dimensionality of the database.
polynomial_order int
polynomial_order intThe polynomial order of the wavefield.
receiver_fields Set[str]
receiver_fields Set[str]The receiver fields available in the database.
Methods
get_waveform_data()
get_waveform_data()def get_waveform_data(
self,
receiver: salvus.flow.simple_config.receiver._Base,
receiver_field: Optional[str] = None,
sampling_rate: Optional[float] = None,
) -> obspy.core.stream.Stream:
...Get waveforms from the database.
Parameters
receiversalvus.flow.simple_config.receiver._Base — Salvus receiver object.receiver_fieldOptional[str] — The receiver field to extract. If the receiver object only contains a single receiver field this does not have to be specified.sampling_rateOptional[float] — Optionally resample to a chosen sampling rate. Cannot downsample.
Returns obspy.core.stream.Stream