CullFromMaskedRegion#
- class lsst.meas.algorithms.CullFromMaskedRegion(*args, **kw)#
Bases:
ConfigDeselect sources that lie in a “bad” mask plane.
This will select against objects whose image coordinates lie in a region with any of the mask bits in the
badMaskNameslist set. Namely used for a reference catalog for which the flag columns we would get from the measurement plugins do not exist.NOTE: In the context of reference objects, it is recommended NOT to include EDGE in the
badMaskNameslist as that will remove all the reference objects outside the detector but within the pixelMargin (thus nulling the pixelMargin padding all together!)Attributes Summary
List of mask planes for which sources should be removed if a bit is set.
Name of column for image x coordinate.
Name of column for image y coordinate.
Methods Summary
apply(catalog, exposure)Apply the mask plane requirements to a catalog.
Attributes Documentation
- badMaskNames#
List of mask planes for which sources should be removed if a bit is set. (
List, default['NO_DATA', 'NOT_DEBLENDED'])
- xColName#
Name of column for image x coordinate. (
str, default'centroid_x')
- yColName#
Name of column for image y coordinate. (
str, default'centroid_y')
Methods Documentation
- apply(catalog, exposure)#
Apply the mask plane requirements to a catalog.
Returns whether the sources were selected.
Parameters#
- catalog
lsst.afw.table.SourceCatalogorpandas.DataFrame or
astropy.table.TableCatalog of sources to which the requirements will be applied.
- exposure
lsst.afw.image.Exposureor None The exposure whose mask plane is to be respected.
Returns#
- selected
numpy.ndarray Boolean array indicating for each source whether it is selected (True means selected).
Raises#
- RuntimeError
Raised if exposure passed is
None.
- catalog