how to use tweakshifts
May 3, 2008 on 7:20 pm | In Uncategorized | Comments Offwe could register images precise to 0.1 pixel by iterating multidrizzle (mul) and tweakshifts (twe). since twe only works when the shifts are within 1 pixel or there are tiny rotations, we have to find the rough shifts by hand.
step 0.
create files list to be the input:
list_mul:
—————-
a_flt.fits
b_flt.fits
—————-
list_twe:
—————-
a_single_sci.fits
b_single_sci.fits
—————-
The first file will be the reference image.
step 1.
create the refimage:
mul a_flt.fits
imcopy a_single_sci.fits refimage.fits
step 2.
mul @list_mul
*turn off all the steps of mul except driz_separate+
*keep temporary files: clean=no
*no difference for updatewcs=yes or no
step 3.
measure the relative shifts manually from the *single_sci.fits
*choose 2-5 stars far away in the images and use e.g. imexam to find their positions.
*create the shiftfile:
—————-
# frame: output
# reference: refimage.fits
# form: delta
# units: pixels
a_flt.fits 0.0 0.0
b_flt.fits -3.4 -5.1
—————-
step 4.
repeat step 2. and
*refimage=refimage.fits
*shiftfile=shiftfile
step .5
repeat step 3. and if the additional shifts are within 1 pixel continue with step 7. otherwise, step 6.
step 6.
if the shifts in x axis (or y axis) for the stars are of the same sign, goto step 4. otherwise, rotational adjustment is needed.
—————-
# frame: output
# reference: refimage.fits
# form: delta
# units: pixels
a_flt.fits 0.0 0.0 0.0 1.0
b_flt.fits -3.4 -5.1 359.9 1.0
—————-
goto step 4.
step 7.
twe @list_twe
*undisturb=no
*no difference if shiftfile is provided
*fitgeometry=shift
*clean=no
check the output shiftfile: all shifts should be <1pixel, and add them to shiftfile for mul.
find out the best parameters of twe to ensure 10-60 objects matched (but 3 or 150 may be also acceptable).
*fwhmpsf=3.0-2.0
*tolerance=3.0-0.5
*threshold=10.0-2.0
#optional: use e.g. tvmark to check those matched objects. it cant be done if the images
are opened by ds9. so,
>display b_single_sci.fits 1 zr- zs- z1=0.01 z2=6 ztrans=log
>tvm b_single_sci.match
step 8.
repeat step 4. and then step 7.
the numbers of matched objects should be no less than those of the last run and the shifts produced by twe should also be decreasing .
step 9.
repeat step 7. when all the shifts suggested by twe are < 0.1 pixels.
*it’s possible it’s only reachable for 0.2 pixels
Thanks to Max Mutchler and Warren J. Hack. They are really experts.
http://www.stsci.edu/hst/acs/documents/handbooks/DataHandbookv2/acs_Ch47.html
http://www.stsci.edu/hst/wfpc2/analysis/WFPC2_drizzle_registration.html
http://forums.stsci.edu/phpbb/viewtopic.php?p=172
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^