Hi Fieldtrip experts,<br><br>Im working on an EEG analysis in fieldtrip and I came across some possible bugs or perhaps I am doing something wrong.... I have a dataset with 28 subjects and my grandavg (including the 28 individuals) look like this:<br>
<br>grandavg = <br><br>    individual: [28x64x1251 double]<br>         label: {64x1 cell}<br>          time: [1x1251 double]<br>        dimord: 'subj_chan_time'<br>           cfg: [1x1 struct]<br>          mask: [1x64 double]<br>
<br> I first tried to use a mask in ft_topoplotER in the  11/11/2012 fieldtrip version but this did not work:<br><br>input:<br><br>cfg = [];<br>cfg.xlim = [0.3 0.4];<br>cfg.baseline = [-.2 0]; <br>cfg.layout = ft_prepare_layout(timelock_mat{1,1})<br>
cfg.interactive='yes';<br>grandavg.mask = [ones(1, 60) zeros(1,4)]; %just an example<br>cfg.maskparameter = 'mask';<br>ft_topoplotER(cfg,grandavg)<br><br>Reference to non-existent field 'mask'.<br>
Error in ft_topoplotTFR (line 713)<br>  datmask = data.(cfg.maskparameter);<br><br>it seems that around line 420 in the function   data = ft_timelockanalysis(tmpcfg, data) it does not retrieve the mask parameter.<br><br>To check if it was an old bug I downloaded the newest FT version: 16/12/2012: the mask parameter does not work in this version yet..<br>
<br>Moreover:<br>topoplotTFR line 409-411 there is a section added compared to version 11/11/2012:<br><br>%%%%%%%<br>if isfield(cfg, 'parameter') && ~isfield(data, cfg.parameter)<br>  error('cfg.parameter=%s is not present in data structure', cfg.parameter);<br>
end<br>%%%%%%%<br><br>which checks whether the is present... but because I have all my individual subjects in the data I am waiting for line 425:data = ft_timelockanalysis(tmpcfg, data) to average my dataset. It crashes here (after removal of these lines it runs like normal)<br>
<br>Error using ft_topoplotTFR (line 412)<br>cfg.parameter=avg is not present in data structure<br><br>Is there something I am missing?<br><br>Thanks a lot! (also for providing this very good package!)<br><br>Berry<br>