next_inactive up previous


QUICKSIM Version 2.0 14 September 2001

QuickSim has been updated for AO-2 using the post-launch calibration data for the effective areas, pulse-height distribution response, and internal background.

Currently, only the full window modes for the EPIC detectors are supported. In addition, only the thick, medium, and thin filter positions are supported.

The following document is unchanged from AO-1. The required input parameter files have changed, however, the observation input file structure has not.

Files in the AO-2 QuickSim distribution

Code  
quicksim.f Solaris QuickSim program
quicksim_lnk Sample file to compile QuickSim under solaris
quicksim_linux.f Linux QuickSim program
quicksim_linux_lnk Sample file to compile QuickSim under LINUX
simsource.f Companion program to QuickSim which creates the input file which provides the observation and source information; this version compiles under Linux, DecOSF, and Solaris
subs.for File containing all of the quicksim subroutines
subs_linux.f File containing all of the quicksim subroutines, for use under Linux
   
Input Files  
rac.fits FITS image of ROSAT all-sky survey 1/4 keV band map (Snowden et al. 1995, ApJ, 454, 643)
ram.fits FITS image of ROSAT all-sky survey 3/4 keV band map (Snowden et al. 1995, ApJ, 454, 643)
raij.fits FITS image of ROSAT all-sky survey 1.5 keV band map (Snowden et al. 1995, ApJ, 454, 643)
ranh.fits FITS image of Galactic $N_{\rm H}$ (Dickey & Lockman 1990, ARA&A)
area.fits FITS image of effective areas for different EPIC filters and modes
vignet.fits FITS image of mirror vignetting as a function of energy
mos-pha.fits Look-up table for the MOS CCD line broadening
pn-pha.fits Look-up table for the PN CCD line broadening
mos1-back.fits Background spectrum for the MOS1 detector
mos2-back.fits Background spectrum for the MOS2 detector
pn-back.fits Background spectrum for the PN detector
psf_array.fits Look-up table for the on- and off-axis point response (from SciSim runs), see Figure 1 for the QuickSim dartboard
raymond.fits FITS image of model Raymond & Smith spectra using the 1998 vintage of Raymond & Smith code and cosmic abundances from Allen (Shelton 1998)
   
Documentation  
README contains version history
quicksim.ps this document
run.log annotated listing of a session from SimSource to Xspec
run.ps PS file of fit for run.log session
   
Test Files see § 5
input1, input2 sample QuickSim input files
test1.fits QuickSim output photon event file for input1
test2.fits QuickSim output photon event file for input2
n132d_hri_bs.fits FITS image required as input when QuickSim is run with input2

QUICKSIM Version 1.0.4 5 April 1999
SIMSOURCE Version 1.0.4
PROCSIM Version 1.5.2
SIMEXTEND Version 0.1

Steve Snowden          XMM GOF, NASA/Goddard Space Flight Center

Introduction

QuickSim is designed to provide a platform-independent method for modeling XMM EPIC observations. (It only requires a Fortran 90 compiler and CFITSIO to function.) It is not meant to replace SciSim which is much more complete in its treatment of observations since it includes a complete ray-tracing modeling of the mirrors and the quantum efficiencies of the gratings and detectors. However, QuickSim does provide reasonable modeling for EPIC spatial and spectral distributions for a variety of input spectra and angular distributions, including user supplied spectra and images. As the name implies, it also runs significantly faster than SciSim. Perhaps the best way of considering QuickSim is to view it as a PIMMS for EPIC imaging observations.

The output of QuickSim is a photon event file (fits-format table) with the following parameters: time (in seconds from observation start), pulse height (in 3.947 eV bins to match the bins of SciSim, note that the effective area files have a 5 eV spacing), and right ascension and declination (in offsets of $0.05''$ from the pointing direction) of individual events. The events are not time ordered. Currently the output files can be used in Xselect (producing output that can be used in Grppha and Xspec) and Ximage, although Ximage does not yet recognize the XMM instruments. The output files should be usable in any analysis package which can process photon event files.

ProcSim is a temporary fix to create photon event files from EPIC and RGS ODF files created by SciSim, which can then be used in analysis packages such as Xselect, Ximage, and Xspec. The output files have also been used successfully with ASCfit. ProcSim will be superceded by the release of the XMM SAS package.

Installation

The basic QuickSim distribution consists of four fortran 90 files (two of which, quicksim.f and subs.for, have two versions, Linux and Solaris/DecOSF) and nine data files. The package also requires cfitsio (available from HEASARC) which includes fortran 90 interface software (note that the fortran 90 version of fitsio will not work with this code). In addition, binary executables for different platforms will be added with time. All input files required by QuickSim must be placed in one directory, the name of the directory is an input to QuickSim. The files can be downloaded from: ftp://heasarc.gsfc.nasa.gov/xmm/software/quicksim. Of the data files included in the distribution and listed in the following table, rac.fits, ram.fits, ranh.fits are required only if the cosmic background feature is used, and raymond.fits is required only if thermal emission spectral models are to be used (including the cosmic background feature).

