[Eeglablist] Memory problem in ASR

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Fri Oct 20 13:09:09 PDT 2023


Dear Hanna,

I wrote this section for you. Try this trick to see if it works. Your
physical memory is 16132 MB so the default 8192 MB should be good.
https://sccn.ucsd.edu/wiki/Makoto%27s_useful_EEGLAB_code#How_to_hard-code_to_specify_the_amount_of_RAM_used_in_ASR_.2810.2F20.2F23_added.29

If this solves the problem, the problem is in the function that estimates
the available amount of memory.

By the way, if you are curious about ASR in general, read my recent
commentary on ASR.
https://urldefense.com/v3/__https://academic.oup.com/sleep/advance-article/doi/10.1093/sleep/zsad241/7275639__;!!Mih3wA!EHL48vK1uyILireV7ej22xlFu5vt3eVy_vYa4e4WMsUxHRvr_pIu31T5k9iRPnhwyUdfl6GDVi2DB06XKdzW2KJRDKo$ 

Makoto

On Fri, Oct 20, 2023 at 2:37 PM Hanna Szakács via eeglablist <
eeglablist at sccn.ucsd.edu> wrote:

> 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
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>


More information about the eeglablist mailing list