summaryrefslogtreecommitdiff
path: root/wcsutil
diff options
context:
space:
mode:
Diffstat (limited to 'wcsutil')
-rw-r--r--wcsutil/__init__.py8
-rw-r--r--wcsutil/instruments.py4
2 files changed, 8 insertions, 4 deletions
diff --git a/wcsutil/__init__.py b/wcsutil/__init__.py
index 894abad..05790f8 100644
--- a/wcsutil/__init__.py
+++ b/wcsutil/__init__.py
@@ -224,28 +224,28 @@ class HSTWCS(WCS):
def all_pix2sky(self, *args, **kwargs):
origin = self.get_origin(*args)
- if self.det2imfile != None:
+ if self.det2imext != None:
return WCS.all_pix2sky(self, self.det2im(*args),origin )
else:
return WCS.all_pix2sky(self, *args)
def pix2foc(self, *args, **kwargs):
origin = self.get_origin(*args)
- if self.det2imfile != None:
+ if self.det2imext != None:
return WCS.pix2foc(self, self.det2im(*args), origin)
else:
return WCS.pix2foc(self, *args)
def p4_pix2foc(self, *args, **kwargs):
origin = self.get_origin(*args)
- if self.det2imfile != None:
+ if self.det2imext != None:
return WCS.p4_pix2foc(self, self.det2im(*args), origin)
else:
return WCS.p4_pix2foc(self, *args)
def wcs_pix2sky(self, *args, **kwargs):
origin = self.get_origin(*args)
- if self.det2imfile != None:
+ if self.det2imext != None:
return WCS.wcs_pix2sky(self, self.det2im(*args), origin)
else:
return WCS.wcs_pix2sky(self, *args)
diff --git a/wcsutil/instruments.py b/wcsutil/instruments.py
index 4491079..6d41e2a 100644
--- a/wcsutil/instruments.py
+++ b/wcsutil/instruments.py
@@ -105,6 +105,10 @@ class ACSWCS(InstrWCS):
except KeyError:
print 'ERROR: Detector kw not found.\n'
raise
+ except TypeError:
+ #this is the case of creating a default HSTWCS object by
+ #providing 'instrument' and 'detector'
+ pass
def set_parity(self):
parity = {'WFC':[[1.0,0.0],[0.0,-1.0]],