5.4.1.11. eqcorrscan.utils.clustering.re_thresh_csv

eqcorrscan.utils.clustering.re_thresh_csv(path, old_thresh, new_thresh, chan_thresh)[source]

Remove detections by changing the threshold.

Can only be done to remove detection by increasing threshold, threshold lowering will have no effect.

Parameters:
  • path (str) Path to the .csv detection file
  • old_thresh (float) Old threshold MAD multiplier
  • new_thresh (float) New threshold MAD multiplier
  • chan_thresh (int) Minimum number of channels for a detection
Returns:

List of detections

Example

>>> from eqcorrscan.utils.clustering import re_thresh_csv
>>> import os
>>> det_file = os.path.join('eqcorrscan', 'tests', 'test_data',
...                         'expected_tutorial_detections.txt')
>>> detections = re_thresh_csv(path=det_file, old_thresh=8, new_thresh=10,
...                            chan_thresh=3)
Read in 22 detections
Left with 17 detections