# computing head position information

**URL:** <https://mne.discourse.group/t/computing-head-position-information/2348>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [October 20, 2020, 6:01pm UTC](https://mne.discourse.group/t/computing-head-position-information/2348 "2020-10-20T18:01:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 20, 2020, 6:01pm UTC](https://mne.discourse.group/t/computing-head-position-information/2348/1 "2020-10-20T18:01:38Z")

</div>

External Email - Use Caution

Hi,

I would like to find out if there is a manual or if you could point me to literature on the effect of different input parameters in mne.chpi.compute\_chpi\_head\_pos ( info, chpi\_locs, dist\_limit=0.005, gof\_limit=0.98, adjust\_dig=False, verbose=None)

This is because I am using a few datasets with movement compensation performed with Elekta maxfilter (-movecomp with default parameters such as HPI-fit parameters for each every 200ms) and a few datasets where movement compensation is performed within MNE. What I am finding is some head position calculations with default goodness of fit (0.98) gives me an empty matrix and a "cannot determine the transformation" error for all coils. While, if I reduce the goodness of fit, or if I set the t\_step\_max=0.2 (which I am assuming is comparable to Maxfilter -movecomp) for calculation of chpi locations ( mne.chpi.compute\_chpi\_locs), I do get an head\_pos array of a decent size.

Nithya Ramakrishnan  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20201020/177f97dd/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201020/177f97dd/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 21, 2020, 3:53pm UTC](https://mne.discourse.group/t/computing-head-position-information/2348/2 "2020-10-21T15:53:44Z")

</div>

External Email - Use Caution

> I would like to find out if there is a manual or if you could point me to  
> literature on the effect of different input parameters in  
> mne.chpi.compute\_chpi\_head\_pos ( info, chpi\_locs, dist\_limit=0.005,  
> gof\_limit=0.98, adjust\_dig=False, verbose=None)

These parameters should behave similarly to how they do in MaxFilter's head  
position estimation, read more in the MaxFilter manual:

[https://ohba-analysis.github.io/osl-docs/downloads/maxfilter\_user\_guide.pdf](https://ohba-analysis.github.io/osl-docs/downloads/maxfilter_user_guide.pdf)

What I am finding is some head position calculations with default goodness

> of fit (0.98) gives me an empty matrix and a ?cannot determine the  
> transformation? error for all coils. While, if I reduce the goodness of  
> fit, or if I set the t\_step\_max=0.2 (which I am assuming is comparable to  
> Maxfilter -movecomp) for calculation of chpi locations (  
> mne.chpi.compute\_chpi\_locs), I do get an head\_pos array of a decent size.

You might need to set `t_window=0.2` as well. If MaxFilter always outputs  
positions separated by 200 ms, then you might also need `t_step_min=0.2` as  
well. But there should be some combination of parameters you can use to get  
the head positions.

You can also use MaxFilter just for the head position estimation step by  
calling it with the `-hp some_filename.pos` option, and then use MNE-Python  
to do the movement compensation using these positions computed by MaxFilter.

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20201021/1eeb544f/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201021/1eeb544f/attachment.html)
