diff options
author | lim <lim@stsci.edu> | 2012-06-06 16:59:03 -0400 |
---|---|---|
committer | lim <lim@stsci.edu> | 2012-06-06 16:59:03 -0400 |
commit | dcac482d19c8f69652aa32c2fbd6d646afdf9b3c (patch) | |
tree | 3b8f9a90387c21c86902f6932ec2b727edf01c9a /lib/polygon.py | |
parent | 2c5bec6ad29ec91ca2b395886fa8d2d3a259a035 (diff) | |
download | stsci.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.py | 12 |
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""" |