braindecode.preprocessing.ApplyProj#

class braindecode.preprocessing.ApplyProj(*, projs=None, verbose=None)[source]#

Braindecode preprocessor wrapper for apply_proj().

Apply the signal space projection (SSP) operators to the data.

Parameters:
projsProjection | list of Projection | None

The projectors to apply. All projectors must already be present in self.info["projs"]. If None, all projectors are applied.

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:
selfsame type as the input data

The instance.

Notes

Once a projector has been applied, it can no longer be removed. It is usually not recommended to apply the projectors at too early stages, as they are applied automatically later on (e.g. when computing inverse solutions). Hint: using the copy method individual projection vectors can be tested without affecting the original data. With evoked data, consider the following example:

projs_a = mne.read_proj('proj_a.fif')
projs_b = mne.read_proj('proj_b.fif')
# add the first, copy, apply and see ...
evoked.add_proj(a).copy().apply_proj().plot()
# add the second, copy, apply and see ...
evoked.add_proj(b).copy().apply_proj().plot()
# drop the first and see again
evoked.copy().del_proj(0).apply_proj().plot()
evoked.apply_proj()  # finally keep both