meeg_utils.testing.check_step#
- meeg_utils.testing.check_step(step, inst)[source]#
Check that a step honours the meeg-utils step contract.
The checks are:
Parameters survive
get_params/set_params,clone()and a round trip through the pipeline configuration format.transformbeforefitraisesNotFittedError.fitreturns the step itself and setssystem_andqc_.With
copy=True, neitherfitnortransformmodify the input.The output has the declared type.
Unless the step declares
changes_channels, channel names and order are unchanged.Unless the step declares
changes_times, the sampling rate, number of samples,first_samp,meas_dateand annotations are unchanged (steps declaringadds_annotationsmay only addBAD_ones).Every kind in
plot_kindsthat is available for this fit draws a figure (or a list of figures), andplot()without data draws exactly the available kinds that need none.
- Parameters:
step (Step) – An unfitted step.
inst (Raw | Epochs | Evoked) – Preloaded data the step can process.
- Raises:
AssertionError – If a check fails.