The wfc3tools module contains a function calwf3 that calls the CALWF3 executable. Use this function to facilitate batch runs or for the TEAL interface.
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.
calwf3 is now part of HSTCAL package, which can be downloaded from http://www.stsci.edu/institute/software_hardware/stsdas/download-stsdas
calwf3 supports several command line options:
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.iglob('j*_raw.fits'):
calwf3.calwf3(fits)
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
Run the ‘calwf3.e’ executable as from the shell. For more information on CALWF3 see the WFC3 Data Handbook at http://www.stsci.edu/hst/wfc3/documents/handbooks/currentDHB/
Parameters:
- input : str
- Name of input file.
- printtime : bool, optional
- Set to True to turn on the printing of time stamps.
- save_tmp: bool, optional
- Set to True to have CALWF3 save temporary files.
- verbose : bool, optional
- Set to True for verbose output.
- debug : bool, optional
- Set to True to turn on debugging output.