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 = {} |
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.
| 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.
|
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.
| None lsst.scarlet.lite.io.component.ScarletComponentBaseData.register | ( | cls | ) |
Register a new component type
| 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.