To summarize the preceding section, the main components of spectral fitting are as follows:
This section describes how XSPEC performs these tasks.
C(I): The Observed Spectrum
To obtain each observed spectrum, , XSPEC uses two files: the
data (spectrum) file, containing , and the background file,
containing . The data file tells XSPEC how many total photon
counts were detected by the instrument in a given channel. XSPEC then
uses the background file to derive the set of background-subtracted
spectra C(I) in units of counts per second. The background-subtracted
count rate is given by, for each spectrum:
where and are the counts in the data and background files; and are the exposure times in the data and background files; and , and are the background and area scaling values from the spectrum and background respectively, which together refer the background flux to the same area as the observation as necessary. When this is done, XSPEC has an observed spectrum to which the model spectrum can be fit.
R(I,E): The Instrumental Response
Before XSPEC can take a set of parameter values and predict the spectrum that would be detected by a given instrument, XSPEC must know the specific characteristics of the instrument. This information is known as the detector response. Recall that for each spectrum the response is proportional to the probability that an incoming photon of energy will be detected in channel . As such, the response is a continuous function of . This continuous function is converted to a discrete function by the creator of a response matrix who defines the energy ranges such that:
XSPEC reads both the energy ranges, , and the response matrix from a
response file in a compressed format that only stores non-zero
elements. XSPEC also includes an option to use an auxiliary response
file, which contains an array that is multiplied into as follows:
This array is designed to represent the efficiency of the detector with the response file representing a normalized Redistribution Matrix Function, or RMF. Conventionally, the response is in units of cm.
M(E): The Model Spectrum
The model spectrum, , is calculated within XSPEC using the energy ranges defined by the response file :
and is in units of photons/cm/s. XSPEC allows the construction of composite models consisting of additive components representing X-ray sources (e.g., power-laws, blackbodies, and so forth), multiplicative components, which modify additive components by an energy-dependent factor (e.g., photoelectric absorption, edges, ...). Convolution and mixing models can then perform sophisticated operations on the result. Models are defined in algebraic notation.
For example, the following expression:
phabs (power + phabs (bbody))defines an absorbed blackbody, phabs(bbody), added to a power-law, power. The result then is modified by another absorption component, phabs. For a list of available models, see Chapter 6.