braindecode.preprocessing.ApplyGradientCompensation#

class braindecode.preprocessing.ApplyGradientCompensation(grade, verbose=None)[source]#

Braindecode preprocessor wrapper for apply_gradient_compensation().

Apply CTF gradient compensation.

Warning

The compensation matrices are stored with single precision, so repeatedly switching between different of compensation (e.g., 0->1->3->2) can increase numerical noise, especially if data are saved to disk in between changing grades. It is thus best to only use a single gradient compensation level in final analyses.

Parameters:
gradeint

CTF gradient compensation level.

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:
rawinstance of Raw

The modified Raw instance. Works in-place.