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] |
Base class for a source This is primarily to allow `isinstance` checks without importing the full `Source` class.
| 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.
| 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.
| 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.
| 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.
| 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.