5.2.4.1.12. 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:
- Returns:
List of detections
- Return type:
list
Example
>>> from eqcorrscan.utils.clustering import re_thresh_csv >>> # Get the path to the test data >>> import eqcorrscan >>> import os >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' >>> det_file = os.path.join(TEST_PATH, 'expected_tutorial_detections.txt') >>> detections = re_thresh_csv(path=det_file, old_thresh=8, new_thresh=10, ... chan_thresh=3) >>> print(len(detections)) 17
Note
This is a legacy function, and will read detections from all versions.
Warning
Only works if thresholding was done by MAD.