pyhctsa.operations.spectral.phase_amp_coupling

pyhctsa.operations.spectral.phase_amp_coupling(y, n_bands=5, max_n='full', n_phase_bins=18)

Cross-frequency phase-amplitude coupling.

Parameters:
y : array-like

The input time series.

n_bands : int, optional

The number of equal-width frequency bands to split the spectrum into (default: 5, matching spectral_summaries()’ 5-band split). Phase-amplitude pairs are formed from every pair of bands i < j (phase from the slower band, amplitude from the faster), giving comb(n_bands, 2) pairs.

max_n : int or str, optional

The maximum number of samples to consider; longer series are cropped to their first max_n points. Can be 'full' to disable cropping (default).

n_phase_bins : int, optional

The number of phase bins used to estimate each band pair’s modulation index (default: 18, i.e. 20-degree bins, the standard choice from Tort et al. 2010).

Returns:

  • maxMI: the maximum modulation index across all band pairs – the comodulogram peak, i.e. whether any band pair shows real coupling.

  • entropyMI: the normalized Shannon entropy of the MI values across pairs (0 = coupling concentrated in a single band pair, 1 = uniformly diffuse across all pairs).

Returns NaN if the time series is too short for the requested number of bands.

Return type:

dict