[Eeglablist] zapline plus plugin error

Will Decker jdecke5 at lsu.edu
Thu Jun 29 10:16:07 PDT 2023


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






More information about the eeglablist mailing list