STScI Logo

Hubble Space Telescope
WFC PAM Script

#
# Make WFC PAMs from coeff files.
#
# Richard Hook, February 2004
#
#access to the appropriate tasks
stsdas
dither

# Delete temp files
delete tmp*
delete wfc?_pam.fits

# First create oversize input
ctio
imcreate tmp.fits 2 4110 2060

# Put some values into the header
hedit tmp.fits exptime 1.0 add+ update+

# Drizzle
dither
unlearn drizzle
drizzle.outnx=4500
drizzle.outny=4500
drizzle tmp.fits tmp_drz.fits outweig=tmp_wht.fits coeffs="WFC_coeffs1"
drizzle tmp.fits tmp_drz.fits outweig=tmp_wht.fits coeffs="WFC_coeffs2"

# Blot back
unlearn blot
blot.outnx=4096
blot.outny=2048
blot.expout=2.0
blot tmp_wht.fits tmp_blt1.fits coeffs="WFC_coeffs1"
blot tmp_wht.fits tmp_blt2.fits coeffs="WFC_coeffs2"

imarith 1.0 / tmp_blt1.fits wfc1_pam.fits
imarith 1.0 / tmp_blt2.fits wfc2_pam.fits

print "+ WFC pixel area maps are wfc1_pam.fits & wfc2_pam.fits"
delete tmp*
#