LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.afw.table._source.SourceCatalog Class Reference

Public Member Functions

def getChildren (self, parent, *args)
 

Static Public Attributes

string reason = 'Use `getSchema().getAliasMap().get("slot_Centroid")` instead. To be removed after 20.0.0.')
 
 hasCentroidSlot
 
 reason
 
 getCentroidKey
 
 getCentroidErrKey
 
 getCentroidFlagKey
 
 getShapeDefinition
 
 hasShapeSlot
 
 getShapeKey
 
 getShapeErrKey
 
 getShapeFlagKey
 

Detailed Description

Definition at line 33 of file _source.py.

Member Function Documentation

◆ getChildren()

def lsst.afw.table._source.SourceCatalog.getChildren (   self,
  parent,
args 
)
Return the subset of self for which the parent field equals the given value.

In order for this method to return the correct result, it must be sorted by parent
(i.e. self.isSorted(SourceTable.getParentKey()) must be True).  This is naturally the
case with SourceCatalogs produced by the detection and deblending tasks, but it may
not be true when concatenating multiple such catalogs.

Additional Catalogs or sequences whose elements correspond in order to the records
of self (i.e. zip(self, *args) is valid) will be subset using the same slice object
used on self, and these subsets will be returned along with the subset of self.

Parameters
----------
parent : `int`
    ID of the parent to get children for.
args : `~lsst.afw.table.Catalog`
    Additional catalogs to subset for the childrens to return.

Returns
-------
children : iterable of `~lsst.afw.table.SourceRecord`
    Children sources.

Definition at line 35 of file _source.py.

35  def getChildren(self, parent, *args):
36  """Return the subset of self for which the parent field equals the given value.
37 
38  In order for this method to return the correct result, it must be sorted by parent
39  (i.e. self.isSorted(SourceTable.getParentKey()) must be True). This is naturally the
40  case with SourceCatalogs produced by the detection and deblending tasks, but it may
41  not be true when concatenating multiple such catalogs.
42 
43  Additional Catalogs or sequences whose elements correspond in order to the records
44  of self (i.e. zip(self, *args) is valid) will be subset using the same slice object
45  used on self, and these subsets will be returned along with the subset of self.
46 
47  Parameters
48  ----------
49  parent : `int`
50  ID of the parent to get children for.
51  args : `~lsst.afw.table.Catalog`
52  Additional catalogs to subset for the childrens to return.
53 
54  Returns
55  -------
56  children : iterable of `~lsst.afw.table.SourceRecord`
57  Children sources.
58  """
59  if not self.isSorted(SourceTable.getParentKey()):
60  raise AssertionError(
61  "The table is not sorted by parent, so cannot getChildren")
62  s = self.equal_range(parent, SourceTable.getParentKey())
63  if args:
64  return (self[s],) + tuple(arg[s] for arg in args)
65  else:
66  return self[s]
67 
68 
69 SourceTable.getCentroidDefinition = deprecate_pybind11(

Member Data Documentation

◆ getCentroidErrKey

lsst.afw.table._source.SourceCatalog.getCentroidErrKey
static

Definition at line 78 of file _source.py.

◆ getCentroidFlagKey

lsst.afw.table._source.SourceCatalog.getCentroidFlagKey
static

Definition at line 81 of file _source.py.

◆ getCentroidKey

lsst.afw.table._source.SourceCatalog.getCentroidKey
static

Definition at line 75 of file _source.py.

◆ getShapeDefinition

lsst.afw.table._source.SourceCatalog.getShapeDefinition
static

Definition at line 84 of file _source.py.

◆ getShapeErrKey

lsst.afw.table._source.SourceCatalog.getShapeErrKey
static

Definition at line 93 of file _source.py.

◆ getShapeFlagKey

lsst.afw.table._source.SourceCatalog.getShapeFlagKey
static

Definition at line 96 of file _source.py.

◆ getShapeKey

lsst.afw.table._source.SourceCatalog.getShapeKey
static

Definition at line 90 of file _source.py.

◆ hasCentroidSlot

lsst.afw.table._source.SourceCatalog.hasCentroidSlot
static

Definition at line 72 of file _source.py.

◆ hasShapeSlot

lsst.afw.table._source.SourceCatalog.hasShapeSlot
static

Definition at line 87 of file _source.py.

◆ reason [1/2]

string lsst.afw.table._source.SourceCatalog.reason = 'Use `getSchema().getAliasMap().get("slot_Centroid")` instead. To be removed after 20.0.0.')
static

Definition at line 71 of file _source.py.

◆ reason [2/2]

lsst.afw.table._source.SourceCatalog.reason
static

Definition at line 74 of file _source.py.


The documentation for this class was generated from the following file:
lsst::utils.deprecated.deprecate_pybind11
def deprecate_pybind11(obj, reason, category=FutureWarning)
Definition: deprecated.py:32