Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matched filtering with both peak signs simultaneously #2914

Merged
merged 27 commits into from
Oct 7, 2024

Conversation

yger
Copy link
Collaborator

@yger yger commented May 29, 2024

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.
I've also added a drastic speed up of the function, by simplification of the convolution

@alejoe91 alejoe91 added the sortingcomponents Related to sortingcomponents module label Jun 4, 2024
@yger
Copy link
Collaborator Author

yger commented Jun 6, 2024

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....

@samuelgarcia samuelgarcia added this to the 0.101.0 milestone Jun 12, 2024
@samuelgarcia samuelgarcia removed this from the 0.101.0 milestone Jul 5, 2024
@yger
Copy link
Collaborator Author

yger commented Jul 19, 2024

@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
Copy link
Collaborator Author

yger commented Sep 27, 2024

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

@samuelgarcia
Copy link
Member

Bien joué.

@samuelgarcia samuelgarcia merged commit fbbb89f into SpikeInterface:main Oct 7, 2024
15 checks passed
@yger yger deleted the mf_with_both_peak_signs branch October 7, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sortingcomponents Related to sortingcomponents module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants