diff --git a/gwsumm/data/coherence.py b/gwsumm/data/coherence.py index 6a1f7c2b..fc67823b 100644 --- a/gwsumm/data/coherence.py +++ b/gwsumm/data/coherence.py @@ -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