|
LSST Applications g00d0e8bbd7+edbf708997,g03191d30f7+9ce8016dbd,g1955dfad08+0bd186d245,g199a45376c+5137f08352,g1fd858c14a+a888a50aa2,g262e1987ae+45f9aba685,g29ae962dfc+1c7d47a24f,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3fd5ace14f+eed17d2c67,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+c4107e45b5,g67b6fd64d1+6dc8069a4c,g74acd417e5+f452e9c21a,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+2025e9ce17,g7cc15d900a+2d158402f9,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d4809ba88+c4107e45b5,g8d7436a09f+e96c132b44,g8ea07a8fe4+db21c37724,g98df359435+aae6d409c1,ga2180abaac+edbf708997,gac66b60396+966efe6077,gb632fb1845+88945a90f8,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gca7fc764a6+6dc8069a4c,gd7ef33dd92+6dc8069a4c,gda68eeecaf+7d1e613a8d,gdab6d2f7ff+f452e9c21a,gdbb4c4dda9+c4107e45b5,ge410e46f29+6dc8069a4c,ge41e95a9f2+c4107e45b5,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Classes | |
| class | MultiResolutionSupport |
Functions | |
| np.ndarray | bspline_convolve (np.ndarray image, int scale) |
| int | get_starlet_scales (Sequence[int] image_shape, int|None scales=None) |
| np.ndarray | starlet_transform (np.ndarray image, int|None scales=None, int generation=2, Callable|None convolve2d=None) |
| np.ndarray | multiband_starlet_transform (np.ndarray image, int|None scales=None, int generation=2, Callable|None convolve2d=None) |
| np.ndarray | starlet_reconstruction (np.ndarray starlets, int generation=2, Callable|None convolve2d=None) |
| np.ndarray | multiband_starlet_reconstruction (np.ndarray starlets, int generation=2, Callable|None convolve2d=None) |
| MultiResolutionSupport | get_multiresolution_support (np.ndarray image, np.ndarray starlets, np.floating sigma, float sigma_scaling=3, float epsilon=1e-1, int max_iter=20, str image_type="ground") |
| np.ndarray | apply_wavelet_denoising (np.ndarray image, np.floating|None sigma=None, float sigma_scaling=3, float epsilon=1e-1, int max_iter=20, str image_type="ground", bool positive=True) |
| np.ndarray lsst.scarlet.lite.wavelet.apply_wavelet_denoising | ( | np.ndarray | image, |
| np.floating | None | sigma = None, | ||
| float | sigma_scaling = 3, | ||
| float | epsilon = 1e-1, | ||
| int | max_iter = 20, | ||
| str | image_type = "ground", | ||
| bool | positive = True ) |
Apply wavelet denoising
Uses the algorithm and notation from Starck et al. 2011, section 4.1
Parameters
----------
image:
The image to denoise
sigma:
The standard deviation of the image
sigma_scaling:
The threshold in units of sigma to declare a coefficient significant
epsilon:
Convergence criteria for determining the support
max_iter:
The maximum number of iterations.
This applies to both finding the support and the denoising loop.
image_type:
The type of image that is being used.
This should be "ground" for ground based images with wide PSFs or
"space" for images from space-based telescopes with a narrow PSF.
positive:
Whether or not the expected result should be positive
Returns
-------
result:
The resulting denoised image after `max_iter` iterations.
Definition at line 336 of file wavelet.py.
| np.ndarray lsst.scarlet.lite.wavelet.bspline_convolve | ( | np.ndarray | image, |
| int | scale ) |
Convolve an image with a bspline at a given scale.
This uses the spline
`h1d = np.array([1.0 / 16, 1.0 / 4, 3.0 / 8, 1.0 / 4, 1.0 / 16])`
from Starck et al. 2011.
Parameters
----------
image:
The 2D image or wavelet coefficients to convolve.
scale:
The wavelet scale for the convolution. This sets the
spacing between adjacent pixels with the spline.
Returns
-------
result:
The result of convolving the `image` with the spline.
Definition at line 36 of file wavelet.py.
| MultiResolutionSupport lsst.scarlet.lite.wavelet.get_multiresolution_support | ( | np.ndarray | image, |
| np.ndarray | starlets, | ||
| np.floating | sigma, | ||
| float | sigma_scaling = 3, | ||
| float | epsilon = 1e-1, | ||
| int | max_iter = 20, | ||
| str | image_type = "ground" ) |
Calculate the multi-resolution support for a
dictionary of starlet coefficients.
This is different for ground and space based telescopes.
For space-based telescopes the procedure in Starck and Murtagh 1998
iteratively calculates the multi-resolution support.
For ground based images, where the PSF is much wider and there are no
pixels with no signal at all scales, we use a modified method that
estimates support at each scale independently.
Parameters
----------
image:
The image to transform into starlet coefficients.
starlets:
The starlet dictionary used to reconstruct `image` with
dimension (scales+1, Ny, Nx).
sigma:
The standard deviation of the `image`.
sigma_scaling:
The multiple of `sigma` to use to calculate significance.
Coefficients `w` where `|w| > K*sigma_j`, where `sigma_j` is
standard deviation at the jth scale, are considered significant.
epsilon:
The convergence criteria of the algorithm.
Once `|new_sigma_j - sigma_j|/new_sigma_j < epsilon` the
algorithm has completed.
max_iter:
Maximum number of iterations to fit `sigma_j` at each scale.
image_type:
The type of image that is being used.
This should be "ground" for ground based images with wide PSFs or
"space" for images from space-based telescopes with a narrow PSF.
Returns
-------
M:
Mask with significant coefficients in `starlets` set to `True`.
Definition at line 243 of file wavelet.py.
| int lsst.scarlet.lite.wavelet.get_starlet_scales | ( | Sequence[int] | image_shape, |
| int | None | scales = None ) |
Get the number of scales to use in the starlet transform.
Parameters
----------
image_shape:
The 2D shape of the image that is being transformed
scales:
The number of scales to transform with starlets.
The total dimension of the starlet will have
`scales+1` dimensions, since it will also hold
the image at all scales higher than `scales`.
Returns
-------
result:
Number of scales, adjusted for the size of the image.
Definition at line 80 of file wavelet.py.
| np.ndarray lsst.scarlet.lite.wavelet.multiband_starlet_reconstruction | ( | np.ndarray | starlets, |
| int | generation = 2, | ||
| Callable | None | convolve2d = None ) |
Reconstruct a multiband image. See `starlet_reconstruction` for a description of the remainder of the parameters.
Definition at line 220 of file wavelet.py.
| np.ndarray lsst.scarlet.lite.wavelet.multiband_starlet_transform | ( | np.ndarray | image, |
| int | None | scales = None, | ||
| int | generation = 2, | ||
| Callable | None | convolve2d = None ) |
Perform a starlet transform of a multiband image. See `starlet_transform` for a description of the parameters.
Definition at line 161 of file wavelet.py.
| np.ndarray lsst.scarlet.lite.wavelet.starlet_reconstruction | ( | np.ndarray | starlets, |
| int | generation = 2, | ||
| Callable | None | convolve2d = None ) |
Reconstruct an image from a dictionary of starlets
Parameters
----------
starlets:
The starlet dictionary used to reconstruct the image
with dimension (scales+1, Ny, Nx).
generation:
The generation of the starlet transform (either ``1`` or ``2``).
convolve2d:
The filter function to use to convolve the image
with starlets in 2D.
Returns
-------
image:
The 2D image reconstructed from the input `starlet`.
Definition at line 183 of file wavelet.py.
| np.ndarray lsst.scarlet.lite.wavelet.starlet_transform | ( | np.ndarray | image, |
| int | None | scales = None, | ||
| int | generation = 2, | ||
| Callable | None | convolve2d = None ) |
Perform a starlet transform, or 2nd gen starlet transform.
Parameters
----------
image:
The image to transform into starlet coefficients.
scales:
The number of scale to transform with starlets.
The total dimension of the starlet will have
`scales+1` dimensions, since it will also hold
the image at all scales higher than `scales`.
generation:
The generation of the transform.
This must be `1` or `2`.
convolve2d:
The filter function to use to convolve the image
with starlets in 2D.
Returns
-------
starlet:
The starlet dictionary for the input `image`.
Definition at line 105 of file wavelet.py.