[FieldTrip] Using cfg.maskparameter with topoplotTFR

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Tue Dec 11 15:51:55 CET 2012


Dear Clara,

My feeling is that you illspecified the mask parameter. 
cfg,maskparameter should indeed be a field that you have to add to your 
data. It should have an equal length than your number of channels and 
consist of 1s and 0s. It is not possible to partially mask (at the 
moment). We might think about adding some alpha blending some day, though.
Also, please use the most recent FieldTrip version. Line 697 in the most 
recent version has nothing to do with masking. It might be a bug in an 
old version, which is fixed now.Hope it works for you with the most 
recent version for you, because for me it does ;)

Your code should look something like this:
data               = ...;
cfg                = [];
cfg.layout         = ...;
cfg.xlim           = [5 10];
cfg.zlim           = [0.08 0.2];

data.mask          = ones(size(data.label));
data.mask(1:end/2) = 0; % I made this somethign random for me
cfg.maskparameter  = 'mask';

ft_topoplotER(cfg, data);

Should you keep on having problems, feel free to ask.

Best,
Jörn

PS: It's generally consider nice to say 'hello' before asking for help :)


On 12/11/2012 3:22 PM, Clara A. Scholl wrote:
> How can I specify cfg.maskparameter to mask out some channels when
> plotting topoplots with ft_topoplotTFR?  When I specify a vector the
> same length as the number of channels I'm plotting, I have an error
> with line 697 of ft_topoplotTFR and get "??? Argument to dynamic
> structure reference must evaluate to a valid field name."  I can see
> that cfg.maskparameter should be a field of my data structure (datmask
> = data.(cfg.maskparameter)), but I don't understand what that would
> be.
>
> More generally, I want to plot scalp topographies with some channels
> masked out (made transparent, or set to zero/white where the colorbar
> is modified to be white at zero) BUT I don't want to actually set
> those values to zero, because doing so generates interpolation
> artifacts.  What's the best strategy?  The cluster plotting tutorials
> are very nice for showing the whole topography with a subset of
> channels highlighted, but I find that the presence of channel markers
> obscures the underlying topography.  I'd really appreciate any
> guidance or references for how to mask out a part of the topography.
>
> Thanks,
> Clara
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121211/738cfce5/attachment-0002.html>


More information about the fieldtrip mailing list