musicflower.util.get_fourier_component

musicflower.util.get_fourier_component(pcds, fourier_component)[source]

Compute the amplitude and phase of a specific Fourier component.

Parameters
  • pcds (ndarray) – array of arbitrary shape, the Fourier transform is computed along the last dimension

  • fourier_component (int) – component of the Fourier transform to extract (must not be larger than the last dimension of pcds)

Return type

Tuple[ndarray, ndarray]

Returns

amplitude, phase (arrays of same shape as pcds without the last dimension)