eelbrain.pipeline.MneExperiment.load_test

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

Create and load spatio-temporal cluster test results

Parameters
  • test (None | str) – Test for which to create a report (entry in MneExperiment.tests; None to use the test that was specified most recently).

  • tstart (scalar) – Beginning of the time window for the test in seconds (default is the beginning of the epoch).

  • tstop (scalar) – End of the time window for the test in seconds (default is the end of the epoch).

  • pmin (float | 'tfce' | None) – Kind of test.

  • parc (None | str) – Parcellation for which to collect distribution.

  • mask (None | str) – Mask whole brain.

  • 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 (bool | tuple) – Apply baseline correction using this period in sensor space. True to use the epoch’s baseline specification (default).

  • src_baseline (bool | tuple) – 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).

    Warning

    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).

Returns

  • 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).