Files in the QuickSim distribution

Code  
quicksim.f main QuickSim program
quicksim_linux.f main QuickSim program for use under Linux
simsource.f companion program to QuickSim which creates the input file which provides the observation and source information; this version compiles under Linux, DecOSF, and Solaris
simextend.f companion program to QuickSim which creates input images for extended sources, this version compiles under Linux, DecOSF, and Solaris
subs.for file containing all of the quicksim subroutines
subs_linux.f file containing all of the quicksim subroutines, for use under Linux
rac.fits fits image of ROSAT all-sky survey 1/4 keV band map (Snowden et al. 1995, ApJ, 454, 643)
ram.fits fits image of ROSAT all-sky survey 3/4 keV band map (Snowden et al. 1995, ApJ, 454, 643)
ranh.fits fits image of Galactic $N_{\rm H}$ (Dickey & Lockman 1990, ARA&A)
area.fits fits image of effective areas for different EPIC filters and modes
mirr_area2.dat ASCII file of mirror effective areas on- and off-axis as a function of energy
pha_array_mos.fits look-up table for the MOS CCD line broadening
pha_array_pn.fits look-up table for the PN CCD line broadening
psf_array.fits look-up table for the on- and off-axis point response (from SciSim runs), see Figure 1 for the QuickSim dartboard
raymond.fits fits image of model Raymond & Smith spectra using the 1998 vintage of Raymond & Smith code and cosmic abundances from Allen (Shelton 1998)
procsim.f converts SciSim output into a single photon event file (see § 8)
procsim_linux.f Linux version of procsim.f
   
Documentation  
README contains version history
quicksim.ps this document
run.log annotated listing of a session from SimSource to Xspec
run.ps PS file of fit for run.log session
   
Test Files see § 5
input1, input2 sample QuickSim input files
test1.fits QuickSim output photon event file for input1
test2.fits QuickSim output photon event file for input2
n132d_hri_bs.fits image required as input when QuickSim is run with input2

Compilation

Solaris:     Use the simsource.f, quicksim.f, simextend.f, and subs.for files. The following commands will compile the programs on a Solaris platform. The command line assumes that the system has f90 set up and cfitsio compiled as directed with the libcfitsio.a file (the cfitsio library file) in the source code directory (if the library is in another directory, change the ``-L'' part of the command from ``.'' to the path name of the directory including the final ``/''). Note that with the 1998 December release version of cfitsio, a change was required in the link and compile command (the ``-lm'', ``-lsocket'', and ``-nsl'' parts of the command were previously not required). The commands are:
f90 -o quicksim quicksim.f subs.for -L. -lcfitsio -lm -lsocket -lnsl
f90 -o simextend simextend.f -L. -lcfitsio -lm -lsocket -lnsl
f90 -o simsource simsource.f

DecOSF:     Use the simsource.f, quicksim.f, simextend.f, and subs.for files. The following commands will compile the programs on a Dec OSF platform. Again, the libcfitsio.a file must be in the source-code directory. A change similar to that for Solaris is required by the 1998 December cfitsio release. The commands are:
f90 -o quicksim quicksim.f subs.for -L. -lcfitsio -lm
f90 -o simextend simextend.f -L. -lcfitsio -lm
f90 -o simsource simsource.f

Linux:     Use the simsource.f, quicksim_linux.f, and subs_linux.f files. The following commands will compile the programs on a Linux platform. Again, the libcfitsio.a file must be in the source-code directory. The commands are:
f90 -o quicksim_linux quicksim_linux.f subs_linux.f -L. -lcfitsio
f90 -o simextend simextend.f -L. -lcfitsio
f90 -o simsource simsource.f

Notes on f90 compilers:     Several f90 compilers have been used at GSFC for compilation of the code. The compilation works for both the NAG and Sun compilers on the Solaris platform and the Dec compiler on the Dec OSF platform. On Linux (Red Hat 5.2), the Personal (free) version of Linux VAST/f90 from Pacific-Sierra Research was used (http://www.psrv.com/lnxf90.html).

Figure 1: The QuickSim XMM dartboard. Point sources were input on a $3'$ base grid to demonstrate the distortion of the PSF with increasing off-axis angle.
\begin{figure}\psfig{figure=dartboard.ps,width=10.0cm}\end{figure}

Operation

Running QuickSim is a two-part process. The procedure is to run SimSource, and SimExtend if needed, first to generate an input data file in the proper format to control QuickSim, and then to run QuickSim to generate the simulation output photon event file.

SimSource

SimSource creates an ascii file with the controlling parameters for both the observation and the sources. The ascii file can be modified as desired using any standard text editor as long as the format remains unchanged, rather than rerunning SimSource. The general format of the SimSource output/QuickSim input is:

line 1 directory string up to 55 characters long pointing to where the input data files are located, these are the eight data files in the QuickSim distribution.
line 2 name of the QuickSim output file
line 3 comment line detailing the observation control parameters
line 4 observation control parameters
line 4a if the background spectrum is user supplied, this line gives the file name
line 5 comment line detailing the source parameters
lines $6-$ source parameters, one source per line for QuickSim provided spectra, a second line is required for user supplied spectra

SimSource Input

1) Directory string up to 55 characters long pointing to where the input data files are located. Note that the final ``/'' in the directory string is required.

