irfft#

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

Use MKL to perform a 1D IFFT of the input array along the given axis. The input is assumed to contain only positive frequencies, and the output is always real.

If n is not given the length of the transformed axis is 2*(m-1), where m is the length of the transformed axis of the input. To get an odd number of output points, n must be specified.

Parameters:
xarray_like

Input array, can be complex.

fscfloat, optional

The forward transform scale factor. Internally, this function sets the reverse transform scale factor as 1/(n*fsc). The default is 1.0.

nint, optional

Length of the transformed axis of the output. For n output points, n//2+1 input points are necessary. If the input is longer than this, it is cropped. If it is shorter than this, it is padded with zeros.

axisint, optional

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

Returns:
ndarray

The transformed array.