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

Message from EEGLABLIST #22

Open
arnodelorme opened this issue Sep 5, 2023 · 0 comments
Open

Message from EEGLABLIST #22

arnodelorme opened this issue Sep 5, 2023 · 0 comments

Comments

@arnodelorme
Copy link
Contributor

Hello,

I am attempting to remove linenoise from my data using the zapline plus plugin. I am using open-source data (raw data can be found here<https://urldefense.com/v3/__https://fcon_1000.projects.nitrc.org/indi/cmi_eeg/eeg.html__;!!Mih3wA!GGjki7w5I0Fsj3n2j_Kl3RfJPrsNp9djEGnEniXARUkcMJM9PcpHqzFP7Kx8fD5oN5dDSp00gxx8xfXMvCXzNQ$ >) in which I have bandpass filtered the data using a range of parameters (from 0.01 Hz to 1 Hz) with EEGLAB's pop_basicfilter()​ leaving me with multiple iterations of the data, all with different filter parameters. However, zapline plus will process some files and not others. Below is my code implementing zapline plus.

filtdirnames = {filtdir1, filtpt1dir, filtpt01dir, filtpt25dir, filtpt5dir, filtpt75dir}; % directories with filtered data, filtdir1 = filtered at 1 Hz, filtpt75dir = filtered at 0.75 Hz
highpass_str = {'1', 'pt1', 'pt01', 'pt25', 'pt5', 'pt75'};
for i = 6 % iterate over each filter directory (filtdirnames)
for s = 1:numsubjects
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
eeglab('redraw');

subject = subject_list{s};
EEG = pop_loadset ([subject 'highpass' highpass_str{i} '.set'],filtdirnames{i});
[ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 0 );
EEG = pop_zapline_plus(EEG, 'noisefreqs','line','coarseFreqDetectPowerDiff',4, ...
'chunkLength',0,'adaptiveNremove',1,'fixedNremove',1, 'plotResults', 0);

[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 4,'gui','off');
[ALLEEG, EEG, CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET,'setname',[subject 'zp' highpass_str{i} ],'gui','off');
EEG = pop_saveset( EEG, [subject 'zp' highpass_str{i} '.set'], zp);
end
end

All of the files that underwent a 1 Hz bandpass filter and a 0.01 Hz bandpass filter were successfully processed through the plugin. However, some of the files that have undergone the other filter parameters produced an error:

Nremove is larger than 1/5th of the components, using that (25)!
Unable to perform assignment because the left and right sides have a different number of elements.

Error in clean_data_with_zapline_plus (line 48)
      noisePeaks(iChunk) = this_freqs_detailed(mean(pxx_chunk(this_freq_idx_detailed,:),2) == maxFinePower);

Error in clean_data_with_zapline_plus_eeglab_wrapper (line 25)
[EEG.data, EEG.etc.zapline.config, EEG.etc.zapline.analyticsResults, plothandles]
      clean_data_with_zapline_plus(EEG.data, EEG.srate, zaplineConfig);

Error in pop_zapline_plus (line 35)
     EEG = clean_data_with_zapline_plus_eeglab_wrapper(EEG, struct(options{:})); %, param);

I have linked three files, two of which were filtered at 0.25 Hz using the pop_basicfilter()​ and the other being filtered at 1 Hz using pop_basicfilter()​ from EEGLAB. Below is a description of each file in the context of this error.

  1. symbsearch-018_highpass_pt25.set --> Data filtered at 0.25 Hz. Produces error detailed above.
  2. symbsearch-021_highpass_pt25.set --> Data filtered at 0.25 Hz. Does NOT produce error detailed above.
  3. symbsearch-020_highpass_1.set --> Data filtered at 1.0 Hz. Does NOT produce error detailed above.
    Here is the link to the files. https://urldefense.com/v3/__https://lsu.box.com/s/e2bwlr58yoa9zxc7f8uvcj71acyvke1s__;!!Mih3wA!GGjki7w5I0Fsj3n2j_Kl3RfJPrsNp9djEGnEniXARUkcMJM9PcpHqzFP7Kx8fD5oN5dDSp00gxx8xfWaFd-GLw$
    Any help in determining the problem would be greatly appreciated.

Thanks,
Will Decker

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

1 participant