mne.preprocessing.compute_proj_hfc#

mne.preprocessing.compute_proj_hfc(info, order=1, picks='meg', exclude='bads', *, accuracy='accurate', verbose=None)[source]#

Generate projectors to perform homogeneous/harmonic correction to data.

Remove evironmental fields from magentometer data by assuming it is explained as a homogeneous 1 or harmonic field 2. Useful for arrays of OPMs.

Parameters
infomne.Info | None

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

orderint

The order of the spherical harmonic basis set to use. Set to 1 to use only the homogeneous field component (default), 2 to add gradients, 3 to add quadrature terms etc.

picksstr | array_like | slice | None

Channels to include. Default of 'meg' (same as None) will select all non-reference MEG channels. Use ('meg', 'ref_meg') to include reference sensors as well.

excludelist | ‘bads’

List of channels to exclude from HFC, only used when picking based on types (e.g., exclude=”bads” when picks=”meg”). Specify 'bads' (the default) to exclude all channels marked as bad.

accuracystr

Can be "point", "normal" or "accurate" (default), defines which level of coil definition accuracy is used to generate model.

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
projslist of Projection

List of computed projection vectors.

Notes

To apply the projectors to a dataset, use inst.add_proj(projs).apply_proj().

New in v1.4.

References

1

Tim M. Tierney, Nicholas Alexander, Stephanie Mellor, Niall Holmes, Robert Seymour, George C. O’Neill, Eleanor A. Maguire, and Gareth R. Barnes. Modelling optically pumped magnetometer interference in meg as a spatially homogeneous magnetic field. NeuroImage, 2021. doi:10.1016/j.neuroimage.2021.118484.

2

Tim M. Tierney, George C. Mellor, Stephanie nd O’Neill, Ryan C. Timms, and Gareth R. Barnes. Spherical harmonic based noise rejection and neuronal sampling with multi-axis opms. NeuroImage, 2022. doi:10.1016/j.neuroimage.2022.119338.

Examples using mne.preprocessing.compute_proj_hfc#

Preprocessing optically pumped magnetometer (OPM) MEG data

Preprocessing optically pumped magnetometer (OPM) MEG data