6.6.2 Maximum-Likelihood Statistics
The second alternative is to replace the χ
-minimization scheme with the Cash maximum-likelihood scheme
when ﬁtting data. This method is much better suited to data with low count rates and is a suitable option
only if one is running XSPEC v11.1.0 or later. The reason for this is that RGS spectrum ﬁles have prompted a
slight modiﬁcation to the OGIP standard. Because the RGS spatial extraction mask has a spatial-width which
is a varying function of wavelength, it has become necessary to characterize the BACKSCL and AREASCL
parameters as vectors (i.e., one number for each wavelength channel), rather than scalar keywords as they are
for data from the EPIC cameras and past missions. These quantities map the size of the source extraction
region to the size of the background extraction region and are essential for accurate ﬁts. Only XSPEC v11.1.0,
or later versions, are capable of reading these vectors, so ensure that one has an up-to-date installation at your
One caveat of using the cstat option is that the scheme requires a “total” and “background” spectrum to be
loaded into XSPEC. This is in order to calculate parameter errors correctly. Consequently, be sure not to use
the “net” spectra that were created as part of product packages by SAS v5.2 or earlier. To change schemes in
XSPEC before ﬁtting the data, type:
• XSPEC>statistic cstat
6.7 ANALYSIS OF EXTENDED SOURCES
6.7.1 Region masks for extended sources
The optics of the RGS allow spectroscopy of reasonably extended sources, up to a few arc minutes. The width
of the spatial extraction mask is deﬁned by the fraction of total events one wishes to extract. With the default
pipeline parameter values, 90% of events are extracted, assuming a point-like source.
Altering and optimizing the mask width for a spatially-extended source may take some trial and error, and,
depending on the temperature distribution of the source, may depend on which lines one is currently interested
in. While AB Dor is not an extended source, the following example increases the width of the extraction mask
and ensures that the size of the background mask is reduced so that the two do not overlap:
• rgsproc orders=’1 2’ entrystage=spectra finalstage=fluxing bkgcorrect=no xpsfincl=99
> orders – dispersion orders to extract.
> xpsfincl – Include this fraction of point-source events inside the spatial source extraction mask.
> xpsfexcl – Exclude this fraction of point-source events from the spatial background extraction mask.
> pdistincl – Include this fraction of point-source events inside the pulse height extraction mask.
Observing extended sources eﬀectively broadens the psf of the spectrum in the dispersion direction. Conse-
quently it is prudent to also increase the width of the PI masks using the pdistincl parameter in order to
prevent event losses.
6.7.2 Fitting spectral models to extended sources
RGS response matrices are consistent for point sources only. Since extended source spectra are broadened, the
simplest way to deal with this problem during spectral ﬁtting is to reproduce the broadening function, and
convolve it across the spectral model.
XSPEC v11.2 contains the convolution model rgsxsrc. It requires two external ﬁles to perform the operation.
1. An OGIP FITS image of the source. The better the resolution of the image, the more accurate the
convolution. For example, if a Chandra image of the source is available, this will provide a more accurate
result than an EPIC image.
2. An ASCII ﬁle called, e.g. xsource.mod, containing three lines of input. It deﬁnes three environment
variables and should look like this example: