summaryrefslogtreecommitdiff
path: root/stwcs/updatewcs
diff options
context:
space:
mode:
Diffstat (limited to 'stwcs/updatewcs')
-rw-r--r--stwcs/updatewcs/__init__.py8
-rw-r--r--stwcs/updatewcs/makewcs.py6
2 files changed, 8 insertions, 6 deletions
diff --git a/stwcs/updatewcs/__init__.py b/stwcs/updatewcs/__init__.py
index 72d2961..a59f106 100644
--- a/stwcs/updatewcs/__init__.py
+++ b/stwcs/updatewcs/__init__.py
@@ -1,8 +1,10 @@
from __future__ import absolute_import, division, print_function
+
import atexit
from astropy.io import fits
from .. import wcsutil
-from ..wcsutil import HSTWCS
+#from ..wcsutil.hwstwcs import HSTWCS
+
from .. import __version__
from astropy import wcs as pywcs
@@ -115,7 +117,7 @@ def makecorr(fname, allowed_corr):
# Determine the reference chip and create the reference HSTWCS object
nrefchip, nrefext = getNrefchip(f)
wcsutil.restoreWCS(f, nrefext, wcskey='O')
- rwcs = HSTWCS(fobj=f, ext=nrefext)
+ rwcs = wcsutil.HSTWCS(fobj=f, ext=nrefext)
rwcs.readModel(update=True, header=f[nrefext].header)
if 'DET2IMCorr' in allowed_corr:
@@ -133,7 +135,7 @@ def makecorr(fname, allowed_corr):
sciextver = extn.header['extver']
ref_wcs = rwcs.deepcopy()
hdr = extn.header
- ext_wcs = HSTWCS(fobj=f, ext=i)
+ ext_wcs = wcsutil.HSTWCS(fobj=f, ext=i)
# check if it exists first!!!
# 'O ' can be safely archived again because it has been restored first.
wcsutil.archiveWCS(f, ext=i, wcskey="O", wcsname="OPUS", reusekey=True)
diff --git a/stwcs/updatewcs/makewcs.py b/stwcs/updatewcs/makewcs.py
index 8dbcd85..4c6b3df 100644
--- a/stwcs/updatewcs/makewcs.py
+++ b/stwcs/updatewcs/makewcs.py
@@ -204,8 +204,8 @@ class MakeWCS(object):
alpha = 0.0
beta = 0.0
v23_corr = np.array([[0.], [0.]])
- logger.debug("TDD Zero point correction for chip {0} defaulted to: {1}".format((hwcs.chip,
- v23_corr)))
+ logger.debug("TDD Zero point correction for chip"
+ "{0} defaulted to: {1}".format(hwcs.chip, v23_corr))
return v23_corr
tdd = np.array([[beta, alpha], [alpha, -beta]])
@@ -213,7 +213,7 @@ class MakeWCS(object):
xy0 = np.array([[cls.tdd_xyref[hwcs.chip][0] - 2048.],
[cls.tdd_xyref[hwcs.chip][1] - 2048.]])
v23_corr = np.dot(mrotp, np.dot(tdd, xy0)) * 0.05
- logger.debug("TDD Zero point correction for chip {0}: {1}".format((hwcs.chip, v23_corr)))
+ logger.debug("TDD Zero point correction for chip {0}: {1}".format(hwcs.chip, v23_corr))
return v23_corr
zero_point_corr = classmethod(zero_point_corr)