[Mne_analysis] Read head position from .fif file

Eric Larson larson.eric.d at gmail.com
Wed Jul 13 12:55:59 EDT 2016
Search archives:

>
> Eric, shouldn't you be able to read the head position directly from the
> *.fif files because you have the head_to_dev transforms?
>

The initial head position is stored in info['dev_head_t'], yeah. However
the time-varying head position, which is needed for movement compensation,
isn't stored in the FIF file until 1) movement compensation is performed in
Python or MaxFilter, or 2) MaxFilter is run in head-position-only mode as
`maxfilter -headpos ...`.

We have done some work in MNE-Python on estimating the head positions
directly, but it's still experimental. So for now you can do something like
this to get a suitable head-position text file:

maxfilter -f test_raw.fif -headpos -format short -hp test_raw_hp.pos


Note that this MaxFilter mode will also write out a test_raw_quat.fif file,
which is the same as the input file, but with the head positions added as
channels. But for MNE-Python it's easiest to use the ASCII text file output
test_raw_hp.pos instead.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160713/7f400202/attachment.html 


More information about the Mne_analysis mailing list