ESBO-ETC/tests/psf/test_Airy.py
2020-05-08 15:06:44 +02:00

15 lines
637 B
Python

from unittest import TestCase
from esbo_etc.classes.psf.Airy import Airy
import astropy.units as u
class TestAiry(TestCase):
def setUp(self):
self.airy = Airy(13, 4 * u.um, 0.5 * u.m, 10, 6.5 * u.nm)
def test_calc_reduced_observation_angle(self):
self.assertAlmostEqual(self.airy.calcReducedObservationAngle("peak").value, 0.0)
self.assertAlmostEqual(self.airy.calcReducedObservationAngle("fwhm").value, 1.028)
self.assertAlmostEqual(self.airy.calcReducedObservationAngle("min").value, 2.44)
self.assertAlmostEqual(self.airy.calcReducedObservationAngle("80").value, 1.7938842051009245)