Skip to content

Commit

Permalink
Merge branch 'develop' into waveform_id_error
Browse files Browse the repository at this point in the history
  • Loading branch information
calum-chamberlain authored Jun 28, 2024
2 parents ae55bb4 + d9b3d0b commit f4cab41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eqcorrscan/core/match_filter/party.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions eqcorrscan/utils/pre_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f4cab41

Please sign in to comment.