Skip to content

Commit 07d5d00

Browse files
committed
Make CalibrateImageTask astrometry test match production.
The unit test was still fitting astrometry to the second-stage star catalog, even though the task itself had switched to using the PSF star catalog.
1 parent 1146cdd commit 07d5d00

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_calibrateImage.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,11 @@ def test_astrometry(self):
458458
calibrate.astrometry.setRefObjLoader(self.ref_loader)
459459
psf_stars, background, candidates, _ = calibrate._compute_psf(self.exposure, self.id_generator)
460460
calibrate._measure_aperture_correction(self.exposure, psf_stars)
461-
stars = calibrate._find_stars(self.exposure, background, self.id_generator)
462-
463-
calibrate._fit_astrometry(self.exposure, stars)
461+
calibrate._fit_astrometry(self.exposure, psf_stars)
464462

465463
# Check that we got reliable matches with the truth coordinates.
466-
sky = stars["sky_source"]
467-
fitted = SkyCoord(stars[~sky]['coord_ra'], stars[~sky]['coord_dec'], unit="radian")
464+
sky = psf_stars["sky_source"]
465+
fitted = SkyCoord(psf_stars[~sky]['coord_ra'], psf_stars[~sky]['coord_dec'], unit="radian")
468466
truth = SkyCoord(self.truth_cat['coord_ra'], self.truth_cat['coord_dec'], unit="radian")
469467
idx, d2d, _ = fitted.match_to_catalog_sky(truth)
470468
np.testing.assert_array_less(d2d.to_value(u.milliarcsecond), 35.0)

0 commit comments

Comments
 (0)