Zapline algorythm cannot recognise 50Hz noise

6 vues (au cours des 30 derniers jours)
Ekaterina
Ekaterina le 23 Août 2024
Commenté : Ekaterina le 10 Juin 2025
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 :)

Réponses (1)

Jacob Mathew
Jacob Mathew le 6 Juin 2025
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 commentaire
Ekaterina
Ekaterina le 10 Juin 2025
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by