2) Name of the QuickSim output file. If left blank or if a file of the same name already exists, QuickSim will create a name of the form quicksim*.fits where the ``*'' is either nothing or ``_n'' where n is a two-digit number starting with 01.

3) Pointing direction - right ascension and declination in decimal degrees

4) Exposure time - in seconds

5) EPIC detector - ``mos'' or ``pn''

6) EPIC filter - ``thick'', ``medium'', ``thin'', or ``open''

if the PN detector is being used, the PN timing mode is required

6a) PN mode - ``full'', ``large'', ``small'' (note: ``timing'' and ``burst'' modes have been disabled)

if the MOS detector is being used, the MOS window mode is required

6b) MOS mode - ``full'', ``w2'', ``w3''

7) Internal Background - ``true'', ``false''. QuickSim distributes a flat spectrum with the intensity specified in the Users' Handbook.

8) Background - ``cosmic'', ``power'', ``rs'', ``black'', ``brems'', ``mono'', ``self'' or ``none''. QuickSim distributes the model background photons over the field smoothly as modified by the vignetting of the telescope. For 1/4 arc minute annuli, it takes the model spectrum, corrects it for vignetting, and distributes the photons randomly.

cosmic program creates a model spectrum of the cosmic background using data from the course diffuse background maps from the ROSAT all-sky survey. The background is modeled as three components:
  1) the extragalactic power law ($8.7E^{-1.38}$ photon number spectrum of Chen, Fabian, & Gendreau 1997, MNRAS, 285, 449),
  2) a $10^{6.6}$ K Raymond & Smith thermal emission spectrum with cosmic abundances (Allen) to represent the excess of the observed spectrum over the power law in the $0.5-1.0$ keV band, and
  3) a $10^{6.0}$ K Raymond & Smith thermal emission spectrum with cosmic abundances (Allen) to represent the residual of the observed spectrum at $1\over4$ keV.
power program uses a power law spectrum with user input slope and normalization
rs program uses a Raymond & Smith spectrum with cosmic abundances (Allen) with user input temperature and normalization
black program uses a blackbody spectrum with user input temperature and normalization
brems program uses a bremßtrahlung spectrum with user input temperature and normalization
mono program uses a monochromatic spectrum with user input energy and normalization
self program reads in a user supplied spectrum

9) Background spectral parameters - in general three parameters - when required the normalization refers to the unabsorbed flux

cosmic none  
power law param1 photon number index
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ in the $0.1-12.0$ keV band
  param3 absorption column density in H I cm$^{-2}$
Raymond & Smith param1 temperature in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ in the $0.1-12.0$ keV band
  param3 absorption column density in H I cm$^{-2}$
blackbody param1 temperature in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ in the $0.1-12.0$ keV band
  param3 absorption column density in H I cm$^{-2}$
bremßtrahlung param1 temperature in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ in the $0.1-12.0$ keV band
  param3 absorption column density in H I cm$^{-2}$
monochromatic param1 energy in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ in the $0.1-12.0$ keV band
  param3 absorption column density in H I cm$^{-2}$
user supplied file name the input spectrum must consist of an ASCII list of ordered triplets. The entries are the lower bin energy, upper bin energy (the energies can be either eV or keV as selected), and the spectrum in various units.
  param1 units of spectrum
    0 = photons cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ bin$^{-1}$
    1 = ergs cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ bin$^{-1}$
    2 = eV cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ bin$^{-1}$
    3 = keV cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ bin$^{-1}$
    4 = photons cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ eV$^{-1}$
    5 = eV cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ eV$^{-1}$
    6 = keV cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ eV$^{-1}$
    7 = photons cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ keV$^{-1}$
    8 = eV cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ keV$^{-1}$
    9 = keV cm$^{-2}$ s$^{-1}$ arcmin$^{-2}$ keV$^{-1}$
  param2 bin (energy) units
    1 = keV
    2 = eV
  param3 bin energy format
    1 = low edge, high edge, flux
    2 = center, half width, flux (Xspec format)
  param4 absorption column density in H I cm$^{-2}$

10) Output file name - name of file which will contain the controlling parameters for the model observation

11) Source direction - right ascension and declination in decimal degrees

12) Spectral model - ``power'', ``rs'', ``black'', ``brems'', ``mono'', or ``self''

