lsst.scarlet.lite ge1c02a5578+b0138be388
 
Loading...
Searching...
No Matches
lsst.scarlet.lite.source.SourceBase Class Reference
Inheritance diagram for lsst.scarlet.lite.source.SourceBase:
lsst.scarlet.lite.source.Source

Public Member Functions

ScarletSourceBaseData to_data (self)
 
Self __getitem__ (self, Any indices)
 
Self __deepcopy__ (self, dict[int, Any] memo)
 
Self __copy__ (self)
 
Self copy (self, bool deep=False)
 

Static Public Attributes

dict metadata = None
 
list components [Component]
 

Detailed Description

Base class for a source

This is primarily to allow `isinstance` checks
without importing the full `Source` class.

Member Function Documentation

◆ __copy__()

Self lsst.scarlet.lite.source.SourceBase.__copy__ ( self)
Create a copy of this source.

Returns
-------
source : SourceBase
    A new source that is a copy of this one.

◆ __deepcopy__()

Self lsst.scarlet.lite.source.SourceBase.__deepcopy__ ( self,
dict[int, Any] memo )
Create a deep copy of this source.

Parameters
----------
memo : dict[int, Any]
    A memoization dictionary used by `copy.deepcopy`.

Returns
-------
source : SourceBase
    A new source that is a deep copy of this one.

◆ __getitem__()

Self lsst.scarlet.lite.source.SourceBase.__getitem__ ( self,
Any indices )
Get a sub-source corresponding to the given indices.

Parameters
----------
indices: Any
    The indices to use to slice the source model.

Returns
-------
source: SourceBase
    A new source that is a sub-source of this one.

Raises
------
IndexError :
    If the index includes a ``Box`` or spatial indices.

◆ copy()

Self lsst.scarlet.lite.source.SourceBase.copy ( self,
bool deep = False )
Create a copy of this source.

Parameters
----------
deep : bool, optional
    If `True`, a deep copy is made. If `False`, a shallow copy is made.
    Default is `False`.

Returns
-------
source : Self
    A new source that is a copy of this one.

◆ to_data()

ScarletSourceBaseData lsst.scarlet.lite.source.SourceBase.to_data ( self)
Convert to a `ScarletSourceBaseData` for serialization

Returns
-------
source_data:
    The `ScarletSourceData` representation of this source.

Reimplemented in lsst.scarlet.lite.source.Source.


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