summaryrefslogtreecommitdiff
path: root/lib/stwcs/distortion
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2011-10-25 17:25:35 -0400
committerhack <hack@stsci.edu>2011-10-25 17:25:35 -0400
commitb5f4204747f7e4105049713b40d7bca0fae052e5 (patch)
tree8a2bd7713049a348ea3d955c646ccf1a7c4b7815 /lib/stwcs/distortion
parentc68d6121a6847327df30ece3d90d8cfe0919367b (diff)
downloadstwcs_hcf-b5f4204747f7e4105049713b40d7bca0fae052e5.tar.gz
Merging changes from 'stwcs_hdrlet' branch (r18787 - r13909) into trunk. This version of STWCS (0.9.1) provides support for headerlets based on 'Headerlet Design' wiki document, and includes TEAL interfaces for all public headerlet functions. It also moves the TEAL interface for 'updatewcs' from 'astrodither' to this package. The TEAL interaces have been included as a new 'gui' sub-package in order to keep them separate from the remainder of the package's functionality.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13910 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/distortion')
-rw-r--r--lib/stwcs/distortion/mutil.py2
-rw-r--r--lib/stwcs/distortion/utils.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/stwcs/distortion/mutil.py b/lib/stwcs/distortion/mutil.py
index 8f80b67..4965bd1 100644
--- a/lib/stwcs/distortion/mutil.py
+++ b/lib/stwcs/distortion/mutil.py
@@ -424,7 +424,7 @@ def readWCSCoeffs(header):
refpix['PSCALE'] = _scale
refpix['V2REF'] = 0.
refpix['V3REF'] = 0.
- refpix['THETA'] = RADTODEG(_theta)
+ refpix['THETA'] = np.rad2deg(_theta)
refpix['XDELTA'] = 0.0
refpix['YDELTA'] = 0.0
refpix['DEFAULT_SCALE'] = yes
diff --git a/lib/stwcs/distortion/utils.py b/lib/stwcs/distortion/utils.py
index 7f937f7..1d395cb 100644
--- a/lib/stwcs/distortion/utils.py
+++ b/lib/stwcs/distortion/utils.py
@@ -72,15 +72,15 @@ def computeFootprintCenter(edges):
This algorithm should be more robust against discontinuities at the poles.
"""
- alpha = fileutil.DEGTORAD(edges[:,0])
- dec = fileutil.DEGTORAD(edges[:,1])
+ alpha = np.deg2rad(edges[:,0])
+ dec = np.deg2rad(edges[:,1])
xmean = np.mean(np.cos(dec)*np.cos(alpha))
ymean = np.mean(np.cos(dec)*np.sin(alpha))
zmean = np.mean(np.sin(dec))
- crval1 = fileutil.RADTODEG(np.arctan2(ymean,xmean))%360.0
- crval2 = fileutil.RADTODEG(np.arctan2(zmean,np.sqrt(xmean*xmean+ymean*ymean)))
+ crval1 = np.rad2deg(np.arctan2(ymean,xmean))%360.0
+ crval2 = np.rad2deg(np.arctan2(zmean,np.sqrt(xmean*xmean+ymean*ymean)))
return crval1,crval2