[FieldTrip] ft_mergealgin: high residual variance?

Maria Hakonen maria.hakonen at gmail.com
Fri Nov 2 07:37:44 CET 2018


Hi Jan-Mathias!

Thank you for the answer!
I changed the units of gradiometers and head model to cm.
This clearly decreased the residual variances.
Also, singleshell seems to work better than localspheres.

However, the transformation seems to still increase the residual variance a
lot.

Here are some examples:
original -> template             RV 407.64 %
original             -> original RV 9.85 %
original -> template -> original RV 10.75 %
realigning trial 706
original -> template             RV 393.13 %
original             -> original RV 9.00 %
original -> template -> original RV 9.90 %
realigning trial 707
original -> template             RV 362.10 %
original             -> original RV 8.33 %
original -> template -> original RV 9.18 %
realigning trial 708
original -> template             RV 377.15 %
original             -> original RV 9.43 %
original -> template -> original RV 10.33 %

The code is now as follows:
load([data_path nameList{subj} '.mat']);
grad = datafinal.grad;
hs=ft_read_headshape([hdr_path nameList{subj} '/hs_file']);

cfg           = [];
cfg.method    = 'singlesphere';
cfg.geom      = hs;
cfg.grad      = grad;
cfg.feedback  = true;
vol  = ft_prepare_headmodel(cfg);

vol = ft_convert_units(vol,'cm');
grad = ft_convert_units(grad,'cm');
cfg = [];
cfg.template = template;
cfg.inwardshift = 2.5;
cfg.feedback ='no';
cfg.vol =  vol;
data = ft_megrealign(cfg, data);

Best,
Maria

to 1. marrask. 2018 klo 10.35 Schoffelen, J.M. (Jan Mathijs) (
jan.schoffelen at donders.ru.nl) kirjoitti:

> Hi Maria,
>
> Are you sure about the units in your headmodel (and gradiometers)? Using
> the value 1.0 as an inwardshift parameter suggests ‘cm’. Not sure what will
> happen when by accident the hs_file is in ‘m’ (which, as far as I know, is
> usually the case).
>
> Best wishes,
>
> Jan-Mathijs
>
> J.M.Schoffelen, MD PhD
> Senior Researcher, VIDI-fellow - PI, language in interaction
> Telephone: +31-24-3614793
> Physical location: room 00.028
> Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
>
>
>
>
> On 29 Oct 2018, at 13:33, Maria Hakonen <maria.hakonen at gmail.com> wrote:
>
> Dear FieldTrip experts,
>
> I have run ft_mergealign across subjects to align the head positions.
> However, the residual variance between the original and the realigned data
> seems to be high:
>
> original -> template             RV 21232.46 %
> original             -> original RV 36.96 %
> original -> template -> original RV 9579.95 %
>
> Could someone please let me know what would be the largest acceptable
> change in the residual variance, and what should I do if the residual
> variance is too high? Does the increase in residual variance mean that
> there is a large shift in the head position?
>
> I have used ft_mergealign as follows:
>
> template = list of subjects (i.e. I want to calculate an average head
> position over the subjects)
>
> grad = data.grad;
> hs=ft_read_headshape([hdr_path nameList{subj} '/hs_file']);
> vol = ft_headmodel_localspheres(hs,grad);
>
> cfg = [];
> cfg.template = template;
> cfg.inwardshift = 1.0;
> cfg.vol =  vol;
> data_aligned = ft_megrealign(cfg, data);
>
> Best,
> Maria
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181102/46115286/attachment.html>


More information about the fieldtrip mailing list