roiextract.pipeline.Inverse#

class roiextract.pipeline.Inverse(inv, method, lambda2, nave=1)#

Source reconstruction via an inverse operator. This step wraps the mne.minimum_norm.apply_inverse_raw() function, allowing quick access to the weight matrix corresponding to the inverse operator.

Note

Currently, only fixed source orientations are supported.

Parameters:
invInverseOperator

The inverse operator to be used for source reconstruction.

methodstr

The name of the reconstruction method to use. Supported methods include "MNE", "dSPM", "sLORETA", and "eLORETA".

lambda2float

The regularization parameter for the inverse operator.

naveint, default=1

Number of averages used to regularize the solution. Set to 1 on raw data.

Methods

fit(data)

Fit the inverse operator to the provided data.

fit_transform(data)

Fit the inverse operator to the provided data and then apply it.

get_names()

Names for rows of the weight matrix that corresponds to this step.

get_params()

Parameters of the pipeline step that should be saved in the corresponding spatial filter.

get_weights()

The weight matrix corresponding to the fitted inverse operator.

transform(data)

Apply the fitted inverse operator to the provided data.

fit(data)#

Fit the inverse operator to the provided data.

Parameters:
dataRaw

The raw data to fit the inverse operator on.

Returns:
selfInverse

The fitted inverse operator.

fit_transform(data)#

Fit the inverse operator to the provided data and then apply it.

Parameters:
dataRaw

The raw data to fit and apply the inverse operator on.

Returns:
stcSourceEstimate

The source estimate obtained by applying the inverse operator.

get_names()#

Names for rows of the weight matrix that corresponds to this step.

Returns:
row_nameslist of str

Names for rows of the weight matrix that corresponds to this step.

get_params()#

Parameters of the pipeline step that should be saved in the corresponding spatial filter.

Returns:
paramsdict

Parameters of the pipeline step that should be saved in the corresponding spatial filter.

get_weights()#

The weight matrix corresponding to the fitted inverse operator.

Returns:
weightsarray, shape (n_sources, n_sensors)

The weight matrix of the inverse operator.

transform(data)#

Apply the fitted inverse operator to the provided data.

Parameters:
dataRaw

The raw data to apply the inverse operator on.

Returns:
stcSourceEstimate

The source estimate obtained by applying the inverse operator.