Remove peak_sign in favour of main_channel_indices#4624
Conversation
…tings to reload them
…less_peak_sign_more_main_channel
…less_peak_sign_more_main_channel
for more information, see https://pre-commit.ci
peak_sign in favour of main_channelpeak_sign in favour of main_channel_index
|
Hey @ecobost , I went through your comments on #4374 and mostly resolved them (sorry it's on a new PR, I didn't have permission to push to Sam's branch). Here's a list of "controversial" things to discuss.
@samuelgarcia @alejoe91 could you take a look at this - would be great to get merged next week!! |
peak_sign in favour of main_channel_indexpeak_sign in favour of main_channel_indices
| sparsity = compute_sparsity( | ||
| sorting_analyzer_or_templates, | ||
| method="radius", | ||
| radius_um=radius_um, | ||
| peak_sign=peak_sign, | ||
| amplitude_mode=peak_mode, | ||
| ) |
There was a problem hiding this comment.
@samuelgarcia this feels a bit weird. Should we really be computing sparsity here?
| recording, | ||
| format="memory", | ||
| folder=None, | ||
| main_channel_indices=None, |
There was a problem hiding this comment.
alessio wanted main_channel_ids here no ?
lets have the two ?
There was a problem hiding this comment.
No, this is ok since you are also passing the recording. So it's not ambiguous. My main issue was in how we store the property I'm the sorting object, which is now correctly using main_chamnel_ids
Sequel to #4374
I didn't have permission to push to Sam's branch, so I made my own...
Idea is that when you make your analyzer, it must have a
peak_sign,peak_modeand hence amain_channel_index. We then use these throughout the codebase instead of propagating the other stuff.Some design things:
SortingAnalyzer, you setpeak_sign,peak_modeand hence amain_channel_indeximmediately (or ASAP). Then none of theget_main_templatetype functions are allowed to receive these args. BUT if you have aTemplate, you must explicitly pass these args. So we're trying to make it simple for the analyzer (for users) but explicit for templates (for developers)Cool things:
peak_signno longer appears in metrics.@samuelgarcia did the tedious work, but now I'm refining and getting the tests to pass...