spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Matched filtering with both peak signs simultaneously

Open yger opened this issue 1 year ago • 1 comments

This PR should allow matched filtering to work with both positive and negative peak sign detection. If both is selected, then templates are duplicated with a sign inversion, and added to the dictionary of templates.

yger avatar May 29 '24 05:05 yger

This PR should not be merged as it is, because even if this is working without error, the behavior is strange. I suspect that, in the numba kernel, there is a corner case as mentioned by @samuelgarcia that wrote it with inequalities, such that if templates are at the same spot, we are keeping all peaks. Currently, if only neg or pos is selected for the peak type, this is working fine. But with both, we have way too many peaks detected....

yger avatar Jun 06 '24 19:06 yger

@samuelgarcia I've found the bug and I've patched it. This is maybe too late for the release, but since it was tagged at some point. Now this branch is working as expected!

yger avatar Jul 19 '24 08:07 yger

@samuelgarcia I've added the optimisation we discussed for convolution in this PR, and this is ready to go on my side

yger avatar Sep 27 '24 12:09 yger

Bien joué.

samuelgarcia avatar Oct 07 '24 13:10 samuelgarcia