lsst.scarlet.lite gee10cc3b42+43dac7135f
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
lsst.scarlet.lite.component.FactorizedComponent Class Reference
Inheritance diagram for lsst.scarlet.lite.component.FactorizedComponent:
lsst.scarlet.lite.component.Component lsst.scarlet.lite.models.free_form.FreeFormComponent

Public Member Functions

 __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)
 
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)
 
np.ndarray prox_spectrum (self, np.ndarray spectrum)
 
np.ndarray prox_morph (self, np.ndarray morph)
 
bool resize (self, Box model_box)
 
 update (self, int it, np.ndarray input_grad)
 
None parameterize (self, Callable parameterization)
 
 __str__ (self)
 
 __repr__ (self)
 
- Public Member Functions inherited from lsst.scarlet.lite.component.Component
Box bbox (self)
 
tuple bands (self)
 

Public Attributes

 bg_rms
 
 bg_thresh
 
 floor
 
 monotonicity
 
 padding
 
 morph
 

Protected Attributes

 _spectrum
 
 _morph
 
 _peak
 
 _bbox
 
- Protected Attributes inherited from lsst.scarlet.lite.component.Component
 _bands
 
 _bbox
 

Detailed Description

A component that can be factorized into spectrum and morphology
parameters.

Parameters
----------
bands:
    The bands of the spectral dimension, in order.
spectrum:
    The parameter to store and update the spectrum.
morph:
    The parameter to store and update the morphology.
peak:
    Location of the peak for the source.
bbox:
    The `Box` in the `model_bbox` that contains the source.
bg_rms:
    The RMS of the background used to threshold, grow,
    and shrink the component.
floor:
    Minimum value of the spectrum or center morphology pixel
    (depending on which is normalized).
monotonicity:
    The monotonicity operator to use for making the source monotonic.
    If this parameter is `None`, the source will not be made monotonic.

Constructor & Destructor Documentation

◆ __init__()

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 )

Member Function Documentation

◆ component_center()

tuple[int, int] | None lsst.scarlet.lite.component.FactorizedComponent.component_center ( self)
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

◆ get_model()

Image lsst.scarlet.lite.component.FactorizedComponent.get_model ( self)
Build the model from the spectrum and morphology

Reimplemented from lsst.scarlet.lite.component.Component.

◆ grad_morph()

lsst.scarlet.lite.component.FactorizedComponent.grad_morph ( self,
np.ndarray input_grad,
np.ndarray morph,
np.ndarray spectrum )
Gradient of the morph wrt. the component model

◆ grad_spectrum()

lsst.scarlet.lite.component.FactorizedComponent.grad_spectrum ( self,
np.ndarray input_grad,
np.ndarray spectrum,
np.ndarray morph )
Gradient of the spectrum wrt. the component model

◆ morph()

np.ndarray lsst.scarlet.lite.component.FactorizedComponent.morph ( self)
The array of morphology values

◆ parameterize()

None lsst.scarlet.lite.component.FactorizedComponent.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.

◆ peak()

tuple[int, int] | None lsst.scarlet.lite.component.FactorizedComponent.peak ( self)
The peak of the component

Returns
-------
peak:
    The peak of the component

◆ prox_morph()

np.ndarray lsst.scarlet.lite.component.FactorizedComponent.prox_morph ( self,
np.ndarray morph )
Apply a prox-like update to the morphology

Reimplemented in lsst.scarlet.lite.models.free_form.FreeFormComponent.

◆ prox_spectrum()

np.ndarray lsst.scarlet.lite.component.FactorizedComponent.prox_spectrum ( self,
np.ndarray spectrum )
Apply a prox-like update to the spectrum

Reimplemented in lsst.scarlet.lite.models.free_form.FreeFormComponent.

◆ resize()

bool lsst.scarlet.lite.component.FactorizedComponent.resize ( self,
Box model_box )
Test whether or not the component needs to be resized

Reimplemented from lsst.scarlet.lite.component.Component.

Reimplemented in lsst.scarlet.lite.models.free_form.FreeFormComponent.

◆ shape()

tuple lsst.scarlet.lite.component.FactorizedComponent.shape ( self)
Shape of the resulting model image

◆ spectrum()

np.ndarray lsst.scarlet.lite.component.FactorizedComponent.spectrum ( self)
The array of spectrum values

◆ update()

lsst.scarlet.lite.component.FactorizedComponent.update ( self,
int it,
np.ndarray input_grad )
Update the spectrum and morphology parameters

Reimplemented from lsst.scarlet.lite.component.Component.


The documentation for this class was generated from the following file: