diff --git a/eqcorrscan/core/match_filter/party.py b/eqcorrscan/core/match_filter/party.py index c4e45407d..fafec7f51 100644 --- a/eqcorrscan/core/match_filter/party.py +++ b/eqcorrscan/core/match_filter/party.py @@ -23,6 +23,7 @@ import numpy as np from obspy import Catalog, read_events, Stream +from obspy.core.event import Comment from eqcorrscan.core.match_filter.family import _write_family, _read_family from eqcorrscan.core.match_filter.matched_filter import MatchFilterError @@ -489,6 +490,13 @@ def rethreshold(self, new_threshold, new_threshold_type='MAD', d.threshold = new_thresh d.threshold_input = new_threshold d.threshold_type = new_threshold_type + if d.event: + d.event.comments = [ + c for c in d.event.comments + if not c.text.lower().startswith("threshold=")] + d.event.comments.append(Comment( + text=f"threshold={new_thresh}")) + rethresh_detections.append(d) family.detections = rethresh_detections return self diff --git a/eqcorrscan/utils/pre_processing.py b/eqcorrscan/utils/pre_processing.py index 5c4489ea3..65123303a 100644 --- a/eqcorrscan/utils/pre_processing.py +++ b/eqcorrscan/utils/pre_processing.py @@ -843,6 +843,8 @@ def _group_process(filt_order, highcut, lowcut, samp_rate, process_length, Logger.info(f"Splitting these data in {n_chunks} chunks") if n_chunks == 0: Logger.error('Data must be process_length or longer, not computing') + Logger.error(f"Data have {data_len_samps} samples and we require at " + f"least {chunk_len_samps} samples") return [] for i in range(n_chunks):