13) Spectral parameters - two parameters - when required the normalization refers to the unabsorbed flux

power law param1 photon number index
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band
Raymond & Smith param1 temperature in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band
blackbody param1 temperature in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band
bremßtrahlung param1 temperature in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band
monochromatic param1 energy in keV
  param2 normalization in ergs cm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band
user supplied file name the input spectrum must consist of an ASCII list of ordered triplets. The entries are the lower bin energy, upper bin energy (the energies can be either eV or keV as selected), and the spectrum in various units.
  param1 units of spectrum
    0 = photons cm$^{-2}$ s$^{-1}$ bin$^{-1}$
    1 = ergs cm$^{-2}$ s$^{-1}$ bin$^{-1}$
    2 = eV cm$^{-2}$ s$^{-1}$ bin$^{-1}$
    3 = keV cm$^{-2}$ s$^{-1}$ bin$^{-1}$
    4 = photons cm$^{-2}$ s$^{-1}$ eV$^{-1}$
    5 = eV cm$^{-2}$ s$^{-1}$ eV$^{-1}$
    6 = keV cm$^{-2}$ s$^{-1}$ eV$^{-1}$
    7 = photons cm$^{-2}$ s$^{-1}$ keV$^{-1}$
    8 = eV cm$^{-2}$ s$^{-1}$ keV$^{-1}$
    9 = keV cm$^{-2}$ s$^{-1}$ keV$^{-1}$
  param2 bin (energy) units
    1 = keV
    2 = eV
  param3 bin energy format
    1 = low edge, high edge, flux
    2 = center, half width, flux (Xspec format except all extra lines have been removed)

14) $N_{\rm H}$ for absorption - in units of H I cm$^2$

15) Source temporal properties - period in seconds, pulsed fraction between 0.0 and 1.0 (0 0 for no pulsations) The temporal variation assumes a constant plus a sine function. With a pulsed fraction of 1.0 the count rate would vary between 0 and twice the average value. The times are produced using a random number generator and the events in the output fits file are not time ordered.

16) Source distribution - ``point'', ``gaussian'', ``power'', ``elliptical'', ``king'', or ``image''

17) Distribution parameters - up to six parameters

point source   no additional input
2-d gaussian param1 FWHM in x in arc minutes
  param2 FWHM in y in arc minutes
  param3 rotation angle in degrees from the positive RA axis to positive declination
power law param1 power-law index
2-d elliptical param1 inner semi-major axis in arc minutes
  param2 outer semi-major axis in arc minutes
  param3 ellipticity
  param4 rotation angle in degrees from the positive RA axis
king model param1 $\beta$
  param2 core radius in arc minutes
user supplied   file name of fits image
  param1 minimum image pixel in the horizontal (RA) direction to be included in the simulation
  param2 maximum image pixel in the horizontal (RA) direction to be included in the simulation
  param3 minimum image pixel in the vertical (Dec) direction to be included in the simulation
  param4 maximum image pixel in the vertical (Dec) direction to be included in the simulation
  param5 input control
    1 = simple scaling of input image
    2 = use the input image as a probability distribution, the source spectrum will be used to produce the counts for the entire object
  param5a if the input control (param5) is 1 for a simple scaling of the input image, then enter the count rate ratio between the XMM detector being modeled and the detector used for the image.
  param5b if the input control (param5) is 1 for a simple scaling of the input image, then enter the exposure time for the original image

Lines 11 - 17 are repeated for all input sources. To gracefully exit the program enter ``1000 0'' for the source coordinates. For all character input, only the first four characters are used (i.e., ``gauss'' is both read and registered as ``gaus''). The character strings can be either upper case or lower case, but not a mixture of both, for any individual input.

Notes for a user-input image: 1) The fits file must contain the image as the primary record, not as an extension. The projection should be tangential and the coordinates should be $(\alpha,\delta)_{2000}$. It also must include the keywords CRVAL1 and CRVAL2 listing the reference direction in decimal degrees, the keywords CDELT1 and CDELT2 listing the pixel size in decimal degrees, and the keywords CRPIX1 and CRPIX2 listing the reference direction in the image in pixels. An example of such a header is reproduced below. Images produced by Ximage will work as will those produced by the ROSAT ESAS software. 2) Param1 through param4 specify the region of the input image (in pixels) over which QuickSim will loop. This allows the user to extract a region in a larger image in order to save significant CPU time. Both the pixel size and angular resolution of the input image should be smaller than the instrument (MOS or PN) psf or the structure in the resultant image will be dominated by non-EPIC effects. 3) If param5, option 1 is selected then the counts in a given input pixel will be multiplied by the input scale factor (param 5a, derived for example from PIMMS) and by the ratio of the QuickSim exposure to the exposure of the input image. The total number of counts will then be distributed spectrally using the input spectral parameters (not including the flux) and spatially randomly over the output region covered by the input pixel. If param5 option 2 is selected then the counts specified by the input spectrum will be distributed using the input image as a probability distribution (after the image has been normalized so that the sum of all the pixels to be used equals one). This includes all of the counts over the field, so a noisy image such as from the ROSAT HRI will divert much of the specified flux away from any central source.

