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

Public Member Functions

dict as_dict (self)
 
ScarletSourceData from_dict (cls, dict data, DTypeLike dtype=np.float32)
 
Source to_source (self, Observation observation)
 
- Public Member Functions inherited from lsst.scarlet.lite.io.source_base.ScarletSourceBaseData
None register (cls)
 

Static Public Member Functions

ScarletSourceData from_source (Source source)
 

Static Public Attributes

str source_type = SOURCE_TYPE
 
list components [ScarletComponentBaseData]
 
str version = CURRENT_SCHEMA
 
- Static Public Attributes inherited from lsst.scarlet.lite.io.source_base.ScarletSourceBaseData
dict source_registry = {}
 
dict metadata = None
 

Detailed Description

Data for a scarlet source

Attributes
----------
components :
    The components contained in the source that are not factorized.
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.
source_type :
    The type of source being stored
version :
    The schema version of the ScarletSourceData.

Member Function Documentation

◆ as_dict()

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

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

Reimplemented from lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.

◆ from_dict()

ScarletSourceData lsst.scarlet.lite.io.source.ScarletSourceData.from_dict ( cls,
dict data,
DTypeLike dtype = np.float32 )
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 from lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.

◆ from_source()

ScarletSourceData lsst.scarlet.lite.io.source.ScarletSourceData.from_source ( Source source)
static
Deprecated: Create a `ScarletSourceData` from a scarlet `Source`

Parameters
----------
source:
    The scarlet `Source` to convert.

Returns
-------
result:
    The `ScarletSourceData` representation of the source.

◆ to_source()

Source lsst.scarlet.lite.io.source.ScarletSourceData.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 from lsst.scarlet.lite.io.source_base.ScarletSourceBaseData.


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