Public Member Functions | |
| tuple[int, int, int] | shape (self) |
| Box | bbox (self) |
| list[Component] | components (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 |
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.
| 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.
| 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.
| 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.
| Box lsst.scarlet.lite.blend.BlendBase.bbox | ( | self | ) |
The bounding box of the entire blend.
| 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.
| 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.
| 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.
| tuple[int, int, int] lsst.scarlet.lite.blend.BlendBase.shape | ( | self | ) |
Shape of the model for the entire `Blend`.
| 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.