rfft#

pynlo.utility.fft.rfft(x, fsc=1.0, n=None, axis=-1)[source]#

Use MKL to perform a 1D FFT of the real input array along the given axis. The output array is complex and only contains positive frequencies.

The length of the transformed axis is n//2 + 1.

Parameters:
xarray_like

Input array, must be real.

fscfloat, optional

The forward transform scale factor. The default is 1.0.

nint, optional

Number of points to use along the transformed axis of the input. If n is smaller than the length of the input, the input is cropped. If it is larger, the input is padded with zeros.

axisint, optional

Axis over which to compute the FFT. The default is the last axis.

Returns:
complex ndarray

The transformed array.