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

Simplification of signatures wrt noise_levels #2379

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

yger
Copy link
Collaborator

@yger yger commented Jan 2, 2024

After discussing with @alejoe91, we realized that it would be good to remove noise_levels from the function signatures, since now noise_levels can be saved as attributes of the recording. By simple modification of the base object, noise_levels are saved and pickled (for parallel processing), and thus they can be automatically infered from the recording if already computed.

@alejoe91 alejoe91 added the sortingcomponents Related to sortingcomponents module label Jan 2, 2024
@h-mayorquin
Copy link
Collaborator

I think this makes sense. If the noise is a canonical property of the recorder as @alejoe91 once told me, then we should treat it as one. That also has the benefits of simplifying the signatures.

I htink you should add deprecations to the removal of the signatures though and not remove them sharply as you are doing it here.

Comment on lines +32 to +35
"noise_level_std_raw",
"noise_level_std_scaled",
"noise_level_mad_raw",
"noise_level_mad_scaled",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bad idea beacuse if you apply a preprocessing this properties will be propagated which will be wrong!!

@samuelgarcia
Copy link
Member

I am not sure to like this. And maybe I am almost sure to dislike.
I think that the probe a a canical property of recording but noise level is more complicated because it depend on parameters (how many chunk, std vs rms vs mad). So in that case it is better to keep noise level explicit averywhere.
Lets discuss this with a call.

@yger
Copy link
Collaborator Author

yger commented Jan 9, 2024

Current, noise levels are already treated as a "special" property, since they are cached and used as a private attribute. So to me, this is making the whole API more consistent. But we can discuss that.

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.

None yet

4 participants