LSST Applications g0fba68d861+05a5e06e50,g1fd858c14a+904f1f4196,g2c84ff76c0+247cd845a2,g2c9e612ef2+f5117f1d55,g35bb328faa+fcb1d3bbc8,g4af146b050+123c2f4d45,g4d2262a081+a9e7a6e053,g4e0f332c67+c58e4b632d,g53246c7159+fcb1d3bbc8,g5a012ec0e7+ac98094cfc,g60b5630c4e+f5117f1d55,g67b6fd64d1+dd0349c22b,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g87b7deb4dc+2a1aa4536a,g8852436030+d21aad2af4,g89139ef638+dd0349c22b,g8d6b6b353c+f5117f1d55,g9125e01d80+fcb1d3bbc8,g989de1cb63+dd0349c22b,g9f33ca652e+0a580a37dd,g9f7030ddb1+ae84e0d5a5,ga2b97cdc51+f5117f1d55,gabe3b4be73+1e0a283bba,gb1101e3267+1d994e7598,gb58c049af0+f03b321e39,gb89ab40317+dd0349c22b,gcca6a94b71+4ed007ada1,gcf25f946ba+d21aad2af4,gd315a588df+9d9c5ccff1,gd6cbbdb0b4+75aa4b1db4,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+6fce216140,ge278dab8ac+c61fbefdff,ge410e46f29+dd0349c22b,ge82c20c137+e12a08b75a,gf67bdafdda+dd0349c22b,v28.0.2.rc1
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.scarlet.lite.io.ComponentCube Class Reference
Inheritance diagram for lsst.scarlet.lite.io.ComponentCube:
lsst.scarlet.lite.component.Component

Public Member Functions

 __init__ (self, tuple[Any,...] bands, Box bbox, 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)
 
Box bbox (self)
 
tuple bands (self)
 

Public Attributes

 peak = peak
 

Protected Attributes

 _model = model
 
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.

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

Definition at line 507 of file io.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.scarlet.lite.io.ComponentCube.__init__ ( self,
tuple[Any, ...] bands,
Box bbox,
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.

Definition at line 517 of file io.py.

517 def __init__(self, bands: tuple[Any, ...], bbox: Box, model: Image, peak: tuple[int, int]):
518 """Initialization
519
520 Parameters
521 ----------
522 bands:
523 model:
524 The 3D (bands, y, x) model of the component.
525 peak:
526 The `(y, x)` peak of the component.
527 bbox:
528 The bounding box of the component.
529 """
530 super().__init__(bands, bbox)
531 self._model = model
532 self.peak = peak
533

Member Function Documentation

◆ bands()

tuple lsst.scarlet.lite.component.Component.bands ( self)
inherited
The bands in the component model

Definition at line 66 of file component.py.

66 def bands(self) -> tuple:
67 """The bands in the component model"""
68 return self._bands
69

◆ bbox()

Box lsst.scarlet.lite.component.Component.bbox ( self)
inherited
The bounding box that contains the component in the full image

Definition at line 61 of file component.py.

61 def bbox(self) -> Box:
62 """The bounding box that contains the component in the full image"""
63 return self._bbox
64

◆ get_model()

Image lsst.scarlet.lite.io.ComponentCube.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.

Definition at line 534 of file io.py.

534 def get_model(self) -> Image:
535 """Generate the model for the source
536
537 Returns
538 -------
539 model:
540 The model as a 3D `(band, y, x)` array.
541 """
542 return self._model
543

◆ parameterize()

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

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

Definition at line 551 of file io.py.

551 def parameterize(self, parameterization: Callable) -> None:
552 """Implementation of unused abstract method"""

◆ resize()

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

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

Definition at line 544 of file io.py.

544 def resize(self, model_box: Box) -> bool:
545 """Test whether or not the component needs to be resized"""
546 return False
547

◆ update()

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

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

Definition at line 548 of file io.py.

548 def update(self, it: int, input_grad: np.ndarray) -> None:
549 """Implementation of unused abstract method"""
550

Member Data Documentation

◆ _bands

tuple lsst.scarlet.lite.component.Component._bands = bands
protectedinherited

Definition at line 57 of file component.py.

◆ _bbox

Box lsst.scarlet.lite.component.Component._bbox = bbox
protectedinherited

Definition at line 58 of file component.py.

◆ _model

lsst.scarlet.lite.io.ComponentCube._model = model
protected
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.

Definition at line 531 of file io.py.

◆ peak

lsst.scarlet.lite.io.ComponentCube.peak = peak

Definition at line 532 of file io.py.


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