nvidia.dali.experimental.dynamic.power_spectrum#

nvidia.dali.experimental.dynamic.power_spectrum(input, /, *, batch_size=None, device=None, axis=None, nfft=None, power=None)#

Calculates power spectrum of the signal.

Supported backends
  • ‘cpu’

Parameters:

input (Tensor/Batch) – Input to the operator.

Keyword Arguments:
  • axis (int, optional, default = -1) –

    Index of the dimension to be transformed to the frequency domain.

    By default, the last dimension is selected.

  • nfft (int, optional) –

    Size of the FFT.

    By default, the nfft is selected to match the length of the data in the transformation axis.

    The number of bins that are created in the output is calculated with the following formula:

    nfft // 2 + 1
    

    Note

    The output only represents the positive part of the spectrum.

  • power (int, optional, default = 2) –

    Exponent of the FFT magnitude.

    The supported values are:

    • 2 for power spectrum (real*real + imag*imag)

    • 1 for the complex magnitude (sqrt(real*real + imag*imag)).