summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--updatewcs/apply_corrections.py5
-rw-r--r--updatewcs/makewcs.py3
2 files changed, 5 insertions, 3 deletions
diff --git a/updatewcs/apply_corrections.py b/updatewcs/apply_corrections.py
index 4eee126..9d3573e 100644
--- a/updatewcs/apply_corrections.py
+++ b/updatewcs/apply_corrections.py
@@ -5,6 +5,7 @@ import pyfits
import time
from pytools import fileutil
import os.path
+from stwcs.wcsutil import altwcs
#Note: The order of corrections is important
@@ -53,11 +54,11 @@ def setCorrections(fname, vacorr=True, tddcorr=True, dgeocorr=True, d2imcorr=Tru
if 'MakeWCS' in acorr and newIDCTAB(fname):
print "New IDCTAB file detected. This invalidates all WCS's."
print "Deleting all previous WCS's"
- keys = utils.wcskeys(pyfits.getheader(fname, ext=1))
+ keys = altwcs.wcskeys(pyfits.getheader(fname, ext=1))
if 'O' in keys:
keys.remove('O')
for key in keys:
- utils.deleteWCS(fname, key)
+ altwcs.deleteWCS(fname, key)
if 'VACorr' in acorr and vacorr==False: acorr.remove('VACorr')
if 'TDDCorr' in acorr:
diff --git a/updatewcs/makewcs.py b/updatewcs/makewcs.py
index 49bca0b..08da0b8 100644
--- a/updatewcs/makewcs.py
+++ b/updatewcs/makewcs.py
@@ -3,7 +3,7 @@ from __future__ import division # confidence high
from stwcs import DEGTORAD, RADTODEG
import numpy as np
from math import sin, sqrt, pow, cos, asin, atan2,pi
-import utils
+from stwcs import utils
from pytools import fileutil
class MakeWCS(object):
@@ -52,6 +52,7 @@ class MakeWCS(object):
'CRVAL2': ext_wcs.wcs.crval[1],
'CRPIX1': ext_wcs.wcs.crpix[0],
'CRPIX2': ext_wcs.wcs.crpix[1],
+ 'IDCTAB': ext_wcs.idctab,
}
return kw2update