<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Maria,
<div class=""><br class="">
</div>
<div class="">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).</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
J.M.Schoffelen, MD PhD<br class="">
Senior Researcher, VIDI-fellow - PI, language in interaction<br class="">
Telephone: +31-24-3614793</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Physical location: room 00.028</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 29 Oct 2018, at 13:33, Maria Hakonen <<a href="mailto:maria.hakonen@gmail.com" class="">maria.hakonen@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">Dear FieldTrip experts,
<div class=""><br class="">
</div>
<div class="">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:</div>
<div class=""> </div>
<div class="">
<div class="">original -> template RV 21232.46 %</div>
<div class="">original -> original RV 36.96 %</div>
<div class="">original -> template -> original RV 9579.95 %</div>
</div>
<div class=""><br class="">
</div>
<div class="">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? </div>
<div class=""><br class="">
</div>
<div class="">I have used ft_mergealign as follows:</div>
<div class=""><br class="">
</div>
<div class="">template = list of subjects (i.e. I want to calculate an average head position over the subjects)</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">grad = data.grad;</div>
<div class="">hs=ft_read_headshape([hdr_path nameList{subj} '/hs_file']);</div>
<div class="">vol = ft_headmodel_localspheres(hs,grad);</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];</div>
<div class="">cfg.template = template;</div>
<div class="">cfg.inwardshift = 1.0;</div>
<div class="">cfg.vol = vol;</div>
<div class="">data_aligned = ft_megrealign(cfg, data);</div>
</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Maria <br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br class="">
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>