Continuing the discussion from Requirements for overhauled calibration task?:
The proposed new task structure (which is missing some details; a closer but evolving version can be found in DM-4692) makes it hard to measure aperture correction. The issue is that the source catalog must contain a flag field indicating if a source was used to measure PSF, but the proposed CalibrateTask will not have that information, since it never tries to measure PSF.
I can see several ways out of this. Feedback, including alternate suggestions, would be most welcome.
Move final detection and measurement into CharacterizeImageTask
CharacterizeImageTask
already has the “used for PSF” flag from the brighter catalog, so it can easily perform the deeper detection and final measurement that includes aperture correction, e.g. by copying the flag from the shallower catalog. This leaves CalibrateTask
to simply run AstrometryTask
and PhotoCalTask
.
One side benefit: a common testing need is to avoid operations that require a reference catalog. In this plan CalibrateTask
only performs such operations so it can simply be elided for such tests. If CalibrateTask
continues to perform the final detection and measurement then it is a bit harder to elide only the operations that require a reference catalog. On the other hand, if CalibrateTask
does so little it may no longer be needed.
Perform PSF fitting in CalibrateTask
If we add a PSF fitting step in CalibrateTask
then it gains all the information it needs to measure aperture correction. The question is whether it is safe and desirable to fit a PSF based on a deeper catalog. Certainly our current code does this, but the change to using only bright stars to fit the PSF was intentional.
Implement CalibrateTask
as proposed and pass it “used for PSF” information
I dislike this solution because it makes the CalibrateTask
less self-contained and much harder to use (at least when measurement of aperture correction is wanted).