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()
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_traceobspy.core.trace.Trace — The data trace.synthetic_data_traceobspy.core.trace.Trace — The synthetic trace.event_latitudefloat — The event latitude.event_longitudefloat — The event longitude.event_depth_in_meterfloat — The event depth in km.event_origin_timeobspy.core.utcdatetime.UTCDateTime — The event origin time used for travel time calculations.station_latitudefloat — The station latitude.station_longitudefloat — The station longitude.minimum_period_in_secondsfloat — The minimum period of the data in seconds.maximum_period_in_secondsfloat — The maximum period of the data in seconds.min_ccfloat — Minimum normalized correlation coefficient of the complete traces.max_noisefloat — Maximum relative noise level for the whole trace. Measured from maximum amplitudes before and after the first arrival.max_noise_windowfloat — Maximum relative noise level for individual windows.min_velocityfloat — All arrivals later than those corresponding to the threshold velocity [km/s] will be excluded.threshold_shiftfloat — Maximum allowable time shift within a window, as a fraction of the minimum period.threshold_correlationfloat — Minimum normalized correlation coefficient within a window.min_length_periodfloat — Minimum length of the time windows relative to the minimum period.min_peaks_troughsfloat — Minimum number of extrema in an individual time window (excluding the edges).max_energy_ratiofloat — Maximum energy ratio between data and synthetics within a time window. Don’t make this too small!min_envelope_similarityfloat — 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_factorint — Max allowed oversampling based on the minimum period and the Nyquist theorem. Otherwise data will be decimated.verbosebool — No output by default.plotbool — Create a plot of the algorithm while it does its work.
Returns Sequence[Tuple[float, float, float]]