diff options
author | dencheva <dencheva@stsci.edu> | 2012-08-30 14:28:23 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2012-08-30 14:28:23 -0400 |
commit | a67bad59a8fe50b1099b2953da176e1f83c4f843 (patch) | |
tree | 1429cec709213a3c73202807f5ce778f56d64ef4 | |
parent | 7a3c98f8f3e67dc8c3d719761d3174ece1589e0b (diff) | |
download | stwcs_hcf-a67bad59a8fe50b1099b2953da176e1f83c4f843.tar.gz |
do not attempt to make a correction if idcmodel is None
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@19030 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | lib/stwcs/updatewcs/corrections.py | 3 | ||||
-rw-r--r-- | lib/stwcs/updatewcs/makewcs.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/stwcs/updatewcs/corrections.py b/lib/stwcs/updatewcs/corrections.py index b227d05..70bca3b 100644 --- a/lib/stwcs/updatewcs/corrections.py +++ b/lib/stwcs/updatewcs/corrections.py @@ -198,6 +198,9 @@ class CompSIP(object): def updateWCS(cls, ext_wcs, ref_wcs): logger.info("\n\tStarting CompSIP: %s" %time.asctime()) kw2update = {} + if not ext_wcs.idcmodel: + logger.info("IDC model not found, SIP coefficient will not be computed") + return kw2update order = ext_wcs.idcmodel.norder kw2update['A_ORDER'] = order kw2update['B_ORDER'] = order diff --git a/lib/stwcs/updatewcs/makewcs.py b/lib/stwcs/updatewcs/makewcs.py index 76d80b8..9f95a13 100644 --- a/lib/stwcs/updatewcs/makewcs.py +++ b/lib/stwcs/updatewcs/makewcs.py @@ -39,6 +39,9 @@ class MakeWCS(object): recomputes the basic WCS kw """ logger.info("\n\tStarting MakeWCS: %s" % time.asctime()) + if not ext_wcs.idcmodel: + logger.info("IDC model not found, turning off Makewcs") + return {} ltvoff, offshift = cls.getOffsets(ext_wcs) v23_corr = cls.zero_point_corr(ext_wcs) |