Skip to content

Commit

Permalink
cover tuple case in time
Browse files Browse the repository at this point in the history
  • Loading branch information
aelanman committed Oct 3, 2022
1 parent 37ed971 commit 36694c4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lunarsky/tests/test_time.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from astropy.coordinates import ICRS
from astropy.coordinates import ICRS, EarthLocation
from astropy.time import TimeDelta
import pytest

Expand All @@ -23,3 +23,15 @@ def test_sidereal_time_calculation(lat, lon):
src = SkyCoord(alt="90d", az="0d", frame="lunartopo", obstime=tt, location=loc)
lst = tt.sidereal_time("mean")
assert np.isclose(lst.deg, src.transform_to(ICRS()).ra.deg, atol=1e-4)


def test_earthloc():
lat = -30.0
lon = 127.0

t0 = Time(
"2020-01-01T00:00:00", location=EarthLocation.from_geodetic(lon=lon, lat=lat)
)
t1 = Time("2020-01-01T00:00:00", location=(lon, lat))

assert t0.location == t1.location

0 comments on commit 36694c4

Please sign in to comment.