pybic.BicAn.InstDiffFreq

BicAn.InstDiffFreq(j, k, fband=0, fwindow=0, dist='gauss', plot=True, err=False, histo=False)[source]

Plot the instantaneous difference frequency vs normalized bispectral modulus.

Here we define

\[\Delta f_{\rm inst}(t) \equiv \frac{1}{2\pi}\frac{d\beta(t)}{dt},\]

where, for a single value in bifrequency space \((f_1,f_2)\), the local bispectrum \(\widetilde{\mathcal{B}}\) is given by

\[\widetilde{\mathcal{B}}(t) = X(t,f_1)X(t,f_2)X^*(t,f_1+f_2) = |\widetilde{\mathcal{B}}(t)| e^{i \beta(t)},\]

where \(X(t,f)\) is a time-frequency representation. The biphase \(\beta(t)\) is then

\[\beta(t) = \varphi(t,f_1) + \varphi(t,f_2) - \varphi(t,f_1+f_2),\]

defining the phases \(\varphi(t,f)\) via \(X(t,f) = |X(t,f)|e^{i\varphi(t,f)}\).

Parameters:
  • j (int) – Index 1.

  • k (int) – Index 2.

  • fband (float) – Instantaneous frequency bandwidth. Presently affects only the output distribution!

  • fwindow (float) – Limits for x (frequency) axis.

  • dist (str) – Choose Gaussian ('gauss') or Lorentzian distribution.

  • plot (bool) – Plot inst diff freq vs. time.

  • err (bool) – Plot errorbars instead of timeline.

  • histo (bool) – Plot phase histogram.

Returns:

freq, amp, freq_err, um = InstDiffFreq(...)

  • freq (ndarray) - Instantaneous difference frequency.

  • amp (ndarray) - Normalized bispectral modulus.

  • freq_err (ndarray) - Std dev of inst diff freq.

  • um (ndarray) - Contrived freq-amp distribution.

Return type:

list