diff --git a/python/lsst/pipe/tasks/calibrateImage.py b/python/lsst/pipe/tasks/calibrateImage.py index 4ba3dd492..3459b8cc1 100644 --- a/python/lsst/pipe/tasks/calibrateImage.py +++ b/python/lsst/pipe/tasks/calibrateImage.py @@ -392,6 +392,9 @@ def setDefaults(self): # Keep sky sources in the output catalog, even though they aren't # wanted for calibration. self.star_selector["science"].doSkySources = True + # Set the flux and error fields + self.star_selector["science"].signalToNoise.fluxField = "slot_CalibFlux_instFlux" + self.star_selector["science"].signalToNoise.errField = "slot_CalibFlux_instFluxErr" # Use the affine WCS fitter (assumes we have a good camera geometry). self.astrometry.wcsFitter.retarget(lsst.meas.astrom.FitAffineWcsTask) diff --git a/tests/test_calibrateImage.py b/tests/test_calibrateImage.py index 8522bd59f..c14a99cc4 100644 --- a/tests/test_calibrateImage.py +++ b/tests/test_calibrateImage.py @@ -189,7 +189,7 @@ def _check_run(self, calibrate, result, expect_calibrated_pixels: bool = True): self.assertEqual(result.stars["slot_PsfFlux_mag"].unit, u.ABmag) # Should have detected all S/N >= 10 sources plus 2 sky sources, whether 1 or 2 snaps. - self.assertEqual(len(result.stars), 7) + self.assertEqual(len(result.stars), 6) # Did the psf flags get propagated from the psf_stars catalog? self.assertEqual(result.stars["calib_psf_used"].sum(), 3) @@ -319,7 +319,7 @@ def test_find_stars(self): # Only 5 psf-like sources with S/N>10 should be in the output catalog, # plus two sky sources. - self.assertEqual(len(stars), 7) + self.assertEqual(len(stars), 6) self.assertTrue(stars.isContiguous()) # Sort in order of brightness, to easily compare with expected positions. stars.sort(stars.getPsfFluxSlot().getMeasKey()) @@ -420,8 +420,8 @@ def test_match_psf_stars(self): # sort() above leaves the catalog non-contiguous. stars = stars.copy(deep=True) np.testing.assert_array_equal(stars["calib_psf_candidate"], - [False, False, False, False, True, True, True]) - np.testing.assert_array_equal(stars["calib_psf_used"], [False, False, False, False, True, True, True]) + [False, False, False, True, True, True]) + np.testing.assert_array_equal(stars["calib_psf_used"], [False, False, False, True, True, True]) # Too few sources to reserve any in these tests. self.assertEqual(stars["calib_psf_reserved"].sum(), 0)