Note for user-input spectra: When using Xspec spectra all lines except those with spectrum numbers must be removed from the file. This typically means a few lines at the top. Also, multiple spectra in a file separated by the QDP "no" line will not work. Extra columns in the file will not cause any problems, as long as the total flux is in the third column.

Note for input fluxes: The fluxes input into QuickSim are the unabsorbed fluxes from the sources. In general QuickSim prints out the flux before (input) and after absorption is included.

Note for the King model angular distribution: The King model will cause QuickSim to crash if values too close to 0.5 are given for $\beta$. The program will therefore terminate if values of $\beta<0.526$ are given as input.

SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                   16 / number of bits per data pixel
NAXIS   =                    2 / number of data axes
NAXIS1  =                  512 / length of data axis 1
NAXIS2  =                  512 / length of data axis 2
COMMENT   FITS (Flexible Image Transport System) format defined in Astronomy and
COMMENT   Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.
COMMENT   Contact the NASA Science Office of Standards and Technology for the
COMMENT   FITS Definition document #100 and other FITS information.
COMMENT   HRI count map
CONTENT = 'IMAGE   '           /
TELESCOP= 'ROSAT   '           / mission name
INSTRUME= 'HRI     '           / instrument name
OBS_MODE= 'POINTING'           / obs mode: POINTING,SLEW, OR SCAN
RADECSYS= 'FK5     '           / Equatorial system reference
EQUINOX =                 2000 / Equinox
BZERO   =       0.00000000E+00 /
BSCALE  =       1.00000000E+00 /
BUNIT   = 'counts  '           / Units of data
CRPIX1  =             256.5000 / Reference pixel
CTYPE1  = 'RA---TAN'           / Projection
CRVAL1  =              81.2600 / Right Ascension
CDELT1  =          -0.00138889 / Pixel size
CUNIT1  = 'deg     '           / Units of coordinate
CRPIX2  =             256.5000 / Reference pixel
CTYPE2  = 'DEC--TAN'           / Projection
CRVAL2  =             -69.6400 / Declination
CDELT2  =           0.00138889 / Pixel size
CUNIT2  = 'deg     '           / Units of coordinate
COMMENT   This file was produced using the ESAS software written by
COMMENT   S. L. Snowden, and written using the FITSIO package of
COMMENT   W. D. Pence.

SimExtend

SimExtend creates an image FITS file of an extended-source distribution which is used in QuickSim. It is possible to have QuickSim directly calculate the distributions for extended sources (see above), however in that case the vignetting is calculated only for the central position (which is used for the entire source). This is acceptable for distributions of a few arc minutes or less. If the distribution is input as an image then the vignetting is applied on a pixel-by-pixel basis across the field. The output from SimExtend should be used with input control $=2$ in the user-supplied source distribution input above. SimExtend creates variable-sized images (depending on the input pixel size) that cover a $60'$ diameter region. This allows the sources to be placed anywhere inside the QuickSim field and have the SimExtend image cover the entire field.

SimExtend Input

1) Source direction - right ascension and declination in decimal degrees.

2) Pixel size in arc minutes.

3) Name of the SimExtend output file.

4) Source distribution - ``gaussian'', ``power'', ``elliptical'', or ``king''

5) Distribution parameters - up to four parameters

2-d gaussian param1 FWHM in x in arc minutes
  param2 FWHM in y in arc minutes
  param3 rotation angle in degrees from the positive RA axis to positive declination
power law param1 power-law index
2-d elliptical param1 inner semi-major axis in arc minutes
  param2 outer semi-major axis in arc minutes
  param3 ellipticity
  param4 rotation angle in degrees from the positive RA axis to positive declination
king model param1 $\beta$
  param2 core radius in arc minutes

QuickSim Attributes

Observational aspects modeled by QuickSim

1) Energy-dependent vignetting is included.

2) The EPIC effective areas for the various modes and filters are included.

3) The telescope point spread function is included (based on the MOS response). The PSF is truncated at $6\mbox{$. \! '$}7$.

4) The CCD spectral responses (line broadening) are included separately for the MOS and PN cameras, and are based of the different RMFs.

5) Background from the cosmic diffuse background and other spectra are options.

6) Internal background from charged particles (based on values from the XMM Users' Handbook).

7) Sinusoidal temporal variation can be modeled.

Observational aspects NOT modeled by QuickSim and other caveats

1) For extended sources, the vignetting used for the entire source is that of the central point. This effect can be avoided by using SimExtend to create an input source image.

2) Ghost images for the MOS detector and out-of-time event for the PN detector are not represented.

