diff options
author | lim <lim@stsci.edu> | 2012-06-19 16:56:56 -0400 |
---|---|---|
committer | lim <lim@stsci.edu> | 2012-06-19 16:56:56 -0400 |
commit | ef995958061934dadcf51ea843bef37052a6f76c (patch) | |
tree | 0ccad50e34da61d9fe399fc2c2ceac6a2a270448 /lib/skyline.py | |
parent | b196c939f8dd233af0811802bf1a125c90063973 (diff) | |
download | stsci.sphere-ef995958061934dadcf51ea843bef37052a6f76c.tar.gz |
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
Diffstat (limited to 'lib/skyline.py')
-rw-r--r-- | lib/skyline.py | 11 |
1 files changed, 10 insertions, 1 deletions
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) |