Skip to content

Commit

Permalink
Report on seed id overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
calum-chamberlain committed Nov 28, 2023
1 parent 3636578 commit cd929cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eqcorrscan/core/match_filter/helpers/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ def _prepper(
stream=_unpickle_stream(st_file).merge(),
templates=template_streams,
template_names=template_names)
if len(_st) == 0:
Logger.error(

Check warning on line 359 in eqcorrscan/core/match_filter/helpers/processes.py

View check run for this annotation

Codecov / codecov/patch

eqcorrscan/core/match_filter/helpers/processes.py#L359

Added line #L359 was not covered by tests
f"No traces returned from correlation prep: {_st}")
continue

Check warning on line 361 in eqcorrscan/core/match_filter/helpers/processes.py

View check run for this annotation

Codecov / codecov/patch

eqcorrscan/core/match_filter/helpers/processes.py#L361

Added line #L361 was not covered by tests
starttime = _st[0].stats.starttime

if xcorr_func in (None, "fmf", "fftw"):
Expand Down
3 changes: 3 additions & 0 deletions eqcorrscan/utils/pre_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,9 @@ def _prep_data_for_correlation(stream, templates, template_names=None,
[key.split('.') + [i] for key, value in template_ids.items()
for i in range(value)])
seed_ids = [('.'.join(seed_id[0:-1]), seed_id[-1]) for seed_id in seed_ids]
Logger.info(f"Prepping for {len(seed_ids)} channels that share seed-ids "
f"between templates and stream")
Logger.debug(f"Shared seed-ids: {seed_ids}")

for channel_number, seed_id in enumerate(template_ids.keys()):
stream_data = np.zeros(stream_length, dtype=np.float32)
Expand Down

0 comments on commit cd929cb

Please sign in to comment.