Move theta and phi properties to the top
@@ -694,6 +694,16 @@ class MapCoord(object):
"""Latitude coordinate in degrees."""
return self._data["lat"]
+ @property
+ def theta(self):
+ """Theta co-latitude angle in radians"""
+ return np.pi / 2. - np.radians(self.lat)
+
+ @property
+ def phi(self):
+ """Phi longitude angle in radians"""
+ return np.radians(self.lon)
+
@property
def coordsys(self):
"""Coordinate system (str)"""
@@ -919,17 +929,6 @@ class MapCoord(object):
return self.__class__(coords, coordsys=self.coordsys)
- @property
- def theta(self):
- """Theta latitude angle in radians"""
- return np.array(np.pi / 2. - np.radians(self.lat), ndmin=1)
-
- @property
- def phi(self):
- """Phi longitude angle in radians"""
- return np.array(np.radians(self.lon), ndmin=1)
-
-
class MapGeomMeta(InheritDocstrings, abc.ABCMeta):
pass
