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

Robert Oostenveld r.oostenveld at donders.ru.nl
Tue Dec 2 09:26:29 CET 2014


Hi Brittany

It seems that eeglab2fieldtrip does not know how to deal with the EEG structure once it has interpolated channels in it. This case was probably not considered when implementing the function. Can you report it on http://bugzilla.fcdonders.nl and share a small EEGLAB dataset with it (using http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers)?

best regards
Robert



On 02 Dec 2014, at 06:41, Brittany Alperin <Balperin07 at gmail.com> wrote:

> Hello
> 
> 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)
>     FFT_MIST(subj);
> 
> 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?
> 
> Thanks,
> Brittany
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list