[FieldTrip] Importing large edf data

Jörn M. Horschig jorn at artinis.com
Fri Dec 18 14:17:34 CET 2015


Hi all,

 

I am not expert in edf data, but it is indeed true that some dataformats allow for reading in single channels, while others do not, and some dataformats allow for reading in only specific time points while others do not. While the FT-end-user may specify these things always, independently of the data format, ‘behind the curtain’ FT may need to read in all data and/or channels and then throw away what the user did NOT ask for. So, while specifying only a second of data for the ft_ high level function, it might be that the specific low-level reading function (mostly written by the manufacturer) does return ALL samples anyways. Same might happen for the channel dimension. 

 

Most dataformats allow for at least either the one or the other, few for both and few for none. So, if specifying shorter trial lengths does not work, it might be well worth to specify only a single channel (as Anja suggested). But again, I do not know the specifics of edf. I justed wanted to add that to the discussion for educational purposes.

 

Best of luck ;)

Jörn

--
Jörn M. Horschig, PhD, Software Engineer
 <http://www.artinis.com/> Artinis Medical Systems  |  +31 481 350 980 

 

From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Anja Pflug
Sent: Friday, December 18, 2015 14:07
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] Importing large edf data

 

Hello Leila,

have you tried to import only one of your 51 channels?

If this works you  could cut the data or downsample it and then combine all channels in a later step.

Best,

Anja

 

 <mailto:fieldtrip-request at science.ru.nl> fieldtrip-request at science.ru.nl hat am 18. Dezember 2015 um 12:00 geschrieben:


Send fieldtrip mailing list submissions to
fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl> 

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
or, via email, send a message with subject or body 'help' to
fieldtrip-request at science.ru.nl <mailto:fieldtrip-request at science.ru.nl> 

You can reach the person managing the list at
fieldtrip-owner at science.ru.nl <mailto:fieldtrip-owner at science.ru.nl> 

When replying, please edit your Subject line so it is more specific
than "Re: Contents of fieldtrip digest..."


Today's Topics:

1. importing large edf data (Leila Ayoubian)


----------------------------------------------------------------------

Message: 1
Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC)
From: Leila Ayoubian <leilayou_54 at yahoo.com <mailto:leilayou_54 at yahoo.com> >
To: "fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl> " <fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl> >
Subject: [FieldTrip] importing large edf data
Message-ID:
<807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com <mailto:807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> >
Content-Type: text/plain; charset="utf-8"

Hi:Thanks for providing us with this amazing toolbox.
I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.?
So trying to load the data like this:
cfg.dataset= ('mydata.edf');
rawdata=ft_preprocessing(cfg);
This is the error message I get :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error using zeros
Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time
and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.

Error in read_edf (line 403)
? dat = zeros(length(chanindx),nepochs*epochlength);

Error in ft_read_data (line 622)
??? dat = read_edf(filename, hdr, begsample, endsample, chanindx);

Error in ft_preprocessing (line 566)
????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary',
????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat);

Error in ReadFedfiles (line 8)
rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. 


I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf'
?hdr?? = ft_read_header(filename);
?sample.start=1
?sample.end=100
dat = ft_read_data(filename,'sample.start','1','sample.end','100') 
and here is again the error message:
Error using zeros
Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a
long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.

Error in read_edf (line 403)
? dat = zeros(length(chanindx),nepochs*epochlength);

Error in ft_read_data (line 622)
??? dat = read_edf(filename, hdr, begsample, endsample, chanindx);

Error in ReadFedfiles (line 31)
dat = ft_read_data(filename,'sample.start','1','sample.end','100')
?
>> 

Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful.
Thanks again for your support and assistance. 
We appreciate your effort.
Kind regards

___________________________________________________ Dr. Leila Ayoubian 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151218/6dfa7ce1/attachment-0001.html>

------------------------------

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl> 
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

End of fieldtrip Digest, Vol 61, Issue 14
*****************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151218/d9359fff/attachment.html>


More information about the fieldtrip mailing list