lsst.scarlet.lite gee10cc3b42+585e252eca
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.scarlet.lite.io.ScarletBlendData Class Reference

Public Member Functions

dict as_dict (self)
 
ScarletBlendData from_dict (cls, dict data, DTypeLike dtype=np.float32)
 
Blend minimal_data_to_blend (self, np.ndarray model_psf, DTypeLike dtype)
 
Blend to_blend (self, Observation observation)
 

Static Public Member Functions

ScarletBlendData from_blend (Blend blend, tuple[int, int] psf_center)
 

Public Attributes

 origin
 
 shape
 
 psf_center
 
 bands
 

Static Public Attributes

tuple origin [int, int]
 
tuple shape [int, int]
 
dict sources [int, ScarletSourceData]
 
tuple psf_center [float, float]
 
np psf .ndarray
 
tuple bands [str]
 

Detailed Description

Data for an entire blend.

Attributes
----------
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.
psf_center:
    The location used for the center of the PSF for
    the blend.
psf:
    The PSF of the observation.
bands : `list` of `str`
    The names of the bands.
    The order of the bands must be the same as the order of
    the multiband model arrays, and SEDs.

Member Function Documentation

◆ as_dict()

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

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

◆ from_blend()

ScarletBlendData lsst.scarlet.lite.io.ScarletBlendData.from_blend ( Blend blend,
tuple[int, int] psf_center )
static
Convert a scarlet lite blend into a persistable data object

Parameters
----------
blend:
    The blend that is being persisted.
psf_center:
    The center of the PSF.

Returns
-------
blend_data:
    The data model for a single blend.

◆ from_dict()

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

◆ minimal_data_to_blend()

Blend lsst.scarlet.lite.io.ScarletBlendData.minimal_data_to_blend ( self,
np.ndarray model_psf,
DTypeLike dtype )
Convert the storage data model into a scarlet lite blend

Parameters
----------
model_psf:
    PSF in model space (usually a nyquist sampled circular Gaussian).
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.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: