Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/8.0.0/doc/specadd.ps.gz
Дата изменения: Wed Jul 2 01:42:54 2008
Дата индексирования: Tue Oct 2 08:47:51 2012
Кодировка:
XMM-Newton Science Analysis System Page: 1
specadd
July 1, 2008
Abstract
It creates a multiple X-ray spectrum FITS le either by stacking or putting to-
gether two single spectrum les or by stacking a single spectrum on top of an existing
multiple spectrum le.
1 Instruments/Modes
Instrument Mode
EPIC-MOS Imaging
EPIC-MOS Timing
EPIC-pn Imaging
EPIC-pn Timing
2 Use
pipeline processing no
interactive analysis yes
3 Description
specadd creates a multiple X-ray spectrum FITS le by stacking or putting together (\adding") two
single spectrum les. It can also be used to add a single spectrum le to an already existing multiple
spectrum le.
This type of spectral les is particularly useful when the user wants to simultaneously analyse di erent
observations of the same object carried out with the same instrument or with di erent instruments. It
would be easier to handle a large number of spectral datasets if they form a single data le than if they
reside in di erent spectral les. For example, ten observations (performed with the same instrument and
at the same observing mode) of a source taken at di erent epochs would require to handle ten di erent
spectral les to be able to attach a di erent response le to every epoch. This would happen also if
the user wants to analyse the spectra of a source taken with di erent instruments (example MOS1 and
MOS2).
With a multiple spectrum le all the spectra could be stored together (in a unique le) since the response
les (ancilliary and redistribution matrix) and background les are attached to every single spectrum.
xmmsas 20080701 1801-8.0.0

XMM-Newton Science Analysis System Page: 2
The Data extension for a multiple spectral dataset stores one single spectrum per row, instead of one
channel per row as it is the case of single spectrum les. It has at least the three mandatory columns:
SPEC NUM (scalar giving the reference number of the spectrum in the particular row), CHANNEL (variable
length array column containing channel numbers for the spectra in the COUNTS column),COUNTS (variable
length array column with the count values observed in each channel). Other columns (STAT ERR (vari-
able length array column giving the statistical error of COUNTS), ROWID, QUALITY, GROUPING,BACKFILE,
BACKSCAL, CORRFILE, CORRSCAL, RESPFILE, ANCRFILE, ANCRFILE) are optional and they can be substi-
tuted by keywords if all the spectra share these values (i.e., same background le, same response le,
etc.). This is the default case for STAT ERR. Provided that none of the input spectra have this column, the
output multiple spectral le will substitute it by a keyword POISSERR=T within the extension header.
specadd will keep the remaining optional and mandatory columns as columns to provide the highest
exibility. This will allow the user, for example, to attach a di erent response or background le to each
of the spectra being considered.
The resulting multiple spectrum le that can be read into XspecV.10 and higher.
Example: there are three observations of a source with three di erent instruments the user wants
to analyse simultaneously (it is left to the user the decision of which type of simultaneous analysis is
scienti cally correct). The observations were carried out with MOS1 (specm1. ts), MOS2 (specm2. ts)
and PN (specpn. ts). The single spectra should have their ANCRFILE, RESPFILE keywords lled
out with their respective response matrices so that specadd can write these names in the appropriate
columns.
The rst step would be adding two of the single spectrum les into a multiple spectrum le. Then the
third single spectrum and this newly created le could be added together.
specadd sets=''specm1.fits specm2.fits'' useoldsumset=false sumset=''specm1m2.fits''
specadd sets=''specpn.fits'' useolsumset=true oldsumset=''specm1m2.fits''
sumset=''specm1m2pn.fits''
4 Parameters
This section documents the parameters recognized by this task (if any).
Parameter Mand Type Default Constraints
sets yes lename spectrum s1. ts spec-
trum s2. ts
List with the single spectrum les to be \added"
useoldsumset no boolean false
If true, an existing multiple spectrum set will be included in the output set
oldsumset no lename spectrum mold. ts
Existing multiple spectrum set that will be included in the output set
sumset yes lename spectrum mnew. ts
Name of output multiple spectrum set
xmmsas 20080701 1801-8.0.0

XMM-Newton Science Analysis System Page: 3
5 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.
NotSpecFile (fatal)
Files in sets are not spectral les
NotSingleSpecFile (fatal)
Any of the les in sets is a multiple spectrum le
NotMultipleSpecFile (fatal)
File in oldsumset is a single spectrum le
NoExposure (warning)
Input spectral le has no EXPOSURE attribute. Taking exposure value:1.00E+00
corrective action:
6 Input Files
1. sets List of FITS single spectrum les
2. oldsumset Input multiple spectrum FITS le
7 Output Files
1. sumset Multiple spectrum FITS le
8 Algorithm
specadd is a F90 module which does the following
module specadd
Read input sets
Check that they are spectral files
Create an output multiple spectrum file
xmmsas\_20080701\_1801-8.0.0

XMM-Newton Science Analysis System Page: 4
If (useoldsumset) is true
copy oldsumset in output sumset
create those columns not present in oldsumset
else
create all necessary columns
endif
Insert n (n=numberOfSingleSpectra) new rows in sumset
For each of the n single spectra in sets
add single spectrum to sumset
End
end module specadd
9 Comments
10 Future developments
References
xmmsas 20080701 1801-8.0.0