LSST Applications g0000d66e7c+ce78115f25,g0485b4d2cb+c8d56b10d4,g0fba68d861+fcbc158cd0,g1ec0fe41b4+3e153770da,g1fd858c14a+57ee4e1624,g2440f9efcc+8c5ae1fdc5,g35bb328faa+8c5ae1fdc5,g4d2262a081+1e04cc5a47,g53246c7159+8c5ae1fdc5,g55585698de+7a33f081c8,g56a49b3a55+b9d5cac73f,g60b5630c4e+7a33f081c8,g67b6fd64d1+035c836e50,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g7ac00fbb6c+b938379438,g8352419a5c+8c5ae1fdc5,g8852436030+5ba78a36c9,g89139ef638+035c836e50,g94187f82dc+7a33f081c8,g989de1cb63+035c836e50,g9d31334357+7a33f081c8,g9f33ca652e+e34120223a,ga815be3f0b+911242149a,gabe3b4be73+8856018cbb,gabf8522325+21619da9f3,gb1101e3267+0b44b44611,gb89ab40317+035c836e50,gc91f06edcd+e59fb3c9bc,gcf25f946ba+5ba78a36c9,gd6cbbdb0b4+958adf5c1f,gde0f65d7ad+6c98dcc924,ge278dab8ac+83c63f4893,ge410e46f29+035c836e50,gf35d7ec915+97dd712d81,gf5e32f922b+8c5ae1fdc5,gf67bdafdda+035c836e50,gf6800124b1+1714c04baa,w.2025.19
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, tuple bands, Parameter|np.ndarray spectrum, Parameter|np.ndarray morph, Box bbox, tuple[int, int]|None peak=None, np.ndarray|None bg_rms=None, float|None bg_thresh=0.25, float floor=1e-20, Monotonicity|None monotonicity=None, int padding=5) | |
tuple[int, int]|None | peak (self) |
tuple[int, int]|None | component_center (self) |
np.ndarray | spectrum (self) |
np.ndarray | morph (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) | |
np.ndarray | prox_spectrum (self, np.ndarray spectrum) |
np.ndarray | prox_morph (self, np.ndarray morph) |
bool | resize (self, Box model_box) |
update (self, int it, np.ndarray input_grad) | |
None | parameterize (self, Callable parameterization) |
__str__ (self) | |
__repr__ (self) | |
Box | bbox (self) |
tuple | bands (self) |
Public Attributes | |
bg_rms = bg_rms | |
bg_thresh = bg_thresh | |
floor = floor | |
monotonicity = monotonicity | |
padding = padding | |
morph | |
Protected Attributes | |
_spectrum = parameter(spectrum) | |
_morph = parameter(morph) | |
tuple[int, int]|None | _peak = peak |
tuple | _bands = bands |
Box | _bbox = bbox |
A component that can be factorized into spectrum and morphology parameters. Parameters ---------- bands: The bands of the spectral dimension, in order. spectrum: The parameter to store and update the spectrum. morph: The parameter to store and update the morphology. peak: Location of the peak for the source. bbox: The `Box` in the `model_bbox` that contains the source. bg_rms: The RMS of the background used to threshold, grow, and shrink the component. floor: Minimum value of the spectrum or center morphology pixel (depending on which is normalized). monotonicity: The monotonicity operator to use for making the source monotonic. If this parameter is `None`, the source will not be made monotonic.
Definition at line 115 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.__init__ | ( | self, | |
tuple | bands, | ||
Parameter | np.ndarray | spectrum, | ||
Parameter | np.ndarray | morph, | ||
Box | bbox, | ||
tuple[int, int] | None | peak = None, | ||
np.ndarray | None | bg_rms = None, | ||
float | None | bg_thresh = 0.25, | ||
float | floor = 1e-20, | ||
Monotonicity | None | monotonicity = None, | ||
int | padding = 5 ) |
Definition at line 142 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.__repr__ | ( | self | ) |
Definition at line 340 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.__str__ | ( | self | ) |
Definition at line 333 of file component.py.
|
inherited |
The bands in the component model
Definition at line 66 of file component.py.
|
inherited |
The bounding box that contains the component in the full image
Definition at line 61 of file component.py.
tuple[int, int] | None lsst.scarlet.lite.component.FactorizedComponent.component_center | ( | self | ) |
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 182 of file component.py.
Image lsst.scarlet.lite.component.FactorizedComponent.get_model | ( | self | ) |
Build the model from the spectrum and morphology
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 219 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.grad_morph | ( | self, | |
np.ndarray | input_grad, | ||
np.ndarray | morph, | ||
np.ndarray | spectrum ) |
Gradient of the morph wrt. the component model
Definition at line 232 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.grad_spectrum | ( | self, | |
np.ndarray | input_grad, | ||
np.ndarray | spectrum, | ||
np.ndarray | morph ) |
Gradient of the spectrum wrt. the component model
Definition at line 228 of file component.py.
np.ndarray lsst.scarlet.lite.component.FactorizedComponent.morph | ( | self | ) |
The array of morphology values
Definition at line 210 of file component.py.
None lsst.scarlet.lite.component.FactorizedComponent.parameterize | ( | self, | |
Callable | parameterization ) |
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 315 of file component.py.
tuple[int, int] | None lsst.scarlet.lite.component.FactorizedComponent.peak | ( | self | ) |
The peak of the component Returns ------- peak: The peak of the component
Definition at line 171 of file component.py.
np.ndarray lsst.scarlet.lite.component.FactorizedComponent.prox_morph | ( | self, | |
np.ndarray | morph ) |
Apply a prox-like update to the morphology
Reimplemented in lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.
Definition at line 243 of file component.py.
np.ndarray lsst.scarlet.lite.component.FactorizedComponent.prox_spectrum | ( | self, | |
np.ndarray | spectrum ) |
Apply a prox-like update to the spectrum
Reimplemented in lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.
Definition at line 236 of file component.py.
bool lsst.scarlet.lite.component.FactorizedComponent.resize | ( | self, | |
Box | model_box ) |
Test whether or not the component needs to be resized
Reimplemented from lsst.scarlet.lite.component.Component.
Reimplemented in lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.
Definition at line 278 of file component.py.
tuple lsst.scarlet.lite.component.FactorizedComponent.shape | ( | self | ) |
Shape of the resulting model image
Definition at line 215 of file component.py.
np.ndarray lsst.scarlet.lite.component.FactorizedComponent.spectrum | ( | self | ) |
The array of spectrum values
Definition at line 205 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.update | ( | self, | |
int | it, | ||
np.ndarray | input_grad ) |
Update the spectrum and morphology parameters
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 307 of file component.py.
|
protectedinherited |
Definition at line 57 of file component.py.
Definition at line 58 of file component.py.
Definition at line 161 of file component.py.
|
protected |
Definition at line 162 of file component.py.
Definition at line 160 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.bg_rms = bg_rms |
Definition at line 163 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.bg_thresh = bg_thresh |
Definition at line 164 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.floor = floor |
Definition at line 166 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.monotonicity = monotonicity |
Definition at line 167 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.morph |
Definition at line 312 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.padding = padding |
Definition at line 168 of file component.py.