[Eeglablist] Out of Memory issues

Alejandro alejandro at sccn.ucsd.edu
Mon Sep 24 12:04:04 PDT 2012


Hi Dwight and all,

I've seen this memory issue for awhile now and it seems that is going to 
be very common in the era of multi-modal eeg analysis. Re-sampling high 
density EEG up to audio sampling rates does not seems to be the 
plausible solution because it will result in a ridiculous large 
datasets. One solution would be using EEGLAB's memory mapping mechanism 
(EEGLAB's menu -> File-> Options), although is not clear how to 
represent the audio signal if both, EEG and multi-channel audio are very 
large, matlab matrices?, additional channels in EEG.data?, buffering 
chunks from files?, etc. I've addressed this issue in a toolbox called 
MoBILAB (MoBI stands for Mobile Brain/Body Imaging), I'm not sure if is 
shipped with EEGLAB at this moment. Anyway, the toolbox represents each 
different stream of data as an object, each object can have different 
sampling rate, and properties, underneath the data is stored in a file 
that is being memory-mapped, so when you do ">> object.data" you're 
accessing the data in matrix, meanwhile the OS is taking care of 
fetching from disk the chunks you actually need. MoBILAB can export data 
back and forth from/to EEGLAB if the EEG structure is no very 
convoluted. Check the website below if you're interested.

Ok, done with my little bit of advertisement, the main point I want to 
make is this, if your have collected different modalities in some 
synchronous way (see LSL website for a reference of how to do that), and 
all the streams were properly sampled, then you probably don't have to 
resample them to make them match sample by sample, instead of "walking"  
in sample points you would walk in time, is what I do in my MultiStream 
Browser (visualization tool for multi-modal data). I'd advise only 
resampling those channels (chunks) you going to work with in internal 
functions and return the results back in the original sampling rate of 
the input data. Observe that keeping EEG datasets at 40 kHz will fill up 
your disk pretty quickly. Also, check out Matlab timeseries's resample 
method for a simple way of resampling two time series to a common time base.

Regards,
Alejandro

relevant links:
http://code.google.com/p/mobilab/
http://sccn.ucsd.edu/wiki/Mobilab_software#Shortcut_to_practical_chapters

http://code.google.com/p/labstreaminglayer/
http://www.mathworks.com/help/matlab/ref/timeseries.resample.html



On 09/21/2012 02:32 PM, Dwight Peterson wrote:
> Hi all,
>
>        I am getting an output message of OUT OF MEMORY quite often 
> when attempting to use certain functions within EEGLAB.  For example, 
> this OUT OF MEMORY message occurs when I try to re-sample my dataset 
> after it has been successfully loaded in to EEGLAB. The reason I am 
> trying to re-sample is because our data acquisition system is 
> extremely high resolution, however, this leads to memory issues given 
> that the sampling rate is 48000 Hz.   Because we are limited in terms 
> of our equipment, I was trying to re-sample to a smaller sampling 
> rate, but I keep getting this error message.  Also, this error message 
> comes up when I try to load in a saved continuous EEG dataset that I 
> have already processed.  However, if I re-create the eeg dataset from 
> the beginning (e.g., import > from .mat array) there is no such error 
> message.
>        I have already tried the memory options within the File menu of 
> the EEGLAB GUI.
>
>        Any suggestions would be most appreciated!
>
> Thanks!
>
> --Dwight--
>
> -- 
> Dwight J. Peterson, M.A.
> Graduate Assistant
> Cognitive and Brain Sciences
> Department of Psychology/296
> Memory and Brain Laboratory
> University of Nevada, Reno
> Reno, NV 89557
> Cellular: 319-231-8596
> Laboratory: 775-682-8667
>
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20120924/781ef2c8/attachment.html>


More information about the eeglablist mailing list