[FieldTrip] Make a custom layout

Hanson fanshine at yeah.net
Wed Dec 23 09:55:28 CET 2015


Dear all,

I am new to FieldTrip and  trying to  do the time-frequency analysis of my eeg data , however it seems that no suitable layout. And I use ft_prepare_layout function to make a custom layout(electrode_position32.mat).
%% Time-frequency analysis 
cfg              = [];
cfg.output       = 'pow';
cfg.channel      = 'EEG';
cfg.method       = 'mtmconvol';
cfg.taper        = 'hanning';
cfg.foi          = 2:2:30;                           
cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.5;   
cfg.toi          = -0.5:0.05:1.5;                   
TFRhann = ft_freqanalysis(cfg, data);


cfg = [];       
cfg.showlabels   = 'yes';
cfg.layout       = 'electrode_position32.mat';
figure 
ft_multiplotTFR(cfg, TFRhann);


cfg = [];
cfg.channel      = 'C4';
figure 
ft_singleplotTFR(cfg, TFRhann);


cfg = [];
cfg.layout = 'electrode_position32.mat';
figure 
ft_topoplotTFR(cfg, TFRhann);


When I run the script. I am getting the following error.


Warning: (one of the) axis is/are not evenly spaced, but plots are made as if axis are linear 
> In ft_multiplotTFR at 405
  In TFanalysis_zhs_2 at 52 
the call to "ft_multiplotTFR" took 0 seconds
the call to "ft_singleplotTFR" took 0 seconds
reading layout from file electrode_position32.mat
the call to "ft_prepare_layout" took 0 seconds
Warning: Some points fall outside the outline, please consider using another layout 
> In ft_plot_topo at 171
  In fieldtrip\private\topoplot_common at 731
  In ft_topoplotTFR at 192
  In TFanalysis_zhs_2 at 62 
Index exceeds matrix dimensions.


Error in ft_plot_topo (line 182)
    mask{i}(end+1, :) = mask{i}(1, :);                   % force them to be closed


Error in topoplot_common (line 731)
  ft_plot_topo(chanX,chanY,datavector,opt{:});


Error in ft_topoplotTFR (line 192)
[cfg] = topoplot_common(cfg, varargin{:});


Error in TFanalysis_zhs_2 (line 62)
ft_topoplotTFR(cfg, TFRhann);


Do you have any suggestion about it?
Thank you very much for your attention.


Kind Regards,
Hanson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151223/a124fba1/attachment-0001.html>


More information about the fieldtrip mailing list