[FieldTrip] HELP time_frequency

Eelke Spaak eelke.spaak at donders.ru.nl
Fri Nov 28 13:57:02 CET 2014


Dear Giuseppe,

Try initializing your cfg to empty (cfg = [];) at the beginning of
your %% plotting block. In general, every FT function call should use
its own cfg-structure. (The one exception being the pattern cfg =
ft_definetrial(cfg); data = ft_preprocessing(cfg);, which remains for
historical reasons).)

Best,
Eelke

On 28 November 2014 at 13:06, Giuseppe Spinelli
<giuseppespinelli88 at gmail.com> wrote:
> n Dear FieldTrippers
>
> I am new to FieldTrip so I hope you could forgive my inexperience!
>
> I am trying to segment a  triggered EEGLAB dataset (.set) which has been
> already preprocessed (resempled, filtered and cleaned by ICA).
>
> What I did was basically to define ethe eventvalue field with respect to
> each experimental condition (32,64,128) in the continuous eeglab dataset
> then defining trial and then I run the preprocess function. Finally I run
> the  ft_databrowser for visual inspecting one condition only (data_SE).
>
> The process results in these errors:
>
> Error using ft_fetch_data (line 62)
> data does not contain a consistent trial definition, fetching data is not
> possible
>
> Error in ft_databrowser>redraw_cb (line 1485)
> art = ft_fetch_data(opt.artdata, 'begsample', begsample, 'endsample',
> endsample);
>
> Error in ft_databrowser (line 696)
> redraw_cb(h);
>
> Error in eeglab2fieldtrip (line 30)
> cfg = ft_databrowser(cfg);
>
>
> here the script
>
> % loading .set dataset (from EEGLAB)
> cfg = [];
> cfg.dataset =
> 'C:\Users\GiuS\Documents\MATLAB\CAVE_ERROR_2_FIELDTRIP\EEG\S01.set';
> cfg.continuous = 'yes';
>
> % defining trials
> cfg.trialfun = 'ft_trialfun_general';
> cfg.trialdef.eventtype = 'trigger';
>
> % cfg.trialdef.eventvalue = 32;
> cfg.trialdef.eventvalue = 64;
> % cfg.trialdef.eventvalue = 128;
>
> cfg.trialdef.prestim = 1;
> cfg.trialdef.poststim = 2;
>
> cfg = ft_definetrial(cfg);
>
> % data_CO = ft_preprocessing(cfg); % n = 140
> data_SE = ft_preprocessing(cfg); % n = 30
> % data_LE = ft_preprocessing(cfg); % n = 30
>
> % % plotting
> cfg.viewmode = 'vertical';
> cfg.plotlabels = 'yes';
> cfg.blocksize = 10;
> % cfg = ft_databrowser(cfg, data_CO);
> cfg = ft_databrowser(cfg, data_SE);
> % cfg = ft_databrowser(cfg, data_LE);
>
> I would be glad to receive some help.
>
> Many thanks in advance
>
> -
> Giuseppe Spinelli, Ph.D. student
> Social and Cognitive Neuroscience Laboratory
> http://agliotilab.org/lab-staff/phd-students/1st-year/giuseppe-spinelli#anchor
>
> Department of Psychology, Sapienza University of Rome
> via dei Marsi 78, 00185 - Rome
> Phone/Fax: (+39) 06-49917635
>
> IRCCS Fondazione Santa Lucia
> via Ardeatina 306, 00142 - Rome
> Tel. (+39) 06 5150 1107
>
> @: giuseppe.spinelli at uniroma1.it



More information about the fieldtrip mailing list