3) The gaps between CCD chips are not represented.

4) The fine structure in the PSF is not represented.

5) Pile-up for bright sources is not represented.

6) The PSF is based on SciSim runs using the MOS detector


Test Input

The distribution comes with two sample inputs (``input1'' and ``input2'') and their resultant output fits files (``test1.fits'' and ``test2.fits''). Running QuickSim with the input ``input1'' will produce data for 5 different source distributions with different spectra. The upper panel in Figure 2 shows the resultant image. Running QuickSim with the input ``input2'' will produce a simulation of a 10 ks observation of the LMC supernova remnant N132D. ``n132d_xmm.fits'' contains he XMM image of N132D. In both cases the runs are for a single MOS detector with the THIN filter. The lower panel in Figure 2 shows the resultant image.

Figure 2: Images produced from the test runs. The upper image shows the results using the input1 input which demonstrates the different source angular distributions available in QuickSim. The lower image shows the input2 QuickSim simulation using a ROSAT HRI observation of the LMC supernova remnant N132D as a template.
\begin{figure}\psfig{figure=test.ps,width=10.0cm}\end{figure}

Test-Run Log

A log file has been included of a simple simulation which extends from the use of SimSource to input a single on-axis power-law point source to the fitting of the simulated spectrum using the Xspec package. The run used SimSource, QuickSim, Xselect, grppha, and Xspec. The last three packages are available through the HEASARC Legacy anonymous FTP facility (ftp heasarc.gsfc.nasa.gov then cd to software/ftools and software/xanadu). The packages used are those which were current (i.e., publicly released) on 21 December 1998.

The log file has been separated by invoked program and individual inputs have been annotated. In addition, directions are given on how to download the required ARF and RMF files for use in Xspec from the XMM SOC WWW pages at ESTEC.

Reliability of Results

Coarse Count Rates

