LSST Applications 29.1.0,g0fba68d861+6b120c4394,g123d84c11c+8c5ae1fdc5,g1ec0fe41b4+191117f6ec,g1fd858c14a+c8450ae71a,g3533f9d6cb+a04f9ee0ab,g35bb328faa+8c5ae1fdc5,g3f0dcc2b1b+7df08700bd,g4178042926+b4254969db,g44ba364a48+04455b336b,g53246c7159+8c5ae1fdc5,g60b5630c4e+a04f9ee0ab,g663da51e9b+b05e6e1875,g67b6fd64d1+250bf6acd3,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g8352419a5c+8c5ae1fdc5,g87e3079a85+d3fa38de54,g8852436030+cd899e2626,g89139ef638+250bf6acd3,g93a033419f+31ead11197,g989de1cb63+250bf6acd3,g9f33ca652e+f6053ecf14,ga1e959baac+5fbc491aed,ga2f891cd6c+a04f9ee0ab,gabe3b4be73+8856018cbb,gabf8522325+1f7e6d67b9,gac2eed3f23+250bf6acd3,gb1101e3267+0c331e9486,gb89ab40317+250bf6acd3,gcf25f946ba+cd899e2626,gd107969129+8964d67276,gd6cbbdb0b4+6bbecc8878,gde0f65d7ad+d65f9e019a,ge278dab8ac+eb3bbeb12f,ge410e46f29+250bf6acd3,gf5e32f922b+8c5ae1fdc5,gff02db199a+747430a128,gffe7e49bb4+a04f9ee0ab
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) |
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 | |
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 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.
|
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 182 of file component.py.
|
inherited |
Build the model from the spectrum and morphology
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 219 of file component.py.
|
inherited |
Gradient of the morph wrt. the component model
Definition at line 232 of file component.py.
|
inherited |
Gradient of the spectrum wrt. the component model
Definition at line 228 of file component.py.
|
inherited |
The array of morphology values
Definition at line 210 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 315 of file component.py.
|
inherited |
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.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 215 of file component.py.
|
inherited |
The array of spectrum values
Definition at line 205 of file component.py.
|
inherited |
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.
|
protectedinherited |
Definition at line 162 of file component.py.
Definition at line 160 of file component.py.
|
inherited |
Definition at line 163 of file component.py.
|
inherited |
Definition at line 164 of file component.py.
|
inherited |
Definition at line 166 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 167 of file component.py.
|
inherited |
Definition at line 312 of file component.py.
|
inherited |
Definition at line 168 of file component.py.
lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent.peaks = peaks |
Definition at line 81 of file free_form.py.