[FieldTrip] Using cfg.maskparameter with topoplotTFR

Clara A. Scholl clara.scholl at gmail.com
Tue Dec 11 16:08:50 CET 2012


Dear Jörn,

Thank you so much for the helpful clarification and for your very
rapid reply.  I misunderstood how to specify the mask appropriately --
in the data structure and not in the configuration structure -- and
the mask works when I follow your directions.  Thank you also for the
reminder to use the most recent version of FieldTrip, I was looking at
a version from Feb. 2012.

Thanks again,
Clara


On Tue, Dec 11, 2012 at 9:51 AM, "Jörn M. Horschig"
<jm.horschig at donders.ru.nl> wrote:
> 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
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list