Back to the main page.

Bug 2770 - eeglab2fieldtrip does not know how to deal with the EEG structure with interpolated channels

Status CLOSED FIXED
Reported 2014-12-02 20:55:00 +0100
Modified 2015-02-11 10:40:00 +0100
Product: FieldTrip
Component: external
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

- 2014-12-02 20:55:08 +0100

Created attachment 681 one channel interpolated When converting EEGlab to fieldtrip structure, files with interpolated channels are not processed correctly. Instead of saying the input is raw data with 36 channels (my data has 36 channels), if 2 channels were interpolated, it will say the input is raw data with 34 channels. In trying to run an FFT, the following error was thrown: Reference to non-existent field 'trial'. Error in ft_freqanalysis (line 382) ntrials = numel(data.trial); No error occurred when converting a file with no interpolated channels.


Robert Oostenveld - 2014-12-03 09:09:07 +0100

the file 164_MIST_prac.fdt is missing from the dataset, hence EEGLAB cannot import it. Can you also share that one? It will be much bigger than the *.set file, so I suggest using one of these http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers


- 2014-12-03 09:22:52 +0100

Created attachment 682 fdt file Sorry about that. The fdt file is now available as well.


Robert Oostenveld - 2014-12-03 10:04:20 +0100

I have confirmed the bug. The issue is with ft_selectdata (which is used inside ft_freqanalysis) and can already be replicated with data = eeglab2fieldtrip(EEG, 'preprocessing', 'none'); cfg = []; cfg.trials = 'all'; cfg.channel = 'all'; data1 = ft_selectdata(cfg, data);


Robert Oostenveld - 2014-12-03 10:09:25 +0100

(In reply to Robert Oostenveld from comment #3) length(data.label) is 35, whereas the data matrix has 36 channels.


Robert Oostenveld - 2014-12-03 12:04:20 +0100

I copied the data to our test repository and made a test script. The problem is not yet fixed. mac011> svn commit test/test_bug2770.m Adding test/test_bug2770.m Transmitting file data . Committed revision 10016.


Robert Oostenveld - 2015-01-26 11:17:29 +0100

I solved the problem by updating fieldtrip/external/eeglab/eeglab2fieldtrip to the latest version from EEGLAB '$Id: eeglab2fieldtrip.m,v 1.6 2009-07-02 23:39:29 arno Exp $'. roboos@mentat001> svn commit Sending external/eeglab/eeglab2fieldtrip.m Transmitting file data . Committed revision 10122. The test script now works fine.


Robert Oostenveld - 2015-02-11 10:40:00 +0100

Closed several bugs that were recently resolved. Please reopen if you are not happy with the resolution.