|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, tuple[int, int] shape, npt.DTypeLike dtype=float, bool auto_update=True, int fit_radius=1) | |
| tuple[int, int] | shape (self) |
| tuple[int, int] | center (self) |
| update (self, tuple[int, int] shape) | |
| check_size (self, tuple[int, int] shape, tuple[int, int] center, bool update=True) | |
| np.ndarray | __call__ (self, np.ndarray image, tuple[int, int] center) |
Public Attributes | |
| np.ndarray|None | weights = None |
| np.ndarray|None | distance = None |
| tuple[int, int, int, int]|None | sizes = None |
| dtype = dtype | |
| auto_update = auto_update | |
| fit_radius = fit_radius | |
Class to implement Monotonicity
Callable class that applies monotonicity as a pseudo proximal
operator (actually a projection operator) to *a* radially
monotonic solution.
Notes
-----
This differs from monotonicity in the main scarlet branch because
this stores a single monotonicity operator to set the weights for all
of the pixels up to the size of the largest shape expected,
and only needs to be created once _per blend_, as opposed to
once _per source_..
This class is then called with the source morphology
to make monotonic and the location of the "center" of the image,
and the full weight matrix is sliced accordingly.
Parameters
----------
shape:
The shape of the full operator.
This must be larger than the largest possible object size
in the blend.
dtype:
The numpy ``dtype`` of the output image.
auto_update:
If ``True`` the operator will update its shape if a image is
too big to fit in the current operator.
fit_radius:
Pixels within `fit_radius` of the center of the array to make
monotonic are checked to see if they have more flux than the center
pixel. If they do, the pixel with larger flux is used as the center.
Definition at line 42 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.__init__ | ( | self, | |
| tuple[int, int] | shape, | ||
| npt.DTypeLike | dtype = float, | ||
| bool | auto_update = True, | ||
| int | fit_radius = 1 ) |
Definition at line 77 of file operators.py.
| np.ndarray lsst.scarlet.lite.operators.Monotonicity.__call__ | ( | self, | |
| np.ndarray | image, | ||
| tuple[int, int] | center ) |
Make an input image monotonic about a center pixel
Parameters
----------
image:
The image to make monotonic.
center:
The ``(y, x)`` location _in image coordinates_ to make the
center of the monotonic region.
Returns
-------
result:
The input image is updated in place, but also returned from this
method.
Definition at line 214 of file operators.py.
| tuple[int, int] lsst.scarlet.lite.operators.Monotonicity.center | ( | self | ) |
The center of the full operator
Returns
-------
result:
The center of the full operator.
Definition at line 105 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.check_size | ( | self, | |
| tuple[int, int] | shape, | ||
| tuple[int, int] | center, | ||
| bool | update = True ) |
Check to see if the operator can be applied
Parameters
----------
shape:
The shape of the image to apply monotonicity.
center:
The location (in `shape`) of the point where the monotonicity will
be taken from.
update:
When ``True`` the operator will update itself so that an image
with shape `shape` can be made monotonic about the `center`.
Raises
------
ValueError:
Raised when an array with shape `shape` does not fit in the
current operator and `update` is `False`.
Definition at line 186 of file operators.py.
| tuple[int, int] lsst.scarlet.lite.operators.Monotonicity.shape | ( | self | ) |
The 2D shape of the largest component that can be made monotonic
Returns
-------
result:
The shape of the oeprator.
Definition at line 94 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.update | ( | self, | |
| tuple[int, int] | shape ) |
Update the operator with a new shape
Parameters
----------
shape:
The new shape
Definition at line 118 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.auto_update = auto_update |
Definition at line 89 of file operators.py.
| np.ndarray | None lsst.scarlet.lite.operators.Monotonicity.distance = None |
Definition at line 86 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.dtype = dtype |
Definition at line 88 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.fit_radius = fit_radius |
Definition at line 90 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.sizes = None |
Definition at line 87 of file operators.py.
| lsst.scarlet.lite.operators.Monotonicity.weights = None |
Definition at line 85 of file operators.py.