|
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 bands, np.ndarray|Parameter spectrum, np.ndarray|Parameter morph, Box model_bbox, float|None bg_thresh=None, np.ndarray|None bg_rms=None, float floor=1e-20, list[tuple[int, int]]|None peaks=None, float min_area=0) | |
| np.ndarray | prox_spectrum (self, np.ndarray spectrum) |
| np.ndarray | prox_morph (self, np.ndarray morph) |
| bool | resize (self, Box model_box) |
| __str__ (self) | |
| __repr__ (self) | |
| np.ndarray | morph (self) |
| tuple[int, int]|None | peak (self) |
| tuple[int, int]|None | component_center (self) |
| np.ndarray | spectrum (self) |
| tuple | shape (self) |
| Image | get_model (self) |
| grad_spectrum (self, np.ndarray input_grad, np.ndarray spectrum, np.ndarray morph) | |
| grad_morph (self, np.ndarray input_grad, np.ndarray morph, np.ndarray spectrum) | |
| update (self, int it, np.ndarray input_grad) | |
| None | parameterize (self, Callable parameterization) |
| ScarletComponentBaseData | to_data (self) |
| Box | bbox (self) |
| tuple | bands (self) |
Public Attributes | |
| peaks = peaks | |
| min_area = min_area | |
| bg_rms = bg_rms | |
| bg_thresh = bg_thresh | |
| floor = floor | |
| monotonicity = monotonicity | |
| padding = padding | |
| is_symmetric = is_symmetric | |
| morph | |
Protected Attributes | |
| _spectrum = parameter(spectrum) | |
| _morph = parameter(morph) | |
| tuple[int, int]|None | _peak = peak |
| tuple | _bands = bands |
| Box | _bbox = bbox |
Implements a free-form component
With no constraints this component is typically either a garbage collector,
or part of a set of components to deconvolve an image by separating out
the different spectral components.
See `FactorizedComponent` for a list of parameters not shown here.
Parameters
----------
peaks: `list` of `tuple`
A set of ``(cy, cx)`` peaks for detected sources.
If peak is not ``None`` then only pixels in the same "footprint"
as one of the peaks are included in the morphology.
If `peaks` is ``None`` then there is no constraint applied.
min_area: float
The minimum area for a peak.
If `min_area` is not `None` then all regions of the morphology
with fewer than `min_area` connected pixels are removed.
Definition at line 36 of file free_form.py.
| lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.__init__ | ( | self, | |
| tuple | bands, | ||
| np.ndarray | Parameter | spectrum, | ||
| np.ndarray | Parameter | morph, | ||
| Box | model_bbox, | ||
| float | None | bg_thresh = None, | ||
| np.ndarray | None | bg_rms = None, | ||
| float | floor = 1e-20, | ||
| list[tuple[int, int]] | None | peaks = None, | ||
| float | min_area = 0 ) |
Definition at line 58 of file free_form.py.
| lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.__repr__ | ( | self | ) |
Definition at line 139 of file free_form.py.
| lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.__str__ | ( | self | ) |
Definition at line 132 of file free_form.py.
|
inherited |
The bands in the component model
Definition at line 71 of file component.py.
|
inherited |
The bounding box that contains the component in the full image
Definition at line 66 of file component.py.
|
inherited |
The center of the component in its bounding box
This is likely to be different than `Component.center`,
since `Component.center` is the center of the component in the
full model, whereas `component_center` is the center of the component
inside its bounding box.
Returns
-------
center:
The center of the component in its bounding box
Definition at line 213 of file component.py.
|
inherited |
Build the model from the spectrum and morphology
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 250 of file component.py.
|
inherited |
Gradient of the morph wrt. the component model
Definition at line 263 of file component.py.
|
inherited |
Gradient of the spectrum wrt. the component model
Definition at line 259 of file component.py.
|
inherited |
The array of morphology values
Definition at line 241 of file component.py.
|
inherited |
Convert the component parameter arrays into Parameter instances
Parameters
----------
parameterization: Callable
A function to use to convert parameters of a given type into
a `Parameter` in place. It should take a single argument that
is the `Component` or `Source` that is to be parameterized.
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 353 of file component.py.
|
inherited |
The peak of the component
Returns
-------
peak:
The peak of the component
Definition at line 202 of file component.py.
| np.ndarray lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.prox_morph | ( | self, | |
| np.ndarray | morph ) |
Apply a prox-like update to the morphology This is the main difference between an `SedComponent` and a `FactorizedComponent`, since this component has fewer constraints.
Reimplemented from lsst.scarlet.lite.component.FactorizedComponent.
Definition at line 96 of file free_form.py.
| np.ndarray lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.prox_spectrum | ( | self, | |
| np.ndarray | spectrum ) |
Apply a prox-like update to the spectrum This differs from `FactorizedComponent` because an `SedComponent` has the spectrum normalized to unity.
Reimplemented from lsst.scarlet.lite.component.FactorizedComponent.
Definition at line 84 of file free_form.py.
| bool lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.resize | ( | self, | |
| Box | model_box ) |
Test whether or not the component needs to be resized
Reimplemented from lsst.scarlet.lite.component.FactorizedComponent.
Definition at line 129 of file free_form.py.
|
inherited |
Shape of the resulting model image
Definition at line 246 of file component.py.
|
inherited |
The array of spectrum values
Definition at line 236 of file component.py.
|
inherited |
Convert the component to persistable ScarletComponentBaseData
Returns
-------
component_data: ScarletComponentBaseData
The data object containing the component information
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 371 of file component.py.
|
inherited |
Update the spectrum and morphology parameters
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 345 of file component.py.
|
protectedinherited |
Definition at line 62 of file component.py.
Definition at line 63 of file component.py.
Definition at line 191 of file component.py.
|
protectedinherited |
Definition at line 192 of file component.py.
Definition at line 190 of file component.py.
|
inherited |
Definition at line 193 of file component.py.
|
inherited |
Definition at line 194 of file component.py.
|
inherited |
Definition at line 196 of file component.py.
|
inherited |
Definition at line 199 of file component.py.
| lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.min_area = min_area |
Definition at line 82 of file free_form.py.
|
inherited |
Definition at line 197 of file component.py.
|
inherited |
Definition at line 350 of file component.py.
|
inherited |
Definition at line 198 of file component.py.
| lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.peaks = peaks |
Definition at line 81 of file free_form.py.