From 71f456c7257e07ad51d530f8c177792c64454781 Mon Sep 17 00:00:00 2001 From: dencheva Date: Tue, 26 May 2015 14:20:54 +0000 Subject: Raise an IOError if NPOLFILE or D2IMFILE keywords have values but the files are not found on disk. Part of #1074 git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@40433 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/distortion/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/stwcs/distortion/utils.py') diff --git a/lib/stwcs/distortion/utils.py b/lib/stwcs/distortion/utils.py index 449bc18..51df391 100644 --- a/lib/stwcs/distortion/utils.py +++ b/lib/stwcs/distortion/utils.py @@ -33,7 +33,7 @@ def output_wcs(list_of_wcsobj, ref_wcs=None, owcs=None, undistort=True): crval = np.array([crval1,crval2], dtype=np.float64) # this value is now zero-based if owcs is None: - if ref_wcs == None: + if ref_wcs is None: ref_wcs = list_of_wcsobj[0].deepcopy() if undistort: outwcs = undistortWCS(ref_wcs) @@ -98,7 +98,7 @@ def undistortWCS(wcsobj): cx, cy = coeff_converter.sip2idc(wcsobj) # cx, cy can be None because either there is no model available # or updatewcs was not run. - if cx == None or cy == None: + if cx is None or cy is None: if foundIDCTAB(wcsobj.idctab): m = """IDCTAB is present but distortion model is missing. Run updatewcs() to update the headers or @@ -157,7 +157,7 @@ def apply_idc(pixpos, cx, cy, pixref, pscale= None, order=None): pixref: reference opixel position """ - if cx == None: + if cx is None: return pixpos if order is None: -- cgit