Math & FFT Utilities
Centered FFT functions and mathematical helpers for testing.
Centered FFT
torchlinops.utils.cfftn
Compute the centered n-dimenional FFT.
Assumes the origin lies in the middle of the array (i.e., that the array has been fftshifted)
| PARAMETER | DESCRIPTION |
|---|---|
dim
|
The dimensions over which to take the ifft. |
norm
|
Normalization mode. For the forward transform (fft()), these correspond to:
Calling the backward transform (cifftn()) with the same normalization mode will apply an overall normalization of 1/n between the two transforms. This is required to make ifft() the exact inverse. Default is "backward" (no normalization).
TYPE:
|
Source code in src/torchlinops/utils/_fft.py
torchlinops.utils.cifftn
Compute the centered n-dimensional inverse FFT.
Assumes the origin lies in the middle of the array (i.e., that the array has been fftshifted)
| PARAMETER | DESCRIPTION |
|---|---|
dim
|
The dimensions over which to take the ifft. |
norm
|
Normalization mode. For the backward transform (ifft()), these correspond to:
Calling the forward transform (cfftn()) with the same normalization mode will apply an overall normalization of 1/n between the two transforms. This is required to make ifft() the exact inverse. Default is "backward" (normalize by 1/n).
TYPE:
|
Source code in src/torchlinops/utils/_fft.py
torchlinops.utils.cfft
torchlinops.utils.cifft
torchlinops.utils.cfft2
torchlinops.utils.cifft2
Adjoint Helpers
torchlinops.utils.inner
torchlinops.utils.is_adjoint
The adjoint test states that if A and AH are adjoints, then inner(y, Ax) = inner(AHy, x)