lsst.scarlet.lite ge1c02a5578+d801c9999e
Loading...
Searching...
No Matches
lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent Class Reference
Inheritance diagram for lsst.scarlet.lite.models.free_form.FactorizedFreeFormComponent:
lsst.scarlet.lite.component.FactorizedComponent lsst.scarlet.lite.component.Component

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)
Public Member Functions inherited from 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, bool is_symmetric=False)
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)
 update (self, int it, np.ndarray input_grad)
None parameterize (self, Callable parameterization)
ScarletComponentBaseData to_data (self)
 __str__ (self)
 __repr__ (self)
FactorizedComponent __getitem__ (self, Any indices)
FactorizedComponent __deepcopy__ (self, dict[int, Any] memo)
FactorizedComponent __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

 peaks = peaks
 min_area = min_area
Public Attributes inherited from lsst.scarlet.lite.component.FactorizedComponent
 bg_rms = bg_rms
 bg_thresh = bg_thresh
 floor = floor
 monotonicity = monotonicity
 padding = padding
 is_symmetric = is_symmetric
 morph

Additional Inherited Members

Protected Attributes inherited from lsst.scarlet.lite.component.FactorizedComponent
 _spectrum = parameter(spectrum)
 _morph = parameter(morph)
tuple[int, int]|None _peak = peak
Protected Attributes inherited from lsst.scarlet.lite.component.Component
tuple _bands = bands
Box _bbox = bbox

Detailed Description

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.

Member Function Documentation

◆ prox_morph()

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.

◆ prox_spectrum()

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.

◆ resize()

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.


The documentation for this class was generated from the following file:
  • python/lsst/scarlet/lite/models/free_form.py