[Eeglablist] Memory problem in ASR

Hanna Szakács szakacsmiriamhanna at gmail.com
Fri Oct 20 04:06:28 PDT 2023


Hi all,

I keep encountering a problem while trying to reject noisy segments in EEG
data. I wrote a function that uses ASR, and it starts to clean the data,
but breaks at some point:

Finding a clean section of the data...
Determining time window rejection thresholds...done.
Keeping 91.9% (276 seconds) of the data.
eeg_insertbound(): 15 boundary (break) events added.
eeg_insertbound(): 15 boundary (break) events added.
Estimating calibration statistics; this may take a while...
Determining per-component thresholds...done.
Error using asr_process (line 132)
Not enough memory

Error in clean_asr (line 194)
    [signal.data,state] =

asr_process(sig,signal.srate,state,windowlen,windowlen/2,stepsize,maxdims,maxmem,usegpu);

Error in clean_artifacts (line 268)
        BUR =
clean_asr(EEG,burst_crit,[],[],[],burst_crit_refmaxbadchns,burst_crit_reftolerances,[],
[], false,
        max_mem);

Error in pop_clean_rawdata (line 211)
cleanEEG = clean_artifacts(EEG, options{:});

Error in Manual_Preprocessing_Pipeline>removeBadEpochs (line 154)
    EEG = pop_clean_rawdata( ...

Error in Manual_Preprocessing_Pipeline (line 64)
        [EEG, ALLEEG, CURRENTSET] = removeBadEpochs(EEG, ALLEEG,
CURRENTSET);


As you can see, ASR starts cleaning the data but then decides it can't
access enough memory. About my memory:

>> memory
Maximum possible array:       31374 MB (3.290e+10 bytes) *
Memory available for all arrays:       31374 MB (3.290e+10 bytes) *
Memory used by MATLAB:        3117 MB (3.268e+09 bytes)
Physical Memory (RAM):       16132 MB (1.692e+10 bytes)

So, I definitely do have enough memory. Can someone explain what the
problem could be and how to solve it?

Thanks in advance,
Hanna


More information about the eeglablist mailing list