Public Member Functions | |
| __init__ (self, tuple bands, np.ndarray|Parameter model, 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 | model (self) |
| Image | get_model (self) |
| tuple | shape (self) |
| np.ndarray | grad_model (self, np.ndarray input_grad, np.ndarray model) |
| np.ndarray | prox_model (self, np.ndarray model) |
| bool | resize (self, Box model_box) |
| update (self, int it, np.ndarray grad_log_likelihood) | |
| None | parameterize (self, Callable parameterization) |
| __str__ (self) | |
| __repr__ (self) | |
| ScarletComponentBaseData | to_data (self) |
| FreeFormComponent | __getitem__ (self, Any indices) |
| FreeFormComponent | __deepcopy__ (self, dict[int, Any] memo) |
| FreeFormComponent | __copy__ (self) |
Public Member Functions inherited from lsst.scarlet.lite.component.Component | |
| __init__ (self, tuple bands, Box bbox) | |
| Box | bbox (self) |
| tuple | bands (self) |
| Component | __getitem__ (self, Any indices) |
| Component | __copy__ (self) |
| Component | __deepcopy__ (self, dict[int, Any] memo) |
| Component | copy (self, bool deep=False) |
Public Attributes | |
| bg_rms = bg_rms | |
| bg_thresh = bg_thresh | |
| floor = floor | |
| peaks = peaks | |
| min_area = min_area | |
| model | |
Protected Attributes | |
| _model = parameter(model) | |
Protected Attributes inherited from lsst.scarlet.lite.component.Component | |
| tuple | _bands = bands |
| Box | _bbox = bbox |
Implements a component with no spectral or monotonicty constraints This is a FreeFormComponent that is not factorized into a spectrum and morphology with no monotonicity constraint.
| FreeFormComponent lsst.scarlet.lite.models.free_form.FreeFormComponent.__copy__ | ( | self | ) |
Create a copy of this component.
Returns
-------
component : FreeFormComponent
A new component that is a copy of this one.
| FreeFormComponent lsst.scarlet.lite.models.free_form.FreeFormComponent.__deepcopy__ | ( | self, | |
| dict[int, Any] | memo ) |
Create a deep copy of this component.
Parameters
----------
memo: dict[int, Any]
A dictionary to keep track of already copied objects.
Returns
-------
component : FreeFormComponent
A new component that is a deep copy of this one.
| FreeFormComponent lsst.scarlet.lite.models.free_form.FreeFormComponent.__getitem__ | ( | self, | |
| Any | indices ) |
Get a sub-component corresponding to the given indices.
Parameters
----------
indices: Any
The indices to use to slice the component model.
Returns
-------
component: FreeFormComponent
A new component that is a sub-component of this one.
Raises
------
IndexError :
If the index includes a ``Box`` or spatial indices.
| Image lsst.scarlet.lite.models.free_form.FreeFormComponent.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 from lsst.scarlet.lite.component.Component.
| None lsst.scarlet.lite.models.free_form.FreeFormComponent.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.
| bool lsst.scarlet.lite.models.free_form.FreeFormComponent.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 from lsst.scarlet.lite.component.Component.
| ScarletComponentBaseData lsst.scarlet.lite.models.free_form.FreeFormComponent.to_data | ( | self | ) |
Convert the component to persistable ScarletComponentBaseData
Returns
-------
component_data: ScarletComponentBaseData
The data object containing the component information
Reimplemented from lsst.scarlet.lite.component.Component.
| lsst.scarlet.lite.models.free_form.FreeFormComponent.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 from lsst.scarlet.lite.component.Component.