diff options
author | hack <hack@stsci.edu> | 2011-10-31 12:53:35 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-10-31 12:53:35 -0400 |
commit | ebbd2caa93a0144fcea6e8f368ebaf012b8d1d13 (patch) | |
tree | da8a0138ff35aa7a55488162aba0f78ce716f2d8 /lib | |
parent | 10cf088f010c6ebf937b4739603a9da72ac88ff2 (diff) | |
download | stwcs_hcf-ebbd2caa93a0144fcea6e8f368ebaf012b8d1d13.tar.gz |
Corrected a couple of (minor) interface violations with PyFITS in updatewcs calls to '.getval()'.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13925 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stwcs/updatewcs/det2im.py | 4 | ||||
-rw-r--r-- | lib/stwcs/updatewcs/npol.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/stwcs/updatewcs/det2im.py b/lib/stwcs/updatewcs/det2im.py index bda3ca3..5e03f74 100644 --- a/lib/stwcs/updatewcs/det2im.py +++ b/lib/stwcs/updatewcs/det2im.py @@ -69,7 +69,7 @@ class DET2IMCorr(object): def getAxisCorr(cls, refname): try: - direction = pyfits.getval(refname, ext=1, key='EXTNAME') + direction = pyfits.getval(refname, 'EXTNAME', ext=1) if direction == 'DX': return 1 elif direction == 'DY': return 2 else: @@ -127,7 +127,7 @@ class DET2IMCorr(object): axiscorr = cls.getAxisCorr(d2imfile) sci_hdr = fobj[1].header data_shape = pyfits.getdata(d2imfile, ext=1).shape - naxis = pyfits.getval(d2imfile, ext=1, key='NAXIS') + naxis = pyfits.getval(d2imfile, 'NAXIS', ext=1 ) kw = { 'NAXIS': 'Size of the axis', 'CRPIX': 'Coordinate system reference pixel', diff --git a/lib/stwcs/updatewcs/npol.py b/lib/stwcs/updatewcs/npol.py index 18f73b0..2607e48 100644 --- a/lib/stwcs/updatewcs/npol.py +++ b/lib/stwcs/updatewcs/npol.py @@ -248,7 +248,7 @@ class NPOLCorr(object): continue npl.close() - naxis = pyfits.getval(npolfile, ext=1, key='NAXIS') + naxis = pyfits.getval(npolfile, 'NAXIS', ext=1) ccdchip = nplextname #npol_header['CCDCHIP'] kw = { 'NAXIS': 'Size of the axis', |