meeg_utils.steps.HFC#
- class meeg_utils.steps.HFC(order=1, *, accuracy='accurate')[source]#
Remove environmental fields from OPM data by a homogeneous or harmonic field model.
On-head OPM arrays have no reference sensors or fixed helmet, so the interference is modelled as a spatially smooth field: homogeneous (
order=1; Tierney et al., 2021, NeuroImage 244:118484) or a low-order spherical-harmonic expansion (order=2adds gradients; Tierney et al., 2022, NeuroImage 258:119338). The field is fitted from the sensor positions and orientations alone (mne.preprocessing.compute_proj_hfc()) and projected out of the good MEG channels.- Parameters:
order (int) – Order of the field model: 1 (homogeneous, 3 components), 2 (plus gradients, 8 components), …
accuracy ({"point", "normal", "accurate"}) – Coil-definition accuracy used for the model.
- qc_#
n_components(projected out),n_channels,axes_per_location(median number of sensors per location; with one, HFC also removes brain signal and a warning is raised),power_change_db(good MEG channels, after relative to before; strongly negative values mean much interference was removed) andshielding_db(power reduction below 10 Hz, where environmental fields dominate).- Type:
Notes
The projectors are applied to the data and stored as active projectors in
info["projs"], so later rank estimates (e.g. for ICA) account for them; existing projectors are left as they are. Mark bad channels first: they are excluded from the model and left unchanged.Figures (
plot()):"psd", spectra before and after.Methods
__init__([order, accuracy])fit(inst[, y, system])Learn the step's state from the data.
fit_transform(inst[, y, system, copy])Fit the step on the data and transform the same data.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
plot([kind, inst])Draw quality-control figures.
set_fit_request(*[, inst, system])Configure whether metadata should be requested to be passed to the
fitmethod.set_params(**params)Set the parameters of this estimator.
set_transform_request(*[, copy, inst])Configure whether metadata should be requested to be passed to the
transformmethod.transform(inst, *[, copy])Apply the fitted step to the data.
Attributes
Data types the step accepts.
adds_annotationsWhether the step may add
BAD_annotations (existing ones are kept).changes_channelsWhether the step may add, drop or reorder channels.
changes_timesWhether the step may change the time axis (e.g. resampling, cropping).
drops_epochsWhether the step may drop epochs (e.g. artifact rejection).
kind -> whether it needs data (
inst).returnsData type the step returns;
Nonemeans the same type as its input.Acquisition systems the step applies to;
Nonemeans all systems.- accepts: ClassVar[tuple[type, ...]] = (<class 'mne.io.base.BaseRaw'>, <class 'mne.epochs.BaseEpochs'>, <class 'mne.evoked.Evoked'>)#
Data types the step accepts.