[FieldTrip] 642 nodes for source model based on cortical sheet

Eelke Spaak eelke.spaak at donders.ru.nl
Wed Dec 5 10:52:09 CET 2012


Dear Andrea,

To be honest, I have never used or worked on ft_prepare_sourcemodel,
but I do know that the line you quote is a call to ft_getopt in which
the last value is only the default. So, if cfg has a field called
'spheremesh', then that value will be used, rather than the default.

Put in other words:

cfg = [];
cfg.spheremesh = 12;
result = ft_getopt(cfg, 'spheremesh', 642)

then result should be 12, and not 642.

Have you tried specifying cfg.spheremesh = some value? If that does
not work, the value is being changed somewhere else, not in the line
you quote (which might be a bug, I don't know enough about
ft_prepare_sourcemodel to make that judgement).

Best,
Eelke

On 5 December 2012 10:32, andrea brovelli <andrea.brovelli at univ-amu.fr> wrote:
>
> Dear all,
>
> I am constructing a source model based on cortical sheet and I get always
> 642 nodes.
>
> I tried to track down this magic number and I have found that at lines 209
> and 229 of ft_prepare_sourcemodel.m you fix it to:
>
>   cfg.spheremesh  = ft_getopt(cfg, 'spheremesh', 642); % FIXME move
> spheremesh to cfg.grid
>
>
> What was the rationale behind this ?
>
> Did you modify this in more recent versions of Fieldtrip or how could we
> have it in the cfg in the future ?
>
> Thanks a lot
>
> bye
>
> Andrea
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



More information about the fieldtrip mailing list