You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: apply validity flag in vectorized_sig2noise_ratio
'peak2peak[flag is True] = 0' indexes with the Python expression
'flag is True' (a constant False), which numpy treats as an empty
boolean mask, so the assignment was a silent no-op and invalid
windows (no signal, border peaks) leaked raw ratios instead of the
intended 0. Same for peak2mean. Index with the flag array itself.
The existing test only passed because of the no-op: on its 5x5
correlation maps the second peak always sits on the map border, so
applying the flag zeroes every peak2peak ratio. Rebuild it on 16x16
maps with interior peaks and add an explicit regression test for the
flag behaviour.
Fixes#368
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments