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 |
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.
| 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.
|
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.
| None lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.register | ( | cls | ) |
Register a new source type
| 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.