mne_connectivity.seed_target_indices#

mne_connectivity.seed_target_indices(seeds, targets)[source]#

Generate indices parameter for bivariate seed-based connectivity.

Parameters:
seedsarray of int | int, shape (n_unique_seeds)

Seed indices.

targetsarray of int | int, shape (n_unique_targets)

Indices of signals for which to compute connectivity.

Returns:
indicestuple of array of int, shape (2, n_cons)

The indices parameter used for connectivity computation.

Notes

seeds and targets should be array-likes or integers representing the indices of the channel pairs in the data for each connection. seeds and targets will be expanded such that connectivity will be computed between each seed and each target. E.g. the seeds and targets:

seeds   = [0, 1]
targets = [2, 3, 4]

would be returned as:

indices = (np.array([0, 0, 0, 1, 1, 1]),  # seeds
           np.array([2, 3, 4, 2, 3, 4]))  # targets

where the indices have been expanded to have shape (2, n_cons), where n_cons = n_unique_seeds * n_unique_targets.

Examples using mne_connectivity.seed_target_indices#

Compute Phase Slope Index (PSI) in source space for a visual stimulus

Compute Phase Slope Index (PSI) in source space for a visual stimulus

Compute coherence in source space using a MNE inverse solution

Compute coherence in source space using a MNE inverse solution

Compute multivariate measures of the imaginary part of coherency

Compute multivariate measures of the imaginary part of coherency

Compute seed-based time-frequency connectivity in sensor space

Compute seed-based time-frequency connectivity in sensor space