reading EGI data

Joseph Dien jdien07 at MAC.COM
Sat Apr 17 08:41:11 CEST 2010


Hi,
    yeah, there's a bug in the code.  When someone added support for unsegmented files to my EGI simple binary file format code, it appears they didn't test it very well.  There's been a number of problems.  In this case, instead of just skipping the first sample, it's skipping hdr.nChans+Nevents samples, resulting in mangled data.

I'm at a conference right now but as soon as I get home I'll post a fix and let you know that it's done.  Sigh...

Joe



On Apr 16, 2010, at 12:09 PM, Giovanni Piantoni wrote:

> Dear all,
>
> I get this incredible error when I try to read EGI data. If the first
> data point is odd, it works well (EGI_data_odd.png), while if the
> first data point is even, then the result doesn't make much sense
> (EGI_data_even.png).
> You can replicate it with this data:
> http://bit.ly/cdqzZH
>
> and the following code:
>
> cfg = [];
> cfg.dataset = 'EGIrecording.raw';
> cfg.trialdef.triallength = Inf;
> def = ft_definetrial(cfg);
> data = ft_preprocessing(def);
> plot(data.trial{1}(1,:)) % odd
>
> def.trl(1) = 2;
> data = ft_preprocessing(def);
> plot(data.trial{1}(1,:)) % even
>
> Does anybody have an idea on what's going on?
>
> Thanks,
> Gio
>
> -------------------------------------------------------------------------------------
> MATLAB Version 7.9.0.529 (R2009b)
> Operating System: Linux 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12
> 04:38:19 UTC 2010 x86_64
> Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java
> HotSpot(TM) 64-Bit Server VM mixed mode
> -------------------------------------------------------------------------------------
>
> --
> Giovanni Piantoni, Ph.D. student
> Dept. Sleep & Cognition
> Netherlands Institute for Neuroscience
> Meibergdreef 47
> 1105 BA Amsterdam (NL)
>
> +31 (0)20 5665492
> g.piantoni at nin.knaw.nl
> www.nin.knaw.nl/research_groups/van_someren_group/
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
> <EGI_data_odd.png><EGI_data_even.png>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



More information about the fieldtrip mailing list