Zapline algorythm cannot recognise 50Hz noise

3 次查看(过去 30 天)
Hi everyone,
I've encountered an issue trying to run clean_data_with_zapline_plus_eeglab_wrapper() within EEGLab. From my understanding, this function is supposed to recognise powerline noise and remove it. I am interating through the recordings of my subjects now and for some of them the function works as expected and produces nice figures from which I can tell the it's doing perfectly good job. Here's an example:
For other recordings (which are in no way different) the function fails to recognise 50Hz noise and instead starts to produce more and figures. Here's an example of one figure, but they all look similar tho that:
Could you please suggest why the function may fail to perform correctly? Why does it try to run the algorythm over and over again with no improvement? And can I explicitly tell it not to repeat the procedure again after the first failure?
I am not a skilled Matlab user, therefore unfortunately, the source code does not give me answers.
I'll apreciate any piece of advice :)

回答(1 个)

Jacob Mathew
Jacob Mathew 2025-6-6
Hey Ekaterina,
I had a look into the GitHub of zapline-plus and the function clean_data_with_zapline_plus() which is what clean_data_with_zapline_plus_eeglab_wrapper() internally calls. You have an varargin i.e optional argument noisefreqs which can be used to specify the frequencies that you want to remove.
From the images you provided, it seems like the correct one identified the 50Hz (49.99 Hz to be precise) line frequency but the incorrect one picked it up as 51.06 Hz. You can try passing 50Hz as part of this optional argument to try and remove the line noise frequency instead of letting the function try and identify it.
The following is the link to the appropriate file on the GitHub page:
  1 个评论
Ekaterina
Ekaterina 2025-6-10
Thanks a lot Jacob!
I've used 'noisefreqs' to detect line noise: clean_data_with_zapline_plus_eeglab_wrapper(EEG, struct('noisefreqs', 'line'));
But maybe it'll be worth trying specifying precise numbers next time.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by