From a67bad59a8fe50b1099b2953da176e1f83c4f843 Mon Sep 17 00:00:00 2001 From: dencheva Date: Thu, 30 Aug 2012 18:28:23 +0000 Subject: 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 --- lib/stwcs/updatewcs/corrections.py | 3 +++ lib/stwcs/updatewcs/makewcs.py | 3 +++ 2 files changed, 6 insertions(+) (limited to 'lib') 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) -- cgit