summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil/getinput.py
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2014-05-01 17:44:37 -0400
committerdencheva <dencheva@stsci.edu>2014-05-01 17:44:37 -0400
commit1aea0a057bde417b181538512006c1dfeccbc16e (patch)
treec2700e59e198b77fb6581be3902edb99c2e1c0c0 /lib/stwcs/wcsutil/getinput.py
parente2041048d7b03b0a8d9557863a1cfb32592fab1a (diff)
downloadstwcs_hcf-1aea0a057bde417b181538512006c1dfeccbc16e.tar.gz
further changes to move to astropy
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31270 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/wcsutil/getinput.py')
-rw-r--r--lib/stwcs/wcsutil/getinput.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stwcs/wcsutil/getinput.py b/lib/stwcs/wcsutil/getinput.py
index b5a5df7..dbd240f 100644
--- a/lib/stwcs/wcsutil/getinput.py
+++ b/lib/stwcs/wcsutil/getinput.py
@@ -1,4 +1,4 @@
-from astropy.io import fits as pyfits
+from astropy.io import fits
from stsci.tools import irafglob, fileutil, parseinput
def parseSingleInput(f=None, ext=None):
@@ -20,14 +20,14 @@ def parseSingleInput(f=None, ext=None):
extnum = int(ext[1]) #handle ext=('',extnum)
else:
extnum = ext
- phdu = pyfits.open(filename)
+ phdu = fits.open(filename)
hdr0 = phdu[0].header
try:
ehdr = phdu[extnum].header
except (IndexError, KeyError), e:
raise e.__class__('Unable to get extension %s.' % extnum)
- elif isinstance(f, pyfits.HDUList):
+ elif isinstance(f, fits.HDUList):
phdu = f
if ext == None:
extnum = 0
@@ -38,8 +38,8 @@ def parseSingleInput(f=None, ext=None):
filename = hdr0.get('FILENAME', "")
else:
- raise ValueError('Input must be a file name string or a pyfits file '
- 'object')
+ raise ValueError('Input must be a file name string or a'
+ '`astropy.io.fits.HDUList` object')
return filename, hdr0, ehdr, phdu