mne.chpi.compute_chpi_locs#

mne.chpi.compute_chpi_locs(info, chpi_amplitudes, t_step_max=1.0, too_close='raise', adjust_dig=False, verbose=None)[source]#

Compute locations of each cHPI coils over time.

Parameters:
infomne.Info

The mne.Info object with information about the sensors and methods of measurement.

chpi_amplitudesdict

The time-varying cHPI coil amplitudes, with entries “times”, “proj”, and “slopes”. Typically obtained by mne.chpi.compute_chpi_amplitudes().

t_step_maxfloat

Maximum time step to use.

too_closestr

How to handle HPI positions too close to the sensors, can be ‘raise’ (default), ‘warning’, or ‘info’.

adjust_digbool

If True, adjust the digitization locations used for fitting based on the positions localized at the start of the file.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
chpi_locsdict

The time-varying cHPI coils locations, with entries “times”, “rrs”, “moments”, and “gofs”.

Notes

This function is designed to take the output of mne.chpi.compute_chpi_amplitudes() and:

  1. Get HPI coil locations (as digitized in info['dig']) in head coords.

  2. If the amplitudes are 98% correlated with last position (and Δt < t_step_max), skip fitting.

  3. Fit magnetic dipoles using the amplitudes for each coil frequency.

The number of fitted points n_pos will depend on the velocity of head movements as well as t_step_max (and t_step_min from mne.chpi.compute_chpi_amplitudes()).

New in version 0.20.

Examples using mne.chpi.compute_chpi_locs#

Extracting and visualizing subject head movement

Extracting and visualizing subject head movement