LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
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) | |
Public Attributes | |
bg_rms | |
bg_thresh | |
floor | |
monotonicity | |
padding | |
morph | |
Protected Attributes | |
_spectrum | |
_morph | |
_peak | |
_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 ) |
Reimplemented from lsst.scarlet.lite.component.Component.
Reimplemented in lsst.scarlet.lite.models.free_form.FreeFormComponent.
Definition at line 142 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.__repr__ | ( | self | ) |
Reimplemented in lsst.scarlet.lite.models.free_form.FreeFormComponent.
Definition at line 333 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.__str__ | ( | self | ) |
Reimplemented in lsst.scarlet.lite.models.free_form.FreeFormComponent.
Definition at line 326 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 308 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.FreeFormComponent.
Definition at line 242 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.FreeFormComponent.
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.FreeFormComponent.
Definition at line 271 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 300 of file component.py.
|
protected |
Definition at line 296 of file component.py.
|
protected |
Definition at line 161 of file component.py.
|
protected |
Definition at line 162 of file component.py.
|
protected |
Definition at line 160 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.bg_rms |
Definition at line 163 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.bg_thresh |
Definition at line 164 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.floor |
Definition at line 166 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.monotonicity |
Definition at line 167 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.morph |
Definition at line 305 of file component.py.
lsst.scarlet.lite.component.FactorizedComponent.padding |
Definition at line 168 of file component.py.