From 4e159e931957748ba106134707d8ee3e2cb4770c Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Mon, 2 Dec 2024 09:43:38 -0500 Subject: [PATCH] Add more testing for ReprocessVisitImageTask. --- tests/test_reprocess_visit_image.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_reprocess_visit_image.py b/tests/test_reprocess_visit_image.py index 4d80270..4f54142 100644 --- a/tests/test_reprocess_visit_image.py +++ b/tests/test_reprocess_visit_image.py @@ -211,6 +211,13 @@ def test_run(self): # Faintest non-sky source should be marked as used. flux_sorted = result.sources[result.sources.argsort("slot_CalibFlux_instFlux")] self.assertTrue(flux_sorted[~flux_sorted["sky_source"]]["calib_psf_used"][0]) + # Test that the schema init-output agrees with the catalog output. + self.assertEqual(task.sources_schema.schema, result.sources_footprints.schema) + # The flux/instFlux ratio should be the LocalPhotoCalib value. + for record in result.sources_footprints: + self.assertAlmostEqual( + record["base_PsfFlux_flux"] / record["base_PsfFlux_instFlux"], record["base_LocalPhotoCalib"] + ) class ReprocessVisitImageTaskRunQuantumTests(lsst.utils.tests.TestCase):