tensorpac.methods.modulation_index_nb

tensorpac.methods.modulation_index_nb(pha, amp, n_bins=18)[source]

Numba-based Modulation index (MI).

The modulation index is obtained using the Kullback Leibler Distance which measures how much the distribution of binned amplitude differs from a uniform distribution.

Parameters
pha, amparray_like

Respectively the arrays of phases of shape (n_pha, n_epochs, n_times) and the array of amplitudes of shape (n_amp, n_epochs, n_times). Both arrays should be of type float64 (np.float64)

n_binsint | 18

Number of bins to binarize the amplitude according to phase intervals (should be np.int64)

Returns
pacarray_like

Array of phase amplitude coupling of shape (n_amp, n_pha, …)

References

Tort et al. 2010 [11]