diff options
author | bsimon <bsimon@stsci.edu> | 2015-05-04 14:30:51 -0400 |
---|---|---|
committer | bsimon <bsimon@stsci.edu> | 2015-05-04 14:30:51 -0400 |
commit | 354c99daa69a8cc4eff3b081ec2c0cdce9df102c (patch) | |
tree | 16cd6d316dc1892952726e6aa5eb5abbad94ce5d /lib/stwcs/wcsutil/instruments.py | |
parent | a750294506fb6270c44b791928ab8d5630a22ca2 (diff) | |
download | stwcs_hcf-354c99daa69a8cc4eff3b081ec2c0cdce9df102c.tar.gz |
Updated files to run under python 2 and 3
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@39775 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/wcsutil/instruments.py')
-rw-r--r-- | lib/stwcs/wcsutil/instruments.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/stwcs/wcsutil/instruments.py b/lib/stwcs/wcsutil/instruments.py index 8641e51..45da046 100644 --- a/lib/stwcs/wcsutil/instruments.py +++ b/lib/stwcs/wcsutil/instruments.py @@ -1,6 +1,6 @@ -from __future__ import division # confidence high +from __future__ import absolute_import, division, print_function # confidence high -from mappings import ins_spec_kw +from .mappings import ins_spec_kw class InstrWCS(object): """ @@ -157,7 +157,7 @@ class ACSWCS(InstrWCS): try: self.detector = self.primhdr['DETECTOR'] except KeyError: - print 'ERROR: Detector kw not found.\n' + print('ERROR: Detector kw not found.\n') raise def set_parity(self): @@ -165,7 +165,7 @@ class ACSWCS(InstrWCS): 'HRC':[[-1.0,0.0],[0.0,1.0]], 'SBC':[[-1.0,0.0],[0.0,1.0]]} - if self.detector not in parity.keys(): + if self.detector not in parity: parity = InstrWCS.set_parity(self) else: self.parity = parity[self.detector] @@ -208,7 +208,7 @@ class WFPC2WCS(InstrWCS): try: self.detector = self.exthdr['DETECTOR'] except KeyError: - print 'ERROR: Detector kw not found.\n' + print('ERROR: Detector kw not found.\n') raise @@ -227,7 +227,7 @@ class WFC3WCS(InstrWCS): try: self.detector = self.primhdr['DETECTOR'] except KeyError: - print 'ERROR: Detector kw not found.\n' + print('ERROR: Detector kw not found.\n') raise def set_filter1(self): @@ -243,7 +243,7 @@ class WFC3WCS(InstrWCS): parity = {'UVIS':[[-1.0,0.0],[0.0,1.0]], 'IR':[[-1.0,0.0],[0.0,1.0]]} - if self.detector not in parity.keys(): + if self.detector not in parity: parity = InstrWCS.set_parity(self) else: self.parity = parity[self.detector] @@ -278,7 +278,7 @@ class NICMOSWCS(InstrWCS): try: self.detector = self.primhdr['CAMERA'] except KeyError: - print 'ERROR: Detector kw not found.\n' + print('ERROR: Detector kw not found.\n') raise class STISWCS(InstrWCS): @@ -309,7 +309,7 @@ class STISWCS(InstrWCS): try: self.detector = self.primhdr['DETECTOR'] except KeyError: - print 'ERROR: Detector kw not found.\n' + print('ERROR: Detector kw not found.\n') raise def set_date_obs(self): |