FITS PSF added

This commit is contained in:
Lukas Klass 2020-10-26 18:05:57 +01:00
parent 527d91aea9
commit 0381f694ac
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class FITS(AGriddedPSF):
if "XPSFCTR" in hdul[0].header and "YPSFCTR" in hdul[0].header: if "XPSFCTR" in hdul[0].header and "YPSFCTR" in hdul[0].header:
center_point = [hdul[0].header["XPSFCTR"], hdul[0].header["YPSFCTR"]] center_point = [hdul[0].header["XPSFCTR"], hdul[0].header["YPSFCTR"]]
else: 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 # Close the file
hdul.close() hdul.close()

View File

@ -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 = 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.createPhotometricAperture("circle", d_ap_2 / 2)
mask_2 = self.airy.mapToPixelMask(mask_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 # Jitter
reduced_observation_angle = self.fits.calcReducedObservationAngle(80, 1 * u.arcsec).value reduced_observation_angle = self.fits.calcReducedObservationAngle(80, 1 * u.arcsec).value