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

How to eliminate potential AC noises? #3521

Open
DaohanZhang opened this issue Nov 6, 2024 · 9 comments
Open

How to eliminate potential AC noises? #3521

DaohanZhang opened this issue Nov 6, 2024 · 9 comments
Labels
preprocessing Related to preprocessing module

Comments

@DaohanZhang
Copy link

Hello everyone! I found my last NPX recording got polluted with some potential AC noises possibly due to poor GND and REF. Here are some of the noises after sorting with KS4, which is spikes approximately appeared at at 50Hz pulses. Is there any preprocess filters could eliminate such noises. I tried using notch_filter centered 50, 100 and 150Hz before default bandpass_filter, it just did not work.
0ecc14c3bf12ebd352303efe0510714
image

@alejoe91
Copy link
Member

alejoe91 commented Nov 6, 2024

Hi @DaohanZhang

Can you plot a spectrum of the traces? If the noise is localized, you can play with the q factor of the notch filter to broaden/narrow the notch band to try to remove most of the noise

@DaohanZhang
Copy link
Author

It's a little bit weird... I have put most of the details on slack.
image

@alejoe91
Copy link
Member

alejoe91 commented Nov 6, 2024

It would be helpful to look at the spectra though (couldn't find them on slack)

@DaohanZhang
Copy link
Author

Here comes the spectra!
First I plot the traces and there are periodic patterns:
image
After that, I plot the spectra of some of the elecs:
image
image
image
image
image
image
image
image
image
image
image
image

@alejoe91
Copy link
Member

Thanks, can you also plot the power spectrum density? It makes it easier to check for very localized noise sources. From the spectrograms, they seem quite distributed so a notch filter won't help much here...

@DaohanZhang
Copy link
Author

image
image
image
image
image
image
image
image
image
image
These are PSDs

@alejoe91 alejoe91 added the preprocessing Related to preprocessing module label Nov 21, 2024
@alejoe91
Copy link
Member

@DaohanZhang

Can you try a notch filter where you have the peak (~5000Hz) and see if it improves the situation?

@zm711
Copy link
Collaborator

zm711 commented Dec 4, 2024

Any word on trying Alessio's tip @DaohanZhang ?

@cwindolf
Copy link
Collaborator

Some collaborators have had good results from https://github.com/MariusKlug/zapline-plus although it is Matlab and I haven't tried it personally

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

No branches or pull requests

4 participants