[FieldTrip] Unit error using ft_topoplotTFR.m

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Sun May 1 18:14:59 CEST 2016


Hi Andrew,

It seems that FT chokes on some bookkeeping operation (the ‘unbalancing’ stuff), which is known to be tricky, and requires too many words, and is too tedious to explain why these obscure steps would be needed in the first place. Note that there seems to exist an inconsistency between the topo and multi functions, so I think this should be looked into.
This being said, given your error stack it looks as if you run into this because you try to create a layout from the sensor description in the data. I would advice to use one of the standard layouts we have on file (in the fieldtrip/template/layout directory). The one you probably want to use is either cfg.layout = ‘4D248.lay’, or ‘4D248_helmet.mat’. (to be sure, just check the filenames in the directory, because I don’t know them from the top of my head). With an existing layout-filename in the cfg you should not run into this.

Best,
Jan-Mathijs



On 29 Apr 2016, at 14:01, Reid, A.T. (Andrew) <A.Reid at psych.ru.nl<mailto:A.Reid at psych.ru.nl>> wrote:

Hi all,

I am trying to do a simple topo plot of some time-locked HCP data. Running ft_multiplotTFR on the TFR output structure works fine.

When I run ft_topoplotTFR on the same structure, I get the following error:

creating layout from data.grad
undoing the invcomp balancing for the gradiometer definition

Error using ft_scalingfactor (line 181)
cannot convert T to unknown

Error in ft_scalingfactor (line 94)
 factor = cellfun(@ft_scalingfactor, old(:), new(:));

Error in ft_apply_montage (line 309)
 scale = ft_scalingfactor(input.chanunit, montage.chanunitorg);

Error in undobalancing (line 37)
   sens = ft_apply_montage(sens, sens.balance.(sens.balance.current), 'inverse', 'yes', 'keepunused', 'yes', 'warning', 'no');

Error in ft_prepare_layout>sens2lay (line 957)
   sens = undobalancing(sens);

Error in ft_prepare_layout (line 430)
 layout = sens2lay(data.grad, cfg.rotate, cfg.projection, cfg.style, cfg.overlap);

Error in ft_topoplotTFR (line 192)
cfg.layout = ft_prepare_layout(cfg, varargin{:});


The data.grad.balance.invcomp.chanunitnew cell array appears to be the culprit, as it contains “unknown” while the main data.chanunit has unit “T”. Not sure how to proceed here..

Thanks!

Andrew


____________________________________________________

Andrew Reid
Postdoctoral Fellow
Department of Cognitive Artificial Intelligence
Donders Institute for Brain, Cognition and Behaviour
Radboud University Nijmegen
Web: http://andrew.modelgui.org/
Tel: +31 (0)24 36 55931







_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160501/b00907b6/attachment-0001.html>


More information about the fieldtrip mailing list