summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/stwcs/updatewcs/apply_corrections.py8
-rw-r--r--setup.cfg2
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/stwcs/updatewcs/apply_corrections.py b/lib/stwcs/updatewcs/apply_corrections.py
index 74feb82..86b623a 100644
--- a/lib/stwcs/updatewcs/apply_corrections.py
+++ b/lib/stwcs/updatewcs/apply_corrections.py
@@ -1,4 +1,4 @@
-from __future__ import division, print_function # confidence high
+from __future__ import division, print_function # confidence high
import os
from astropy.io import fits
@@ -7,6 +7,7 @@ from stsci.tools import fileutil
import os.path
from stwcs.wcsutil import altwcs
from . import utils
+from . import wfpc2_dgeo
import logging
logger = logging.getLogger("stwcs.updatewcs.apply_corrections")
@@ -42,6 +43,11 @@ def setCorrections(fname, vacorr=True, tddcorr=True, npolcorr=True, d2imcorr=Tru
# make a copy of this list !
acorr = allowed_corrections[instrument][:]
+ # For WFPC2 images, the old-style DGEOFILE needs to be
+ # converted on-the-fly into a proper D2IMFILE here...
+ if instrument == 'WFPC2':
+ # check for DGEOFILE, and convert it to D2IMFILE if found
+ d2imfile = wfpc2_dgeo.update_wfpc2_d2geofile(fname)
# Check if idctab is present on disk
# If kw IDCTAB is present in the header but the file is
# not found on disk, do not run TDDCorr, MakeCWS and CompSIP
diff --git a/setup.cfg b/setup.cfg
index d7c05da..ebbace0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = stwcs
-version = 1.2.2.dev
+version = 1.2.3.dev
author = Nadia Dencheva, Warren Hack
author-email = help@stsci.edu
summary = Recomputes the WCS of an HST observation and puts all distortion