lsst.scarlet.lite ge1c02a5578+afb4790f61
 
Loading...
Searching...
No Matches
lsst.scarlet.lite.io.blend.ScarletBlendData Class Reference
Inheritance diagram for lsst.scarlet.lite.io.blend.ScarletBlendData:
lsst.scarlet.lite.io.blend_base.ScarletBlendBaseData

Public Member Functions

Box bbox (self)
 
dict as_dict (self)
 
ScarletBlendData from_dict (cls, dict data, DTypeLike dtype=np.float32)
 
Blend minimal_data_to_blend (self, np.ndarray|None model_psf=None, np.ndarray|None psf=None, tuple[str]|None bands=None, DTypeLike dtype=np.float32)
 
Blend to_blend (self, Observation observation)
 
- Public Member Functions inherited from lsst.scarlet.lite.io.blend_base.ScarletBlendBaseData
None register (cls)
 

Static Public Member Functions

ScarletBlendData from_blend (Blend blend)
 

Static Public Attributes

str blend_type = BLEND_TYPE
 
tuple origin [int, int]
 
tuple shape [int, int]
 
dict sources [Any, ScarletSourceBaseData]
 
str version = CURRENT_SCHEMA
 
- Static Public Attributes inherited from lsst.scarlet.lite.io.blend_base.ScarletBlendBaseData
dict blend_registry = {}
 
dict metadata = None
 

Detailed Description

Data for an entire blend.

Attributes
----------
blend_type :
    The type of blend being stored.
metadata :
    Metadata associated with the blend,
    for example the order of bands, the PSF, etc.
origin :
    The lower bound of the blend's bounding box.
shape :
    The shape of the blend's bounding box.
sources :
    Data for the sources contained in the blend,
    indexed by the source id.
version :
    The schema version of the stored data.

Member Function Documentation

◆ as_dict()

dict lsst.scarlet.lite.io.blend.ScarletBlendData.as_dict ( self)
Return the object encoded into a dict for JSON serialization

Returns
-------
result :
    The object encoded as a JSON compatible dict

Reimplemented from lsst.scarlet.lite.io.blend_base.ScarletBlendBaseData.

◆ bbox()

Box lsst.scarlet.lite.io.blend.ScarletBlendData.bbox ( self)
The bounding box of the blend

Reimplemented from lsst.scarlet.lite.io.blend_base.ScarletBlendBaseData.

◆ from_blend()

ScarletBlendData lsst.scarlet.lite.io.blend.ScarletBlendData.from_blend ( Blend blend)
static
Deprecated: Convert a scarlet lite blend into a storage data model.

Parameters
----------
blend :
    The blend to convert.
Returns
-------
result :
    The storage data model representing the blend.

◆ from_dict()

ScarletBlendData lsst.scarlet.lite.io.blend.ScarletBlendData.from_dict ( cls,
dict data,
DTypeLike dtype = np.float32 )
Reconstruct `ScarletBlendData` from JSON compatible
dict.

Parameters
----------
data :
    Dictionary representation of the object
dtype :
    Datatype of the resulting model.

Returns
-------
result :
    The reconstructed object

Reimplemented from lsst.scarlet.lite.io.blend_base.ScarletBlendBaseData.

◆ minimal_data_to_blend()

Blend lsst.scarlet.lite.io.blend.ScarletBlendData.minimal_data_to_blend ( self,
np.ndarray | None model_psf = None,
np.ndarray | None psf = None,
tuple[str] | None bands = None,
DTypeLike dtype = np.float32 )
Convert the storage data model into a scarlet lite blend

Parameters
----------
model_psf :
    PSF in model space (usually a nyquist sampled circular Gaussian).
psf :
    The PSF of the observation.
    If not provided, the PSF stored in the blend data is used.
bands :
    The bands in the blend model.
    If not provided, the bands stored in the blend data are used.
dtype :
    The data type of the model that is generated.

Returns
-------
blend :
    A scarlet blend model extracted from persisted data.

◆ to_blend()

Blend lsst.scarlet.lite.io.blend.ScarletBlendData.to_blend ( self,
Observation observation )
Convert the storage data model into a scarlet lite blend

Parameters
----------
observation :
    The observation that contains the blend.
    If `observation` is ``None`` then an `Observation` containing
    no image data is initialized.

Returns
-------
blend :
    A scarlet blend model extracted from persisted data.

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