diff --git a/lunarsky/time.py b/lunarsky/time.py index cf2d8f6..c786880 100644 --- a/lunarsky/time.py +++ b/lunarsky/time.py @@ -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: diff --git a/lunarsky/topo.py b/lunarsky/topo.py index 52bc3bf..d45def0 100644 --- a/lunarsky/topo.py +++ b/lunarsky/topo.py @@ -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)