Warning
You should not be running CALACS from within PyRAF!
The version of CALACS described in this document is HSTCAL CALACS. It contains destriping and CTE correction. The version of CALACS in STSDAS does not contain these updates.
CALACS can now be found at /usr/stsci/hstcaldev/bin/calacs.e. Simply call it from the command line:
/usr/stsci/hstcaldev/bin/calacs.e jb1f89eaq_raw.fits
Mac users may need to install the latest irafdev from http://stsdas.stsci.edu/configuration.html in order to have the latest CALACS.
Note
HSTCAL CALACS is now also available in irafx at /usr/stsci/hstcalx/bin/calacs.e.
CALACS supports several command line options:
By default CALACS will try to perform the CTE correction using all available CPUs on your computer. You can set the maximum number of CPUs available for CALACS by setting the OMP_NUM_THREADS environmental variable.
In tcsh:
setenv OMP_NUM_THREADS 2
In bash:
export OMP_NUM_THREADS=2
The recommended method for running CALACS in batch mode is to use Python and the subprocess module: http://docs.python.org/library/subprocess.html
For example:
import glob
import subprocess as sp
calacs = '/usr/stsci/hstcaldev/bin/calacs.e'
fitslist = glob.glob('*.fits')
for fits in fitslist:
sp.call([calacs,fits])
There are a number of ways to use the subprocess module. Some examples can be found in the Python documentation: http://docs.python.org/library/subprocess.html#replacing-older-functions-with-the-subprocess-module
The PHOTCORR step is now performed using IMPHTTAB files. You must add the IMPHTTAB keyword to image headers pointing to a matching IMPHTTAB table.
The latest IMPHTTAB tables can be found on CDBS at /grp/hst/cdbs/jref/. The tables have the suffix _imp.fits. Be sure to grab the table for your instrument by checking the DETECTOR header keyword.
Alternatively you may set the PHOTCORR keyword to OMIT. The photometry keywords are simply not added to the image header by CALACS.
Running CALACS with CTE correction requires adding some header keywords to images:
You may adjust some CTE correction algorithm parameters by adding and of the following keywords to image headers: