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

find_next_noisefreq finds no noisefreq #14

Open
ksgfan opened this issue Jan 20, 2023 · 3 comments
Open

find_next_noisefreq finds no noisefreq #14

ksgfan opened this issue Jan 20, 2023 · 3 comments

Comments

@ksgfan
Copy link

ksgfan commented Jan 20, 2023

Hi,

The problem starts in clean_data_with_zapline_plus.m (323). find_next_noisefreq finds no noisefreq, which results in length(noisefreqs) being 0. Consequently, the while loop is never entered and data not cleaned. Finally, cfg.f_noise = f_noise; throws an error, because f_noise is not defined (its defined only within the while loop).

Best,
Dawid

@MariusKlug
Copy link
Owner

Hi Dawid,

thanks for checking out Zapline-plus! I cannot find the line cfg.f_noise = f_noise;, could you point me to where exactly this happens?

Cheers,
Marius

@ksgfan
Copy link
Author

ksgfan commented Apr 14, 2023

Hi Marius,

thanks for the response! The cfg.f_noise = f_noise; was my custom code, that's why you cannot find it : )

Nevertheless, for some data files the find_next_noisefreq does not find a noisefreq, which results in line noise being not removed.

Best,
Dawid

@MariusKlug
Copy link
Owner

If find_next_noisefreqs does not find noisefreqs, but you think there is something that should be removed, you can either specify that noisefreq manually or you can lower the detector threshold so it is more sensitive. But yeah, if it does not have one, then it also cannot give you a frequency, of course. zaplineConfig.noisefreqs will then be [], so you may be able to assign that nonetheless to your results, depending on how you store it.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants