MneExperiment.load_test(test, tstart=None, tstop=None, pmin=None, parc=None, mask=None, samples=10000, data='source', baseline=True, smooth=None, src_baseline=None, return_data=False, make=False, **state)

Create and load spatio-temporal cluster test results

  • test (str) – Test for which to create a report (entry in MneExperiment.tests.

  • tstart (Optional[float]) – Beginning of the time window for the test in seconds (default is the beginning of the epoch).

  • tstop (Optional[float]) – End of the time window for the test in seconds (default is the end of the epoch).

  • pmin (Union[Literal[‘tfce’], float, None]) – Kind of test.

  • parc (Optional[str]) – Run the test separately in each label of parc. Warning: for spatio-temporal tests, this does not properly correct for multiple comparisons.

  • mask (Optional[str]) – Parcellation to use as anatomical mask in which to perform the test.

  • samples (int) – Number of random permutations of the data used to determine cluster p-values (default 10’000). If the test is already cached with a number ≥ samples the cached version is returned, otherwise the test is recomputed.

  • data (str) –

    Data to test, for example:

    • 'sensor' spatio-temporal test in sensor space.

    • 'source' spatio-temporal test in source space.

    • 'source.mean' ROI mean time course.

    • 'sensor.rms' RMS across sensors.

  • baseline (Union[bool, Tuple[Optional[float], Optional[float]]]) – Apply baseline correction using this period in sensor space. True to use the epoch’s baseline specification (default).

  • smooth (Optional[float]) – Smooth data in space before test (value in [m] STD of Gaussian).

  • src_baseline (Union[bool, Tuple[Optional[float], Optional[float]], None]) – Apply baseline correction using this period in source space. True to use the epoch’s baseline specification. The default is to not apply baseline correction.

  • return_data (bool) –

    Return the data along with the test result (see below).


    Single trial data (i.e., two-stage tests) take up a lot of memory and it might not be possible to load all data at once. Instead, loop through subjects and collect summary statistics.

  • make (bool) – If the target file does not exist, create it (could take a long time depending on the test; if False, raise an IOError).

  • ... – State parameters (Use the group state parameter to select the subject group for which to perform the test).


  • ds (Dataset | dict (if return_data==True)) – Data that forms the basis of the test (for ROI tests, a {roi: dataset} dictionary).

  • res (NDTest | ROITestResult) – Test result for the specified test (for ROIs tests, an ROITestResult object).