Table 1 shows the results of QuickSim runs versus PIMMS output (the ECF values in the XMM Users' Handbook were calculated using a modified version of the PIMMS package and so are represented by the PIMMS listings) for various input spectral forms with the assumption of no interstellar absorption. The results are for one MOS camera with the thin filter and full window mode and the PN camera with the thin filter and full mode. In all cases a source flux of $1.0\times10^{-12}$ ergs cm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band was used, which produces negligible pile-up. As can be seen, there is generally quite good agreement between QuickSim and PIMMS. The largest differences are between the Raymond & Smith results, and can easily explained by the different vintages of the code used for the input spectra.


Table 1: Comparison of QuickSim and PIMMS results.
Spectral Type   MOS Camera (counts s$^{-1}$) PN Camera (counts s$^{-1}$)
    QuickSim PIMMS QuickSim PIMMS
  Photon Index        
Power Law 1.0 0.068 0.068 0.214 0.214
  2.0 0.143 0.142 0.668 0.664
  3.0 0.120 0.118 0.898 0.889
  T (keV)        
Bremßtrahlung 0.2 0.129 0.128 1.045 1.041
  0.5 0.201 0.200 1.082 1.079
  1.0 0.208 0.206 0.931 0.929
  2.0 0.181 0.180 0.733 0.731
  5.0 0.136 0.136 0.510 0.509
  T (keV)        
Blackbody 0.2 0.268 0.267 1.071 1.070
  0.5 0.188 0.187 0.549 0.549
  1.0 0.097 0.097 0.254 0.254
  2.0 0.045 0.045 0.115 0.115
  5.0 0.023 0.023 0.063 0.063
  T (K)        
Raymond $10^{6.0}$ 0.089 0.095 0.996 0.997
& Smith $10^{6.6}$ 0.259 0.257 1.090 1.085
  $10^{7.0}$ 0.223 0.216 0.843 0.822
  $10^{7.6}$ 0.156 0.151 0.572 0.556

Angular Distributions

Figure 3 shows a test of the Gaussian source distribution feature (courtesy of Andy Ptak). For the test, a $30''$ Gaussian profile was simulated by QuickSim, and then fitted for the width parameter with a result of $30\hbox{$.\!\!^{\prime\prime}$}24$. There is a minor but clear systematic variation in the residuals which is likely due to differences in the PSF used for the simulation and the fitting procedures. The other source distributions have as yet not been verified.

Figure 3: Test of the Gaussian source angular distribution feature in QuickSim. The data, model fit (dot-dashed line), point response function (dotted line), and background level (dashed line) are shown in the top panel. The ratio of the data to the model is shown in the bottom panel.
\begin{figure}\psfig{figure=gaussian.ps,width=10.0cm}\end{figure}

To test the King model facility two distributions were simulated by QuickSim, and then fitted using the King model in the QDP plotting package. The upper panel in Figure 4 shows the results for an input core radius of $30''$ and $\beta=0.55$ with fitted values of $35''$ and $\beta=0.552$, respectively. The middle panel in Figure 4 shows the results for an input core radius of $60''$ and $\beta=1.00$ with fitted values of $59.9''$ and $\beta=0.92$, respectively. In neither case was the intrinsic EPIC PSF folded into the fitting model, which likely accounts for much of the discrepancy between the input and fitted values for the parameters. As a matter of interest for those who will use XMM to study clusters of galaxies, the lower panel shows the radial profile of a point source fitted with a King function. The fit is reasonably good out to a radius of $100''$, and is still close out to $200''$. The fitted values for the model are $6\hbox{$.\!\!^{\prime\prime}$}5$ for the core radius and $\beta=0.69$.

Figure 4: Test of the King model source angular distribution feature in QuickSim. The upper two panels show the data and model fits for King distributions and list the input and fitted parameters. The bottom panel shows the point-source distribution fit with a King model.
\begin{figure}\psfig{figure=king.ps,width=18.0cm}\end{figure}

An $r^{-1.0}$ model was used to test the QuickSim power law facility with the result again fitted using the QDP plotting package. Figure 5 shows the results when the radial profile is fit over the $15'-500'$ range, with a fitted value of $0\mbox{$. \! '$}993$. The flattening at lower radii is due to the finite PSF.

Figure 5: Test of the power law model source angular distribution feature in QuickSim. The input slope was 1.0 and the fitted slope, using the $15'-500'$ range, was $0\mbox{$. \! '$}993$.
\begin{figure}\psfig{figure=power.ps,width=18.0cm}\end{figure}

Spectral Models

Table 2 shows the results of using Xspec to fits simulations of various spectra. The simulations modeled relatively bright sources for relatively long exposures producing on the order of $2\times10^5$ events for each spectrum. This is a sufficient number of events to show systematic errors in the modeling. Based on the thermal emission spectral simulation, the simulated spectrum includes line widths which are narrower than those in the spectral response matrix (1998 February version). While in almost all cases the fitted values for temperatures (or index) and absorption column densities deviate from the model value, the deviation is not great ($<4$% except for the bremßtrahlung temperature which is 10% off). Figures 6 and 7 show plots of the simulated spectra along with the best-fit models.


Table 2: Xspec fits to QuickSim simulations.
Spectral Type Model Values Best-Fit Values
  index $N_{\rm H}$ $^a$ $\chi^2_\nu$ $^b$ index $N_{\rm H}$ $^a$ $\chi^2_\nu$
Power Law 1.4 10.0 1.25 $1.41\pm0.01$ $8.7\pm0.1$ 1.01
  T (keV) $N_{\rm H}$ $\chi^2_\nu$ T (keV) $N_{\rm H}$ $\chi^2_\nu$
Raymond & Smith$^c$ 0.86 1.0 3.26 $0.874\pm0.001$ $0.71\pm0.03$ 2.45
  T (keV) $N_{\rm H}$ $\chi^2_\nu$ T (keV) $N_{\rm H}$ $\chi^2_\nu$
Blackbody 1.0 5.0 1.11 $0.993\pm0.002$ $4.81\pm0.14$ 1.02
  T (keV) $N_{\rm H}$ $\chi^2_\nu$ T (keV) $N_{\rm H}$ $\chi^2_\nu$
Bremßtrahlung 2.5 20.0 2.44 $2.85\pm0.02$ $18.1\pm0.1$ 2.01
$^a$Units of $10^{20}$ cm$^{-2}$.
$^b$Spectral parameters fixed at QuickSim input values and normalization allowed to vary.
$^c$The poorness of the Raymond & Smith equilibrium model fits are likely due the use of different vintages of the spectra between QuickSim and Xspec.

Use of QuickSim Output Files

The QuickSim output file is a photon event file in FITS format with a primary header and two extension tables. The first extension contains a GTI (Good Times Intervals) table with one row. The columns in the row are START ($time=0$ s) and STOP ($time=exposure$ in seconds). The second extension contains the event list, and has five columns. The columns are TIME, X, Y, PHA, and PI. TIME is the event time in seconds (note that the events are not time ordered). X and Y are the sky coordinates of the events in units of $0\hbox{$.\!\!^{\prime\prime}$}05$ relative to the optical axis. PHA and PI are the pulse height of the event and are duplicates. One channel is 3.947364 eV.

QuickSim output files have been used successfully in Ximage, Xselect, IDL, and ASCfit, and should work with other analysis packages which can process OGIP-standard photon event files. The user must keep in mind the available parameters and the default pixel sizes. For instance, the standard Xselect binning is by 16, which produces $0\hbox{$.\!\!^{\prime\prime}$}8$ binned pixels. A common mistake made in Xselect concerns the position coordinates. Xselect expects to use DETX and DETY as the position coordinates but they are not included in the QuickSim output, which instead uses X and Y. In an Xselect run the User must therefore use the commands:

set xyname X Y
set wmapname X Y

As of this writing, the most recent EPIC RMFs and ARFs (detector response matrices and effective area files, respectively) are the March99 versions, and should be used for spectral fitting. They are available through the ESTEC XMM SOC www pages at:
http://astro.estec.esa.nl/XMM/
by pushing the ``XMM CALIBRATION'' button, the ``Index of XMM Calibration Files'' button, and then the ``Compressed files'' button.

Figure 6: Plots of simulated spectra. The upper panel shows the model power law spectrum along with the best-fit model curve. The lower panel shows the model Raymond & Smith (thermal emission) spectrum with its best-fit model curve.
\begin{figure}\psfig{figure=pow-rs.ps,width=10.0cm}\end{figure}

Figure 7: Plots of simulated spectra. The upper panel shows the model blackbody spectrum along with the best-fit model curve. The lower panel shows the model bremßtrahlung spectrum with its best-fit model curve.
\begin{figure}\psfig{figure=black-brem.ps,width=10.0cm}\end{figure}


ProcSim

ProcSim is a tool to convert SciSim (currently Version 2.0.4) output from the X-ray instruments (RGS, EPIC MOS and PN) into photon event files, which can be used in the same manner as the QuickSim output files (e.g., in Xselect, grppha, Xspec, Ximage). The individual CCD files are merged into a single file and the event positions are translated into sky coordinates. Figure 8 shows the result of SciSim runs for the MOS and PN detectors fitted with Xspec. The input source spectrum in both cases was an $E^{-2}$ power law with a flux of $10^{-4}$ photons mm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band.

NOTE: ProcSim can process MOS data from the PrimeFullWindow (standard), PrimePartialW2, and PrimePartialW3 modes but not the FastModeUncompressed mode. ProcSim can process PN data from the PrimeFullWindow (standard), PrimeLargeWindowAll, PrimeLargeWindowCentral, and PrimeSmallWindow modes but not the FastModeTiming mode. ProcSim can process RGS data only from the Spectroscopy_3x3ocb(baseline) (standard) mode.

In the merging process, ProcSim accounts for 1) the rotation (on the sky) by 90 degrees between the two EPIC MOS cameras and 2) the offset of the center of the PN CCD array from the optical axis. However, rotation angles of the detectors are not considered so the roll angle in SciSim simulations should always be set to 0 degrees, if ProcSim is going to be used. ProcSim also has a simple algorithm to reconstruct CCD events for the EPIC PN detector. However, note that if bright sources are being modeled with the possibility of multiple events in individual frames, it is possible that the event reconstruction algorithm that ProcSim uses will break down, as well as the normal pile-up occurring (which SciSim models).

Figure 9 shows a plot of SciSim RGS data. The input spectrum is an $E^{-2}$ power law and therefore the plot clearly shows the characteristic ``banana'' curves for three orders in energy-dispersion coordinate space.

ProcSim can be found in the same release area as the QuickSim distribution and is compiled the same as QuickSim (without the subroutines):
Solaris:     f90 -o procsim procsim.f -L. -lcfitsio -lm -lsocket -lnsl
Dec OSF:     f90 -o procsim procsim.f -L. -lcfitsio -lm
Linux:     f90 -o procsim procsim_linux.f -L. -lcfitsio
ProcSim is a stand-alone FORTRAN 90 program which only requires cfitsio. To use ProcSim, the output of SciSim is first processed using modf, podf, or rodf, whichever is appropriate. ProcSim queries for the detector and for the right ascension and declination (in decimal degrees) of the pointing (as yet, SciSim doesn't carry that information through to its output files).

Figure 8: Plots of SciSim simulated EPIC spectra, the upper panel shows a PN simulation while the lower panel shows a MOS simulation. In both cases the input spectrum is an $E^{-2}$ power law with a flux of $10^{-4}$ photons mm$^{-2}$ s$^{-1}$ in the $0.1-12.0$ keV band. The SciSim output was processed by ProcSim and the resultant photon event files were processed through Xselect, grppha, and Xspec. Each spectrum is shown with its best-fit model curve.
\begin{figure}\psfig{figure=pn-mos.ps,width=10.0cm}\end{figure}

Figure 9: Plot of a SciSim simulated RGS spectrum. The input spectrum is an $E^{-2}$ power law with a flux of $10^{-4}$ photons mm$^{-2}$ s$^{-1}$ in the $0.1-2.5$ keV band and the exposure is 25 ks. The SciSim output was processed by ProcSim and the resultant photon event file was plotted using IDL and QDP.
\begin{figure}\psfig{figure=rgs.ps,width=10.0cm}\end{figure}

About this document ...

This document was generated using the LaTeX2HTML translator Version 99.2beta8 (1.46)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -t 'Quicksim v2.0' -image_type gif -split 0 quicksim.tex

The translation was initiated by Michael Arida on 2001-09-14


next_inactive up previous
Michael Arida 2001-09-14