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

DenoiseDat.m needs proper testing #11

Open
ryanharvey1 opened this issue Oct 31, 2024 · 9 comments
Open

DenoiseDat.m needs proper testing #11

ryanharvey1 opened this issue Oct 31, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@ryanharvey1
Copy link
Member

DenoiseDat was pushed to run by default f69a1ac back in Feb. but was never fully tested. It was removed from default in commit d8acfaf .

There has been reports that it removes spikes and distorts signal during common instances such as SWRs and opto pulses. Without full testing, it's hard to know how this function could affect your signal.

@YY535
Copy link

YY535 commented Oct 31, 2024

Can you show some examples of SWRs and opto pulses distortion?
In the default pipeline: preprocessSession.m , the denoising (DenoiseDat) happens at line 252 (line 244-253), which is designed to avoid distortion of LFP signals which is generated at line 198-216.
Therefore, the denoise is specifically for spike sorting at line 255-287.

@ryanharvey1
Copy link
Member Author

I've heard from @lkaraba, @heathlarsson, and @amymarple that it has negatively affected their signal or removed spikes during opto pulses, so maybe they have examples. However, it would have been good to test how this function affects these things before it was made default.

@heathlarsson
Copy link
Collaborator

Yes for opto the noise removal will lose units. Needs to be fully tested.

@YY535
Copy link

YY535 commented Oct 31, 2024

Can you please give explicit examples/sessions? What exactly happens there? We need to see the problem to solve it, it would be related to component selection.

@AntonioFR8
Copy link
Member

AntonioFR8 commented Oct 31, 2024 via email

@ryanharvey1
Copy link
Member Author

ryanharvey1 commented Nov 1, 2024

Some other thoughts on this function.

@ryanharvey1
Copy link
Member Author

Example on how DenoiseDat alters raw signal. The first image is original, and the second is following DenoiseDat. Because average waveform extraction is preformed on this altered signal, sessions that used this function may likely have inaccurate cell trilateration.

Original signal

Altered signals

@ryanharvey1
Copy link
Member Author

Additionally, a very important point is that the denoising is preformed across the entire recording session and not just high emg intervals.

@AntonioFR8
Copy link
Member

AntonioFR8 commented Nov 2, 2024 via email

@ryanharvey1 ryanharvey1 added the bug Something isn't working label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants