License: http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE
This version tries to implement a full updating of the WCS based on information about the V2/V3 plane which is obtained from th IDCTAB and, in the case of WFPC2, the OFFTAB.
The only parameters from the original WCS which are retained are the CRVALs of the reference chip.
The original WCS are first copied to MCD1_1 etc before being updated.
UPINCD History: | |
---|---|
First try, Richard Hook, ST-ECF/STScI, August 2002. Version 0.0.1 (WJH) - Obtain IDCTAB using PyDrizzle function. Version 0.1 (WJH) - Added support for processing image lists.
Revised to base CD matrix on ORIENTAT, instead of PA_V3 Supports subarrays by shifting coefficients as needed.
MAKEWCS History: | |
---|---|
WCS creation based on a reference tangent plane.
V0.1 (RNH) - First working version for tests. May 20th 2004. V0.11 (RNH) - changed reference chip for ACS/WFC. May 26th 2004. V0.2 (WJH) - Removed all dependencies from IRAF and use new WCSObject
class for all WCS operations.
V0.4 (WJH/CJH) - Corrected logic for looping of extension in FITS image. V0.5 (RNH) - Chip to chip CRVAL shifting logic change. V0.6 (CJH/WJH) - Added support for non-associated STIS data. V0.6.2 (WJH) - Added support for NICMOS data. This required
new versions of wcsutil and fileutil in PyDrizzle.
Perform angle subtraction a-b taking into account small-angle differences across 360degree line.
This handles the fact that WFPC2 subarray observations may not include chip 3 which is the default reference chip for full observations. Also for subarrays chip 3 may not be the third extension in a MEF file. It is a kludge but this whole module is one big kludge. ND
Find the number of SCI extensions in the image. Input:
image - name of single input image
This task will read in a distortion model from the IDCTAB and generate a new WCS matrix based on the value of ORIENTAT. It will support subarrays by shifting the distortion coefficients to image reference position before applying them to create the new WCS, including velocity aberration. Original WCS values will be moved to an O* keywords (OCD1_1,...). Currently, this task will only support ACS and WFPC2 observations.
Parameters : | |
---|---|
input: str :
quiet: bool :
prepend: char :
restore: bool :
tddcorr: bool :
|
Notes
An example of how this can be used is given as:
>>> import makewcs
>>> makewcs.run('raw') # This will update all _raw files in directory
>>> makewcs.run('j8gl03igq_raw.fits[sci,1]')
Shift reference position of coefficients to new center where (xs,ys) = old-reference-position - subarray/image center. This will support creating coeffs files for drizzle which will be applied relative to the center of the image, rather than relative to the reference position of the chip.
Derived directly from PyDrizzle V3.3d.