xlens.utils.catalog

Functions

getPatchInner(sources, patchInfo, pixel_scale)

getTractInner(sources, tractInfo, skyMap)

Set a flag for each source that the skyMap includes in tractInfo.

set_isPrimary(sources, skyMap, tractInfo, patchInfo, ...)

Set isPrimary and related flags on sources.

Module Contents

getPatchInner(sources, patchInfo, pixel_scale)[source]
getTractInner(sources, tractInfo, skyMap)[source]

Set a flag for each source that the skyMap includes in tractInfo.

Parameters:
  • sources (lsst.afw.table.SourceCatalog) – A sourceCatalog with pre-calculated centroids.

  • tractInfo (lsst.skymap.TractInfo) – Tract object

  • skyMap (lsst.skymap.BaseSkyMap) – Sky tessellation object

Returns:

isTractInner – True if the skyMap.findTract method returns the same tract as tractInfo.

Return type:

array-like of bool

set_isPrimary(sources, skyMap, tractInfo, patchInfo, pixel_scale)[source]

Set isPrimary and related flags on sources.

For coadded imaging, the isPrimary flag returns True when an object is in the inner region of a coadd patch, is in the inner region of a coadd tract

Parameters:
  • sources (lsst.afw.table.SourceCatalog) – A sourceTable. Reads in centroid fields and an nChild field. Writes is-patch-inner, is-tract-inner, and is-primary flags.

  • skyMap (lsst.skymap.BaseSkyMap) – Sky tessellation object

  • tractInfo (lsst.skymap.TractInfo, optional) – Tract object; required if self.isSingleFrame is False.

  • patchInfo (lsst.skymap.PatchInfo) – Patch object; required if self.isSingleFrame is False.

  • pixel_scale (float) – pixel scale