@@ -99,8 +99,9 @@ def read_head_pos(fname):
99
99
100
100
Returns
101
101
-------
102
- pos : array, shape (N , 10)
102
+ quats : array, shape (n_pos , 10)
103
103
The position and quaternion parameters from cHPI fitting.
104
+ See :func:`mne.chpi.compute_head_pos` for details on the columns.
104
105
105
106
See Also
106
107
--------
@@ -126,8 +127,9 @@ def write_head_pos(fname, pos):
126
127
----------
127
128
fname : path-like
128
129
The filename to write.
129
- pos : array, shape (N , 10)
130
+ pos : array, shape (n_pos , 10)
130
131
The position and quaternion parameters from cHPI fitting.
132
+ See :func:`mne.chpi.compute_head_pos` for details on the columns.
131
133
132
134
See Also
133
135
--------
@@ -141,7 +143,9 @@ def write_head_pos(fname, pos):
141
143
_check_fname (fname , overwrite = True )
142
144
pos = np .array (pos , np .float64 )
143
145
if pos .ndim != 2 or pos .shape [1 ] != 10 :
144
- raise ValueError ("pos must be a 2D array of shape (N, 10)" )
146
+ raise ValueError (
147
+ f"pos must be a 2D array of shape (N, 10), got shape { pos .shape } "
148
+ )
145
149
with open (fname , "wb" ) as fid :
146
150
fid .write (
147
151
" Time q1 q2 q3 q4 q5 "
@@ -157,16 +161,17 @@ def head_pos_to_trans_rot_t(quats):
157
161
158
162
Parameters
159
163
----------
160
- quats : ndarray, shape (N , 10)
164
+ quats : ndarray, shape (n_pos , 10)
161
165
MaxFilter-formatted position and quaternion parameters.
166
+ See :func:`mne.chpi.read_head_pos` for details on the columns.
162
167
163
168
Returns
164
169
-------
165
- translation : ndarray, shape (N , 3)
170
+ translation : ndarray, shape (n_pos , 3)
166
171
Translations at each time point.
167
- rotation : ndarray, shape (N , 3, 3)
172
+ rotation : ndarray, shape (n_pos , 3, 3)
168
173
Rotations at each time point.
169
- t : ndarray, shape (N ,)
174
+ t : ndarray, shape (n_pos ,)
170
175
The time points.
171
176
172
177
See Also
@@ -929,7 +934,8 @@ def compute_head_pos(
929
934
Returns
930
935
-------
931
936
quats : ndarray, shape (n_pos, 10)
932
- The ``[t, q1, q2, q3, x, y, z, gof, err, v]`` for each fit.
937
+ MaxFilter-formatted head position parameters. The columns correspond to
938
+ ``[t, q1, q2, q3, x, y, z, gof, err, v]`` for each time point.
933
939
934
940
See Also
935
941
--------
0 commit comments