mne.chpi.compute_head_pos#
- mne.chpi.compute_head_pos(info, chpi_locs, dist_limit=0.005, gof_limit=0.98, adjust_dig=False, *, weighted=None, verbose=None)[source]#
Compute time-varying head positions.
- Parameters:
- info
mne.Info The
mne.Infoobject with information about the sensors and methods of measurement.- chpi_locs
dict The time-varying cHPI coils locations, with entries “times”, “rrs”, “moments”, and “gofs”. Typically obtained by
compute_chpi_locs()orextract_chpi_locs_ctf().- dist_limit
float Minimum distance (m) to accept for coil position fitting.
- gof_limit
float Minimum goodness of fit to accept for each coil.
- adjust_digbool
If True, adjust the digitization locations used for fitting based on the positions localized at the start of the file.
- weightedbool
If
True, fit all coils that pass thegof_limitanddist_limitcriteria simultaneously, weighting each coil by its goodness of fit and its inter-coil distance error. IfFalse, subselect the three coils that yield the best fit. Weighting avoids discontinuous jumps in the estimated head position caused by coils switching in and out of the fit (see #11330). The default (False) will change to True in 1.14.New in v1.13.
- verbosebool |
str|int|None Control verbosity of the logging output. If
None, use the default verbosity level. See the logging documentation andmne.verbose()for details. Should only be passed as a keyword argument.
- info
- Returns:
- quats
ndarray, shape (n_pos, 10) MaxFilter-formatted head position parameters. The columns correspond to
[t, q1, q2, q3, x, y, z, gof, err, v]for each time point.
- quats
Notes
New in v0.20.
Examples using mne.chpi.compute_head_pos#
Annotate movement artifacts and reestimate dev_head_t
Signal-space separation (SSS) and Maxwell filtering