Project: datamanagement
Issue DM-6078: Aperture correction fails to measure a correction for the final plugin in the list and reports misleading errors
Since the refactoring of DM-4692, runs of *processCcd.py* detail the following in their logs: {code:title=With base_PsfFlux and base_GaussianFlux plugins registered} processCcd.charImage.detectAndMeasure.measureApCorr WARNING: Only 0 sources for calculation of aperture correction for 'base_PsfFlux'; setting to 1.0 processCcd.charImage.detectAndMeasure.measurement: Measuring 65 sources (65 parents, 0 children) processCcd.charImage.detectAndMeasure.measurement.applyApCorr: Applying aperture corrections to 1 flux fields processCcd.charImage.detectAndMeasure.measurement.applyApCorr: Use naive flux sigma computation ... processCcd.calibrate.detectAndMeasure.measurement.applyApCorr: Applying aperture corrections to 2 flux fields processCcd.calibrate.detectAndMeasure.measurement.applyApCorr: Use naive flux sigma computation processCcd.calibrate.detectAndMeasure.measurement.applyApCorr WARNING: Could not find base_GaussianFlux_flux or base_GaussianFlux_fluxSigma in apCorrMap {code} {code:title=With base_PsfFlux, base_GaussianFlux, and ext_photometryKron_KronFlux plugins registered} processCcd.charImage.detectAndMeasure.measureApCorr: Measuring aperture corrections for 2 flux fields processCcd.charImage.detectAndMeasure.measureApCorr WARNING: Only 0 sources for calculation of aperture correction for 'base_PsfFlux'; setting to 1.0 processCcd.charImage.detectAndMeasure.measureApCorr WARNING: Only 0 sources for calculation of aperture correction for 'base_GaussianFlux'; setting to 1.0 processCcd.charImage.detectAndMeasure.measurement.applyApCorr: Applying aperture corrections to 2 flux fields processCcd.charImage.detectAndMeasure.measurement.applyApCorr: Use naive flux sigma computation ... processCcd.calibrate.detectAndMeasure.measurement.applyApCorr: Applying aperture corrections to 3 flux fields processCcd.calibrate.detectAndMeasure.measurement.applyApCorr: Use naive flux sigma computation processCcd.calibrate.detectAndMeasure.measurement.applyApCorr WARNING: Could not find ext_photometryKron_KronFlux_flux or ext_photometryKron_KronFlux_fluxSigma in apCorrMap {code} I can confirm that for the latter, running HSC data with the fix on DM-6063, the aperture corrections are being measured and applied for the PsfFlux and GaussianFlux measurements, but NOT for the KronFlux measurements. Looking at the output from the current "expected" values for the {{lsst_dm_stack_demo}} we see that there is an offset in the Psf-Gaussian fluxes, implying the Gaussian fluxes are not being measured (and hence not applied): !demo_current.png|width=500! From this I conclude that the aperture corrections are indeed being measured for all but the final entry in the plugin list. This implies that the report of "Only 0 sources for calculation of aperture correction for 'xxx_xxFlux'; setting to 1.0" is incorrect for all but the final plugin measurement. The demo previously successfully calculated aperture corrections and, after the logic fix of DM-4836, applied them in the correct order: !demo_previous.png|width=500! The sources of these issues and fixes for them are the goal of this issue.
Story points: 2