lsst.scarlet.lite ge1c02a5578+b0138be388
 
Loading...
Searching...
No Matches
lsst.scarlet.lite.io.source_base.ScarletSourceBaseData Class Reference
Inheritance diagram for lsst.scarlet.lite.io.source_base.ScarletSourceBaseData:
lsst.scarlet.lite.io.source.ScarletSourceData

Public Member Functions

None register (cls)
 
dict as_dict (self)
 
Source to_source (self, Observation observation)
 

Static Public Member Functions

ScarletSourceBaseData from_dict (dict data, DTypeLike dtype=np.float32)
 

Static Public Attributes

dict source_registry = {}
 
dict metadata = None
 

Detailed Description

Data for a scarlet source

Attributes
----------
source_type :
    The type of source being stored.
source_registry :
    A registry of all known source types used for deserialization.
metadata :
    Metadata associated with the source.
    If `metadata` contains the `id` key, it is used as the
    key for the source in a `Blend`'s dictionary of sources.
version :
    The schema version of the exact data class.

Member Function Documentation

◆ as_dict()

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

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

Reimplemented in lsst.scarlet.lite.io.source.ScarletSourceData.

◆ from_dict()

ScarletSourceBaseData lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.from_dict ( dict data,
DTypeLike dtype = np.float32 )
static
Reconstruct `ScarletSourceData` from JSON compatible
dict.

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

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

Reimplemented in lsst.scarlet.lite.io.source.ScarletSourceData.

◆ register()

None lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.register ( cls)
Register a new source type

◆ to_source()

Source lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.to_source ( self,
Observation observation )
Convert to a `Source` for use in scarlet

Parameters
----------
observation:
    The observation used to render the source.

Returns
-------
source:
    The `Source` representation of this data.

Reimplemented in lsst.scarlet.lite.io.source.ScarletSourceData.


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