From 0381f694acac85e5216adfac440cd192accbe8ec Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Mon, 26 Oct 2020 18:05:57 +0100 Subject: [PATCH] FITS PSF added --- esbo_etc/classes/psf/FITS.py | 2 +- tests/psf/test_FITS.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esbo_etc/classes/psf/FITS.py b/esbo_etc/classes/psf/FITS.py index c8b3409..f14f02e 100644 --- a/esbo_etc/classes/psf/FITS.py +++ b/esbo_etc/classes/psf/FITS.py @@ -57,7 +57,7 @@ class FITS(AGriddedPSF): if "XPSFCTR" in hdul[0].header and "YPSFCTR" in hdul[0].header: center_point = [hdul[0].header["XPSFCTR"], hdul[0].header["YPSFCTR"]] else: - center_point = [x / 2 for x in list(self._psf.shape)] + center_point = [x / 2 for x in list(psf.shape)] # Close the file hdul.close() diff --git a/tests/psf/test_FITS.py b/tests/psf/test_FITS.py index cd18172..9a1da3e 100644 --- a/tests/psf/test_FITS.py +++ b/tests/psf/test_FITS.py @@ -33,7 +33,7 @@ class TestFITS(TestCase): mask_2 = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask_2.createPhotometricAperture("circle", d_ap_2 / 2) mask_2 = self.airy.mapToPixelMask(mask_2) - self.assertTrue(np.isclose(float(mask.sum()), float(mask_2.sum()), rtol=0.005)) + self.assertTrue(np.isclose(float(mask.sum()), float(mask_2.sum()), rtol=0.01)) # Jitter reduced_observation_angle = self.fits.calcReducedObservationAngle(80, 1 * u.arcsec).value