pytutorial/numpy/fft
David Rotermund 032b71d409
Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
2023-12-15 14:06:19 +01:00
..
README.md Update README.md 2023-12-15 14:06:19 +01:00

FFT

{:.no_toc}

* TOC {:toc}

The goal

Fouriert transformations are an important part of data analysis.

Questions to David Rotermund

Numpy vs scipy

pip install scipy

Numpy says itself:

The SciPy module scipy.fft is a more comprehensive superset of numpy.fft, which includes only a basic set of routines.

Discrete Fourier Transform (numpy.fft)

Standard FFTs

fft(a[, n, axis, norm]) Compute the one-dimensional discrete Fourier Transform.
ifft(a[, n, axis, norm]) Compute the one-dimensional inverse discrete Fourier Transform.
fft2(a[, s, axes, norm]) Compute the 2-dimensional discrete Fourier Transform.
ifft2(a[, s, axes, norm]) Compute the 2-dimensional inverse discrete Fourier Transform.
fftn(a[, s, axes, norm]) Compute the N-dimensional discrete Fourier Transform.
ifftn(a[, s, axes, norm]) Compute the N-dimensional inverse discrete Fourier Transform.

Real FFTs

rfft(a[, n, axis, norm]) Compute the one-dimensional discrete Fourier Transform for real input.
irfft(a[, n, axis, norm]) Computes the inverse of rfft.
rfft2(a[, s, axes, norm]) Compute the 2-dimensional FFT of a real array.
irfft2(a[, s, axes, norm]) Computes the inverse of rfft2.
rfftn(a[, s, axes, norm]) Compute the N-dimensional discrete Fourier Transform for real input.
irfftn(a[, s, axes, norm]) Computes the inverse of rfftn.

Hermitian FFTs

hfft(a[, n, axis, norm]) Compute the FFT of a signal that has Hermitian symmetry, i.e., a real spectrum.
ihfft(a[, n, axis, norm]) Compute the inverse FFT of a signal that has Hermitian symmetry.

Helper routines

fftfreq(n[, d]) Return the Discrete Fourier Transform sample frequencies.
rfftfreq(n[, d]) Return the Discrete Fourier Transform sample frequencies (for usage with rfft, irfft).
fftshift(x[, axes]) Shift the zero-frequency component to the center of the spectrum.
ifftshift(x[, axes]) The inverse of fftshift.