You are here: Science»
IXO Simulation Tools»
How to run simx
How to run simx
Download simx-0.5.1.tar
First, install simx following the directions on the Downloading and Installing simx page.
Simx uses the ever-popular IRAF interface that should be familiar
to FTOOLS and CIAO users. It expects to find its parameter file in a
directory pointed to by PFILES. If you are an FTOOLS user, you
probably have a directory 'pfiles' in your home directory, e.g.
/home/user/pfiles. In this case, simply copy the simx.par file in
the pfiles directory to this directory and start FTOOLS; e.g.:
unix% cp /path/to/simx/pfiles/simx.par /home/user/pfiles/simx.par
unix% ftools-init
Alternatively, you can simply set the PFILES environment variable
to point to the pfiles directory in simx:
unix% setenv PFILES /path/to/simx/pfiles
Note that the syspfiles/ directory contains a 'pristine' version of the same file in case the one in pfiles is corrupted somehow.
To run simx, simply set the simulation parameters in simx.par to the desired values by editing the file directly in an editor (this method is somewhat risky) or installing FTOOLS and using pset, e.g.:
unix% pset simx OutputFileName = MySimRun
unix% pset simx Exposure=10000
(see (4) for a list of parameter options) and then run simx:
unix% /path/to/simx/bin/simx
The code will generate an output event file in the current
directory which can be viewed with ds9 or used with the CIAO tools
dmextract or the FTOOLS xselect. A modified version of xselect.mdb
is needed to use these files with xselect; it can be found in
the test directory of simx. To
use this file with xselect instead of the default xselect.mdb that
comes with FTOOLS, set the following environment variable:
unix% setenv XSELECT_MDB /path/to/simx/test/xselect.mdb
Complete List of User Parameter Options:
- OutputFileName
- The output event file stem; final file will be this step with "_evt.fits" appended.
-
- PointingRA
- Right Ascension (in decimal degrees) of the pointing direction of the satellite.
-
- PointingDec
- Declination (in decimal degrees) of the pointing direction of the satellite
-
- Exposure
- Exposure time (in seconds)
-
- SourceFlux
- Total source flux (in erg/cm2/s); for IXO, a source with
10-13 erg/cm2/s is reasonably bright.
-
- SourceImageType
- Either Image or Point; if Image, a FITS image file must be provided as the
SourceImageFile parameter. If Point, the point source position must be
provided in SourcePointRA and SourcePointDec
-
- SourcePointRA
- Right Ascension (in decimal degrees) of the point source; only used if
SourceImageType = Point. If this value and the SourcePointDec match the
PointingRA and PointingDec, the source will be centered on the detector.
-
- SourcePointDec
- Declination (in decimal degrees) of the point source
-
- SourceImageFile
- FITS-format file containing the image to simulate
-
- SourceSpectrumType
- One of XSPEC_File, Sherpa_File, or Mono. If set to Mono, the
source is assumed monoenergetic with the energy set in the
MonoEnergy parameter. If XSPEC_File, it is assumed the spectrum
is output from XSPEC using the commands
XSPEC> ...define model spectrum...
XSPEC> plot model
XSPEC> iplot
PLT> wdata model.dat
PLT> quit
In this case, the file will have at least 3 columns,
Energy (in keV), delta-Energy, and flux (in
ph/cm2/s/keV); the first three rows are
ignored as they normally contain text. If Sherpa_File
is the parameter, it is assumed the spectrum file
comes from a Sherpa model created (in CIAO 3) via:
sherpa> ...define model spectrum...
sherpa> write source source.dat
In this case, the file will have 2 columns, Energy (in keV),
and Flux (in ph/cm2/s/keV). If you generate the spectrum file
some other way than XSPEC or Sherpa, simply output the
spectrum in this format (two columns, energy and flux) and simx
should be able to read it. -
- SourceSpectrumFile
- The name of source spectrum file, if SourceSpectrumType=XSPEC_File or Sherpa_File
-
- MonoEnergy
- The energy (in keV) of the mono-energetic spectrum if
SourceSpectrumType = Mono
-
- RandomSeed
- The initial random seed. If you set this to -1, the code
will use the current time to seed the random number generator,
while any other value will always generate the same sequence of
random numbers.
-
- MissionName
- Can be set to IXO or Generic; for all IXO uses,
this should be kept at IXO.
- InstrumentName
- This can be set to CalCore (for the core
40×40 calorimeter array), CalFull (for the full
5 arcmin 52×52) calorimeter array, which has a
larger deadtime and lower resolution), or WFI (the
Wide Field Imager).
- FilterName
- Can be set to either None (no filter), or to BSDO
(Bright Source Defocusing Optic) which diffuses bright
sources to a much larger field.
- File_bkgnd
- Path, including the filename, to the desired
background pha file.
- File_arf
- Path, including the filename, to an effective area
file. At the moment, these are not used for any IXO
responses.
- File_rmf
- Path, including the filename, to the Calorimeter or WFI/HXI response file.