Closed golnousha closed 3 years ago
Hi @golnousha, thanks for letting us know this is a point of confusion! Helps us know what we need to focus on in the documentation.
First of all, are your EEG recordings average-referenced prior to PyPREP? If it isn't, that likely explains the discrepancies you're seeing: noisy_channels_original
is the initial detected noisy channels prior to PyPREP's internal average referencing. This is because PyPREP wants to make sure that any flat or NaN-containing channels are ignored when calculating the initial average reference. I've encountered this big-time with BioSemi recordings, where the initial CMS/DRL referencing masks most bad-by correlation and bad-by-RANSAC channels on its first pass.
Also, even if the original signals are average-referenced, (2) will still generally be longer than (1). This is because of PyPREP's iterative approach to finding a "clean" reference signal (copied here from the docs):
In a nutshell, this means that PyPREP will usually end up with more detected bad channels after re-referencing then before, since removing the influence of some noisy channels on the average reference signal can reveal others that weren't detected earlier (hence the iterative approach).
Hope that helps! Also, please make sure you're using the latest GitHub version of PyPREP for any production work: we've recently fixed a lot of bugs that are still present in the current PyPI release.
Hi there, I am building a large pipeline for EEG resting-state preprocessing. I am using Pyprep to detect bad channels on some clinical datasets (quite noisy to start with). When I run the function and check the outputs for :
I would expect here for 2 and 3 to be a subset of of 1. However, I sometimes find the interpolated list (2) to be longer than the original list of channels (1), and the final list (3) to be often empty. At other times, 3 doesn't contain the channels flagged in 1 that were not interpolated.
Have others encountered this issue? Thanks for the feedback