lsst.scarlet.lite ge1c02a5578+afb4790f61
 
Loading...
Searching...
No Matches
lsst.scarlet.lite.blend.BlendBase Class Reference
Inheritance diagram for lsst.scarlet.lite.blend.BlendBase:
lsst.scarlet.lite.blend.Blend lsst.scarlet.lite.models.fit_psf.FittedPsfBlend

Public Member Functions

tuple[int, int, int] shape (self)
 
Box bbox (self)
 
list[Componentcomponents (self)
 
Self __getitem__ (self, Any indices)
 
Self __copy__ (self)
 
Self __deepcopy__ (self, dict[int, Any] memo)
 
Self copy (self, bool deep=False)
 
Image get_model (self, bool convolve=False, bool use_flux=False)
 
ScarletBlendData to_data (self)
 

Static Public Attributes

Sequence sources [SourceBase]
 
dict metadata | None
 

Detailed Description

A base class for blends that can be extended to add additional
functionality.

This class holds all of the sources and observation that are to be fit,
as well as performing fitting and joint initialization of the
spectral components (when applicable).

Parameters
----------
sources:
    The sources to fit.
observation:
    The observation that contains the images,
        PSF, etc. that are being fit.
metadata:
    Additional metadata to store with the blend.

Member Function Documentation

◆ __copy__()

Self lsst.scarlet.lite.blend.BlendBase.__copy__ ( self)
Create a copy of this blend.

Returns
-------
blend : BlendBase
    A new blend that is a copy of this one.

◆ __deepcopy__()

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

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

Returns
-------
blend : BlendBase
    A new blend that is a deep copy of this one.

◆ __getitem__()

Self lsst.scarlet.lite.blend.BlendBase.__getitem__ ( self,
Any indices )
Get a sub-blend corresponding to the given indices.

Parameters
----------
indices :
    The indices to use to slice the blend.

Returns
-------
sub_blend :
    A new `BlendBase` instance containing only data from the
    specified bands in the specified order.

Raises
------
IndexError :
    If the indices contain bands not included in the original
    blend or any spatial indices are given.

◆ bbox()

Box lsst.scarlet.lite.blend.BlendBase.bbox ( self)
The bounding box of the entire blend.

◆ components()

list[Component] lsst.scarlet.lite.blend.BlendBase.components ( self)
The list of all components in the blend.

Since the list of sources might change,
this is always built on the fly.

◆ copy()

Self lsst.scarlet.lite.blend.BlendBase.copy ( self,
bool deep = False )
Create a copy of this blend.

Parameters
----------
deep :
    If `True`, a deep copy is made. If `False`, a shallow copy is made.
    Default is `False`.

Returns
-------
blend : Self
    A new blend that is a copy of this one.

◆ get_model()

Image lsst.scarlet.lite.blend.BlendBase.get_model ( self,
bool convolve = False,
bool use_flux = False )
Generate a model of the entire blend.

Parameters
----------
convolve:
    Whether to convolve the model with the observed PSF in each band.
use_flux:
    Whether to use the re-distributed flux associated with the sources
    instead of the component models.

Returns
-------
model:
    The model created by combining all of the source models.

Reimplemented in lsst.scarlet.lite.blend.Blend.

◆ shape()

tuple[int, int, int] lsst.scarlet.lite.blend.BlendBase.shape ( self)
Shape of the model for the entire `Blend`.

◆ to_data()

ScarletBlendData lsst.scarlet.lite.blend.BlendBase.to_data ( self)
Convert the blend into a serializable dictionary format.

Returns
-------
data:
    A dictionary containing all of the information needed to
    reconstruct the blend.

Reimplemented in lsst.scarlet.lite.blend.Blend.


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