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

salvus.project.tools.data_selection.seismology.window_picking

Window selection algorithm suitable for phase-based measurements.

Inspired by LASIF’s window picking algorithm.

Functions

select_windows()

def select_windows(
    observed_data_trace: obspy.core.trace.Trace,
    synthetic_data_trace: obspy.core.trace.Trace,
    event_latitude: float,
    event_longitude: float,
    event_depth_in_meter: float,
    event_origin_time: obspy.core.utcdatetime.UTCDateTime,
    station_latitude: float,
    station_longitude: float,
    minimum_period_in_seconds: float,
    maximum_period_in_seconds: float,
    min_cc: float = 0.1,
    max_noise: float = 0.1,
    max_noise_window: float = 0.4,
    min_velocity: float = 2.4,
    threshold_shift: float = 0.3,
    threshold_correlation: float = 0.75,
    min_length_period: float = 1.5,
    min_peaks_troughs: float = 2,
    max_energy_ratio: float = 10.0,
    min_envelope_similarity: float = 0.2,
    max_oversampling_factor: int = 8,
    verbose: bool = False,
    plot: bool = False,
) -> Sequence[Tuple[float, float, float]]: ...

Window selection algorithm for picking windows suitable for misfit calculation based on phase differences.

Returns a list of windows which might be empty due to various reasons. The returned list

Parameters
  • observed_data_trace obspy.core.trace.Trace — The data trace.
  • synthetic_data_trace obspy.core.trace.Trace — The synthetic trace.
  • event_latitude float — The event latitude.
  • event_longitude float — The event longitude.
  • event_depth_in_meter float — The event depth in km.
  • event_origin_time obspy.core.utcdatetime.UTCDateTime — The event origin time used for travel time calculations.
  • station_latitude float — The station latitude.
  • station_longitude float — The station longitude.
  • minimum_period_in_seconds float — The minimum period of the data in seconds.
  • maximum_period_in_seconds float — The maximum period of the data in seconds.
  • min_cc float — Minimum normalized correlation coefficient of the complete traces.
  • max_noise float — Maximum relative noise level for the whole trace. Measured from maximum amplitudes before and after the first arrival.
  • max_noise_window float — Maximum relative noise level for individual windows.
  • min_velocity float — All arrivals later than those corresponding to the threshold velocity [km/s] will be excluded.
  • threshold_shift float — Maximum allowable time shift within a window, as a fraction of the minimum period.
  • threshold_correlation float — Minimum normalized correlation coefficient within a window.
  • min_length_period float — Minimum length of the time windows relative to the minimum period.
  • min_peaks_troughs float — Minimum number of extrema in an individual time window (excluding the edges).
  • max_energy_ratio float — Maximum energy ratio between data and synthetics within a time window. Don’t make this too small!
  • min_envelope_similarity float — The minimum similarity of the envelopes of both data and synthetics. This essentially assures that the amplitudes of data and synthetics can not diverge too much within a window. It is a bit like the inverse of the ratio of both envelopes so a value of 0.2 makes sure neither amplitude can be more then 5 times larger than the other.
  • max_oversampling_factor int — Max allowed oversampling based on the minimum period and the Nyquist theorem. Otherwise data will be decimated.
  • verbose bool — No output by default.
  • plot bool — Create a plot of the algorithm while it does its work.
Returns Sequence[Tuple[float, float, float]]