Skip to content

Commit

Permalink
avoid nan coherence specgrams
Browse files Browse the repository at this point in the history
  • Loading branch information
Iara Ota committed May 16, 2024
1 parent 28be419 commit 8921a0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gwsumm/data/coherence.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,9 @@ def _get_coherence_spectrogram(channel_pair, segments, config=None,
cxy, cxx, cyy = [_get_from_list(
globalv.COHERENCE_COMPONENTS[ck], seg) for ck in ckeys]
csg = abs(cxy)**2 / cxx / cyy
globalv.SPECTROGRAMS[key].append(csg)
globalv.SPECTROGRAMS[key].coalesce()
if not numpy.any(numpy.isnan(csg)):
globalv.SPECTROGRAMS[key].append(csg)
globalv.SPECTROGRAMS[key].coalesce()

if not return_:
return
Expand Down

0 comments on commit 8921a0c

Please sign in to comment.