A number of programs and subroutine libraries are available for manipulating the files used by XSPEC. Most of these are part of the FTOOLS package of tasks to read, write, and modify FITS-format files. There are a few tasks in the XANADU distribution for manipulating the older pre-FITS file formats. However, we recommend that you use the FTOOLS conversion tasks to turn older files into the FITS format and then use the FTOOLS tasks to manipulate them.
The FTOOLS package is available through http at
http://heasarc.gsfc.nasa.gov/lheasoft/
If the FTOOLS package is installed, then help is available on any task by typing
fhelp taskname
To get a complete list of FTOOLS, type
fhelp ftools
Prints the contents of a FITS file to the screen or to a file. |
|
Prints the contents of a FITS RMF file to the screen or to a file.This tool prints the RMF file in a more legible fashion than FDUMP. |
Defines (or redefines) and/or displays the grouping and quality flags, the important keywords, and the fractional systematic errors. |
|
Compresses a FITS PHA file to a user-defined number of channels. The output is a new file containing the revised PHA extension plus a direct copy of any other extensions in the original file. |
|
Compresses a FITS RMF file (the detector response matrix) in channel space to give a user-defined number of resulting channels. |
|
Changes the value of a keyword in a FITS extension header. |
|
Performs arithmetical operations on PHA files. |
|
Adds together ARFs. |
|
Adds together RMFs. |
|
Multiplies an RMF file by an ARF file. |
SF2PHA |
Converts an old pre-FITS-format spectral file into a FITS PHA file. |
RSP2RMF |
Converts an old pre-FITS-format response file into a FITS RMF file. |
STW2PHA |
Converts the output of STWFITS (IRAF.stsdas.fitsio) into a FITS PHA file. |
The directory callib/src/gen in the FTOOLS distribution contains a number of subroutines for reading and writing the extensions in FITS format spectral and response files. More information on their use can be obtained from the xspec website at:
http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/fits/fitsfiles.html
RDPHA2 |
Read a spectrum extension |
WTPHA2 |
Write a spectrum extension |
RDRMF4 |
Read the matrix extension |
WTRMF4 |
Write the matrix extension |
RDEBD3 |
Read the channel boundaries extension |
WTEBD3 |
Write the channel boundaries extension |
RDARF1 |
Read the effective area extension |
WTARF1 |
Write the effective area extension |