-
Notifications
You must be signed in to change notification settings - Fork 241
Change ComputeSpikeLocations to use only peak_sign #4330
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
base: main
Are you sure you want to change the base?
Conversation
|
Forgot to change references to spike_retriever_kwargs in other code/docs/test. I found there is only one place where it was used: spikeinterface/src/spikeinterface/benchmark/benchmark_peak_localization.py Lines 27 to 30 in 5b2e738
As said in #4320, this didn't actually have any effect (cause spike_retriever_kwargs was not passed to SpikeRetriever()), so I commented this code out.I think spike_locations.py is cleaner/easier-to-understand receiving only peak_sign as argument but if you think the use case in benchmark_peak_localization.py warrants the extra complexity, let me know and I'll revert the changes (and make sure spike_retriever_kwargs is forwarded to the SpikeRetriever). |
| if not self.channel_from_template: | ||
| self.params["spike_retriver_kwargs"] = {"channel_from_template": False} | ||
| else: | ||
| ## TODO | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was very important for our benchmark. Lets keep it!
We need the peak channel to be estimated for each peak to take in account the variability.
@yger
|
Thank you for this. We need to be ver very carfull when changing parameters in extension because then when we reload an old analyzer from disck from previous version this will lead to bugs because the params are inconsistent. In case we change parameters we need to ensure a backward compatibitility using th In this particular I think we should keep the previous signature with no change and only ensure that this parameters is propagated correctly. What do you think ? |
Fixes #4320.
Instead of receiving spike_retriever_kwargs (which was not used anyway), receive peak_sign (mirroring ComputeSpikeAmplitudes). Previous default behavior and capabilities will not change (as
peak_signwas the only parameter actually used from spike_retriever_kwargs).Code will change from