I feel like it would be useful to have some additional summary flags and calculated values available for e.g. selecting sources for astrometry calculations. In addition to the centroid covariance (not currently computed by the SDSS centroider), two “derived flags” would be quite helpful: “this is possibly multiple sources” and “this source has a well determined centroid” (note that that’s different from the negation of the existing
centroid_flag, which tells you if the source was able to be centroided at all).
I feel like such logic should live in the code that did the calculation in the first place, as that is where the most knowledge about the calculation resides. It also means that code further down the line does not have to re-invent the calculation every time, possibly saving noticeable compute time (e.g. having to check the number of peaks of each source’s footprint in a catalog).
Here’s a first cut at what these flags would mean, although those who are more familiar with the details of the relevant algorithms may be able to do better:
multipleFlag (computed by deblender?):
any( parent != 0, deblend_nChild > 0, len(footprint.getPeaks()) > 1, )
goodCentroidFlag (computed by centroider):
all( not centroidFlag, isfinite(centroid), isfinite(sigma), ok covariance (??), not saturated, not interpolatedCenter, not edge, not multipleFlag (??) )
goodCentroidFlag could be independent of multipleFlag, thus needing both to be checked to know if a source has a totally reliable centroid. That might simplify the flag setting code, as the centroider would not have to know anything about the deblender results.
I’m not sure if adding flags requires an RFC, or whether there are a few others that could be taken care of at the same time, hence this post.