Mondaic
This API reference is not for the latest stable Salvus version.

salvus.modules.waveform_db.waveform_db

Waveform databases for Salvus.

Classes

WaveformDB

class WaveformDB(builtins.object):
    def __init__(self, filename: Union[pathlib.Path, str]):
        ...

Initialize a waveform database object from a database on disc.

Parameters
  • filename Union[pathlib.Path, str] — Path of the database.
Attributes
database_sampling_rate float

The sampling rate in Hertz for all waveforms in the database.

database_start_time obspy.core.utcdatetime.UTCDateTime

Time of the first sample for all waveforms in the database.

gll_points_per_element int

The number of GLL points per element.

meta_json Dict

Return a copy of the meta.json dictionary of the Salvus run creating the original volume data.

ndim int

The dimensionality of the database.

polynomial_order int

The polynomial order of the wavefield.

receiver_fields Set[str]

The receiver fields available in the database.

Methods
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
  • receiver salvus.flow.simple_config.receiver._Base — Salvus receiver object.
  • receiver_field Optional[str] — The receiver field to extract. If the receiver object only contains a single receiver field this does not have to be specified.
  • sampling_rate Optional[float] — Optionally resample to a chosen sampling rate. Cannot downsample.
Returns obspy.core.stream.Stream