updateAsnTable(tabname,
rootname,
xsh=None,
ysh=None,
form="absolute",
rot=None,
scale=None,
frame="input",
units="pixels",
output=None,
mode="replace")
| source code
|
Updates an existing ASN table with shifts in arcseconds of RA and Dec.
Parameters:
tabname - name of ASN table to be updated
rootname - name of image whose pointing needs to be updated
xsh - X shift from nominal to be applied
ysh - Y shift from nominal to be applied
rot - additional rotation to be applied
scale - scale factor to be applied
form - specifies how shifts are computed:
absolute (default) or delta
frame - specifies whether xsh/ysh are given in terms of
input (default) or output frame
units - specifies units of xsh/ysh:
pixels (default) or arcseconds
output - filename (with or without path) of output image
from which output pixels shifts were computed.
mode - replace or add shifts to existing values
'replace' (default) or 'sum'
The task will:
- open the ASN file (tabname)
- search for the row matching the rootname provided by
the user (img),
- convert any pixel shifts to arcseconds
- update the XOFFSET, YOFFSET, ROTATION columns
(or create them if they don't already exist)
This task assumes that the shifts given as 'input' pixels are
already distortion-corrected, but not scaled/rotated to output frame.
The conversion of shifts given in terms of output pixel coordinates
requires the use of the WCS from the output frame in order to correctly
take into account the output frame's pixel scale and orientation.
Both input and output image specifications assume '.fits' and that
the WCS information appropriate for this are in either [0] or [sci,1].
If necessary a different extension can be specified in the filename.
Also, the output filename can include a path which will be used.
EXAMPLE:
1. Update ASN table 'j8cw03020_asn.fits' for 'j8cw03021_crj.fits'
which has pixel shifts of (10.3,4.72) in (undistorted) input
frame.
>>> updateasn.updateAsnTable('j8cw03020_asn.fits','j8cw03021',
xsh=10.3,ysh=4.72,rot=0.14)
NOTE:
This task still does not correctly work with 'NaN' entries in
the table. For those values, it will not change the values at all.
|