Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
thusser committed Apr 12, 2024
1 parent 37ca5c1 commit 8cf4a08
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/modules/telescope/test_basetelescope.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import numpy as np
from astroplan import Observer
import astropy.units as u

from pyobs.modules.telescope import DummyTelescope
from pyobs.utils.time import Time


def test_get_derotator_offset_from_header():
def test_calculate_derotator_position():
telescope = DummyTelescope()
telescope.observer = Observer(latitude=-32.375823 * u.deg, longitude=20.8108079 * u.deg, elevation=1798.0 * u.m)
obstime = Time("2024-03-21T20:11:52.281735")
hdr = {
"LATITUDE": (-32.375823, None),
"LONGITUD": (20.810807999999998, None),
"HEIGHT": (1798.0000000004793, None),
"TEL-RA": (138.01290730636728, None),
"TEL-DEC": (-64.86351112618202, None),
"TEL-ROT": (-138.68173828124998, None),
"TEL-ALT": (57.24036032917521, None),
}
np.testing.assert_almost_equal(telescope._get_derotator_offset_from_header(hdr, obstime), 90.22, decimal=2)
ra = 138.01290730636728
dec = -64.86351112618202
tel_rot = -138.68173828124998
alt = 57.24036032917521
derot = telescope._calculate_derotator_position(ra, dec, alt, obstime)
np.testing.assert_almost_equal(derot - tel_rot, 90.22, decimal=2)

0 comments on commit 8cf4a08

Please sign in to comment.