lsst.scarlet.lite gee10cc3b42+585e252eca
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
lsst.scarlet.lite.models.free_form.FreeFormComponent Class Reference
Inheritance diagram for lsst.scarlet.lite.models.free_form.FreeFormComponent:
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
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)
 
- Public Member Functions inherited from lsst.scarlet.lite.component.Component
Box bbox (self)
 
tuple bands (self)
 

Public Attributes

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

Additional Inherited Members

- Protected Attributes inherited from lsst.scarlet.lite.component.FactorizedComponent
 _spectrum
 
 _morph
 
 _peak
 
 _bbox
 
- Protected Attributes inherited from lsst.scarlet.lite.component.Component
 _bands
 
 _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.

Constructor & Destructor Documentation

◆ __init__()

lsst.scarlet.lite.models.free_form.FreeFormComponent.__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 )

Member Function Documentation

◆ __repr__()

lsst.scarlet.lite.models.free_form.FreeFormComponent.__repr__ ( self)

◆ __str__()

lsst.scarlet.lite.models.free_form.FreeFormComponent.__str__ ( self)

◆ prox_morph()

np.ndarray lsst.scarlet.lite.models.free_form.FreeFormComponent.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.FreeFormComponent.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.FreeFormComponent.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: