read initial head position from fif file

Hello, I would like to read the initial head position (as I understand - it is calculated from the initial HPI measurement).
I know that the info[‘dev_head_t’] is the transformation from device to head coordinates. Is there a way to calculate the initial head coordinates from this transformation?

Thank you!

  • MNE version: 1.6.0
  • operating system: Windows 10

In which coordinate frame? In the device coordinate frame?
I guess you could invert the dev_head_t transform and use it to map the fiducials.

Code snippet to invert an mne.Transform object trans:

Transform(trans["to"], trans["from"], np.linalg.inv(trans["trans"]))

Mathieu

Thank you.
and once I have this inverted matrix, I need to multiply by the fiducials location (as defined according to the head coordinate system), is this correct?
where can I find this fiducials location data?
thank you!

IIRC, the fiducials are in raw.info["dig"].

Mathieu

1 Like

thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.