Space Telescope Science Institute
COS Data Handbook 2.00
help@stsci.edu
Table of Contents Previous Next Print


COS Data Handbook > Chapter 3: COS Calibration > 3.7 Reference Files

3.7
This section contains a description of the COS reference files. See Figure 3.1 - Figure 3.5 for which modules use these files and Section 3.4 for explanations of how their contents are applied by those modules.
3.7.1 BRSTTAB: Burst Parameters Table
The BRSTTAB file provides the parameters needed to identify bursts. It consists of a primary header extension and a binary table extension with the columns listed in Table 3.5. Details of the burst rejection routine are given in Section 3.4.2.
Table 3.5: BRSTTAB Table Contents
3.7.2 BADTTAB: Bad Time Interval Table
The BADTTAB reference file lists the start and end times of known bad time intervals. It is used by the BADTCORR calibration module to flag events in TIME-TAG events lists which occur during a bad time interval. In later processing the flagged events will be removed from the final calibrated data, and the exposure time header keyword, EXPTIME, updated. The bad time interval table consists of segment, start, and end columns (see, Table 3.6). The segments columns can be populated with either FUVA, FUVB or ANY. The start and end columns are in Modified Julian Date.
Table 3.6: BADTTAB Table Content
3.7.3 PHATAB: Pulse Height Discrimination Table
The PHATAB reference file is only valid for FUV data, and is applied during the PHACORR step of calcos to filter non-photon events. The file consists of two extensions, the first being the primary header, and the second a binary table (see Table 3.7). The table lists the lower and upper thresholds for valid individual pulse heights in TIME-TAG mode. In Time-Tag mode, each detector event has an associated pulse-height of 5 bits with values ranging from 0 to 31, The table also gives the minimum and maximum values for the location of the mean value of the pulse height distribution used in ACCUM mode. In ACCUM mode, a pulse height distribution histogram is generated for the whole exposure and downloaded as part of the science data file. The histogram includes all the digitized events for each segment independently of the currently defined subarrays. Note in ACCUM mode the pulse height is a 7 bit number with values ranging from 0 to 127.
Table 3.7: PHATAB Table Contents
3.7.4 PHAFILE: Pulse Height Discrimination File
This file is only used for FUV data, and is a 2D equivalent to the PHATAB. The PHAFILE is used by the PHACORR calibration module to filter non-photon events. If both a PHATAB and PHAFILE are available, the PHAFILE will be used.
Each pulse height discrimination reference file contains four IMAGE extensions. There are two for each segment, containing the lower and upper PHA limits for each pixel. At a given (X,Y) location in the uncorrected COS data, the value at that location gives the lowest and highest (respectively) pulse height that will be treated as a valid photon event at that detector location.
3.7.5 BRFTAB: Baseline Reference Frame Table
The BRFTAB reference file is only applicable to FUV data and is used during pipeline processing in the TEMPCORR module to apply the thermal distortion correction. The FUV detector does not have physical pixels like a CCD. Instead, the x and y positions of detected photon events are obtained from analog electronics, which are susceptible to thermal changes. Electronic stim pulses are normally commanded during integration and are used as physical position reference points. To return the FUV data to a known physical space, the BRFTAB defines the stim positions.
The BRFTAB file consists of a primary header extension and a binary table extension. The table lists the stim locations, stim search regions, and the active detector areas (Table 3.8).
Table 3.8: BRFTAB Table Contents
X pixel coordinate (zero indexed) of stim11
X pixel coordinate (zero indexed) of stim22

1
Stim 1 is located in the upper left corner

2
Stim 2 is located in the lower right corner

