zapline-plus
zapline-plus copied to clipboard
find_next_noisefreq finds no noisefreq
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
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
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
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