diff options
author | hack <hack@stsci.edu> | 2015-12-18 10:52:00 -0500 |
---|---|---|
committer | hack <hack@stsci.edu> | 2015-12-18 10:52:00 -0500 |
commit | c3f5a3514eff40b3aa178b2996d997a98f03cee0 (patch) | |
tree | 66ea7ed5c190df8d23d1d7bf8f14af2c2c39273d /lib/stwcs/updatewcs/wfpc2_dgeo.py | |
parent | d6432457220db0693499cca272c33081c880d69c (diff) | |
download | stwcs_hcf-c3f5a3514eff40b3aa178b2996d997a98f03cee0.tar.gz |
Logic for setting D2IMFILE has been revised to allow updatewcs to be run multiple times without causing problems. In this case, D2IMFILE only gets set if DGEOFILE needs to be changed or D2IMFILE is not there already.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@47227 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/updatewcs/wfpc2_dgeo.py')
-rw-r--r-- | lib/stwcs/updatewcs/wfpc2_dgeo.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stwcs/updatewcs/wfpc2_dgeo.py b/lib/stwcs/updatewcs/wfpc2_dgeo.py index d2d03ef..884bd7e 100644 --- a/lib/stwcs/updatewcs/wfpc2_dgeo.py +++ b/lib/stwcs/updatewcs/wfpc2_dgeo.py @@ -52,7 +52,8 @@ def update_wfpc2_d2geofile(filename, fhdu=None): else: d2imfile = None fhdu['PRIMARY'].header['DGEOFILE'] = 'N/A' - fhdu['PRIMARY'].header['D2IMFILE'] = 'N/A' + if 'D2IMFILE' not in fhdu['PRIMARY'].header: + fhdu['PRIMARY'].header['D2IMFILE'] = 'N/A' # Only close the file handle if opened in this function if close_fhdu: |