lsst.scarlet.lite ge1c02a5578+afb4790f61
 
Loading...
Searching...
No Matches
lsst.scarlet.lite.component.CubeComponent Class Reference
Inheritance diagram for lsst.scarlet.lite.component.CubeComponent:
lsst.scarlet.lite.component.Component lsst.scarlet.lite.io.cube_component.ComponentCube

Public Member Functions

 __init__ (self, Image model, tuple[int, int] peak)
 
Image get_model (self)
 
bool resize (self, Box model_box)
 
None update (self, int it, np.ndarray input_grad)
 
None parameterize (self, Callable parameterization)
 
ScarletCubeComponentData to_data (self)
 
CubeComponent __getitem__ (self, Any indices)
 
CubeComponent __copy__ (self)
 
CubeComponent __deepcopy__ (self, dict[int, Any] memo)
 
- 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

 peak = peak
 

Protected Attributes

 _model = model
 
- Protected Attributes inherited from lsst.scarlet.lite.component.Component
tuple _bands = bands
 
Box _bbox = bbox
 

Detailed Description

Dummy component for a component cube.

This is duck-typed to a `lsst.scarlet.lite.Component` in order to
generate a model from the component but it is currently not functional
in that it cannot be optimized, only persisted and loaded.

If scarlet lite ever implements a component as a data cube,
this class can be removed.

Constructor & Destructor Documentation

◆ __init__()

lsst.scarlet.lite.component.CubeComponent.__init__ ( self,
Image model,
tuple[int, int] peak )
Initialization

Parameters
----------
bands :
model :
    The 3D (bands, y, x) model of the component.
peak :
    The `(y, x)` peak of the component.
bbox :
    The bounding box of the component.

Member Function Documentation

◆ __copy__()

CubeComponent lsst.scarlet.lite.component.CubeComponent.__copy__ ( self)
Create a copy of this component.

Returns
-------
component : ComponentCube
    A new component that is a shallow copy of this one.

◆ __deepcopy__()

CubeComponent lsst.scarlet.lite.component.CubeComponent.__deepcopy__ ( self,
dict[int, Any] memo )
Create a deep copy of this component.

Parameters
----------
memo: dict[int, Any]
    The memoization dictionary used by `copy.deepcopy`.

Returns
-------
component : ComponentCube
    A new component that is a deep copy of this one.

◆ __getitem__()

CubeComponent lsst.scarlet.lite.component.CubeComponent.__getitem__ ( self,
Any indices )
Get a sub-component corresponding to the given indices.

Parameters
----------
indices :
    The indices to select.
Returns
-------
sub_component :
    A new component that is a sub-component of this one.

◆ get_model()

Image lsst.scarlet.lite.component.CubeComponent.get_model ( self)
Generate the model for the source

Returns
-------
model :
    The model as a 3D `(band, y, x)` array.

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

◆ parameterize()

None lsst.scarlet.lite.component.CubeComponent.parameterize ( self,
Callable parameterization )
Implementation of unused abstract method

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

◆ resize()

bool lsst.scarlet.lite.component.CubeComponent.resize ( self,
Box model_box )
Resize the component if needed and return whether it was resized

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

◆ to_data()

ScarletCubeComponentData lsst.scarlet.lite.component.CubeComponent.to_data ( self)
Convert the component to persistable ScarletComponentData

Returns
-------
component_data: ScarletComponentData
    The data object containing the component information

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

◆ update()

None lsst.scarlet.lite.component.CubeComponent.update ( self,
int it,
np.ndarray input_grad )
Implementation of unused abstract method

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


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