From ef995958061934dadcf51ea843bef37052a6f76c Mon Sep 17 00:00:00 2001 From: lim Date: Tue, 19 Jun 2012 20:56:56 +0000 Subject: lim added final touches to skyline and polygon, and added skyline tests git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@17428 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 7d98dcd06a908e74b9c69699ee813e23d468dad3 --- lib/skyline.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/skyline.py') diff --git a/lib/skyline.py b/lib/skyline.py index bcc3bae..2cc70c1 100644 --- a/lib/skyline.py +++ b/lib/skyline.py @@ -161,6 +161,8 @@ class SkyLine(object): HST images. PRIMARY if image is single ext. """ + extname = extname.upper() + # Convert SCI data to SkyLineMember if fname is not None: with pyfits.open(fname) as pf: @@ -177,7 +179,14 @@ class SkyLine(object): self.polygon = SphericalPolygon([]) def __getattr__(self, what): - return getattr(self.polygon, what) + """Control attribute access to `SphericalPolygon`.""" + if what in ('from_radec', 'from_cone', 'from_wcs', + 'multi_union', 'multi_intersection', + '_find_new_inside',): + raise AttributeError('\'SkyLine\' object has no attribute \'%s\'' % + what) + else: + return getattr(self.polygon, what) def __copy__(self): return deepcopy(self) -- cgit