Calcos contains provisions for recalibrating raw data. Users can specify the pipeline processing steps to be performed and select the associated reference files. However,
calcos was not designed to run its various modules independently, i.e. it is not re-entrant. The pipeline flow is modified by setting calibration switches or reference file names and then rerunning the entire pipeline. The calibration switches in the headers of the calibrated data files will reflect the operations performed on the calibrated data and the reference files used.
If you chose to recalibrate your COS data on your local machine, there is a certain amount of set up required for calcos to run properly. The operations mentioned in the checklist below will be described in detail in the following subsections:
Before running calcos, you will need to define an environment variable to indicate the location of the directory containing the needed calibration reference files. The names of the calibration files are preceded with the logical path name “
lref$” in the COS science headers. Ordinarily you would define this directory in a
PyRAF session to be, for example, “
/data/vega3/cos/lref/” using the
set command:
Note the trailing slash (/). However, calcos and all of its modules are actually foreign tasks and as such do not access
PyRAF environment variables. Therefore,
before invoking the cl, you will need to define an environment variable from the host command line (see below) that is appropriate to your host machine. For Unix/Linux/Mac systems, the appropriate command for the example above is:
Note that an alternative to using the lref$ variable is specifying the full pathnames to the reference files in the science headers.
Chapter 1 of the Introduction to HST Data Handbooks describes how to retrieve data and reference files via the World Wide Web. To retrieve the best reference files via MAST, check “Best Reference Files” in the “Reference Files” section of the Retrieval Options form.
To edit file headers in preparation for recalibration, use the STSDAS task
thedit. The
thedit task takes several input parameters: the name(s) of the raw data files to be edited, the header field to be edited, and the new value of the header field. It can be used to change the values of any calibration switches, reference files or tables to the values you wish to use for recalibrating your data. To edit the calibration keyword values:
Users may find it necessary to edit the input association file for calcos. Reasons for editing an association file might include the use of a different wavecal or to remove a compromised exposure from an association. One way to update an association file is to use the
STSDAS task,
tedit. For example, use the
PyRAF task
tprint to first look at the contents of association table,
l9v221010_asn.fits.
To remove a member from association, l9v221010_asn.fits, and to use a different wavecal file, use the following commands in
PyRAF.
Finally, reprocess the data by running calcos on the updated association file. See the following section for syntaxes of running
calcos.
Users may choose any of three ways to run calcos using Python,
PyRAF, or from the Unix/Linux/Mac command line. The input arguments and examples for each case are as follows:
To redirect the calcos STDOUT to a file use the following command:
While users are recommended to run calcos on association files, it is possible to run
calcos with a single
raw or
corrtag file as the input. In this mode,
calcos will always automatically process both segment files for FUV data if they both exist. For example if
rootname_rawtag_a.fits is the input for
calcos, then
rootname_rawtag_b.fits will automatically be processed. The data from both segments will be calibrated and combined to create the final product,
rootname_x1d.fits
Through the use of associations, calcos also contains a provision to select wavecals other than the default for calibration of the science exposures. To use an exposure other than or in addition to the default wavecal, the user can add a row to the association table. The rootname (case insensitive) should be given in the MEMNAME column, the string EXP-GWAVE in the MEMTYPE column, and the value in the boolean MEMPRSNT column set to true (e.g. yes if you use the
IRAF tedit task). Make sure that the
WAVECORR keyword in the primary header of the raw science file is set to
PERFORM, and then run
calcos as normal. Note GO Wavecals can only be used with non
tagflash data.