diff options
| author | dencheva <dencheva@stsci.edu> | 2010-07-14 16:48:36 -0400 | 
|---|---|---|
| committer | dencheva <dencheva@stsci.edu> | 2010-07-14 16:48:36 -0400 | 
| commit | ca0a0a45618f751c7c82b3797e182536535788a1 (patch) | |
| tree | 6259536945dd05223072a6087f760081b8b59420 /distortion | |
| parent | b1c0cae4cb1d23e69228ecb1da96dd8ac359c23d (diff) | |
| download | stwcs_hcf-ca0a0a45618f751c7c82b3797e182536535788a1.tar.gz | |
typo in previous check in
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@9841 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'distortion')
| -rw-r--r-- | distortion/utils.py | 11 | 
1 files changed, 2 insertions, 9 deletions
| diff --git a/distortion/utils.py b/distortion/utils.py index 676156e..3df88c9 100644 --- a/distortion/utils.py +++ b/distortion/utils.py @@ -40,14 +40,7 @@ def output_wcs(list_of_wcsobj, ref_wcs=None, outwcs=None, undistort=True):      outwcs.wcs.crpix = crpix      outwcs.wcs.set()      return outwcs -""" -    tanpix = outwcs.wcs.s2p(fra_dec, 1)['pixcrd'] -    newcrpix = np.array([crpix[0]+np.ceil(tanpix[:,0].min()), crpix[1]+np.ceil(tanpix[:,1].min())]) -    newcrval = outwcs.wcs.p2s([newcrpix], 1)['world'][0] -    outwcs.wcs.crval = newcrval -    outwcs.wcs.set() -    return outwcs -    """ +  def  undistortWCS(wcsobj):      """      Creates an undistorted linear WCS by applying the IDCTAB distortion model @@ -97,7 +90,7 @@ def  undistortWCS(wcsobj):      lin_wcsobj = pywcs.WCS()         cd_inv = np.linalg.inv(cd_mat)      lin_wcsobj.wcs.cd = np.dot(wcsobj.wcs.cd, cd_inv) -    lin_wcsobj.set() +    lin_wcsobj.wcs.set()      lin_wcsobj.orientat = arctan2(lin_wcsobj.wcs.cd[0,1],lin_wcsobj.wcs.cd[1,1]) * 180./np.pi      lin_wcsobj.pscale = sqrt(lin_wcsobj.wcs.cd[0,0]**2 + lin_wcsobj.wcs.cd[1,0]**2)*3600.      lin_wcsobj.wcs.crval = np.array([0.,0.]) | 
