[Eeglablist] importing edf file

Stefan Debener s.debener at uke.uni-hamburg.de
Thu Jan 26 01:32:38 PST 2006


Stefano,
the following example(!) code might be useful for you, it reads subsets 
of 8 channels (Brain Vision Format), and stores the downsampled data in 
a mat file (for later concatenation), thereby avoiding the "out of 
memory" problem. The less RAM you have, the smaller the number of 
channels you can read at a time. Most EEGLAB import functions now can 
handle reading data in pieces, I guess this holds true for the edf 
import function as well. You could read the data either channel-wise or 
interval-wise. The former is often more convenient, since EEG.event from 
any subset of imported channels will have the complete event 
information. Also, a good part of (initial) data processing is being 
done channel-wise anyway (e.g. filtering)....
Hope this helps,
Stefan



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pathin = ['/data/raid/nov05/'];

% import data  
% -----------  
for i = 1:length(subject)
    pathout = [pathin, 'data/', subject{i}, '/'];
    mkdir(pathout);
    for j = 1:length(block)
        [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
        chans =1;
        for k =1:8 % n of channels/8

            % load subset of channels in groups of 8
            % --------------------------------------
            EEG = pop_loadbv2(pathin, [subject{i}, ...
                block{j}, '.vhdr2'], [], [chans:chans+7]);
           
            % lp filter & downsampling
            % -------------------------
            EEG = pop_eegfilt(EEG,0,90,[],[0]);
            EEG = pop_resample(EEG, 250);
            EEG = eeg_checkset(EEG);

            % save mat file
            % ------------
            data = EEG.data;
            save([pathout, 'cor', block{j}, '_', num2str(k), '.mat'], 
'data', 'k');
            clear data;
            EEG = [];
            pack;
            chans = chans+8;
       end
   end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




stefano ferraina wrote:
> I do have a problem importing big edf files in EEGlab (using the BIOSEMI tool).
> For example, the last file is 120 Mb and with 105 channels recorded.
> No problem with a smaller file.
>
> It looks like that there is a problem with memory. I used both the clean and the pack from matlab to increase the amount of available memory as well as I increased up to the maximum (4 GB) the virtual memory from the Windows control panel.
>
> The error message 'out of memory' is still there:
>
> as well as the warning:
>
> Warning SOPEN: OVERFLOWDETECTION not supported because of missing THRESHOLD.
> ??? Reference to a cleared variable EEGTMP.
>
> ??? Error while evaluating uimenu Callback.
>
> Any suggestion?
>
> stefano ferraina
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> eeglablist mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu




More information about the eeglablist mailing list