2020-04-29 17:37:23 +02:00
|
|
|
from unittest import TestCase
|
|
|
|
from esbo_etc.classes.psf.Airy import Airy
|
|
|
|
import astropy.units as u
|
|
|
|
|
|
|
|
|
|
|
|
class TestAiry(TestCase):
|
|
|
|
def setUp(self):
|
2020-05-08 15:06:44 +02:00
|
|
|
self.airy = Airy(13, 4 * u.um, 0.5 * u.m, 10, 6.5 * u.nm)
|
2020-04-29 17:37:23 +02:00
|
|
|
|
|
|
|
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)
|