BPMF.clib
- BPMF.clib.find_similar_sources(moveouts, source_longitude, source_latitude, cell_longitude, cell_latitude, threshold, num_threads=None, num_stations_for_diff=None)[source]
Find sources with similar moveouts so that users can discard some of them during the computation of the network response, and thus speedup the process.
- Parameters:
moveouts ((n_sources, n_stations) float numpy.ndarray) – The moveouts in seconds. Note: It makes more sense to input the moveouts rather than the absolute travel times here.
threshold (scalar float) – The station average time difference tolerance to consider two sources as being redundant.
- Returns:
redundant_sources – Boolean numpy array with True elements for sources that share similar moveouts with other sources.
- Return type:
(n_sources,) boolean numpy.ndarray
- BPMF.clib.select_cc_indexes(ccs, threshold, search_win)[source]
Select new event detection’s correlation indexes.
- Parameters:
ccs ((n_corr,) numpy.ndarray) – Time series of correlation coefficients.
(n_corr (threshold) – Time series or scalar detection threshold.
scalar () numpy.ndarray or float) – Time series or scalar detection threshold.
search_win (int scalar) – Size of the time window, in number of consecutive correlations, defining grouped detections.
- Returns:
selection – Vector of n_corr booleans that are true if the corresponding CC index is a new event detection.
- Return type:
(n_corr,) bool numpy.ndarray
- BPMF.clib.time_dependent_threshold(time_series, sliding_window_samp, num_dev, overlap=0.66, threshold_type='rms', white_noise=None, num_threads=None)[source]
Time dependent detection threshold.
- Parameters:
time_series ((n_correlations) array_like) – The array of correlation coefficients calculated by FMF (float 32).
sliding_window_samp (scalar integer) – The size of the sliding window, in samples, used to calculate the time dependent central tendency and deviation of the time series.
overlap (scalar float, default to 0.75) –
threshold_type (string, default to 'rms') – Either rms or mad, depending on which measure of deviation you want to use.
- Returns:
threshold – Returns the time dependent threshold, with same size
- Return type:
(n_correlations) array_like