bids.analysis.analysis.Step

class Step(layout, level, index, name=None, transformations=None, model=None, contrasts=None, inputs=None, dummy_contrasts=False)[source]

Represents a single analysis step from a BIDS-Model specification.

Parameters
  • layout (bids.layout.BIDSLayout) – The BIDSLayout containing all project files.

  • level (str) – The BIDS keyword to use as the grouping variable; must be one of [‘run’, ‘session’, ‘subject’, or ‘dataset’].

  • index (int) – The numerical index of the current Step within the sequence of steps.

  • name (str) – Optional name to assign to the step. Must be specified in order to enable name-based indexing in the parent Analysis.

  • transformations (list) – List of BIDS-Model transformations to apply.

  • model (dict) – The ‘model’ part of the BIDS-StatsModels specification.

  • contrasts (list) – List of contrasts to apply to the parameter estimates generated when the model is fit.

  • inputs (list) – Optional list of BIDSVariableCollections to use as input to this Step (typically, the outputs from the preceding Step).

  • dummy_contrasts (dict) – Optional dictionary specifying which conditions to create indicator contrasts for. Dictionary must include a “type” key (‘t’ or ‘FEMA’), and optionally a subset of “conditions”. This parameter is over-written by the setting in setup() if the latter is passed.

Methods

add_collections(self[, drop_na])

Add BIDSVariableCollections (i.e., predictors) to the current Step.

get_collections(self, \*\*filters)

Returns BIDSVariableCollections at the current Step.

get_contrasts(self, collection[, names, …])

Return contrast information at this step for the passed collection.

get_model_spec(self, collection[, sampling_rate])

Get a ModelSpec instance for the passed collection.

setup(self[, inputs])

Set up the Step.

__init__(self, layout, level, index, name=None, transformations=None, model=None, contrasts=None, inputs=None, dummy_contrasts=False)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, layout, level, index[, name, …])

Initialize self.

add_collections(self[, drop_na])

Add BIDSVariableCollections (i.e., predictors) to the current Step.

get_collections(self, \*\*filters)

Returns BIDSVariableCollections at the current Step.

get_contrasts(self, collection[, names, …])

Return contrast information at this step for the passed collection.

get_model_spec(self, collection[, sampling_rate])

Get a ModelSpec instance for the passed collection.

setup(self[, inputs])

Set up the Step.