conatus.spectrum

conatus.spectrum(source, axis, *, label=None)[source]

One-sided power spectrum of a field along a periodic axis, averaged over the others: with f_k the discrete Fourier coefficients of the grid values (rfft / N), E(k) = c_k \|f_k\|^2 (c_k = 2 except k = 0 and the Nyquist mode), so that sum_k E(k) = mean(f^2) (Parseval, checked by test). Shown against the wavenumber 2 pi k / L on log-log axes; k = 0 (the mean) is left out of the curve.

Parameters:
  • source (str)

  • axis (str)

  • label (str | None)

Return type:

Stat