Update test results

This commit is contained in:
Lukas Klass 2020-06-18 09:04:27 +02:00
parent f141733908
commit d82a500a6a
3 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ class TestAiry(TestCase):
mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix)
mask.createPhotometricAperture("circle", d_ap / 2) mask.createPhotometricAperture("circle", d_ap / 2)
mask = self.airy.mapToPixelMask(mask) mask = self.airy.mapToPixelMask(mask)
self.assertAlmostEqual(mask.sum(), 0.8140235177533067) self.assertAlmostEqual(float(mask.sum()), 0.8173985568945881)
# Jitter, unobstructed # Jitter, unobstructed
reduced_observation_angle = self.airy.calcReducedObservationAngle(80, 1 * u.arcsec).value reduced_observation_angle = self.airy.calcReducedObservationAngle(80, 1 * u.arcsec).value
@ -49,7 +49,7 @@ class TestAiry(TestCase):
mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix)
mask.createPhotometricAperture("circle", d_ap / 2) mask.createPhotometricAperture("circle", d_ap / 2)
mask = self.airy.mapToPixelMask(mask, 1 * u.arcsec) mask = self.airy.mapToPixelMask(mask, 1 * u.arcsec)
self.assertAlmostEqual(mask.sum(), 0.8097456506977345) self.assertAlmostEqual(float(mask.sum()), 0.8108919935181225)
# No jitter, obstructed # No jitter, obstructed
reduced_observation_angle = self.airy.calcReducedObservationAngle(80, obstruction=0.04).value reduced_observation_angle = self.airy.calcReducedObservationAngle(80, obstruction=0.04).value
@ -57,7 +57,7 @@ class TestAiry(TestCase):
mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix)
mask.createPhotometricAperture("circle", d_ap / 2) mask.createPhotometricAperture("circle", d_ap / 2)
mask = self.airy.mapToPixelMask(mask, obstruction=0.04) mask = self.airy.mapToPixelMask(mask, obstruction=0.04)
self.assertAlmostEqual(mask.sum(), 0.8088278758034545) self.assertAlmostEqual(float(mask.sum()), 0.8085985979598022)
# Jitter, obstructed # Jitter, obstructed
reduced_observation_angle = self.airy.calcReducedObservationAngle(80, 1 * u.arcsec, 0.04).value reduced_observation_angle = self.airy.calcReducedObservationAngle(80, 1 * u.arcsec, 0.04).value
@ -65,4 +65,4 @@ class TestAiry(TestCase):
mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix)
mask.createPhotometricAperture("circle", d_ap / 2) mask.createPhotometricAperture("circle", d_ap / 2)
mask = self.airy.mapToPixelMask(mask, 1 * u.arcsec, 0.04) mask = self.airy.mapToPixelMask(mask, 1 * u.arcsec, 0.04)
self.assertAlmostEqual(mask.sum(), 0.807989897660598) self.assertAlmostEqual(float(mask.sum()), 0.808837170286202)

View File

@ -23,7 +23,7 @@ class TestZemax(TestCase):
mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix)
mask.createPhotometricAperture("circle", d_ap / 2) mask.createPhotometricAperture("circle", d_ap / 2)
mask = self.zemax.mapToPixelMask(mask) mask = self.zemax.mapToPixelMask(mask)
self.assertAlmostEqual(mask.sum(), 0.8461957147744972) self.assertAlmostEqual(float(mask.sum()), 0.8503792384734423)
# Jitter # Jitter
reduced_observation_angle = self.zemax.calcReducedObservationAngle(80, 1 * u.arcsec).value reduced_observation_angle = self.zemax.calcReducedObservationAngle(80, 1 * u.arcsec).value
@ -31,4 +31,4 @@ class TestZemax(TestCase):
mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix) mask = PixelMask(np.array([1024, 1024]) << u.pix, 6.5 * u.um, np.array([0.5, 0.5]) << u.pix)
mask.createPhotometricAperture("circle", d_ap / 2) mask.createPhotometricAperture("circle", d_ap / 2)
mask = self.zemax.mapToPixelMask(mask, 1 * u.arcsec) mask = self.zemax.mapToPixelMask(mask, 1 * u.arcsec)
self.assertAlmostEqual(mask.sum(), 0.8241591233169423) self.assertAlmostEqual(float(mask.sum()), 0.8260381847048797)

View File

@ -23,7 +23,7 @@ class TestImager(TestCase):
def test_getSNR(self): def test_getSNR(self):
snr = self.imager.getSNR(0.1 * u.s) snr = self.imager.getSNR(0.1 * u.s)
self.assertAlmostEqual(snr.value, 5.675140880569046) self.assertAlmostEqual(snr.value, 5.694075373738752)
def test_getExpTime(self): def test_getExpTime(self):
exp_time = 0.1 * u.s exp_time = 0.1 * u.s