diff options
author | dencheva <dencheva@stsci.edu> | 2009-12-18 12:01:35 -0500 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2009-12-18 12:01:35 -0500 |
commit | 2ef0aacf55807bf346014b224f2139d9c67a4522 (patch) | |
tree | 95a6ca7cd006f4ad458682224977cef1555e2d12 /lib/utils.py | |
parent | a37eae582268a4689e96008be8eb3599685812d2 (diff) | |
download | stwcs_hcf-2ef0aacf55807bf346014b224f2139d9c67a4522.tar.gz |
Minor refactoring and cleaning; fixed a problem when ORIENTAT is not present in the header. Tests against makewcs pass for all instruments.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8507 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/utils.py')
-rw-r--r-- | lib/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils.py b/lib/utils.py index 2731f87..504d609 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -68,7 +68,10 @@ def write_archive(header): cmt = 'archived value' for kw in basic_wcs: nkw = 'O'+kw - header.update(nkw[:8], header[kw], comment=cmt) + try: + header.update(nkw[:8], header[kw], comment=cmt) + except KeyError: #ORIENTAT is not always present in headers + pass header.update('WCSCDATE', fileutil.getLTime(), comment='Local time the WCS kw were archived') |