Public Member Functions | |
| __init__ (self, tuple bands, Box bbox) | |
| Box | bbox (self) |
| tuple | bands (self) |
| bool | resize (self, Box model_box) |
| None | update (self, int it, np.ndarray input_grad) |
| Image | get_model (self) |
| None | parameterize (self, Callable parameterization) |
| ScarletComponentBaseData | to_data (self) |
Protected Attributes | |
| tuple | _bands = bands |
| Box | _bbox = bbox |
A base component in scarlet lite.
Parameters
----------
bands:
The bands used when the component model is created.
bbox: Box
The bounding box for this component.
| tuple lsst.scarlet.lite.component.Component.bands | ( | self | ) |
The bands in the component model
| Box lsst.scarlet.lite.component.Component.bbox | ( | self | ) |
The bounding box that contains the component in the full image
| Image lsst.scarlet.lite.component.Component.get_model | ( | self | ) |
Generate a model for the component
This must be implemented in inherited classes.
Returns
-------
model: Image
The image of the component model.
Reimplemented in lsst.scarlet.lite.component.FactorizedComponent, lsst.scarlet.lite.io.cube_component.ComponentCube, lsst.scarlet.lite.models.free_form.FreeFormComponent, and lsst.scarlet.lite.models.parametric.ParametricComponent.
| None lsst.scarlet.lite.component.Component.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 in lsst.scarlet.lite.component.FactorizedComponent, lsst.scarlet.lite.io.cube_component.ComponentCube, lsst.scarlet.lite.models.free_form.FreeFormComponent, and lsst.scarlet.lite.models.parametric.ParametricComponent.
| bool lsst.scarlet.lite.component.Component.resize | ( | self, | |
| Box | model_box ) |
Test whether or not the component needs to be resized This should be overriden in inherited classes and return `True` if the component needs to be resized.
Reimplemented in lsst.scarlet.lite.component.FactorizedComponent, lsst.scarlet.lite.io.cube_component.ComponentCube, lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent, lsst.scarlet.lite.models.free_form.FreeFormComponent, and lsst.scarlet.lite.models.parametric.ParametricComponent.
| ScarletComponentBaseData lsst.scarlet.lite.component.Component.to_data | ( | self | ) |
Convert the component to persistable ScarletComponentBaseData
Returns
-------
component_data: ScarletComponentBaseData
The data object containing the component information
Reimplemented in lsst.scarlet.lite.component.FactorizedComponent, lsst.scarlet.lite.io.cube_component.ComponentCube, and lsst.scarlet.lite.models.parametric.ParametricComponent.
| None lsst.scarlet.lite.component.Component.update | ( | self, | |
| int | it, | ||
| np.ndarray | input_grad ) |
Update the component parameters from an input gradient
Parameters
----------
it:
The current iteration of the optimizer.
input_grad:
Gradient of the likelihood wrt the component model
Reimplemented in lsst.scarlet.lite.component.FactorizedComponent, lsst.scarlet.lite.io.cube_component.ComponentCube, lsst.scarlet.lite.models.free_form.FreeFormComponent, lsst.scarlet.lite.models.parametric.EllipticalParametricComponent, and lsst.scarlet.lite.models.parametric.ParametricComponent.