summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil/convertwcs.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/convertwcs.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/convertwcs.py')
-rw-r--r--lib/stwcs/wcsutil/convertwcs.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/stwcs/wcsutil/convertwcs.py b/lib/stwcs/wcsutil/convertwcs.py
index 6f9f0bf..7ece2a0 100644
--- a/lib/stwcs/wcsutil/convertwcs.py
+++ b/lib/stwcs/wcsutil/convertwcs.py
@@ -1,5 +1,4 @@
-from astropy.io import fits as pyfits
-
+from astropy.io import fits
try:
import stwcs
from stwcs import wcsutil
@@ -19,8 +18,8 @@ def archive_prefix_OPUS_WCS(fobj,extname='SCI'):
Parameters
----------
- fobj: string or pyfits.HDUList
- Filename or pyfits object of a file
+ fobj : str or `astropy.io.fits.HDUList`
+ Filename or fits object of a file
"""
if stwcs is None:
@@ -33,7 +32,7 @@ def archive_prefix_OPUS_WCS(fobj,extname='SCI'):
closefits = False
if isinstance(fobj,str):
# A filename was provided as input
- fobj = pyfits.open(fobj,mode='update')
+ fobj = fits.open(fobj,mode='update')
closefits=True
# Define the header
@@ -79,13 +78,13 @@ def create_prefix_OPUS_WCS(fobj,extname='SCI'):
Parameters
----------
- fobj: string or pyfits.HDUList
- Filename or pyfits object of a file
+ fobj : str or `astropy.io.fits.HDUList`
+ Filename or fits object of a file
Raises
------
IOError:
- if input PyFITS object was not opened in 'update' mode
+ if input FITS object was not opened in 'update' mode
"""
# List of O-prefix keywords to create
@@ -94,7 +93,7 @@ def create_prefix_OPUS_WCS(fobj,extname='SCI'):
closefits = False
if isinstance(fobj,str):
# A filename was provided as input
- fobj = pyfits.open(fobj,mode='update')
+ fobj = fits.open(fobj, mode='update')
closefits=True
else:
# check to make sure this FITS obj has been opened in update mode