[Mne_analysis] coordinate frame numbering

Eric Larson larson.eric.d at gmail.com
Wed Apr 13 09:04:23 EDT 2016
Search archives:

>
> 1.  (i) Device coordinate coord_frame=1
>      (ii) Head coordinate coord_frame =2?
>     (iii)Surface RAS coord_frame=3
>     (iv) RAS=4
>

These values don't match what we have listed:

https://github.com/mne-tools/mne-python/blob/master/mne/io/constants.py#L199

Which is:

1=device
2=isotrak
3=HPI
4=head
5=MRI (surface RAS)

But hopefully you don't need to deal with them directly.

It might help to look through some of our transformations code
<https://github.com/mne-tools/mne-python/blob/master/mne/transforms.py> if
you plan to work with these coordinate frames directly.

   (b) Where is the coil transformation matrix stored(according to the
> transformation matrix diagrams for different coordinate systems) ?
>

It's in the `loc` parameter stored as triplets of (r0, ex, ey, ez), but
again hopefully you can get what you need from some public function instead
of accessing the attribute directly.

4. Sorry for being paranoid!!! But, does the ""Matrix""" below
> fwd['info']['mri_head_t']
> Out[42]:
> <Transform  |  MRI (surface RAS)->head>
> [[ 0.99930958  0.00998476 -0.03578702 -0.00316745]
>   [ 0.01275932  0.81240469  0.5829544   0.00685511]
>   [ 0.03489422 -0.58300841  0.81171643  0.02888404]
>   [ 0.          0.          0.          1.        ]]
> mean that it is the inverse of T2, i.e T2inv???? I ask this because in
> order to go from Head->Surface RAS, you need the T2 matrix for
> transformation.
>

This means that it's a MRI->Head transform, meaning it will take triplets
in MRI surface RAS space and transform them to the Neuromag head coordinate
system. It sounds like you want Head->MRI instead, which you can get by
using mne.transforms.invert_transform, which is a light wrapper around
scipy.linalg.inv. Our forward solution code does its calculations in head
coordinates, which is why it stores the MRI->Head transformation (it's used
to transform the BEM surfaces, which are natively in MRI RAS coords).

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160413/11dec086/attachment.html 


More information about the Mne_analysis mailing list