Data Format: Type I - a single dataset

In this simplest of cases, the data is stored as a 1-dimensional list (as a function of detector channel). The number of rows in the BINTABLE is therefore the number of (raw) detector channels.


to (filename).PHA
Name: SPECTRUM
Description: PHA data, one row per detector channel
Format: BINTABLE
Table: OGIP format for a single PHA dataset
column
contents
Detector Observed Observed Fractional Quality Grouping Area Background
channel counts statistical systematic flag flag scaling scaling
number or error error
count rate
format of each column
2-byte or 4-byte 2-byte or 4-byte 4-byte 4-byte 2-byte 2-byte 4-byte 4-byte
integer integer or real real integer integer real real
4-byte real
total number of elements per row
1 1 1 1 1 1 1 1
column name
CHANNEL COUNTS STAT_ERR SYS_ERR QUALITY GROUPING AREASCAL BACKSCAL
or
RATE

The BINTABLE columns are:

  1. Chan, a 2-byte or 4-byte INTEGER scalar giving the channel number for each row.
    The FITS column name is CHANNEL.
    (unitless).
  2. Data, either
    • a 2-byte or 4-byte INTEGER scalar giving the number of counts observed in that channel.
      The FITS column name is COUNTS, and the recommended units are counts.
    • a 4-byte REAL scalar giving the number of counts per second observed in that channel.
      The FITS column name is RATE, and the recommended units are counts/s.
  3. Stat_err, a 4-byte REAL scalar giving the statistical error on the value within Data.
    The FITS column name is STAT_ERR.
    The recommended units are as for Data above.
  4. Sys_err, a 4-byte REAL scalar giving the fractional systematic error to be applied to the data in this row (channel).
    The FITS column name is SYS_ERR.
    (unitless).
  5. Qual, a 2-byte INTEGER scalar giving the data quality flag for this row (channel):
    1. if the data quality is “good"
    2. if the data quality is “bad", with the option of the integer value specifying the origin of the flag:
      • ; channel defined “bad" by s/w
      • ; channel defined “dubious" by s/w
      • ; spare (i.e. flag value not used)
      • ; channel set “bad" by user
    The FITS column name is QUALITY.
    (unitless).
  6. Grpg, a 2-byte INTEGER scalar giving the data grouping flag for this row (channel):
    1. if the channel is the start of a new bin.
    2. if the channel is part of a continuing bin.
    3. if the data grouping is undefined for all channels (see below)
    The FITS column name is GROUPING.
    (unitless).
  7. AreaSc, a 4-byte REAL scalar giving the area scaling for this row (channel). In most cases AREASCAL = 1.0, since the instrumental effective area is provided within the spectral calibration files (specifically by the SPECRESP column of the ARF in the general case - see George et al. 1992a). Internally, XSPEC divides the observed spectrum by AreaSc before comparing it to the model spectrum.
  8. BackSc, a 4-byte REAL scalar giving the background scaling for this row (channel). BackSc is used to scale the background spectrum read from the BACKFILE before it is subtracted from the source spectrum. XSPEC multiplies the background spectrum by the ratio of the BackSc for the channel in the spectrum file and the BackSc for the same channel in the background file. The usual application of BackSc is when analyzing spectra from an imaging instrument. In this case BackSc is a measure of the area of the image from which the spectrum was extracted. A BackSc which varies with channel is necessary for grating data where the cross-dispersion width of the extraction region can change with wavelength.
These are summarized in Table 1.

It should be noted that an alternative scheme whereby the and columns are combined into a single quantity, (with the column name DQF) is also allowed, though no longer recommended. Under this scheme (which is used on the 1992 June 01 CD-ROM distributed by the HEASARC containing Einstein SSS and MPC data), corresponds to “bad" data, and & flag whether the channel is (respectively) the start of a new bin, or part of a continuing bin.

Points to Note & Conventions

  • The ordering of the columns is of course arbitrary, however that used here is strongly recommended.
  • The order of Chan should be sequential, starting from the lowest. If not all the valid channels in a detector are included then TLMIN and TLMAX keywords must be included to define the first and last detector channel number.
  • Alternate internal formats (e.g. DOUBLE PRECISION) for the specification of the values within Data & Stat_err are of course allowed but the full precision may not be used by the analysis program.
  • In the case of Data in units of Counts per channel (only), if appropriate the Stat_err column can be deleted from the data table, and POISSERR=T specified as a keyword within the extension header. XSPEC will then assume Poissonian errors are appropriate to the data stored in Data.
  • Sys_err is the fractional systematic error (relative to the value of Data in each row) which XSPEC will add in quadrature to the error given by Stat_err (or the calculated Poissonian error). If no such systematic error is to be applied, then SYS_ERR = 0 should be specified as a keyword within the extension header, and the Sys_err column deleted from the data table.
  • If all rows contain the value ("good"), then QUALITY = 0 should be specified as a keyword within the extension header, and the Qual column deleted from the data table. Within XSPEC, Qual=1 and Qual=5 rows will never be accessible and Qual=2 may be ignored using the “ignore bad" command.
  • If the data has not been “grouped" (i.e. the rebinning of the channels has not been defined), then GROUPING = 0 should be specified as a keyword within the extension header, and the Grpg column deleted from the data table.
  • If the area scaling and/or background scaling are independent of channel then they can be given by the keywords AREASCAL and/or BACKSCAL.


HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Thursday, 21-Oct-2021 12:50:38 EDT