[FieldTrip] Grad and labels

May (Heng-Ru May TAN) Heng-RuMay.Tan at glasgow.ac.uk
Thu Dec 1 15:52:52 CET 2011


Hello

I would like to plot the grad.pnt for a few channels but realised that 
there are fewer labels (271) than grad.pnt rows (276)
Presumably some of the channels have more than 1 grad.pnt


> D =
>
>         hdr: [1x1 struct]
>       label: {248x1 cell}
>        time: {1x9 cell}
>       trial: {1x9 cell}
>     fsample: 1.0172e+003
>        grad: [1x1 struct]
>         cfg: [1x1 struct]
>
> >> D.grad
>
> ans =
>
>         pnt: [276x3 double]
>         ori: [276x3 double]
>         tra: [271x276 double]
>       label: {271x1 cell}
>        unit: 'm'
>     balance: [1x1 struct]
But how do the grad labels correspond to the grad.pnt with the numbers 
don't match?

Can someone help?

Thanks!
May

The above was derived using the following:
>  cfg = [];
>
>         cfg.subjNUM = subjNUM;
>         cfg.irun=irun;
>
>         cfg.headerfile = 'c,rfDC';
>         cfg.datafile = cfg.headerfile;
>         cfg.trialfun ='trialfun_general';
>         cfg.channel={'MEG'};
>         cfg.continuous='yes';
>         cfg.trialdef.eventtype  = '?';
>
>         cfg=ft_definetrial(cfg); %--->cfg.events
>         cfg.header = ft_read_header(cfg.headerfile);
>         % just to be sure
>         cfg = rmfield(cfg,'trl');
>
>
>         %% specify 'trial' information for 'epoching'
>         cfg.detrend='yes';      %no other filtering at the moment.
>
>         cfg.trialdef.stimulusSETnum  = [iset];
>         cfg.trialdef.eventtype = 'PostStimTriggerIdx';  %%
>         cfg.trialdef.eventinfo  = 'PostStimSampleTime';
>         cfg.trialdef.eventvalue  = [iset].*2 + 128;
>
>         cfg.trialdef.response_time=[1]; % to include RXNtime in the 
> definetrial procedure...
>         cfg.trialdef.CorrectWrong = [1]; %only correct ones
>
>         cfg.trialdef.prestim = 2; % duration in secs before '0'
>         cfg.trialdef.poststim = 2; % duration in secs after '0'
>
>         cfg.trialfun ='trialfun_readEventgetRespInfo'; %%CHANGE 3rd 
> Column!!!
>
>         cfg=ft_definetrial(cfg);
>         %      cfg.trl ==//// [begsam endsam off runN stimN ]
>
>         D=ft_preprocessing(cfg);





More information about the fieldtrip mailing list