26 from ._base
import Catalog
27 from ._table
import SourceCatalog, SourceTable
29 Catalog.register(
"Source", SourceCatalog)
36 """Return the subset of self for which the parent field equals the given value.
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.
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.
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.
56 children : iterable of `~lsst.afw.table.SourceRecord`
59 if not self.isSorted(SourceTable.getParentKey()):
61 "The table is not sorted by parent, so cannot getChildren")
62 s = self.equal_range(parent, SourceTable.getParentKey())
64 return (self[s],) + tuple(arg[s]
for arg
in args)
70 SourceTable.getCentroidDefinition,
71 reason=
'Use `getSchema().getAliasMap().get("slot_Centroid")` instead. To be removed after 20.0.0.')
73 SourceTable.hasCentroidSlot,
74 reason=
'Use `getCentroidSlot().isValid()` instead. To be removed after 20.0.0.')
76 SourceTable.getCentroidKey,
77 reason=
'Use `getCentroidSlot().getMeasKey()` instead. To be removed after 20.0.0.')
79 SourceTable.getCentroidErrKey,
80 reason=
'Use `getCentroidSlot().getErrKey()` instead. To be removed after 20.0.0.')
82 SourceTable.getCentroidFlagKey,
83 reason=
'Use `getCentroidSlot().getFlagKey()` instead. To be removed after 20.0.0.')
85 SourceTable.getShapeDefinition,
86 reason=
'Use `getSchema().getAliasMap().get("slot_Shape")` instead. To be removed after 20.0.0.')
88 SourceTable.hasShapeSlot,
89 reason=
'Use `getShapeSlot().isValid()` instead. To be removed after 20.0.0.')
91 SourceTable.getShapeKey,
92 reason=
'Use `getShapeSlot().getMeasKey()` instead. To be removed after 20.0.0.')
94 SourceTable.getShapeErrKey,
95 reason=
'Use `getShapeSlot().getErrKey()` instead. To be removed after 20.0.0.')
97 SourceTable.getShapeFlagKey,
98 reason=
'Use `getShapeSlot().getFlagKey()` instead. To be removed after 20.0.0.')