From df57e3c294d8338dd2a672316319bede32149a2b Mon Sep 17 00:00:00 2001 From: Audrey Budlong Date: Wed, 18 Dec 2024 13:57:34 -0800 Subject: [PATCH] Fixup test --- python/lsst/pipe/tasks/calibrateImage.py | 3 --- tests/test_calibrateImage.py | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/python/lsst/pipe/tasks/calibrateImage.py b/python/lsst/pipe/tasks/calibrateImage.py index 3459b8cc1..4ba3dd492 100644 --- a/python/lsst/pipe/tasks/calibrateImage.py +++ b/python/lsst/pipe/tasks/calibrateImage.py @@ -392,9 +392,6 @@ 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 c14a99cc4..8522bd59f 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), 6) + self.assertEqual(len(result.stars), 7) # 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), 6) + self.assertEqual(len(stars), 7) 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, True, True, True]) - np.testing.assert_array_equal(stars["calib_psf_used"], [False, False, False, True, True, True]) + [False, False, False, False, True, True, True]) + np.testing.assert_array_equal(stars["calib_psf_used"], [False, False, False, False, True, True, True]) # Too few sources to reserve any in these tests. self.assertEqual(stars["calib_psf_reserved"].sum(), 0)