Skip to content

Commit

Permalink
minor bug with handling EarthLocation in time
Browse files Browse the repository at this point in the history
  • Loading branch information
aelanman committed Oct 11, 2022
1 parent 36694c4 commit 1461cda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lunarsky/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(

def sidereal_time(self, kind, longitude=None, model=None):
# Currently returns the zenith RA as the LST.
if self.location is None or self.location is EarthLocation:
if self.location is None or isinstance(self.location, EarthLocation):
return super().sidereal_time(kind, longitude=longitude, model=model)

if model is not None:
Expand Down
3 changes: 3 additions & 0 deletions lunarsky/topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def make_transform(coo, toframe):
obstime = toframe.obstime
location = toframe.location

if location is None:
raise ValueError("location must be defined for LunarTopo transformations")

# Initialize station_ids if not defined.
if location.station_ids == []:
location.__class__._set_site_id(location)
Expand Down

0 comments on commit 1461cda

Please sign in to comment.