summaryrefslogtreecommitdiff
path: root/updatewcs/__init__.py
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2011-02-24 16:33:25 -0500
committerdencheva <dencheva@stsci.edu>2011-02-24 16:33:25 -0500
commit393f3343732f159d0038f822ed289d10a2e07413 (patch)
treec1e75a207a25d9d22685a68563d878fe0fb5c321 /updatewcs/__init__.py
parent0529fe7fede22b0f6978e430dff51eb5fd4346b7 (diff)
downloadstwcs_hcf-393f3343732f159d0038f822ed289d10a2e07413.tar.gz
Closes #674: updatewcs adds a keyword UPWCSVER to the primary header of the flt file to record the version of STWCS used in the updates. In addition removed the __version__ string from hstwcs - we have decided to have only one version string for the entire package.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12011 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'updatewcs/__init__.py')
-rw-r--r--updatewcs/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/updatewcs/__init__.py b/updatewcs/__init__.py
index e07e115..9c899db 100644
--- a/updatewcs/__init__.py
+++ b/updatewcs/__init__.py
@@ -5,6 +5,7 @@ import pyfits
import numpy as np
from stwcs import wcsutil
from stwcs.wcsutil import HSTWCS
+from stwcs import __version__ as stwcsversion
import pywcs
import utils, corrections, makewcs
@@ -160,8 +161,9 @@ def makecorr(fname, allowed_corr, wkey=" ", wname=" ", clobber=False):
if 'DGEOCorr' in allowed_corr:
kw2update = dgeo.DGEOCorr.updateWCS(f)
for kw in kw2update:
- f[1].header.update(kw, kw2update[kw])
-
+ f[1].header.update(kw, kw2update[kw])
+ # Finally record the version of the software which updated the WCS
+ f[0].header.update(key='UPWCSVER', value=stwcsversion, comment="Version of STWCS used to updated the WCS", before='HISTORY')
f.close()
def getKeyName(hdr, wkey, wname, idcname):