From b5f4204747f7e4105049713b40d7bca0fae052e5 Mon Sep 17 00:00:00 2001 From: hack Date: Tue, 25 Oct 2011 21:25:35 +0000 Subject: 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 --- lib/stwcs/distortion/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/stwcs/distortion/utils.py') 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 -- cgit