summaryrefslogtreecommitdiff
path: root/lib/stwcs/distortion/utils.py
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2015-05-26 10:20:54 -0400
committerdencheva <dencheva@stsci.edu>2015-05-26 10:20:54 -0400
commit71f456c7257e07ad51d530f8c177792c64454781 (patch)
tree21667f22301e06cf4887848e53bc7d983c3a3692 /lib/stwcs/distortion/utils.py
parente61b0356aae80773baa27d8fd5bfbd5d5393fa85 (diff)
downloadstwcs_hcf-71f456c7257e07ad51d530f8c177792c64454781.tar.gz
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
Diffstat (limited to 'lib/stwcs/distortion/utils.py')
-rw-r--r--lib/stwcs/distortion/utils.py6
1 files changed, 3 insertions, 3 deletions
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: