STScI Logo

COS
CALCOS v2.21 Release Notes

---------------- CALCOS v2.21 ----------------------------------
These are the changes from calcos version 2.20.1 to "2.21 (2014-02-18)".

Relevant Trac tickets and PRs:
Trac   PR
----  -----
1061  76067   costools.x1dcorr should update the WCS keywords.
1064  76241   Rename some DQ flags in calcos.
1072  76440   Calcos should have an IRAF-independent TEAL interface.
1106  77183   Calcos can fail to write csum for auto/GO wavecal.

When x1dcorr in costools (x1d.py in calcos) is called to extract a 1-D
spectrum, the flt and counts files are first recreated from the corrtag
file.  These files contained WCS keywords that were copied without change
from the input corrtag table, and these table-specific keywords are not
permitted in image headers.  This was fixed by calling the function to
populate the spectroscopic keywords.

A TEAL interface has been added to the calcos source directory, which
allows the user to see and edit the calcos parameters interactively
(import calcos; from stsci.tools import teal; teal.teal("calcos")).

The variables used for data quality flags have been renamed to agree
with the interpretations of the data quality values for the latest
bad pixel table, as described in the Data Handbook.

A bug was fixed in the code for trapping a missing-row exception.  This
is relevant primarily when writing a "calcos sum" (csum) file; calcos must
trap the exception, write the csum file, and continue processing until all
input files have been calibrated at least to the point of writing the
csum file.

Details:
Trac #1061, PR 76067:  costools.x1dcorr should update the WCS keywords.
Trac #1064, PR 76241:  Rename some DQ flags in calcos.
Trac #1072, PR 76440:  Calcos should have an IRAF-independent TEAL interface.
Trac #1106, PR 77183:  Calcos can fail to write csum for auto/GO wavecal.

Other changes:

The __init__.py file was modified to add a TEAL interface to calcos.  A
help file (calcos.help) was added, and files calcos.cfg and calcos.cfgspc
were added in the pars/ subdirectory.
Trac #1072, PR 76440

Changes to calcos.py:

Functions allWavecals and allScience were modified to expand the `try`
sections of try/except statements, to catch possible exceptions in more
functions than just basicCal.  Also, a `finally` section was added to
close the trailer file.  Function processWavecal was modified to include a
try/except statement, and this function now returns status.
Trac #1106, PR 77183

Changes to calcosparam.py:

Some of the variable names for data quality flag values were changed,
e.g. for value 8, DQ_NEAR_EDGE was changed to DQ_POORLY_CALIBRATED.
Trac #1064, PR 76241:  Rename some DQ flags in calcos.

Changes to cosutil.py:

Function imageHeadertoTable was modified to reorganize and expand the list
of (mostly WCS) keywords to be deleted.
Trac #1061, PR 76067

Changes to spwcs.py:

Function deleteKeywords was modified to expand the list of keywords to be
deleted.
Trac #1061, PR 76067

Changes to x1d.py:

In function makeFltCounts, call spwcs.SpWcsImage to update the WCS keywords
in the flt and counts files.
Trac #1061, PR 76067