STScI Logo

Hubble Space Telescope
WFPC2 Drizzle Cookbooks

WFPC2 drizzling

See the WFPC2 Drizzling overview and general tips, to find a cookbook and/or sample dataset that best represents your dataset, with regards to target placement and pointing strategy.

Cookbook for single images with the target placed on the PC chip (only)

NOTE: You may use the c0m/c1m files you now receive from the archive 'as is', there is no need to convert them to GEIS format using STRFITS as mentioned below. If you have WFITS (c0f/c1f) data, then please follow the instructions for converting your data to GEIS (c0h/c1h) format. These instructions are intended for single images or sets of images where it is undesireable to combine multiple images, for example, datasets involving moving targets or transient phenomena.

De-archive the science and data quality FITS files to your working directory. Make a uref directory and download the distortion reference files (IDCTAB and OFFTAB in your image headers) into it, and define your uref directory (set uref). Convert the files to GEIS format (with strfits):

> set uref = "/data/mymachine/uref/"
> strfits *c0f.fits "" ""
> strfits *c1f.fits "" ""

PyDrizzle parameters

The following are sample parameters (with some rationale in the comments) for applying the geometric distortion correction to single images (no image combination). Some of the default parameters are not listed here.

> unlearn pydrizzle  # reset all parameters to default values first

pydrizzle.input = 'u9xb0101m.c0h'
pydrizzle.output = 'jupiter_f410m'  # target_filter filenaming
pydrizzle.section = '1'  # process PC chip only
pydrizzle.kernel = 'square'
pydrizzle.units = 'cps'  # counts or cps
pydrizzle.pixfrac = 1.0
pydrizzle.rotate = yes   # if you want North up
pydrizzle.orient = 0.0   # if you want North up
pydrizzle.psize = '0.0455'  # PC pixel scale
pydrizzle.xsize = 1024
pydrizzle.ysize = 1024
pydrizzle.bits_single = 0
pydrizzle.bits_final = 0
pydrizzle.wt_scl = 'exptime'
pydrizzle.fillval = 0.0
pydrizzle.idckey = 'idctab'
pydrizzle.single = no
pydrizzle.clean = yes = no = no

Inspect your output and iterate as needed

You may wish to set fillval=INDEF, or set bits to include some types of flagged pixels, rather than having empty pixels in the output image.

There are several methods available to remove cosmic rays and detector artifacts from single images, and/or cosmetically interpolate over them. This is beyond the scope of this cookbook, but one method is illustrated in the Jupiter example (see the README file). Send any questions or concerns to the STScI Help Desk (