[Eeglablist] Error in pop_jointprob "Array indices must be positive integers or logical values"
Pindus, Dominika Maria
pindus at illinois.edu
Tue Jun 27 13:00:06 PDT 2023
Good afternoon,
I am writing regarding an error when attempting to reject artifact in a dataset using joint probability (pop_jointprob).
I am using Mac OS Monterey 12.6.5, Matlab version R2020b, EEGLAB version 2021.1. However, the error (described below) also comes up when using version 2023.0.
I am running a pipeline of 34 files to reduce EEG data from the flanker task. My pipeline includes the following lines of code for artifact rejection, with pop_jointprob throwing an error for one file:
EEG = pop_artmwppth( EEG , 'Channel', [10 18 26 35 44], 'Flag', 1, 'Threshold', 100, 'Twindow', [ 0 998], 'Windowsize', 100, 'Windowstep',50 );% AR on midline sites
EEG = pop_jointprob(EEG,1,[10 18 26 35 44],3,3,1,0); %Probability reject at 3SD
pop_summary_AR_eeg_detection(EEG, [m_path 'ArtifactRejectionInfo/' subject '_ar.txt']);
EEG = eeg_rejsuperpose( EEG, 1, 1, 1, 1, 1, 1, 1, 1);
13 files ran smoothly. However, I received an error when attempting to process one file:
Computing joint probability for channels...
Array indices must be positive integers or logical values.
Error in realproba (line 66)
sortbox(data(index)) = sortbox(data(index))+1;
Error in jointprob (line 98)
[ dataProba sortbox ] = realproba( signal(rc, :), discret );
Error in pop_jointprob (line 198)
[ EEG.stats.jpE rejE ] = jointprob( tmpdata, locthresh, EEG.stats.jpE, 1);
Error in Script_SB_CON_PRE_FC (line 274)
EEG = pop_jointprob(EEG,1,[10 18 26 35 44],3,3,1,0); %Probability reject at 3SD
This specific file does not have artifacts reported in a summary table (100% of trials were accepted). However, it is not the only file without artifacts. It also does not contain flatlined channels. The only issue is a noisy Fp1 channel (64-channel cap), which is not specific to this file.
I found a somewhat related error reported by Tyler Grummett in 2014 here: https://sccn.ucsd.edu/pipermail/eeglablist/2014/008141.html
Thus, I downloaded the latest version of EEGLAB 2023.0 and re-run the pipeline. I still received the same error. I then ran the same script using Mac OS Big Sur v. 11.7.2. with Matlab version 2020b and EEGLAB version 2021.1, and still received the same error.
When I excluded this file from the analyses, all remaining files were processed correctly without issues.
If anyone has come across this issue before and would be happy to share what steps they took to resolve it, I would appreciate any advice! I am also happy to share the file.
Thank you,
Dominika
--
Dominika M. Pindus, Ph.D., M.Sc.
Assistant Professor | Department of Kinesiology and Community Health
Affiliate Faculty | Beckman Institute for Advanced Science and Technology
Affiliate Faculty | Neuroscience Program
University of Illinois at Urbana-Champaign
305 Louise Freer Hall | 906 S. Goodwin Avenue | Urbana, IL 61801
Office phone: + 1 217-300-7317 | Email:pindus at illinois.edu<mailto:pindus at illinois.edu>
Website: https://urldefense.com/v3/__http://publish.illinois.edu/physical-activity-and-neurocognitive-health/__;!!Mih3wA!ARgv8Q0Opx-ewzY_o7YNmKDjqwqwjsSoI5CvuVAoWgqvrGp-fWNMXU7IUkONy16nf8Pm3jouMDvRX-ZUEjYePsmR$
More information about the eeglablist
mailing list