lsst.scarlet.lite ge1c02a5578+afb4790f61
 
Loading...
Searching...
No Matches
lsst.scarlet.lite.io.component.ScarletComponentBaseData Class Reference
Inheritance diagram for lsst.scarlet.lite.io.component.ScarletComponentBaseData:
lsst.scarlet.lite.io.cube_component.ScarletCubeComponentData lsst.scarlet.lite.io.factorized_component.ScarletFactorizedComponentData

Public Member Functions

None register (cls)
 
Component to_component (self, Observation observation)
 
dict as_dict (self)
 

Static Public Member Functions

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

Static Public Attributes

dict component_registry = {}
 

Detailed Description

Base data for a scarlet component

Attributes
----------
component_registry :
    A registry of all known component types used for deserialization.
component_type :
    The type of component being stored.
version :
    The schema version of the exact data class.

Member Function Documentation

◆ as_dict()

dict lsst.scarlet.lite.io.component.ScarletComponentBaseData.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.cube_component.ScarletCubeComponentData, and lsst.scarlet.lite.io.factorized_component.ScarletFactorizedComponentData.

◆ from_dict()

ScarletComponentBaseData lsst.scarlet.lite.io.component.ScarletComponentBaseData.from_dict ( dict data,
DTypeLike dtype = np.float32 )
static
Reconstruct `ScarletComponentBaseData` 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.cube_component.ScarletCubeComponentData, and lsst.scarlet.lite.io.factorized_component.ScarletFactorizedComponentData.

◆ register()

None lsst.scarlet.lite.io.component.ScarletComponentBaseData.register ( cls)
Register a new component type

◆ to_component()

Component lsst.scarlet.lite.io.component.ScarletComponentBaseData.to_component ( self,
Observation observation )
Convert the storage data model into a scarlet Component

Parameters
----------
observation :
    The observation that the component is associated with

Returns
-------
component :
    A scarlet component extracted from persisted data.

Reimplemented in lsst.scarlet.lite.io.cube_component.ScarletCubeComponentData, and lsst.scarlet.lite.io.factorized_component.ScarletFactorizedComponentData.


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