phase_amplitude_coupling

phase_amplitude_coupling#

class braintools.metric.phase_amplitude_coupling(lfp, dt, phase_freq_range=(4, 8), amplitude_freq_range=(30, 100), n_bins=18)#

Compute phase-amplitude coupling (PAC) via the Tort modulation index.

The low-frequency phase and high-frequency amplitude are extracted from the analytic band-limited signals (Hilbert construction in the frequency domain). The amplitude is binned by phase and the modulation index is the Kullback-Leibler divergence of the amplitude distribution from uniform, normalized by log(n_bins).

Parameters:
  • lfp (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – LFP signal with shape (n_time,).

  • dt (float | Quantity) – Sampling interval (seconds if a float; converted if a Quantity).

  • phase_freq_range (Tuple[float, float]) – Low-frequency band (Hz) for phase extraction, e.g. theta.

  • amplitude_freq_range (Tuple[float, float]) – High-frequency band (Hz) for amplitude extraction, e.g. gamma.

  • n_bins (int) – Number of phase bins.

Return type:

Tuple[Array, Array, Array]

Returns:

  • modulation_index (jax.Array) – Scalar modulation index in [0, 1] (0 = no coupling).

  • phase_bins (jax.Array) – Phase bin centers, shape (n_bins,).

  • mean_amplitudes (jax.Array) – Mean high-frequency amplitude in each phase bin, shape (n_bins,).