Version:

salvus.project.tools.data_selection.seismology.window_picking

salvus.project.tools.data_selection.seismology.window_picking 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()

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
SIGNATURE
def select_windows(
    observed_data_trace: obspy.Trace,
    synthetic_data_trace: obspy.Trace,
    event_latitude: float,
    event_longitude: float,
    event_depth_in_meter: float,
    event_origin_time: obspy.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,
) -> typing.Sequence[tuple[float, float, float]]: ...
ARGUMENTS
Required
observed_data_trace
Type:obspy.Trace
Description:
The data trace.
Required
synthetic_data_trace
Type:obspy.Trace
Description:
The synthetic trace.
Required
event_latitude
Type:float
Description:
The event latitude.
Required
event_longitude
Type:float
Description:
The event longitude.
Required
event_depth_in_meter
Type:float
Description:
The event depth in km.
Required
event_origin_time
Type:obspy.UTCDateTime
Description:
The event origin time used for travel time calculations.
Required
station_latitude
Type:float
Description:
The station latitude.
Required
station_longitude
Type:float
Description:
The station longitude.
Required
minimum_period_in_seconds
Type:float
Description:
The minimum period of the data in seconds.
Required
maximum_period_in_seconds
Type:float
Description:
The maximum period of the data in seconds.
Optional
min_cc
Type:float
Default value:0.1
Description:
Minimum normalized correlation coefficient of the complete traces.
Optional
max_noise
Type:float
Default value:0.1
Description:
Maximum relative noise level for the whole trace. Measured from maximum amplitudes before and after the first arrival.
Optional
max_noise_window
Type:float
Default value:0.4
Description:
Maximum relative noise level for individual windows.
Optional
min_velocity
Type:float
Default value:2.4
Description:
All arrivals later than those corresponding to the threshold velocity [km/s] will be excluded.
Optional
threshold_shift
Type:float
Default value:0.3
Description:
Maximum allowable time shift within a window, as a fraction of the minimum period.
Optional
threshold_correlation
Type:float
Default value:0.75
Description:
Minimum normalized correlation coefficient within a window.
Optional
min_length_period
Type:float
Default value:1.5
Description:
Minimum length of the time windows relative to the minimum period.
Optional
min_peaks_troughs
Type:float
Default value:2
Description:
Minimum number of extrema in an individual time window (excluding the edges).
Optional
max_energy_ratio
Type:float
Default value:10.0
Description:
Maximum energy ratio between data and synthetics within a time window. Don't make this too small!
Optional
min_envelope_similarity
Type:float
Default value:0.2
Description:
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.
Optional
max_oversampling_factor
Type:int
Default value:8
Description:
Max allowed oversampling based on the minimum period and the Nyquist theorem. Otherwise data will be decimated.
Optional
verbose
Type:bool
Default value:False
Description:
No output by default.
Optional
plot
Type:bool
Default value:False
Description:
Create a plot of the algorithm while it does its work.
RETURNS
Return type: typing.Sequence[tuple[float, float, float]]
PAGE CONTENTS