XXX. Cosmic Origins Spectrograph Datasets and associations generated by the Cosmic Origins Spectrograph (COS) are calibrated by CALCOS. The calibration procedure is specified in the document COS-01-0003 (AV-03). Section XXX.2 describes calibration reference images, and section XXX.3 describes calibration reference tables. XXX.1 File Formats and Conventions The COS calibration reference files are all written as FITS files, with the data in either image or table extensions, depending on the particular reference file. The primary header/data unit consists of just a header, and this header contains keywords such as DETECTOR that are used to select the reference file. The flat field and geometric correction reference files contain images in one or more extensions of type IMAGE. All other reference files are tables, each file containing one table in a BINTABLE extension. The file name is constructed from the standard CDBS unique name, an underscore, a suffix that indicates the type of reference file, and the extension .fits. In a change from the convention for previous instruments, when pixel numbers are given in a COS reference file, the numbers are zero indexed. CALCOS is written in Python, and reference files will likely be created using software that uses zero indexing. Converting to one indexing could be a source of error, and it would likely cause more confusion than if the original zero-indexed values were retained. XXX.1.1 Selection Criteria For a given calibration step, the appropriate reference files are selected based on the values of header keywords in the file to be calibrated. For a reference table, in addition to selecting the file, the row or rows to be used are also selected based on header keywords, but each keyword name matches a column name in the reference table. Wildcard values have been adopted for reference table columns, to avoid the need for a large number of redundant rows. The wildcard value for a column containing character-string values is "ANY", and for a column containing integer values it is -1. XXX.1.2 Version Comparison During the lifetime of COS, it is likely that the formats of some of the reference files will change. Some changes might be backward compatible with CALCOS, but others might not be. In an attempt to reduce the chance of a problem due to using a new reference file with an older version of CALCOS, or an old reference file with a version of CALCOS that expects a newer one, there are three version strings that CALCOS will compare for consistency. Each reference file has a VCALCOS keyword in its primary header. CALCOS itself has a version string, which is written to the headers of calibrated files with the keyword CAL_VER; this must be at least as large as the reference file version. For each reference file, CALCOS also specifies a minimum version for that file; CALCOS requires the reference file to be at least this version. In summary, the version strings don't all have to be the same; the reference file version must be bracketed between the minimum version and the version of CALCOS. It must be emphasized that the VCALCOS of a reference file should not change just because its contents change; this keyword should change only when the format changes in a way that requires a corresponding change to CALCOS. The format of a reference file should not change very often, although the contents may be updated frequently. The version of CALCOS, on the other hand, will change whenever any code has been changed. So it will usually be perfectly OK to use a later version of CALCOS with an earlier version of a reference file. If the format of a reference file is changed, its VCALCOS should be set to the first version of CALCOS that handles that new format, and the minimum version in CALCOS for the particular reference file in question should also be set to that version unless earlier versions of the file are backward compatible. XXX.2 Calibration Reference Images Flat Field Correction Image _flat.fits Description: The flat field image is a pixel-to-pixel flat; the large scale fluctuations in sensitivity will be accounted for in the photometric correction table. These images contain the wavelength-independent high spatial frequency information about the uniformity of the detector response. For ACCUM data, the correction is applied by dividing the science image by the flat field image. For TIME-TAG data, the correction is applied for each event as follows. The zero-indexed pixel coordinates from the RAWX and RAWY columns (corrected for thermal and geometric distortion, if FUV), rounded to the nearest integer, are used as an index into the flat field reference image. The reciprocal of the value at that pixel is assigned to the EPSILON column of the corrected TIME-TAG table. (This column may subsequently be modified by the deadtime correction). Format: For NUV, each flat field reference file contains one image as an IMAGE extension. For FUV, each flat field reference file contains two IMAGE extensions, one for each segment; the EXTNAME values are FUVA and FUVB, corresponding to the segment names. EXTVER should be 1. The images must be unbinned, but they do not need to be full-frame. If they are smaller than full-frame, the extension headers must have keywords giving the offset of the first pixel from the beginning of a full frame. The keywords are ORIGIN_X and ORIGIN_Y; the values are integers, with zero indicating no offset (so a full-frame image would have ORIGIN_X = 0 and ORIGIN_Y = 0). ORIGIN_X is for the more rapidly varying axis, and ORIGIN_Y is for the less rapidly varying axis. Selection Criteria: Files are selected on DETECTOR and OBSTYPE. Restrictions: None. Required Additional Primary Header Keywords: FILETYPE = 'FLAT FIELD REFERENCE IMAGE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. Required Additional Extension Header Keyword: SNR_FF = the signal-to-noise ratio (e.g. 50.) characteristic of the flat field image The following keyword lists describe example primary and extension headers for the flat field correction images. SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / There may be standard extensions ORIGIN = ' ' / FITS file originator DATE = ' ' / Date FITS file was generated COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and COMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365. COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. FILENAME= ' ' FILETYPE= 'FLAT FIELD REFERENCE IMAGE' INSTRUME= 'COS ' DETECTOR= 'FUV ' OBSTYPE = 'SPECTROSCOPIC' / type of observation: IMAGING or SPECTROSCOPIC USEAFTER= 'Jan 01 2004 00:00:00' / use after this date DESCRIP = ' ' PEDIGREE= 'GROUND ' VCALCOS = '2.0 ' / string to compare with CALCOS version NEXTEND = 2 / number of extensions in file END XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 2 / Number of axes NAXIS1 = / Axis length NAXIS2 = / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'FUVA ' / Segment name EXTVER = 1 / Extension version ORIGIN_X= / Offset within detector in first axis ORIGIN_Y= / Offset within detector in second axis SNR_FF = / Average signal-to-noise of the flat field END XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 2 / Number of axes NAXIS1 = / Axis length NAXIS2 = / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'FUVB ' / Segment name EXTVER = 1 / Extension version ORIGIN_X= / Offset within detector in first axis ORIGIN_Y= / Offset within detector in second axis SNR_FF = / Average signal-to-noise of the flat field END Geometric Distortion Correction Image _geo.fits Description: The geometric distortion reference file is used to correct for the intrinsic nonlinearity (INL) of the FUV detector. See COS-11-0039 for a detailed description of how the distortion was measured and how the images may be applied. 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 coordinate (depending on the image in the reference file, see "Format" below). Format: 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. EXTNAME = 'FUVA', EXTVER = 1: Distortion in the X direction for segment FUVA EXTNAME = 'FUVA', EXTVER = 2: Distortion in the Y direction for segment FUVA EXTNAME = 'FUVB', EXTVER = 1: Distortion in the X direction for segment FUVB EXTNAME = 'FUVB', EXTVER = 2: Distortion in the Y direction for segment FUVB The images do not need to be full-frame, and they may be binned. The extension headers must have keywords giving the binning and the offset of the first pixel from the beginning of a full frame. The keywords for binning are XBIN and YBIN, with integer values; 1 indicates no binning. The keywords for offset are ORIGIN_X and ORIGIN_Y; the values are integers, with zero indicating no offset (so a full-frame image would have ORIGIN_X = 0 and ORIGIN_Y = 0). In all four of these keywords, X indicates the more rapidly varying axis, and Y indicates the less rapidly varying axis. Selection Criteria: Files are selected on DETECTOR. Restrictions: This file is only used for FUV data. Required Additional Primary Header Keywords: FILETYPE = 'GEOMETRIC DISTORTION REFERENCE IMAGE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following keyword lists describe example primary and extension headers for the geometric correction images. SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / There may be standard extensions ORIGIN = ' ' / FITS file originator DATE = ' ' / Date FITS file was generated COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and COMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365. COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. FILENAME= ' ' / name of file FILETYPE= 'GEOMETRIC DISTORTION REFERENCE IMAGE' INSTRUME= 'COS ' DETECTOR= 'FUV ' OBSTYPE = 'ANY ' / type of observation: IMAGING or SPECTROSCOPIC USEAFTER= 'Jan 01 2004 00:00:00' / use after this date DESCRIP = ' ' PEDIGREE= 'GROUND ' VCALCOS = '2.0 ' / string to compare with CALCOS version NEXTEND = 4 END XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 2 / Number of axes NAXIS1 = / Axis length NAXIS2 = / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'FUVA ' / Data for segment A EXTVER = 1 / Offsets in the X direction DATE = ' ' ORIGIN_X= / Offset within detector in first axis ORIGIN_Y= / Offset within detector in second axis XBIN = / Bin factor in first axis YBIN = / Bin factor in second axis END XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 2 / Number of axes NAXIS1 = / Axis length NAXIS2 = / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'FUVA ' / Data for segment A EXTVER = 2 / Offsets in the Y direction DATE = ' ' ORIGIN_X= / Offset within detector in first axis ORIGIN_Y= / Offset within detector in second axis XBIN = / Bin factor in first axis YBIN = / Bin factor in second axis END XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 2 / Number of axes NAXIS1 = / Axis length NAXIS2 = / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'FUVB ' / Data for segment B EXTVER = 1 / Offsets in the X direction DATE = ' ' ORIGIN_X= / Offset within detector in first axis ORIGIN_Y= / Offset within detector in second axis XBIN = / Bin factor in first axis YBIN = / Bin factor in second axis END XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 2 / Number of axes NAXIS1 = / Axis length NAXIS2 = / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'FUVB ' / Data for segment B EXTVER = 2 / Offsets in the Y direction DATE = ' ' ORIGIN_X= / Offset within detector in first axis ORIGIN_Y= / Offset within detector in second axis XBIN = / Bin factor in first axis YBIN = / Bin factor in second axis END XXX.3 Calibration Reference Tables COS reference tables are selected on keyword values in the header. Within the table, one or more rows may be selected based on columns in the table. Whether one row, several rows, or all rows in the table may be selected depends on the type of reference table, as described below. The following keyword lists describe the generic primary and extension headers for the calibration reference tables. SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / There may be standard extensions ORIGIN = ' ' / Software package used for creating the file DATE = ' ' / Date FITS file was generated COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and COMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365. COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. FILENAME= ' ' / name of file FILETYPE= ' ' INSTRUME= 'COS ' DETECTOR= ' ' OBSTYPE = 'SPECTROSCOPIC' / type of observation: IMAGING or SPECTROSCOPIC OBSMODE = 'TIME-TAG' / TIME-TAG or ACCUM USEAFTER= 'Jan 01 2004 00:00:00' / use after this date DESCRIP = ' ' PEDIGREE= ' ' VCALCOS = '2.0 ' / string to compare with CALCOS version NEXTEND = 1 / number of extensions in file END XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = / width of table in bytes NAXIS2 = / number of rows PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = / number of columns END Bad Time Intervals Table _badt.fits Description: The bad time intervals table gives start and stop times that indicate when there was an unusual level of interference or noise. TIME-TAG events during these intervals may not be due to actual photon events. Format: Each row of the table gives the start and stop times in MJD of one bad time interval, for one of the FUV segments. Any row in the table that matches the segment may be relevant for an observation. Selection Criteria: Files are selected on DETECTOR and OBSMODE. Restrictions: This file is only used for FUV TIME-TAG data. Required Additional Primary Header Keywords: FILETYPE = 'BAD TIME INTERVALS TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- Segment name, FUVA or FUVB START D MJD Start time of an interval STOP D MJD Stop time of an interval Baseline Reference Frame Table _brf.fits Description: The baseline reference frame table gives the actual location of each of the two electronic stims, for each FUV segment. The observed locations in an image differ from the actual locations due to thermal distortion, and it is these differences that are used to determine the thermal distortion. The table also contains parameters for the size of the region to be searched in an image for the stims; for example, for stim 1 the range of pixels to be searched in the first axis of the image is from SX1 - XWIDTH to SX1 + XWIDTH inclusive (zero indexed). Format: Each row of the table gives the stim parameters for one of the FUV segments. There should be two rows in the table, one per segment, and the appropriate row to use is selected on SEGMENT. Only one row should match. Selection Criteria: Files are selected on DETECTOR. Restrictions: This file is only used for FUV data. Required Additional Primary Header Keywords: FILETYPE = 'BASELINE REFERENCE FRAME TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. Required Additional Extension Header Keywords: TIMESTEP = time interval in seconds (float) within which the thermal distortion will be computed and applied, e.g. 200. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- Segment name, FUVA or FUVB SX1 D pixel X pixel coordinate (zero indexed) of stim 1 SY1 D pixel Y pixel coordinate (zero indexed) of stim 1 SX2 D pixel X pixel coordinate (zero indexed) of stim 2 SY2 D pixel Y pixel coordinate (zero indexed) of stim 2 XWIDTH I pixel Half width of search region for stims YWIDTH I pixel Half height of search region for stims A_LEFT I pixel X pixel of left side of active region A_RIGHT I pixel X pixel of right side of active region A_LOW I pixel Y pixel of lower side of active region A_HIGH I pixel Y pixel of upper side of active region Burst Parameters Table _burst.fits Description: The burst parameters table is used for deciding when the count rate in some time interval in FUV time-tag data is too high to be regarded as normal, i.e. it is a burst. Other parameters used for this calibration step are gotten from the BRFTAB and the XTRACTAB. Format: Each row of the table gives the parameters used by the burst identification and rejection step BRSTCORR. Further details are given below. The row to be used is selected on SEGMENT of the FUV detector. Only one row should match. Screening for bursts is done in two parts. Both rely primarily (but not exclusively) on counts in regions that do not include the source spectrum ("background" counts), and both use the median of counts within intervals of time to estimate what the count rate would be in the absence of bursts. Arrays of the number of source and background events within time intervals of length DELTA_T (or DELTA_T_HIGH for high count-rate data) are constructed from the TIME column of the time-tag data. The first phase in screening (for "large" bursts) is to take the median of all the elements of the background counts array, and to flag as bursts those elements greater than MEDIAN_N times the median. The second phase uses a boxcar smoothing of the background counts (taking the median within the box), and it uses the difference between the background counts and the running median. The boxcar smoothing is done over a time interval MEDIAN_DT, and elements that have already been flagged as bursts are not included when computing the median. The difference between the background and the median is compared with three expressions; if the difference for a time interval is larger than each of those expressions, that time interval is flagged as a burst. The expressions involve BURST_MIN (the minimum count rate that may be regarded as a burst), STDREJ (an N*sigma criterion), and SOURCE_FRAC (the burst must be larger than this fraction of the source counts). The second phase is repeated until no more intervals are identified as bursts, up to MAX_ITER times. Selection Criteria: Files are selected on DETECTOR and OBSMODE. Restrictions: This file is only used for FUV TIME-TAG data. Required Additional Primary Header Keywords: FILETYPE = 'BURST PARAMETERS TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*8 --- Segment name, FUVA or FUVB MEDIAN_N D --- Intervals with counts higher than MEDIAN_N times the global median will be rejected as bursts DELTA_T D s Time interval for binning events DELTA_T_HIGH D s Time interval for binning events when the count rate is high MEDIAN_DT D s Time interval over which the boxcar median filter will be applied BURST_MIN D count /s The count rate must be greater than this in order to be regarded as a burst STDREJ D --- Reject if the counts are greater than STDREJ times the standard deviation SOURCE_FRAC D --- A burst must exceed SOURCE_FRAC times the source count rate before it is considered to be significant MAX_ITER I --- Maximum number of iterations when searching for "smaller" bursts HIGH_RATE D count /s An average count rate higher than HIGH_RATE is considered to be "high" (see also DELTA_T_HIGH) 1-D Extraction Parameters Table _1dx.fits Description: The 1-D extraction parameters table gives the location of the spectrum to be extracted from a 2-D image. Format: The row to be used is selected on SEGMENT, OPT_ELEM, CENWAVE, and APERTURE. For NUV, SEGMENT will be "NUVA", "NUVB" or "NUVC", for the three spectral stripes. Only one row should match. The parameters are interpreted as follows (where X and Y refer to the first and second axis respectively). SLOPE is the slope of the spectrum. For FUV the slope is in Y pixels per X pixel; for NUV the slope is X pixels per Y pixel. B_SPEC is the intercept of the spectral extraction region. The region is a parallelogram, with the shorter edges at the image boundaries and the longer (sloping) edges parallel to the spectrum. The spectrum will nominally be centered within the extraction region. B_SPEC gives the zero-indexed pixel number where a line along the middle of the spectrum intersects the first column of the image. HEIGHT is the width of the parallelogram in the second image axis direction, i.e. the length of the shorter edges of the parallelogram. This is the number of pixels (parallel to the image axis) that should be added together when extracting the spectral value for one output pixel. B_BKG1, B_HGT1 and B_BKG2, B_HGT2 give the intercepts and widths of the two background regions. The slope is the same as for the spectral extraction region. BWIDTH is the width of the boxcar smoothing operator to be applied to the background regions. Selection Criteria: Files are selected on DETECTOR and OBSTYPE. Restrictions: This file is only used for SPECTROSCOPIC data. Required Additional Primary Header Keywords: FILETYPE = '1-D EXTRACTION PARAMETERS TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- Segment name, FUVA or FUVB OPT_ELEM CH*8 --- grating name CENWAVE CH*8 --- central wavelength APERTURE CH*8 --- PSA, BOA, or WCA SLOPE D --- slope of extraction region B_SPEC D pixel intercept (0-indexed) of middle of extr region HEIGHT I pixel full height of extraction region B_BKG1 D pixel intercept for first background extr region B_BKG2 D pixel intercept for second background extr region B_HGT1 I pixel full height of first background region B_HGT2 I pixel full height of second background region BWIDTH I pixel width of boxcar smoothing for background Data Quality Initialization Table _bpix.fits Description: The data quality initialization table gives the locations of rectangular regions that cover portions of the detector that are known to be less then optimal. For each such region, a data quality flag value is given, and there is a column for a text description of the region. Format: Each row of the table gives the location and data quality value for one rectangular region. The region may be finite in both dimensions, but it may also be one pixel wide in either or both dimensions. For FUV, there will be different regions for each of the two segments, and these are distinguished by the SEGMENT column. Any row in the table that matches the segment should be used. For NUV, the value in the SEGMENT column should be "ANY". Selection Criteria: Files are selected on DETECTOR. Restrictions: None Required Additional Primary Header Keywords: FILETYPE = 'DATA QUALITY INITIALIZATION TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- FUVA, FUVB, or ANY for NUV LX I pixel X coordinate of lower left corner of region LY I pixel Y coordinate of lower left corner of region DX I pixel width of region in X DY I pixel width of region in Y DQ I --- data quality value to assign to current region TYPE CH*24 --- comment regarding current region Deadtime Reference Table _dead.fits Description: The deadtime reference frame table gives the livetime factor for various values of the observed global count rate. Format: For FUV, there will be different parameters for each of the two segments, and these are distinguished by the SEGMENT column. All rows in the table that match the segment should be used. For NUV, the value in the SEGMENT column should be "ANY", so that all rows in the table will be used. The rows should be sorted in increasing order of OBS_RATE, the observed count rate. The livetime factor for an observation is determined by first finding the observed global count rate for that observation, and then interpolating within the relevant rows of the deadtime reference table to obtain the corresponding livetime factor. Selection Criteria: Files are selected on DETECTOR. Restrictions: None Required Additional Primary Header Keywords: FILETYPE = 'DEADTIME REFERENCE TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. Required Additional Extension Header Keywords: TIMESTEP = time interval in seconds (float) within which the deadtime will be computed and applied, e.g. 10. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- Segment name, FUVA or FUVB OBS_RATE D count/s/pixel Observed count rate LIVETIME D --- Livetime factor Dispersion Relation Table _disp.fits Description: The dispersion relation table gives a set of polynomial coefficients for computing wavelength from pixel number. Format: 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. For NUV, SEGMENT will be "NUVA", "NUVB" or "NUVC", for the three spectral stripes. Only one row should match. If X is a zero-indexed pixel number in the dispersion direction, the corresponding wavelength in Angstroms is: wavelength = COEFF[0] + COEFF[1] * X + COEFF[2] * X**2 + COEFF[3] * X**3 Selection Criteria: Files are selected on DETECTOR and OBSTYPE. Restrictions: This file is only used for SPECTROSCOPIC data. Required Additional Primary Header Keywords: FILETYPE = 'DISPERSION RELATION REFERENCE TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- FUVA, FUVB, NUVA, NUVB, or NUVC OPT_ELEM CH*8 --- Grating name APERTURE CH*4 --- PSA, BOA, or WCA CENWAVE I angstrom Central wavelength NELEM I --- Number of coefficients to use COEFF D[4] --- Array of coefficients Template Cal Lamp Spectra Table _lamp.fits Description: The template cal lamp spectra table contains template wavecal spectra, to be compared with observed wavecal spectra. Format: Each row of the table gives a template wavecal spectrum in the INTENSITY column. The number of elements in the array will be 16384 for FUV or 1024 for FUV. The row to be used is selected on SEGMENT, OPT_ELEM, and CENWAVE. For NUV, SEGMENT will be "NUVA", "NUVB" or "NUVC", for the three spectral stripes. Only one row should match. An observed wavecal spectrum may be compared (e.g. by cross correlation) with the template wavecal spectrum in order to find the pixel offset of the observed data. The WAVELENGTH column is only included for descriptive purposes; it is not actually needed for wavecal processing. Selection Criteria: Files are selected on DETECTOR and OBSTYPE. Restrictions: This file is only used for SPECTROSCOPIC data. Required Additional Primary Header Keywords: FILETYPE = 'TEMPLATE CAL LAMP SPECTRA TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- FUVA, FUVB, NUVA, NUVB, or NUVC OPT_ELEM CH*8 --- Grating name CENWAVE I angstrom Central wavelength FPOFFSET I --- Offset in motor steps FP_PIXEL_SHIFT D pixel Offset in pixels from FPOFFSET=0 WAVELENGTH D[16384] angstrom Array of wavelengths INTENSITY R[16384] --- Spectrum array to compare with extracted wavecal spectrum Pulse Height Parameters Reference Table _pha.fits Description: The pulse height parameters reference table gives thresholds for checking FUV data based on pulse height. For TIME-TAG data, the table contains lower and upper limit thresholds (LLT and ULT). The pulse height of each event is to be compared with these limits, and the event will be flagged as bad if the pulse height is below the lower limit or above the upper limit. For ACCUM data, individual events are not available, but there will be a histogram of the pulse height distribution (PHD) included with the raw data. Tests will be based on the average of the PHD and location of the peak in the PHD, and warnings will be printed if either value is out of range. The peak must be above the lower threshold and below the upper threshold (the same LLT and ULT as used for TIME-TAG data). In addition, the average must be within a certain fraction of the location of the peak. The lower and upper limits with which the average will be compared are computed by multiplying the location of the peak by MIN_PEAK and MAX_PEAK respectively. Format: Each row of the table gives lower and upper thresholds. The appropriate row to use is selected on SEGMENT, and only one row should match. Selection Criteria: Files are selected on DETECTOR. Restrictions: This file is only used for FUV data. Required Additional Primary Header Keywords: FILETYPE = 'PULSE HEIGHT PARAMETERS REFERENCE TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- FUVA or FUVB LLT I --- lower limit threshold ULT I --- upper limit threshold MIN_PEAK R --- lower limit for location of mean MAX_PEAK R --- upper limit for location of mean Photometric Sensitivity Reference Table _flux.fits Description: The photometric sensitivity reference table gives the instrumental sensitivity as a function of wavelength. Format: Each row of the table gives the instrumental sensitivity for a given observing configuration. The number of elements in the WAVELENGTH and SENSITIVITY arrays must be the same. The flux correction is applied by dividing each element of a 1-D extracted observed spectrum by the instrumental sensitivity, obtained by interpolation within the SENSITIVITY array at the corresponding wavelength. The row to be used is selected on SEGMENT, OPT_ELEM, CENWAVE and APERTURE. For NUV, SEGMENT will be "NUVA", "NUVB" or "NUVC", for the three spectral stripes. Only one row should match. Selection Criteria: Files are selected on DETECTOR and OBSTYPE. Restrictions: This file is only used for SPECTROSCOPIC data. Required Additional Primary Header Keywords: FILETYPE = 'PHOTOMETRIC SENSITIVITY REFERENCE TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type SEGMENT CH*4 --- FUVA, FUVB, NUVA, NUVB, or NUVC OPT_ELEM CH*8 --- Grating name CENWAVE I angstrom Central wavelength APERTURE CH*4 --- PSA or BOA WAVELENGTH D[16384] angstrom Array of wavelengths SENSITIVITY R[16384] Instrumental sensitivity The units for SENSITIVITY are (count/s/bin) / (erg/s/cm**2/angstrom), where bin refers to an element of a 1-D extracted spectrum. Time Dependent Sensitivity Table _tds.fits Description: The time dependent sensitivity table gives information about the relative sensitivity as a function of time and wavelength. The relative sensitivity is represented by a piecewise linear function, one which is linear over intervals of time. The sensitivity may be discontinuous at an endpoint of a time interval. A separate function of time may be specified at each of a number of different wavelengths. Format: Each row of the table gives the slope and intercept of the relative sensitivity for one or more time intervals, at one or more wavelengths. Further details are given below. The row to be used is selected on SEGMENT, OPT_ELEM, and APERTURE. For NUV, SEGMENT will be "NUVA", "NUVB" or "NUVC", for the three spectral stripes. Only one row should match. The WAVELENGTH array gives the wavelengths, at each of which the relative sensitivity is given as a function of time. The allocated length of this array is 60 (for example), and the actual number of elements that are populated is given by NWL. It is recommended that NWL be at least two, in which case the wavelengths should cover the entire range of the detector. The TIME array gives the time at the beginning of each time interval, as a Modified Julian Date. The allocated length of the time array is 12 (for example), and the actual number is given by NT; NT must be at least one. The relative sensitivity should be extrapolated in time, using the slope and intercept of the first or last time, as appropriate; thus slope = 0 and intercept = 1 at any time suffices to describe the case where the sensitivity is constant. SLOPE and INTERCEPT are 2-D arrays, with an allocated size of 60 by 12. (This may be specified by FITS keywords TDIM8 = '(60, 12)' and TDIM9 = '(60, 12)'.) If the time of observation T is greater than or equal to TIME[j] and less than TIME[j+1], then at a wavelength of WAVELENGTH[i] the relative sensitivity at time T is: (T - REF_TIME) * SLOPE[i,j] / (365.25 * 100) + INTERCEPT[i,j]. Dividing by 36525 converts the units of SLOPE from percent per year to a fraction per day. In the above notation for indexing a 2-D array, the first index (over wavelength) is the more rapidly varying. REF_TIME is a table header keyword. Selection Criteria: Files are selected on DETECTOR. Restrictions: This file is only used for SPECTROSCOPIC data. Required Additional Primary Header Keywords: FILETYPE = 'TIME DEPENDENT SENSITIVITY TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. Required Additional Extension Header Keyword: REF_TIME = the Modified Julian Date which serves as the zero point for time in the expression (above) for relative sensitivity as a function of time. The following table describes the column definitions. The sizes given for the WAVELENGTH, TIME, SLOPE and INTERCEPT arrays are examples, and the sizes may be modified. The constraints are that the length of the more rapidly varying dimension of SLOPE and INTERCEPT must be the same as the length of WAVELENGTH, and the length of the less rapidly varying dimension of SLOPE and INTERCEPT must be the same as the length of TIME. Column Data Units Description Name Type SEGMENT CH*4 --- FUVA, FUVB, NUVA, NUVB or NUVC OPT_ELEM CH*8 --- Grating name APERTURE CH*8 --- PSA, BOA, or WCA NWL I --- number of wavelengths in WAVELENGTH array NT I --- number of times in TIME array WAVELENGTH D[60] angstrom array of wavelengths TIME D[12] MJD array of times SLOPE D[60,12] percent /yr slope of each linear segment INTERCEPT D[60,12] --- intercept of each linear segment PEDIGREE CH*12 --- DUMMY if the sensitivity was not measured Wavecal Parameters Reference Table _wcp.fits Description: The wavecal parameters reference table gives parameters which are relevant to wavecal processing. Format: The row to use is selected on OPT_ELEM; only one row should match. The parameters are interpreted as follows. 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, as read from column B_SPEC in the 1dx table. BOX is the width of the boxcar filter for smoothing the cross-dispersion profile. 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. Selection Criteria: Files are selected on DETECTOR and OBSTYPE. Restrictions: This file is only used for SPECTROSCOPIC data. Required Additional Primary Header Keywords: FILETYPE = 'WAVECAL PARAMETERS REFERENCE TABLE' VCALCOS = a string (e.g. '2.0') to compare with the CALCOS version. The following table describes the column definitions: Column Data Units Description Name Type OPT_ELEM CH*8 --- Grating name XC_RANGE D pixel Maximum lag (amplitude) for cross correlation RESWIDTH D pixel Resolution width in dispersion direction MAX_TIME_DIFF D day Defines 'close in time' for wavecals STEPSIZE D OSM step One step of OSM is this many pixels XD_RANGE I pixel Amplitude of search range for finding spectrum BOX I pixel Width of boxcar smoothing filter