Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/8.0.0/doc/rgscombine.ps.gz
Дата изменения: Thu Jan 29 16:26:41 2009
Дата индексирования: Tue Oct 2 08:55:58 2012
Кодировка:
XMM-Newton Science Analysis System Page: 1
rgscombine
Jenny Carter (XMM-Newton SOC, jenny.carter@sciops.esa.int)
(updated by CG)
May 10 2007
Abstract
Combines a list of spectrum les to create one combined spectrum le, and the
corresponding list of response matrices and background spectrum, to create one nal
response matrix and background spectrum le, for a paticular RGS instrument and
spectral order (if they were calculated using beta space) or for both RGS instruments
and the same spectral order (if they were calculated using wavelength grid).
1 Status
version (from VERSION ): 1.1.1
2 Change history
3 Instruments/Modes
Instrument Mode
RGS Spectroscopy
4 Use
pipeline processing no
interactive analysis yes
5 Description
This task adds spectra, background spectra and response matrices of the same instrument and spectral
order (beta binning) or both instruments and same spectral order (wavelength bining), to produce com-
bined les that can be used for quantitative analysis in a spectral tting package such as Xspec. The
component spectra should have been produced by rgsproc, using the spectrumbinning parameter set to
???

XMM-Newton Science Analysis System Page: 2
lambda, if you would like to combine RGS1 and RGS2 spectra. Or, if you are using the spectrumbinning
parameter set to beta, then the component spectra should have been produced by rgsproc, using the
attsyle=user parameters so that all spectra and responses are aligned in wavelength. For example, and
for each observation of the set, the call to rgsproc could be:
rgsproc withsrc=yes srclabel=Capella srcstyle=radec srcra=79.172330 srcdec=+45.997991 attstyle=user
attra=79.172330 attdec=+45.997991 attapos=259.81
Right ascension and declination are the object coordinates and are used twice for the parameters srcra
and srcdec, and also attra and attdec. The position angle is a feature of an individual obersvation and can
be found in the POS details for each observation in XMM-Newton archive, XSA, or in the Observation
Log Browser on the XMM-Newton website.
The task di ers from rgs uxer, in that it is able to combine response matrices and produce a single
response matrix for spectral analysis. The spectra attributes and response values, bar counts, are weighted
prior to addition, in terms of the exposure time and areascal of the individual observation. In this way
the spectra (NET or TOTAL), including background spectra, can be combined.
6 Parameters
This section documents the parameters recognized by this task (if any).
Parameter Mand Type Default Constraints
pha yes list of
les
A list of one or more spectrum les, all produced by rgsspectrum. The task does not enforce any
constraint on the combining of dissimilar spectra.
rmf no string
A list of one or more response matrix les, all produced by rgsrmfgen.
bkg no string
A list of one or more background spectrum les, if spectra to be combined are of type TOTAL. Spectra
can be in COUNTS or RATE (as produced by rgsbkgmodel)
lepha no le
The le name for the output combined spectrum. The default name varies according to the format:
combinedspectra.ds.
lebkg no le
The le name for the output combined background spectrum if applicable. The default name varies
according to the format: combinedbkgspec.ds
???

XMM-Newton Science Analysis System Page: 3
lermf no le
The le name for the output combined response matrix. The default name varies according to the format:
combinedrespmat.ds
rmfgrid no int 4000
The number of energy bins in the response matrix. The default is 4000, as is the default from rgsrmfgen.
All matrices in the observation set must have the same number of bins to be combined.
min no real 4
The minimum wavelength of output for creating the grid over which to combine spectra.
max no real 40
The maximum wavelength of output for creating the grid over which to combine spectra.
bins no int 3400
The number of pha channels in the spectra les.
7 Errors
This section documents warnings and errors generated by this task (if any). Note that warnings and
errors can also be generated in the SAS infrastructure libraries, in which case they would not be docu-
mented here. Refer to the index of all errors and warnings available in the HTML version of the SAS
documentation.
badResponseGrid (error)
The binning of the nal response matrix with the parameter rmfgrid, is di erent from that
found as the number for rows, in one of the input individual response matrices
pairing (error)
The number of response matrix les does not match the number of spectrum les; there
must be a one-to-one pairing.
wrongOrder (error)
Either: The RFLORDER attribute (re ection order) of the response matrix and background
spectra (if applicable) must match the RFLORDER of the corresponding spectrum.
wrongInstrument (error)
Either: The RGS instrument of the background spectra le does not match that of the pha
spectra le, if applicable and adding background spectra, or the order of the response matrix
does not match that of the spectra.
badPhaName (error)
The name of a response matrix le can be inferred from the name of the corresponding
spectrum le only if the nal 14 characters of the spectrum le name begin with \SRSPEC".
???

XMM-Newton Science Analysis System Page: 4
illegalBkgName (error)
The rst background spectra le name cannot be \."; it must either be \@" or else be given
explicitly.
illegalSpectraHDUCLAS (error)
A HDUCLAS attribute (OGIP), HDUCLAS2 attribute (TOTAL or NET spectrum) or HDUCLAS3
attribute (COUNT) is not consistent with a previous le in the pha spectra le list.
Alignment of spectra (error)
The pha les are not aligned in terms of wavelength. The task rgsproc will have to be
called for each pha le with the appropriate attitude parameters (attastyle, attra, attdec,
attapos).
Filename parameter (warning)
No lename given for results les for either spectrum or response matrix
corrective action: No action required. Defaults used.
8 Input Files
 A list of spectrum les as produced by rgsspectrum or rgsproc.
 A list of response matrix les, as produced by rgsrmfgen or rgsproc.
 A list of background spectrum les as produced either by rgsspectrum or rgsbkgmodel,
or by any of the possible derivations of background spectra by rgsproc for TOTAL spectra.
9 Output Files
The output spectrum le is a FITS table with the same format as the original spectrum les.
FITS A FITS-compliant DAL dataset with the table placed in an extension named \SPECTRUM". The
ve columns for a TOTAL spectra le are:
CHANNEL real32 bin center
COUNTS real32 total counts for each channel
QUALITY real32 quality ag as assessed
AREASCAL int16 weighted areascal
BACKSCAL int16 weighted backscal
10 Algorithm
FOR EACH spectrum and response file:
totalexposure = totalexposure + EXPOSURE
FOR EACH spectrum channel:
IF ( acceptable QUALITY )
channelexp = EXPOSURE * AREASCAL
backscalexp = EXPOSURE * BACKSCAL
???

XMM-Newton Science Analysis System Page: 5
totalcounts = totalcounts + COUNTS
Then:
Accumulate counts, backscalexp and channelexp or staterrquad
ELSE
do not add counts
FOR EACH response bin (rows):
FOR EACH response channel (columns):
IF ( corresponding spectrum channel not discarded )
newresponse = newresponse + MATRIX * EXPOSURE * AREASCAL
FOR EACH spectrum channel:
IF (all quality bad over all spectra files)
Set quality flag to 1
Finalareascal = channelexp / totalexposure
Finalbackscal = backscalexp / totalexposure
Finalresponse = newresponse / Finalareascal
11 Comments

12 Developer's notes
12.1 Future developments
12.2 CAL usage
References
???