summaryrefslogtreecommitdiff
path: root/lib/polygon.py
diff options
context:
space:
mode:
authorlim <lim@stsci.edu>2012-06-06 16:59:03 -0400
committerlim <lim@stsci.edu>2012-06-06 16:59:03 -0400
commitdcac482d19c8f69652aa32c2fbd6d646afdf9b3c (patch)
tree3b8f9a90387c21c86902f6932ec2b727edf01c9a /lib/polygon.py
parent2c5bec6ad29ec91ca2b395886fa8d2d3a259a035 (diff)
downloadstsci.sphere-dcac482d19c8f69652aa32c2fbd6d646afdf9b3c.tar.gz
lim added SkyLine codes and added radec to SphericalPolygon
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@17216 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 07652822dd48be9bdf7eaf006de25d8bb6c37fff
Diffstat (limited to 'lib/polygon.py')
-rw-r--r--lib/polygon.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/polygon.py b/lib/polygon.py
index 4270ce6..0d8438c 100644
--- a/lib/polygon.py
+++ b/lib/polygon.py
@@ -113,6 +113,18 @@ class SphericalPolygon(object):
"""
return self._inside
+ @property
+ def radec(self):
+ """Convert `SphericalPolygon` footprint to RA and DEC.
+
+ Returns
+ -------
+ ra, dec: array_like
+ RA and DEC of `self.points`.
+ """
+ return vector.vector_to_radec(self.points[:,0], self.points[:,1],
+ self.points[:,2], degrees=True)
+
@classmethod
def from_radec(cls, ra, dec, center=None, degrees=True):
r"""