mne.bem.fit_sphere_to_headshape

mne.bem.fit_sphere_to_headshape(info, dig_kinds='auto', units='m', verbose=None)[source]

Fit a sphere to the headshape points to determine head center.

Parameters
infoinstance of Info

Measurement info.

dig_kindslist of str | str

Kind of digitization points to use in the fitting. These can be any combination of (‘cardinal’, ‘hpi’, ‘eeg’, ‘extra’). Can also be ‘auto’ (default), which will use only the ‘extra’ points if enough (more than 4) are available, and if not, uses ‘extra’ and ‘eeg’ points.

unitsstr

Can be “m” (default) or “mm”.

New in version 0.12.

move_originbool

If True, allow the origin to vary. Otherwise, fix it at (0, 0, 0).

New in version 0.20.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). If used, it should be passed as a keyword-argument only.

Returns
radiusfloat

Sphere radius.

origin_head: ndarray, shape (3,)

Head center in head coordinates.

origin_device: ndarray, shape (3,)

Head center in device coordinates.

Notes

This function excludes any points that are low and frontal (z < 0 and y > 0) to improve the fit.

Examples using mne.bem.fit_sphere_to_headshape