Coverage for python/lsst/pipe/tasks/setPrimaryFlags.py : 92%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/env python # # LSST Data Management System # Copyright 2008-2016 LSST/AURA # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. #
doc="Name of field in schema with number of deblended children") doc="Names of filters which should never be primary")
"detect_isPatchInner", type="Flag", doc="true if source is in the inner region of a coadd patch", ) "detect_isTractInner", type="Flag", doc="true if source is in the inner region of a coadd tract", ) "detect_isPrimary", type="Flag", doc="true if source has no children and is in the inner region of a coadd patch " "and is in the inner region of a coadd tract " "and is not \"detected\" in a pseudo-filter (see config.pseudoFilterList)", )
"""Set is-primary and related flags on sources
@param[in,out] sources a SourceTable - reads centroid fields and an nChild field - writes is-patch-inner, is-tract-inner and is-primary flags @param[in] skyMap sky tessellation object (subclass of lsst.skymap.BaseSkyMap) @param[in] tractInfo tract object (subclass of lsst.skymap.TractInfo) @param[in] patchInfo patch object (subclass of lsst.skymap.PatchInfo) @param[in] includeDeblend include deblend information in isPrimary? """
# set inner flags for each source and set primary flags for sources with no children # (or all sources if deblend info not available)
# When the centroider fails, we can still fall back to the peak, but we don't trust # that quite as much - so we use a slightly smaller box for the patch comparison. # That's trickier for the tract comparison, so we just use the peak without extra # care there.
except Exception: self.log.warn("merge_peak is not set for pseudo-filter %s" % filt)
continue # Use a slightly smaller box to guard against bad centroids (see above) else:
else:
|