[FieldTrip] error running FFT when importing eeglab data with interpolated channels

Brittany Alperin balperin07 at gmail.com
Tue Dec 2 07:41:39 CET 2014


I have preprocessed my data using EEGlab and am running an FFT using
fieldtrip. I convert my EEGlab dataset to fieldtrip format using:
data = eeglab2fieldtrip(EEG,'preprocessing','none');

No error occurs when I convert the data. My FFT code is:
cfg = [];
cfg.method = 'mtmfft';
cfg.taper = 'hanning';
cfg.foilim = [4 7];
cfg.output = 'pow';
freq = ft_freqanalysis(cfg,data);

When I try to run the FFT, I get the following error:

Reference to non-existent field 'trial'.

Error in ft_freqanalysis (line 382)
ntrials = numel(data.trial);

Error in FFT_MIST (line 22)
freq = ft_freqanalysis(cfg,data);

Error in Batch_FFT_MIST (line 11)

Error in run (line 63)
evalin('caller', [script ';']);

Interestingly, I only get this error when I try running an FFT on data that
has had channels interpolated using EEGlab's interpolation function.

I have 36 channels, but when I've interpolated some, fieldtrip seems to
think the interpolated channels have been deleted. I.e., instead of saying
"the input is raw data with 36 channels and 118 trials" it will say "the
input is raw data with 34 channels and 118 trials".

Does anyone know why interpolating channels in EEGlab would throw fieldtrip
off? Is there anyway I can correct for this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141201/437bf0d0/attachment-0001.html>

More information about the fieldtrip mailing list