From dcac482d19c8f69652aa32c2fbd6d646afdf9b3c Mon Sep 17 00:00:00 2001 From: lim Date: Wed, 6 Jun 2012 20:59:03 +0000 Subject: 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 --- lib/polygon.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/polygon.py') 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""" -- cgit