572231fb3f
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> |
||
---|---|---|
.. | ||
README.md |
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.
fft vs rfft
numpy.fft.fft
fft.fft(a, n=None, axis=-1, norm=None)[source]
Compute the one-dimensional discrete Fourier Transform.
This function computes the one-dimensional n-point discrete Fourier Transform (DFT) with the efficient Fast Fourier Transform (FFT) algorithm [CT].
numpy.fft.rfft
fft.rfft(a, n=None, axis=-1, norm=None)[source]
Compute the one-dimensional discrete Fourier Transform for real input.
This function computes the one-dimensional n-point discrete Fourier Transform (DFT) of a real-valued array by means of an efficient algorithm called the Fast Fourier Transform (FFT).
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. |