hcp.preprocessing.apply_ref_correction

hcp.preprocessing.apply_ref_correction(raw, decim_fit=100)

Regress out MEG ref channels

Computes linear models from MEG reference channels on each sensors, predicts the MEG data and subtracts and computes the residual by subtracting the predictions.

Note

Operates in place.

Note

Can be memory demanding. To alleviate this problem the model can be fit on decimated data. This is legitimate because the linear model does not have any representation of time, only the distributions matter.

raw : instance of Raw
The BTi/4D raw data.
decim_fit : int
The decimation factor used for fitting the model. Defaults to 100.