From ebbd2caa93a0144fcea6e8f368ebaf012b8d1d13 Mon Sep 17 00:00:00 2001 From: hack Date: Mon, 31 Oct 2011 16:53:35 +0000 Subject: 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 --- lib/stwcs/updatewcs/det2im.py | 4 ++-- lib/stwcs/updatewcs/npol.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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', -- cgit