|
LSST Applications g013ef56533+b8d55c8942,g083dd6704c+a047e97985,g199a45376c+0ba108daf9,g1fd858c14a+7a3b874d60,g210f2d0738+7416ca6900,g262e1987ae+1d557ba9a3,g29ae962dfc+519d34895e,g2cef7863aa+aef1011c0b,g30d7c61c20+36d16ea71a,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+cb326ad149,g47891489e3+f459a6810c,g53246c7159+8c5ae1fdc5,g54cd7ddccb+890c8e1e5d,g5a60e81ecd+6240c63dbc,g64539dfbff+7416ca6900,g67b6fd64d1+f459a6810c,g6ebf1fc0d4+8c5ae1fdc5,g74acd417e5+0bae3c876a,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+f459a6810c,g8d7436a09f+dee7680868,g8ea07a8fe4+81eaaadc04,g90f42f885a+34c0557caf,g97be763408+14b8164b5b,g98a1a72a9c+8389601a76,g98df359435+fff771c62d,gb8cb2b794d+6728931916,gbf99507273+8c5ae1fdc5,gc2a301910b+7416ca6900,gca7fc764a6+f459a6810c,gd7ef33dd92+f459a6810c,gdab6d2f7ff+0bae3c876a,ge410e46f29+f459a6810c,ge41e95a9f2+7416ca6900,geaed405ab2+e3b4b2a692,gf9a733ac38+8c5ae1fdc5,w.2025.43
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, np.ndarray image, dict[Sequence[Sequence[int]], np.ndarray]|None image_fft=None) | |
| np.ndarray | image (self) |
| tuple[int,...] | shape (self) |
| np.ndarray | fft (self, Sequence[int] fft_shape, int|Sequence[int] axes) |
| int | __len__ (self) |
| Fourier | __getitem__ (self, int|Sequence[int]|slice index) |
Static Public Member Functions | |
| Fourier | from_fft (np.ndarray image_fft, Sequence[int] fft_shape, Sequence[int] image_shape, int|Sequence[int]|None axes=None, DTypeLike dtype=float) |
Public Attributes | |
| image | |
Protected Attributes | |
| dict | _fft = {} |
| np.ndarray | _image = image |
An array that stores its Fourier Transform
The `Fourier` class is used for images that will make
use of their Fourier Transform multiple times.
In order to prevent numerical artifacts the same image
convolved with different images might require different
padding, so the FFT for each different shape is stored
in a dictionary.
Parameters
----------
image: np.ndarray
The real space image.
image_fft: dict[Sequence[int], np.ndarray]
A dictionary of {shape: fft_value} for which each different
shape has a precalculated FFT.
| lsst.scarlet.lite.fft.Fourier.__init__ | ( | self, | |
| np.ndarray | image, | ||
| dict[Sequence[Sequence[int]], np.ndarray] | None | image_fft = None ) |
| Fourier lsst.scarlet.lite.fft.Fourier.__getitem__ | ( | self, | |
| int | Sequence[int] | slice | index ) |
Definition at line 347 of file fft.py.
| int lsst.scarlet.lite.fft.Fourier.__len__ | ( | self | ) |
| np.ndarray lsst.scarlet.lite.fft.Fourier.fft | ( | self, | |
| Sequence[int] | fft_shape, | ||
| int | Sequence[int] | axes ) |
The FFT of an image for a given `fft_shape` along desired `axes`
Parameters
----------
fft_shape:
"Fast" shape of the image used to generate the FFT.
This will be different than `image_fft.shape` if
any of the dimensions are odd, since `np.fft.rfft`
requires an even number of dimensions (for symmetry),
so this tells `np.fft.irfft` how to go from
complex k-space to real space.
axes:
The dimension(s) of the array that will be transformed.
Definition at line 313 of file fft.py.
|
static |
Generate a new Fourier object from an FFT dictionary
If the fft of an image has been generated but not its
real space image (for example when creating a convolution kernel),
this method can be called to create a new `Fourier` instance
from the k-space representation.
Parameters
----------
image_fft:
The FFT of the image.
fft_shape:
"Fast" shape of the image used to generate the FFT.
This will be different than `image_fft.shape` if
any of the dimensions are odd, since `np.fft.rfft`
requires an even number of dimensions (for symmetry),
so this tells `np.fft.irfft` how to go from
complex k-space to real space.
image_shape:
The shape of the image *before padding*.
This will regenerate the image with the extra
padding stripped.
axes:
The dimension(s) of the array that will be transformed.
Returns
-------
result:
A `Fourier` object generated from the FFT.
Definition at line 251 of file fft.py.
| np.ndarray lsst.scarlet.lite.fft.Fourier.image | ( | self | ) |
The real space image
| tuple[int, ...] lsst.scarlet.lite.fft.Fourier.shape | ( | self | ) |
|
protected |