- MNE-Python version: 0.22.0
- operating system: Ubuntu 20.04.1 LTS
Dear experts,
I tried to get head position of a subject during MEG recording at rest. For this, I used raw data (no MaxFilter, motion correction, SSS/tSSS is applied to these data yet) and this tutorial: Annotate movement artifacts and reestimate dev_head_t — MNE 0.24.0 documentation
So my code looks like:
chpi_amplitudes = mne.chpi.compute_chpi_amplitudes(raw, t_step_min=0.5)
chpi_locs = mne.chpi.compute_chpi_locs(raw.info, chpi_amplitudes)
head_pos = mne.chpi.compute_head_pos(raw.info, chpi_locs)
The output looks fine, and what I actually wanted is to get (x,y,z) coordinates of head positions over time, to remove some outliers points, and choose optimal head position to transform raw data to this new head position.
I found that I can get (x,y,z) coordinates from head_pos in mm like this:
x = head_pos[:,4]*1000
y = head_pos[:,5]*1000
z = head_pos[:,6]*1000
I then plotted how (x,y,z) coordinates change during MEG recording (see Figure, B).
I also wanted to compare my plots with the ones provided in the tutorial:
fig = mne.viz.plot_head_positions(head_pos) - see Figure, A for the output
Surprisingly, I observed that the obtained pictures are quite different, although at least I thought that they should represent the same thing (I tried this for other subjects, situation is similar). These results seem confusing as they are both obtained using head_pos, so it seems they are basing on the same information about head positions, and I believe that mne.viz.plot_head_positions function represents changes in (x,y,z) coordinates during MEG recording (Figure,A), same as plots in Figure,B. Still, it seems like plots in Figure are inverted, or values are multiplied by -1, or something else…
Where could I make a mistake? Why this difference occurs?
My main aim was to get optimal (x,y,z) coordinates to transform my data to this new origin. And I see example of doing this in the tutorial, however, I just don’t understand should I believe this result or not, as they are inconsistent with (x,y,z) plots.
So I am also wondering which coordinates should I believe and choose for the analysis - the ones plotted by mne.viz.plot_head_positions function of the ones in head_pos variable?
Thanks for any help!
Victoria