eelbrain.pipeline.Pipeline.load_test

Pipeline.load_test(test, tstart=None, tstop=None, pmin=None, disconnect_labels=False, samples=10000, data=None, baseline=True, smooth=None, src_baseline=None, samplingrate=None, return_data=False, **state)[source]

Create and load spatio-temporal cluster test results

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

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

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

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

  • disconnect_labels (bool) – For data='source', disconnect cluster adjacency across labels in the current parc state. The default is to run one masked whole-brain source 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 kind to test (the analysis space is set by the inv state: inv='' for sensor space, a non-empty inverse for source space). The default (None) uses default_data in sensor space, or the full source estimates in source space. Examples:

    • None with inv set: spatio-temporal test in source space.

    • None with inv='': spatio-temporal test in sensor space (using default_data, e.g. 'meg' or 'eeg').

    • 'source.mean' with inv set: ROI mean time course.

    • 'eeg.rms' with inv='': RMS across the EEG sensors.

    • 'eeg' with inv='': spatio-temporal test of EEG sensors.

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

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

  • src_baseline (bool | tuple[float | None, 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.

  • samplingrate (int) – Samplingrate in Hz for the analysis (default is specified in epoch definition).

  • return_data (bool) – Return the data along with the test result (see below).

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

Returns:

  • ds (Dataset | ROIData) – 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).

Return type:

NDTest | ROITestResult | tuple[Dataset | ROIData, NDTest | ROITestResult]