262 def run(self, sources, skyMap=None, tractInfo=None, patchInfo=None):
263 """Set isPrimary and related flags on sources.
265 For coadded imaging, the `isPrimary` flag returns True when an object
266 has no children, is in the inner region of a coadd patch, is in the
267 inner region of a coadd trach, and is not detected in a pseudo-filter
268 (e.g., a sky_object).
269 For single frame imaging, the isPrimary flag returns True when a
270 source has no children and is not a sky source.
274 sources : `lsst.afw.table.SourceCatalog`
275 A sourceTable. Reads in centroid fields and an nChild field.
276 Writes is-patch-inner, is-tract-inner, and is-primary flags.
277 skyMap : `lsst.skymap.BaseSkyMap`
278 Sky tessellation object
279 tractInfo : `lsst.skymap.TractInfo`
281 patchInfo : `lsst.skymap.PatchInfo`
290 isPrimary = isTractInner & isPatchInner & ~isPseudo
297 if "sky_source" in sources.schema:
298 isSky = sources[
"sky_source"]
300 isSky = np.zeros(len(sources), dtype=bool)
305 fromBlend, isIsolated, isDeblendedSource, isDeblendedModelSource = result
311 isPrimary = isPrimary & isDeblendedSource