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

Improve detect_bad_channels #2003

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

samuelgarcia
Copy link
Member

@samuelgarcia samuelgarcia commented Sep 15, 2023

detect_bad_channels()

  • fix when some recording is not depth ordered.
  • Add more chunk default computation for reproducibility

Add more chunk default computation.
@samuelgarcia samuelgarcia added the preprocessing Related to preprocessing module label Sep 15, 2023
Comment on lines 20 to 21
chunk_duration_s=0.5,
num_random_chunks=100,
Copy link
Member

Choose a reason for hiding this comment

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

I would just increase the number of random chunks.

Copy link
Member Author

Choose a reason for hiding this comment

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

The noisy channel are done on PSD. 300ms looks like quite short. I wanted to increase a bit.
where this 300ms comme from ?

Copy link
Collaborator

@JoeZiminski JoeZiminski Sep 18, 2023

Choose a reason for hiding this comment

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

Hey both, this was the default from the IBL white paper (code here). In the context of the IBL pipeline PSD (I am not sure for the other methods in detect_bad_channels), I do not think changing this would make too much difference. At 30 kHz sampling rate the FFT frequency bin-width of 300 ms trace would be 30k / 9k = 3.33 Hz vs. 2 Hz (using 500 ms). The main use of the PSD in the IBL function is to calculate the average power above 80% Nyquist. For example, the true 80% of Nyquist at 30 kHz that must be averaged over is the range 12-15000 Hz. This range would be something like 11997.99-14998.32 in practice with 3.33 Hz bins. So I don't think in this context at least it should matter much but I might have made an oversight / mistake.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @JoeZiminski

I agree it won't change much. Instead we increased the number of chunks because we found that the method had quite large fluctuations with only 20 random chunks!

@alejoe91 alejoe91 changed the title improve detect_bad_channels Improve detect_bad_channels Sep 19, 2023
@alejoe91 alejoe91 merged commit fc95465 into SpikeInterface:main Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preprocessing Related to preprocessing module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants