In Python without TEAL:
>>> from wfc3tools import calwf3 >>> calwf3.calwf3(filename)In Python with TEAL:
>>> from stsci.tools import teal >>> from wfc3tools import calwf3 >>> teal.teal('calwf3')In Pyraf:
>>> import wfc3tools >>> epar calwf3
A detailed description of this new and improved calwf3 will be available in a future publication of WFC3 Data Handbook. The current WFC3 Data Handbook can be found at http://www.stsci.edu/hst/wfc3/documents/handbooks/currentDHB/ . In the meantime, if you have questions not answered in this documentation, please contact STScI Help Desk (help[at]stsci.edu).
calwf3 can be run on a single input raw file or an asn table listing the members of an associtaion. When processing an association, it retrieves calibration switch and reference file keyword settings from the first image listed in the asn table. calwf3 does not accept a user-defined list of input images on the command line (e.g. *raw.fits to process all raw files in the current directory).
The wf3ccd, wf32d, and wf3ir tasks on the other hand, will accept such user-defined input file lists, but they will not accept an association table( asn ) as input.
The recommended method for running calwf3 in batch mode is to use Python and the wfc3tools package in the “STSDAS distribution <http://www.stsci.edu/institute/software_hardware/stsdas/download-stsdas>.”
For example:
from wfc3tools import calwf3
import glob
for fits in glob.glob('j*_raw.fits'):
calwf3.calwf3(fits)
calwf3 is now part of HSTCAL package, which can be downloaded from http://www.stsci.edu/institute/software_hardware/stsdas/download-stsdas
The calwf3 executable can also be called directly from the command line:
>>> calwf3.e iaa001kaq_raw.fits [command line options]
calwf3 supports several command line options:
The UVIS image is multiplied by gain right after BIASCORR, converting it to ELECTRONS. This step is no longer embedded within FLATCORR.
It uses DARKFILE for the reference dark image.
The UVIS Dark image is now scaled by EXPTIME and FLASHDUR.
Post-flash correction is now performed after DARKCORR in the WF32D step. When FLSHCORR=PERFORM, it uses FLSHFILE (the post-flash reference file).
Conversion from DN to ELECTRONS no longer depends on FLATCORR=PERFORM. Unit conversion is done for all exposures after BIASCORR.
The PHOTCORR step is now performed using tables of precomputed values instead of calls to SYNPHOT. The correct table for a given image must be specified in the IMPHTTAB header keyword in order for calwf3 to perform the PHOTCORR step. By default, it should be in the iref directory and have the suffix _imp.fits. Each DETECTOR uses a different table.
If you do not wish to use this feature, set PHOTCORR to OMIT.
Using RAW as input:
- flt.fits: output calibrated exposure.
- ima.fits: output ramp calibration IR exposure.
Using ASN as input with WF3REJ:
- crj.fits: cosmic ray rejected image