summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/stwcs/updatewcs/corrections.py3
-rw-r--r--lib/stwcs/updatewcs/makewcs.py3
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)