diff options
author | dencheva <dencheva@stsci.edu> | 2009-10-15 12:17:50 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2009-10-15 12:17:50 -0400 |
commit | 7765ca7fad42ade686fffc3fea1eeb80c1020428 (patch) | |
tree | 7f95b3f14b6a86bdb86a92ca8239fe89ad98372f /lib/utils.py | |
parent | 238774eeee125c177ff53c1b8c1084bc56bfee6b (diff) | |
download | stwcs_hcf-7765ca7fad42ade686fffc3fea1eeb80c1020428.tar.gz |
Once more - dgeo correction for binned images
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8343 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/utils.py')
-rw-r--r-- | lib/utils.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/utils.py b/lib/utils.py index efe8594..2731f87 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -86,4 +86,14 @@ def diff_angles(a,b): if diff < -180.0: diff += 360.0 - return diff
\ No newline at end of file + return diff + +def getBinning(fobj, extver=1): + # Return the binning factor + binned = 1 + if fobj[0].header['INSTRUME'] == 'WFPC2': + mode = fobj[0].header.get('MODE', "") + if mode == 'AREA': binned = 2 + else: + binned = fobj['SCI', extver].header.get('BINAXIS',1) + return binned |