Skip to content

pypty.fft

fftfreq

Wrapper for fftfreq function.

PARAMETER DESCRIPTION
length

Length of the output array.

TYPE: int

sampling

Sample spacing (default is 1).

TYPE: float DEFAULT: 1

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

Discrete Fourier Transform sample frequencies.

ifftfreq

Wrapper for ifftfreq function.

PARAMETER DESCRIPTION
length

Length of the output array.

TYPE: int

sampling

Sample spacing (default is 1).

TYPE: float DEFAULT: 1

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

Discrete inverse Fourier Transform sample frequencies.

fftshift

Wrapper for fftshift function.

PARAMETER DESCRIPTION
array

Input array to be shifted.

TYPE: ndarray

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

Shifted array.

ifftshift

Wrapper for ifftshift function.

PARAMETER DESCRIPTION
array

Input array to be inverse shifted.

TYPE: ndarray

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

Inverse shifted array.

shift_fft2

Wrapper for xp.fft.fftshift(xp.fft.fft2(...)) functions.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the FFT (default is (0, 1)).

TYPE: tuple of int DEFAULT: (0, 1)

overwrite_x

If True, allow overwriting the input array (default is False).

TYPE: bool DEFAULT: False

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

2D Fourier Transform of the input array, shifted.

fft2

Wrapper for fft2 function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the FFT (default is (0, 1)).

TYPE: tuple of int DEFAULT: (0, 1)

overwrite_x

If True, allow overwriting the input array (default is False).

TYPE: bool DEFAULT: False

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

2D Fourier Transform of the input array.

ifft2

Wrapper for ifft2 function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the inverse FFT (default is (0, 1)).

TYPE: tuple of int DEFAULT: (0, 1)

overwrite_x

If True, allow overwriting the input array (default is False).

TYPE: bool DEFAULT: False

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

2D inverse Fourier Transform of the input array.

ifft2_ishift

Wrapper for xp.fft.ifft2(xp.fft.ifftshift(...)) function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the inverse FFT (default is (0, 1)).

TYPE: tuple of int DEFAULT: (0, 1)

overwrite_x

If True, allow overwriting the input array (default is False).

TYPE: bool DEFAULT: False

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

2D inverse Fourier Transform of the input array, after shifting.

shift_fftn

Wrapper for xp.fft.fftshift(xp.fft.fftn(...)) function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the FFT (default is (0, 1, 2)).

TYPE: tuple of int DEFAULT: (0, 1, 2)

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

N-dimensional Fourier Transform of the input array, shifted.

ifftn_ishift

Wrapper for xp.fft.ifftn(xp.fft.ifftshift(...)) function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the inverse FFT (default is (0, 1, 2)).

TYPE: tuple of int DEFAULT: (0, 1, 2)

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

N-dimensional inverse Fourier Transform of the input array, after shifting.

ifftn

Wrapper for ifftn function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the inverse FFT (default is (0, 1, 2)).

TYPE: tuple of int DEFAULT: (0, 1, 2)

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

N-dimensional inverse Fourier Transform of the input array.

fftn

Wrapper for fftn function.

PARAMETER DESCRIPTION
arr

Input array to be transformed.

TYPE: ndarray

axes

Axes over which to compute the FFT (default is (0, 1, 2)).

TYPE: tuple of int DEFAULT: (0, 1, 2)

xp

numpy or cupy, cpu or gpu backend

DEFAULT: numpy

RETURNS DESCRIPTION
ndarray

N-dimensional Fourier Transform of the input array.