3.7.6 WALKTAB: Y Walk Correction Table
The WALKTAB reference file is only applicable to FUV data and is used during pipeline processing in the WALKCORR module to correct the effects of Y walk. The COS FUV XDL detector is subject to gain sag, where as physical locations on the detector accumulate photon events, the pulse height of the electron cloud generated by the event becomes smaller, and the Y co-ordinates of the event are mis-registered towards the bottom of the detector (i.e. a decrease in apparent Y coordinate). These effects are time-variable, and depend on event pulse height.
The current correction employed is a simple linear correction to registered Y location based on event pulse height, but the WALKTAB has the ability to correct both X and Y location based on arbitrary polynomials taking into account X location, Y location, and pulse height.
The WALKTAB file consists of a primary header extension and a binary table extension. The table lists the coefficients of the polynomials in X and Y (Table 3.9). In order to determine how the coefficients will be used, see the WALKCORR section (Section 3.4.5).
Table 3.9: WALKTAB Table Contents
3.7.7 GEOFILE: Geometric Correction File
This file is only used for FUV data. The GEOFILE is used by the GEOCORR calibration module to perform the geometric correction. From the nature and construction of the XDL detectors, the physical sizes of the pixels vary across the detector. The geometric distortion maps are used to correct for this variation and to transform the data into a constant physical pixel size early in the data reduction calibration process. After the thermal correction has been applied and the detector digital span and position are adjusted to their reference values, as defined in the reference table, the geometric correction can be applied. This implies that all the files used to determine the geometric correction were initially thermally-corrected.
Each geometric correction reference file contains four IMAGE extensions. There are two for each segment, and for each segment, there is one for each axis. At a given (X,Y) location in the uncorrected COS data, the value at that location (corrected for binning and offset) in the geometric correction image gives the distortion to be subtracted from the X or Y coordinates. The order of the extensions are: 1 = X coordinate for FUVA, 2 = Y coordinate for FUVA, 3 = X coordinate for FUVB and 4 = Y coordinate for FUVB.
3.7.8 DEADTAB: Deadtime Table
The deadtAB reference file is used in the DQICORR: Initialize Data Quality File module, to obtain the true number of events received compared to the number of events counted by the detector electronics.
There is one DEADTAB reference file for the NUV and FUV detectors. Each consists of a primary header extension and a binary table extension which contains the LIVETIME values for a given observed count rate (OBS_RATE) and segment. The livetime is defined as:
livetime = observed rate / true rate
and can be used to calculate the true count rate.
3.7.9 FLATFILE: Flat-field File
FLATFILE provides a flat-field image which is used by the pipeline to remove the pixel-to-pixel variations in the detector. The FUV FLATFILE consists of a primary header and two 14000 x 400 IMAGE extensions, one for each segment. The NUV FLATFILE consists of a primary header and a 1024 x 1024 IMAGE extension.
Currently, the FUV flat-field reference file only corrects the effect of grid wire shadows, and it only corrects G130M and G160M data. There is no flat-field reference file to correct the data taken with G140L.
The NUV flat-field is a combination of internal and external deuterium flat field lamp exposures from thermal-vacuum testing which illuminate the portion of the detector where spectra fall. The data cover the following pixel region of the detector: x (dispersion): 0 to 1023, and y (cross-dispersion): 495 to 964. The rest of the detector, where flat field data are not available, has a value of 1.0. The bottom four and top three rows of the detector do not fit well with the rest of the detector and they are flagged in the data quality table.
3.7.10 BPIXTAB: Bad Pixel Table
The data quality initialization table identifies rectangular regions on the detectors that are known to be less then optimal. The feature type describes the type of detector blemish enclosed within the bounding box and dq is the quality value assigned to all events detected within the box. The regions were identified by visual inspection of the combined flat field data for each detector (and segment). The BPIXTAB files consist of a primary header and a binary table extension which consists of the columns listed in Table 3.10.
Table 3.10: BPIXTAB Table Content
In the BPIXTAB table, the DQ field may be a logical OR due to several different values, each associated with a unique issue (see Table 2.19).
3.7.11 LAMPTAB: Template Calibration Lamp Spectra Table
The LAMPTAB files consist of a primary header extension and a binary table extension which contains an extracted 1-D spectrum from the internal PtNe calibration lamp through the WCA aperture, for each grating, central wavelength, and FPPOS setting. It is used in the calcos pipeline to determine the pixel offset of the observed data. The structure of the template calibration lamp spectra table is shown in Table 3.11. The stepper motor offsets range from -2 to +1 and correspond to FPPOS settings of 1 to 4.
Table 3.11: LAMPTAB Table Contents
3.7.12 WCPTAB: Wavecal Parameter Table
The WCPTAB file contains information relevant for the wavecal pipeline processing. It consists of primary header extension and a binary table extension which is described in Table 3.12. XC_RANGE is the maximum pixel offset to use when doing a cross correlation between the observed data and the template wavecal. That is, the observed spectrum should be shifted relative to the template by a number of pixels, ranging from -XC_RANGE to +XC_RANGE inclusive. XD_RANGE is half the search range for finding the spectrum in the cross dispersion direction. The search range is from B_SPEC - XD_RANGE to B_SPEC + XD_RANGE inclusive, where B_SPEC is the nominal location of the spectrum from the XTRACTAB table discussed below. BOX is the width of the boxcar filter for smoothing the cross-dispersion profile. RESWIDTH is the number of pixels per resolution element, and is assigned a value of 6.0 for the FUV detectors and 3.0 for the NUV detector.
When applying the offsets found from the wavecals to the science data, it may happen that there was no wavecal at the same OSM position. In this case, the wavecal that was closest in time to the science observation may be used, with a correction for the difference in OSM positions. That correction is based on STEPSIZE, the number of pixels corresponding to one OSM step. There may be a check, however, to guard against using a wavecal that was taken too far away in time from the science observation. If the science observation and wavecal were taken more than MAX_TIME_DIFF apart, then the wavecal should not be used for that science observation.
Table 3.12: WCPTAB Table Contents
3.7.13 DISPTAB: Dispersion Coefficient Table
There are two DISPTAB files with similar formats, one for the NUV, and one for the FUV. They consist of a main header and a binary table in the second HDU. These tables provide the dispersion relations for each segment, aperture, optical element, and central wavelength. Each file has the format given in Table 3.13. The dispersion relation table gives a set of polynomial coefficients for computing wavelength from pixel number (see Oliveira, COS ISR2010-05 and -06 for details).
Each row of the table gives a set of dispersion coefficients. The row to be used is selected on SEGMENT, OPT_ELEM, CENWAVE, and APERTURE.
Table 3.13: DISPTAB Table Format
For Px = the zero-indexed Doppler corrected pixel value in the dispersion direction, the associated wavelength for a specific segment, optical element, let
PX’ = PX + (D_TV03 - D),
Then the corresponding wavelength in Angstroms is given by:
λ(PX) = COEFF[0] + COEFF[1]*PX’ + COEFF[2]*PX’2 + COEFF[3]*PX’3
3.7.14 XTRACTAB: 1-D Spectral Extraction Table
There are two XTRACTAB files with similar formats, one for the NUV and one for the FUV. They consist of a main header and a binary table in the second HDU. These tables provide the information needed to extract the spectrum from a geometrically corrected image of the detector for each optical element and central wavelength. Each file has the format given in Table 3.14.
Table 3.14: XTRACTAB Table Format
The spectral extraction of a source is performed by collapsing the data within a parallelogram of height HEIGHT that is centered on a line whose slope and intercept are given by SLOPE and B_SPEC. Similarly, two background spectra are determined by collapsing the data within a parallelogram of height BHEIGHT centered on the lines defined by SLOPE and B_BKG1 and SLOPE and BKG2. The background spectra are then smoothed by a boxcar of width BWIDTH. These are then scaled and subtracted from the source spectrum.
3.7.15 FLUXTAB: Photometric Throughput Table
There are two fluxTAB files with similar formats, one for the NUV, and one for the FUV. They consist of a main header and a binary table in the second HDU. These tables provide the information needed to convert from corrected detector counts to flux units of erg s-1cm-2A-1 for each segment, optical element, aperture, and central wavelength. Each file has the format given in Table 3.15.
Table 3.15: fluxTAB Table Format
The units of the Sensitivity array are (count s-1 pixel-1)/(erg s-1 cm-2 Angstrom-1). For each segment, optical element, central wavelength setting, and aperture, these files contain arrays of wavelengths and sensitivities which can be interpolated onto the observed wavelength grid. The net counts can then be divided by the sensitivity curves to produce flux calibrated spectra.
3.7.16 TDSTAB: Time Dependent Sensitivity Table
There are two such files, one for the FUV and one for the NUV. They are only used for spectroscopic data. The files contain the information necessary to determine the relative sensitivity curve at any given time by interpolating between relative sensitivity curves given at fiducial times which bracket the observation, or else extrapolate the results from the last curve if the observation date is more recent than the last fiducial date. Interpolation data are provided for each segment, optical element, and aperture (see Table 3.16).
Table 3.16: TDSTAB Table Format
For an observation obtained at time T, which lies between TIME[j] and TIME[j+1], the sensitivity curve used to calibrate the spectrum will be corrected by the following factor:
(T - REF_TIME) SLOPE[i,j]/(365.25*100) + INTERCEPT[i,j].
where REF_TIME is a general reference time given in the header of the FITS extension.
3.7.17 GSAGTAB: Gain Sag Table
The gain sag reference table is only applicable for FUV data and it is used along with the bad pixel reference table (_bpix) in the DQICORR module. The table provides the locations of rectangular regions for portions of the FUV detector that have very low pulse height amplitude.
After the primary header, each extension of the GSAGTAB is a binary fits table of the gain sagged pixels on the detector at a given voltage. During the pipeline processing, these extensions are selected depending on the SEGMENT and HVLEVEL. Each row in the table gives the location and data quality value for one rectangular region. The DATE column is used to select rows. A row will be used to flag a gain sagged region if the value in the DATE column is less than or equal to the exposure start time. For a description on the columns contained in the binary tables see Table 3.17.
Table 3.17: GSAGTAB Table Format
3.7.18 HVTAB: High Voltage Table
The high voltage reference table is only used for FUV data and it populates extension header keywords HVLEVELA and HVLEVELB. In order to optimize the performance of the instrument, the nominal high voltage level on both FUV segments has been changed since launch. This reference table provides the dates when the FUV high voltage was adjusted and the values (raw counts) used in the command to set the high voltage. The file consists of two extensions, FUVA and FUVB, each of them a binary table listing the date and HVLEVEL. (See Table 3.18).
Table 3.18: HVTAB Table Format
3.7.19 SPWCSTAB: Spectroscopic WCS Parameters Table
The spectroscopic SPWCS table gives the parameters needed to populate the world coordinate keywords in the _corrtag, _counts, and _flt files. There are entries for each SEGMENT, OPT_ELEM, CENWAVE, and APERTURE. The columns (see Table 3.19) are interpreted as follows. The detector coordinate system has two dimensions. Let the more rapidly varying axis be X and the less rapidly varying axis Y. The world coordinate system has three dimensions, the spectral coordinate, right ascension, and declination. The reference pixel is at approximately the middle of the detector. CTYPE1 can be WAVE to indicate that the wavelength is a linear function of pixel number, or it can be WAVE-GRI to indicate that the wavelengths should be computed by using the grating (“grism”) equation. In either case, the wavelengths are in vacuum. CRVAL1 is the wavelength at the reference pixel. CRPIX1 is the location of the reference pixel in the first axis (X); the location of the reference pixel in the second axis (Y) is gotten separately from the 1-D Extraction Parameters Table (XTRACTAB). CDELT1 is the dispersion in Angstroms per pixel at the reference pixel. At a single wavelength (nominally the wavelength at the reference pixel), a pixel when projected onto the sky would be approximately a rectangle. CDELT2 and CDELT3 are the sizes of that rectangle in the X and Y directions. SPECRES is the spectral resolution; this is only used for updating the archive search keyword of the same name. G is the groove density of the grating, e.g. 3.8E6 grooves per meter for G130M. SPORDER is the spectral order. This will usually be 1, but for G230L, stripe NUVC, SPORDER will be 2. ALPHA is the angle between the normal to the grating and the light that is incident onto the grating. THETA is the angle between two lines from the grating to the detector, the line to the reference pixel and the line that is perpendicular to the detector. Since the reference pixel is close to the middle of the detector, THETA will probably be close to zero.
Table 3.19: SPWCSTAB Table Format

Table of Contents Previous Next Print