summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil/hstwcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stwcs/wcsutil/hstwcs.py')
-rw-r--r--lib/stwcs/wcsutil/hstwcs.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/stwcs/wcsutil/hstwcs.py b/lib/stwcs/wcsutil/hstwcs.py
index d138f08..371de0f 100644
--- a/lib/stwcs/wcsutil/hstwcs.py
+++ b/lib/stwcs/wcsutil/hstwcs.py
@@ -40,7 +40,7 @@ def extract_rootname(kwvalue,suffix=""):
fullval = kwvalue
# Extract filename without path from kwvalue
fname = os.path.basename(fullval).strip()
-
+
# Now, rip out just the rootname from the full filename
rootname = fileutil.buildNewRootname(fname)
@@ -54,7 +54,7 @@ def build_default_wcsname(idctab):
wcsname = 'IDC_' + idcname
return wcsname
-#
+#
#### HSTWCS Class definition
#
class HSTWCS(WCS):
@@ -173,7 +173,7 @@ class HSTWCS(WCS):
to a CD matrix, if reasonable, by running pc2.cd() method.\n \
The plate scale can be set then by calling setPscale() method.\n"
self.pscale = None
-
+
def setOrient(self):
"""
Computes ORIENTAT from the CD matrix
@@ -278,7 +278,7 @@ class HSTWCS(WCS):
chip=self.chip, direction='forward', date=self.date_obs,
filter1=self.filter1, filter2=self.filter2,
offtab=self.offtab, binned=self.binned)
-
+
if self.ltv1 != 0. or self.ltv2 != 0.:
self.resetLTV()
@@ -287,26 +287,26 @@ class HSTWCS(WCS):
print 'Update header with IDC model kw requested but header was not provided\n.'
else:
self._updatehdr(header)
-
+
def resetLTV(self):
"""
Reset LTV values for polarizer data
-
- The polarizer field is smaller than the detector field.
- The distortion coefficients are defined for the entire
- polarizer field and the LTV values are set as with subarray
+
+ The polarizer field is smaller than the detector field.
+ The distortion coefficients are defined for the entire
+ polarizer field and the LTV values are set as with subarray
data. This may also be true for other special filters.
- This is a special case when the observation is considered
- a subarray in terms of detector field but a full frame in
+ This is a special case when the observation is considered
+ a subarray in terms of detector field but a full frame in
terms of distortion model.
- To avoid shifting the distortion coefficients the LTV values
+ To avoid shifting the distortion coefficients the LTV values
are reset to 0.
"""
if self.naxis1 == self.idcmodel.refpix['XSIZE'] and \
self.naxis2 == self.idcmodel.refpix['YSIZE']:
self.ltv1 = 0.
self.ltv2 = 0.
-
+
def wcs2header(self, sip2hdr=False, idc2hdr=True):
"""
Create a pyfits.Header object from WCS keywords.
@@ -329,13 +329,13 @@ class HSTWCS(WCS):
else:
wname = 'DEFAULT'
h.update('wcsname',value=wname)
-
+
if idc2hdr:
for card in self._idc2hdr():
h.update(card.key,value=card.value,comment=card.comment)
try:
- del h.ascard['RESTFRQ']
- del h.ascard['RESTWAV']
+ del h['RESTFRQ']
+ del h['RESTWAV']
except KeyError: pass
if sip2hdr and self.sip: