STScI Logo

Hubble Space Telescope
COS Calibration Updates

FUV QE Grid Wires
The FUV detector employs a wire grid above the microchannel plate (MCP) stacks to improve quantum efficiency. The wires cast shadows on the MCPs that appear as regularly spaced depressions in extracted spectra (X1D files), about 20% deep every 835-845 pixels. The affected locations are now identified in the CALCOS data products by a data quality flag, DQ=4. Until a full flat field is available for the FUV detectors, the X1DSUM processing has been modified so that the grid wire regions are not included in the average, X1DSUM files. This is accomplished by including DQ=4 in the default value for the SDQFLAGS keyword, the parameter that controls which data flags are ignored when FP-POS exposures are merged into the X1DSUM spectrum. If no FP-POS stepping was performed, the X1DSUM spectrum is a "sum" of only one exposure, and the spectrum will have gaps at the shadow positions.

FUV Pulse Height Filtering
The FUV detector in TIME-TAG mode transmits a scaled pulse height value between 0 and 31 for each event. The pulse height amplitudes (PHA) from photons have a different distribution from background events. Noise events typically have very large or very small PHAs. The PHACORR step in CALCOS flags TIME-TAG events that have PHAs outside specified limits so that they can be excluded when constructing spectra. Initially, CALCOS was set to accept all PHA values. During SMOV, FUV segment B was found to exhibit artifacts that resemble emission lines. These features have PHA=0, outside the normal range for true photon events. To eliminate these features and reduce detector noise, CALCOS now uses PHA values 4-30 for TIME-TAG exposures. When an observation is taken in ACCUM mode, the individual events and information about them (such as PHA) are lost, so ACCUM observations cannot be filtered by CALCOS. Thus the features in segment B may be present in the extracted spectra. However, since ACCUM mode exposures are taken only for high count rate objects, the artifacts will likely have little effect on the target spectrum. The regions where the features are listed in the FUV bad pixel table and flagged by CALCOS with DQ=4096. Since PHA filtering can eliminate valid photons with pulse heights at the extremes of their distribution, the filtering process changes the flux calibration slightly (2% or less). For the time being, CALCOS is using the same sensitivity curves for both TIME-TAG and ACCUM data.

Wavelength Assignment
CALCOS uses PtNe lamp data, which are taken during TIME-TAG exposures or, for ACCUMs, just before or after the exposure, to convert X pixel values to wavelengths through the module WAVECORR. The lamp data are extracted as spectra and cross-correlated with a reference file spectral template to compute offsets. The offsets are then used as a correction in assigning wavelengths to the pixels. Prior to SMOV, the reference files for the lamp templates and the dispersion relations were based on the default FP-POS=3 setting. An exposure for any FP-POS setting was cross-correlated with the single template for that central wavelength. During SMOV, sufficient data were obtained at all four FP-POS settings to create template lamp spectra for each FP-POS setting and central wavelength. This allows better registration of an exposure's wavecals with the wavelength reference frame. In addition, prior to SMOV, the NUV the PtNe data from the three stripes were added to form a single spectrum prior to cross-correlation. This was procedure only works if all the stripes shift by the same amount. However, it was found that the shifts of each stripe can differ by several pixels from one another, leading to incorrect wavelengths and misalignments between FP-POS spectra in X1DSUM files. The current version of CALCOS uses a separate lamp template for each FP-POS position (with known offsets from the FP-POS=3 dispersion relation), and for NUV, each stripe is processed separately.

The wavelength calibration process has also been modified to make it more accurate and robust. First, shift between the wavecal spectrum and template lamp spectrum is now found by minimizing chi^2 of the fit rather than by maximizing the cross correlation. Second, when a bright emission line is partially truncated by an edge of the NUV detector, the distorted line shape can bias the shift that is determined. CALCOS now checks for such truncated lines and sets the wavecal data to zero in their vicinity. See COS ISRs 2010-05 and 2010-06 for details (Oliveira, 2010a and 2010b).

Customized Processing
CALCOS is not only used in the STScI pipeline, but runs in the STSDAS environment. This allows users to customize their own data processing. Some updates have been made to CALCOS since SMOV to facilitate user processing. The corrected time-tag event list (CORRTAG file) is the primary intermediate product most useful for customized processing. Two modifications to CALCOS have been made for this purpose so far. First, CALCOS can now accept CORRTAG files as input, not just raw files. This lets a user do some of the processing by setting some but not all of the calibration switch keywords to PERFORM and running CALCOS on the raw file. Then calibration switches can be reset in the CORRTAG header, the CORRTAG data can be modified (e.g. by applying one's own flat field), and then CALCOS can be rerun with the modified CORRTAG file as input. Second, the CORRTAG file itself has also been modified; a new wavelength column has been added to the table. CALCOS now assigns a wavelength to each event in the file. This will allow users to combine and extract spectra directly without converting the data into images.

There are also two new tasks (in addition to CALCOS) in the hstcos package in STSDAS in PyRAF. The x1dcorr task extracts a 1-D spectrum (or spectra, if NUV), given a CORRTAG file as input. This task creates FLT and COUNTS files from the CORRTAG file and then extracts the spectrum from the FLT and COUNTS files, using the same code as in CALCOS. The splittag task takes a CORRTAG file and splits it by time into multiple files in the same format, i.e. CORRTAG. Then running CALCOS on the output files from splittag will generate a spectrum for each of those time intervals.

Other Improvements

These updates refer to the current version of CALCOS (2.13, September, 2010). A detailed description of the CALCOS processing steps and reference files can be found in Chapter 3 of the COS Data Handbook. The latest information on CALCOS changes can be found at