Cookbook for single images with the target placed on one or more WF chips
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 "" ""If any part of your target falls on the WF4 chip, the data were taken after 1 March 2000, and you are working with c0h/c1h files, ensure that the WF4TFILE and WF4TCORR keywords are present and populated. The WF4TFILE keyword will be present (it should not be 'N/A') and WF4TCORR should be 'COMPLETE'. If this is not the case, you need to re-retrieve your data.
PyDrizzle parametersThe 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 = 'ngc999_f555w' # target_filter filenaming pydrizzle.section = '' # single chip number, or blank for all chips 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.0996' # WF pixel scale pydrizzle.ra = 115.480667 # center target in output image pydrizzle.dec = -18.208472 # center target in output image pydrizzle.xsize = 2048 pydrizzle.ysize = 2048 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 pydrizzle.save = no pydrizzle.build = no
Inspect your output and iterate as needed
You might need to make your output dimensions (outnx, outny) larger to include all the pixels, or wish to make them smaller to truncate unneeded outer parts of the data (i.e. if your target is small).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 (firstname.lastname@example.org).