diff options
author | dencheva <dencheva@stsci.edu> | 2011-02-02 11:15:07 -0500 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2011-02-02 11:15:07 -0500 |
commit | 2ce75009a28bdcc4722adf0a25ec166de2400d7f (patch) | |
tree | 32ab6799ceae4fd56b5b18ecf909c48ffadc7981 | |
parent | d80deca64840b8128799bd756dcea9175e5383b2 (diff) | |
download | stwcs_hcf-2ce75009a28bdcc4722adf0a25ec166de2400d7f.tar.gz |
Added parameter description to utils module.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11829 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | distortion/utils.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/distortion/utils.py b/distortion/utils.py index ff42d69..d132eda 100644 --- a/distortion/utils.py +++ b/distortion/utils.py @@ -8,6 +8,22 @@ from numpy import sqrt, arctan2 from pytools import fileutil def output_wcs(list_of_wcsobj, ref_wcs=None, outwcs=None, undistort=True): + """ + Create an output WCS. + + Parameters + ---------- + list_of_wcsobj: Python list + a list of HSTWCS objects + ref_wcs: an HSTWCS object + to be used as a reference WCS, in case outwcs is None. + if ref_wcs is None (default), the first member of the list + is used as a reference + outwcs: an HSTWCS object + the tangent plane defined by this object is used as a reference + undistort: boolean (default-True) + a flag whether to create an undistorted output WCS + """ fra_dec = np.vstack([w.calcFootprint() for w in list_of_wcsobj]) # This new algorithm may not be strictly necessary, but it may be more @@ -126,7 +142,17 @@ def undistortWCS(wcsobj): return lin_wcsobj def apply_idc(pixpos, cx, cy, pixref, pscale= None, order=None): - #pixpos must be already corrected for ltv1/2 + """ + Apply the IDCTAB polynomial distortion model to pixel positions. + pixpos must be already corrected for ltv1/2. + + Parameters + ---------- + pixpos: a 2D numpy array of (x,y) pixel positions to be distortion corrected + cx, cy: IDC model distortion coefficients + pixref: reference opixel position + + """ if cx == None: return pixpos |