diff options
author | hack <hack@stsci.edu> | 2013-04-30 16:55:57 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2013-04-30 16:55:57 -0400 |
commit | 05d1dce7d577d746482a7cb33d83703ab0b6e769 (patch) | |
tree | a57ddf5997004e18a88ff632a6c3de2b42959c4c /lib/stwcs/distortion/mutil.py | |
parent | 7d529dbb88ec1e47611373638b72ca8d648246a3 (diff) | |
download | stwcs_hcf-05d1dce7d577d746482a7cb33d83703ab0b6e769.tar.gz |
This update removes all references to .has_key() method, including those for list and dict comprehension, but primarily to work with PyFITS 3.2.dev checked in on 29-Apr-2013. [Trac Ticket #1007]
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@24552 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/distortion/mutil.py')
-rw-r--r-- | lib/stwcs/distortion/mutil.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stwcs/distortion/mutil.py b/lib/stwcs/distortion/mutil.py index fc97606..02fc4c2 100644 --- a/lib/stwcs/distortion/mutil.py +++ b/lib/stwcs/distortion/mutil.py @@ -67,10 +67,10 @@ def readIDCtab (tabname, chip=1, date=None, direction='forward', #First thing we need, is to read in the coefficients from the IDC # table and populate the Fx and Fy matrices. - if ftab['PRIMARY'].header.has_key('DETECTOR'): + if 'DETECTOR' in ftab['PRIMARY'].header: detector = ftab['PRIMARY'].header['DETECTOR'] else: - if ftab['PRIMARY'].header.has_key('CAMERA'): + if 'CAMERA' in ftab['PRIMARY'].header: detector = str(ftab['PRIMARY'].header['CAMERA']) else: detector = 1 @@ -263,7 +263,7 @@ def read_tdd_coeffs(phdr): skew_coeffs['TDD_A'] = None skew_coeffs['TDD_B'] = None - if phdr.has_key("TDDORDER"): + if "TDDORDER" in phdr: n = int(phdr["TDDORDER"]) else: print 'TDDORDER kw not present, using default TDD correction' @@ -438,7 +438,7 @@ def readWCSCoeffs(header): for i in xrange(_xorder+1): for j in xrange(i+1): xcname = cxstr+str(j)+'_'+str(i-j) - if header.has_key(xcname): + if xcname in header: fx[i,j] = header[xcname] # Extract Y coeffs separately as a different order may @@ -446,7 +446,7 @@ def readWCSCoeffs(header): for i in xrange(_yorder+1): for j in xrange(i+1): ycname = cystr+str(j)+'_'+str(i-j) - if header.has_key(ycname): + if ycname in header: fy[i,j] = header[ycname] # Now set the linear terms |