summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2008-12-16 12:32:17 -0500
committerdencheva <dencheva@stsci.edu>2008-12-16 12:32:17 -0500
commit4d45636b0d7f6921d9f32258d35c4a0718c9767e (patch)
treee36000d181be76d89e5a55a2bf4280e12f0cc1af
parent56b509af2d9d64e50d412cc0a033f3df0fa57814 (diff)
downloadstwcs_hcf-4d45636b0d7f6921d9f32258d35c4a0718c9767e.tar.gz
Fixed bugs
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/hstwcs@7384 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r--updatewcs/makewcs.py6
-rw-r--r--wcsutil/__init__.py7
2 files changed, 8 insertions, 5 deletions
diff --git a/updatewcs/makewcs.py b/updatewcs/makewcs.py
index 449cf2a..40be750 100644
--- a/updatewcs/makewcs.py
+++ b/updatewcs/makewcs.py
@@ -36,8 +36,10 @@ class MakeWCS(object):
recomputes the basic WCS kw
"""
ltvoff, offshift = cls.getOffsets(ext_wcs)
+
v23_corr = cls.zero_point_corr(ext_wcs)
rv23_corr = cls.zero_point_corr(ref_wcs)
+
cls.uprefwcs(ext_wcs, ref_wcs, rv23_corr, ltvoff, offshift)
cls.upextwcs(ext_wcs, ref_wcs, v23_corr, rv23_corr, ltvoff, offshift)
@@ -135,8 +137,8 @@ class MakeWCS(object):
offshift = offsh
dec = ref_wcs.wcs.crval[1]
tddscale = (ref_wcs.pscale/ext_wcs.idcmodel.cx[1,1])
- rv23 = [ref_wcs.idcmodel.refpix['V2REF'] + rv23_corr_tdd[0,0] *tddscale,
- ref_wcs.idcmodel.refpix['V3REF'] - rv23_corr_tdd[1,0]] * tddscale
+ rv23 = [ref_wcs.idcmodel.refpix['V2REF'] + (rv23_corr_tdd[0,0] *tddscale),
+ ref_wcs.idcmodel.refpix['V3REF'] - (rv23_corr_tdd[1,0] * tddscale)]
# Get an approximate reference position on the sky
rref = numpy.array([[ref_wcs.idcmodel.refpix['XREF']+ltvoffx ,
ref_wcs.idcmodel.refpix['YREF']+ltvoffy]])
diff --git a/wcsutil/__init__.py b/wcsutil/__init__.py
index c43f86e..e406a9a 100644
--- a/wcsutil/__init__.py
+++ b/wcsutil/__init__.py
@@ -100,7 +100,8 @@ class HSTWCS(WCS):
self.dec_targ = primhdr.get('DEC_TARG', None)
self.filename = primhdr.get('FILENAME', "")
self.detector = primhdr.get('DETECTOR', None)
-
+
+
def readIDCCoeffs(self, header):
"""
Reads in first order IDCTAB coefficients if present in the header
@@ -123,9 +124,9 @@ class HSTWCS(WCS):
# Some of the instrument's attributes are recorded in the primary header and
# were already set, (e.g. 'DETECTOR'), the code below is a check for that case.
if not self.__getattribute__(key):
- print '%s object has no attribute %s' % (insobj.__class__.__name__, key)
- else:
raise
+ else:
+ pass
else:
raise KeyError, "Unsupported instrument - %s" %self.instrument