diff options
author | hack <hack@stsci.edu> | 2011-10-25 17:25:35 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-10-25 17:25:35 -0400 |
commit | b5f4204747f7e4105049713b40d7bca0fae052e5 (patch) | |
tree | 8a2bd7713049a348ea3d955c646ccf1a7c4b7815 /lib/stwcs/distortion/utils.py | |
parent | c68d6121a6847327df30ece3d90d8cfe0919367b (diff) | |
download | stwcs_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/utils.py')
-rw-r--r-- | lib/stwcs/distortion/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |