Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://xmm.vilspa.esa.es/scisim/release/latest/help/postscript/osim.ps
Äàòà èçìåíåíèÿ: Wed Jan 12 14:04:44 2005
Äàòà èíäåêñèðîâàíèÿ: Sat Dec 22 15:34:40 2007
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: zodiacal light
Optical Monitor Simulator (OSIM) 4.0
Jon Brum tt
January 12, 2005
This is a paper version of the OSIM help. If possible, refer to the HTML version, which contains images
and hypertext links.
OSIM is a simulator for the Optical Monitor on the XMM-Newton satellite. It forms part of the
XMM-Newton Science Simulator SciSim.
This document contains information speci c to OSIM only; for generic information about SciSim, see
the SciSim User Guide.
1

XMM-Newton Science Simulator Page: 2
Contents
1 Overview of OSIM 4
1.1 Features simulated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Usage 5
2.1 SciSim GUI usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Command line usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Data Files 6
3.1 File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Input le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Con guration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 Source Spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.5 Instrument Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.6 Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.7 Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.8 Con guration Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.8.1 sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.8.2 tracker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.8.3 channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.8.4 instrPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.8.5 spectraPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.8.6 lter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.8.7 exposureTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.8.8 primary, secondary, dichroic, & window . . . . . . . . . . . . . . . . . . . . . . . . 10
3.8.9 cathode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.8.10 magni er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8.11 area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8.12 oa ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

XMM-Newton Science Simulator Page: 3
3.8.13 cr ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8.14 focalLength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8.15 magni cation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.8.16 opticalFWHM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.8.17 detectorFWHM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.8.18 pixelSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.8.19 xpixels & ypixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.8.20 spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.8.21 lambdaMin, lambdaMax & lambdaStep . . . . . . . . . . . . . . . . . . . . . . . . 13
4 The Simulation 13
4.1 Coordinate Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Count rate calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3 Background count rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4 Magni er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5 Point Spread Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.6 Image Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5 Limitations 19
6 Tips and Tricks 19
6.1 Simulating sub-pixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

XMM-Newton Science Simulator Page: 4
1 Overview of OSIM
OSIM is a simulator for the Optical Monitor. The input le speci es the spacecraft attitude behaviour;
the sources are speci ed in a separate le containing the sky background and a set of sources, each with
a given right ascension, declination, magnitude and spectral type. This le can be con gured in the
con guration le or as optional argument to OSIM.
The coordinates of each source are transformed, with respect to the spacecraft attitude, into an o set
relative to the telescope axis. The telescope optics, including the mirrors and magni er, further transform
this into a position in the focal plane.
The count rate is calculated, for each source, taking into account the spectral type and magnitude of
the source, the quantum eôciency of the photocathode as a function of wavelength and the wavelength-
dependent transmission/re ection of the various optical components, including the mirrors, magni er,
lters and detector window. The image is convolved with a point spread function and the count rate
resulting from the sky background is added.
Finally, the image is sampled by the CCD array. The output is a binary le containing which can be
processed by the ODF converters or viewed by the SciSim Tools ssimascii.
The simulation does not currently model the micro-channel plates (MCP) or centroiding. However, the
point spread function takes into account both the optical PSF of the telescope and the PSF of the
detector.
1.1 Features simulated
OSIM models the Optical Monitortelescope and generates a SciSim speci c binary le, that can be
processed by e.g. ODF converters.
It models the following features:
 Imaging (coordinate transformation(Sec. 4.1)) by telescope and channel
 Count rate(Sec. 4.2) for each pixel
 Sky background(Sec. 4.3)
 Source spectra(Sec. 3.4)
 Gaussian Point Spread Function (PSF)(Sec. 4.5) of optics
 Re ectance(Sec. 3.5) of primary and secondary mirrors
 Re ectance(Sec. 3.5) of selector (dichroic)
 Transmittance(Sec. 3.5) of various lters
 Magni cation by magni er(Sec. 4.4)
 Transmittance(Sec. 3.5) of magni er
 Transmittance(Sec. 3.5) of detector window
 Photocathode quantum eôciency(Sec. 3.5)
 FWHM of detector(Sec. 4.5)
 Sampling by CCD pixels(Sec. 4.6)

XMM-Newton Science Simulator Page: 5
It does not currently simulate any e ects of the micro-channel plates (other than open-area ratio) or
digital processing. However, a Gaussian PSF can be speci ed for the detectors, representing the 'splash'
of the MCP.
The following features are planned as future enhancements:
 Grisms
 Centroiding to give sub-pixels
 Digital integration of frames
 Image and fast mode
 Some e ects of micro-channel plate
 Poisson statistics of photons
 Graphical User Interface
2 Usage
OSIM can be run either from the SciSim Graphical User Interface (GUI) or from the command line.
When run from the command line, it reads a list of celestial sources from the con guration, and the
Spacecraft Attitude history from standard input; on the standard output it generates a SciSim binary
le. The output can be converted into an XMM-Newton Observation Data Format (ODF) le using the
program `oodf' (see ODF converters).
OSIM is con gured by the osim config section of the SciSim con guration le. Which les are scanned
for this section is described in the SciSim top-level documentation. With the -c option you can specify an
explicit le to be used. The GUI can be considered as an editor of this con guration. All parameters that
are accessible from the GUI can also be changed on the command line with --keyword value option,
e.g. osim --filter uvw1.
2.1 SciSim GUI usage
To use OSIM from within the SciSim GUI, rst start scisim (see SciSim User Guide). Set up a source
con guration, then select OM and S/C in the con guration dialogue, and click on the start button in the
main window.
The simulation can be con gured by clicking the OM icon with the right mouse button. This pops up a
con guration screen. See section on con guration le(Sec. 3.3).
2.2 Command line usage
To use OSIM from the command line, rst generate an input le, say spsim.out, and a sourcelist le
e.g. sources.dat. Then, OSIM may be run as follows:
osim --sources sources.dat < spsim.out > osim.out

XMM-Newton Science Simulator Page: 6
OSIM can be run in parallel with the X-ray pipeline by running it in the background:
osim --sources sources.dat < spsim.out > osim.out &
gsim --sources sources.dat < spsim.out | msim | rgasim | esim > esim.out
The default OSIM con guration can be customised by providing a le .scisimrc-3, in the user's home
directory. Speci c aspects of the con guration can be overridden by specifying a con guration le with
the -c command-line option. Finally, individual con guration parameters can be overridden on the
command line using `-- '. For example:
osim --filter uvw1 --sources mysources.dat < spsim.out > osim.out
Con guration for command-line operation is described in detail in the SciSim top-level documentation.
3 Data Files
3.1 File Format
A common format is used for the following OSIM les:
 input le(Sec. 3.2)
 con guration le(Sec. 3.3)
 source spectra(Sec. 3.4)
 instrument tables(Sec. 3.5)
These les all use the keyword-value syntax described in the SciSim top-level documentation. This
includes the use of comments introduced using the character `#'.
3.2 Input le
The OSIM input le de nes the attitude history behaviour of the Spacecraft. It is produced by SPSIM.
3.3 Con guration File
The allowable con guration keywords for OSIM are (see section 3.8):
 instrPath(Sec. 3.8.4)
 spectraPath(Sec. 3.8.5)
 lter(Sec. 3.8.6)

XMM-Newton Science Simulator Page: 7
 exposureTime(Sec. 3.8.7)
 primary(Sec. 3.8.8)
 secondary(Sec. 3.8.8)
 dichroic(Sec. 3.8.8)
 cathode(Sec. 3.8.9)
 oa ratio(Sec. 3.8.12)
 cr ratio(Sec. 3.8.13)
 magni er(Sec. 3.8.10)
 area(Sec. 3.8.11)
 focalLength(Sec. 3.8.14)
 opticalFWHM(Sec. 3.8.16)
 detectorFWHM(Sec. 3.8.17)
 pixelSize(Sec. 3.8.18)
 xpixels(Sec. 3.8.19)
 spectra(Sec. 3.8.20)
 lambdaMin(Sec. 3.8.21)
 lambdaMax(Sec. 3.8.21)
 lambdaStep(Sec. 3.8.21)
 sources(Sec. 3.8.1)
 tracker(Sec. 3.8.2)
 channel(Sec. 3.8.3)
3.4 Source Spectra
The OSIM input le(Sec. 3.2) contains a list of sources with speci ed spectral types (e.g. b0, a0, f0, g0,
k0, m0).
For each spectral type (e.g. a0), there must be a corresponding le (e.g. a0.sptm), in the directory
speci ed by the con guration parameter spectraPath.
For example, see the le a0.sptm.
Each spectral le gives the ux for a set of wavelengths. The wavelength range covered should be at least
as large as that de ned by the con guration parameters lambdaMin and lambdaMax. This ensures that
it is possible to interpolate, rather than extrapolate, when calculating the count rate(Sec. 4.2).
The wavelengths need not be equally spaced, but they must be in order of increasing wavelength. More
accurate interpolation will be achieved if the wavelengths are closely spaced in regions where the ux is
varying sharply.

XMM-Newton Science Simulator Page: 8
3.5 Instrument Tables
OSIM uses a set of tables specifying the wavelength-dependent properties of the instrument components,
such as the transmission coeôcients of the lters and the quantum eôciency of the photocathode.
The con guration le(Sec. 3.3) de nes the le names for each of the tables. For example:
 primary(Sec. 3.8.8)
 secondary(Sec. 3.8.8)
 dichroic(Sec. 3.8.8)
 window(Sec. 3.8.8)
 cathode(Sec. 3.8.9)
The con guration parameter instrPath(Sec. 3.8.4) speci es the directory which contains these les. For
example:
instrPath data/instr/mssl_v1.1/
If the path starts with a `/', it is taken to be an absolute path. Otherwise, it is relative to the directories
speci ed by the environment variable SCISIM PATH or, if this is not de ned, SCISIM DIR.
In addition, there must be a le named ` lter.sptm', for any lter speci ed using the `-f lter' command
line option (including the focal magni er). For example, see the lter le uvw1.sptm.
Each le gives the ux for a set of wavelengths. The wavelength range covered should be at least as
large as that de ned by the con guration parameters lambdaMin and lambdaMax. This ensures that it is
possible to interpolate, rather than extrapolate, when calculating the count rate(Sec. 4.2)
The wavelengths need not be equally spaced, but they must be in order of increasing wavelength. More
accurate interpolation will be achieved if the wavelengths are closely spaced in regions where the ux is
varying sharply.
3.6 Output File
The OSIM image les are generated in a SciSim speci c binary format.
The program `oodf' can be used to convert the output into an XMM-Newton Observation Data Format
(ODF converters) le.
3.7 Log File
As well as generating the image le, OSIM also creates a log le, which contains the following details of
the simulation run:
 Version number of OSIM

XMM-Newton Science Simulator Page: 9
 Date and time of OSIM simulation
 Con guration les read
 All parameters used in the simulation
 Data les read
 The count rates for V=0 sources of each spectral type
 The number of sources processed
By default, the log le is called `osim log'. This may be overridden by the `-l' command-line option.
3.8 Con guration Keywords
3.8.1 sources
This keyword refers to the le containing all the sources as speci ed by the User wihitn the SciSim GUI.
3.8.2 tracker
Speci es whether the OM star tracker is working (1) or it is broken (0).
Currently OSIM has not implemented the star-tracker. In the working case mentioned above, OSIM
takes the rst Attitude it gets from the input le, and behaves as if the instrument does not move at all.
If this option is swicthed o , no pointing correction is done, and the image might get blurred.
3.8.3 channel
The User may select the primary (0) channel or redundant (1) channel, that is used to read out the
image section.
3.8.4 instrPath
The path of the directory containing the instrument les(Sec. 3.5).
If this starts with a `/', it is taken to be an absolute path. Otherwise, it is relative to the directories
speci ed by the environment variable SCISIM PATH or, if this is not de ned, SCISIM DIR.
Example:
instrPath data/instr/mssl_v1.1

XMM-Newton Science Simulator Page: 10
3.8.5 spectraPath
The path of the directory containing the spectral les(Sec. 3.4).
If this starts with a `/', it is taken to be an absolute path. Otherwise, it is relative to the directories
speci ed by the environment variable SCISIM PATH or, if this is not de ned, SCISIM DIR.
Example:
spectraPath data/spectra
3.8.6 lter
The name of the lter used by OSIM.
Example:
filter white # Default filter
3.8.7 exposureTime
The exposure time for an observation.
Example:
exposureTime 1000 # Default exposure time (s)
3.8.8 primary, secondary, dichroic, & window
The names of the instrument les(Sec. 3.5) containing transmission/re ection data for the primary mirror,
secondary mirror, dichroic and detector window.
Example:
primary alumin.sptm # Primary mirror
secondary alumin.sptm # Decondary mirror
dichroic alumin.sptm # Dichroic
window window.sptm # Detector window
3.8.9 cathode
The name of the le containing photocathode quantum eôciency as a function of wavelength.
Example:
cathode cathode.sptm # Photocathode QE

XMM-Newton Science Simulator Page: 11
3.8.10 magni er
The name of the magni er. When a lter with this name is selected, OSIM simulates the action of the
magni er(Sec. 4.4).
Example:
magnifier magnifier # Magnifier name
3.8.11 area
The area of the telescope entrance in units of m 2 . This is the area of the primary mirror, less the area
obscurred by the secondary mirror, baes and secondary mirror supports.
Example:
area 0.064 # Area of aperture (m^2)
3.8.12 oa ratio
The Micro-Channel Plate has an e ective area which is less than its physical area.
This variable speci es the name of the le containing open area ratio as a function of wavelength.
Example:
oa_ratio oa_ratio.sptm # Open area ratio of MCP
3.8.13 cr ratio
The name of the le containing count rate ratio as a function of wavelength. The ratios speci ed in this
le may describe e.g. degradation of the instrument response whilst in orbit.
Example:
cr_ratio cr_ratio.sptm # Count rate ratio
3.8.14 focalLength
The overall focal length of the telescope, excluding the magni er.
Example:
focalLength 3.816 # Focal length (m)

XMM-Newton Science Simulator Page: 12
3.8.15 magni cation
The magni cation of the magni er(Sec. 4.4).
Example:
magnification 4.0 # Magnification factor
3.8.16 opticalFWHM
The FWHM of a Gaussian Point Spread Function(Sec. 4.5) describing the optical system. It is speci ed
as an angle in the sky subtended at the instrument.
Example:
opticalFWHM 0.68 # FWHM of optical PSF (arcsec)
3.8.17 detectorFWHM
The FWHM of a Gaussian Point Spread Function(Sec. 4.5) describing the detector (i.e. MCP `splash').
It is speci ed as a distance in the focal plane.
Example:
detectorFWHM 70.0E-6 # FWHM of MCP (m)
3.8.18 pixelSize
The size of a pixel (not a sub-pixel) measured in the focal plane. This is di erent to the physical size of
a CCD pixel since the bre-optic taper increases the e ective size measured in the focal plane.
Example:
pixelSize 74.0E-6 # CCD pixel size (m)
3.8.19 xpixels & ypixels
The number of CCD pixels (not sub-pixels) in the image X and Y directions. Note that the X and Y
directions are referred to as U and V, respectively, in the discussion on coordinate transformation(Sec. 4.1)
to avoid confusion with the spacecraft X and Y axes.
Example:
xpixels 256 # No. of pixels
ypixels 256 # No. of pixels

XMM-Newton Science Simulator Page: 13
3.8.20 spectra
A list of the spectral types for which spectral les(Sec. 3.4) are provided in the spectral directory. The
name of each le is the same as the spectral type with `.sptm' appended.
Every spectral type which will appear in the input le(Sec. 3.2) should be listed here.
Example:
spectra begin
b0 a0 f0 g0 g2 k0 m0 # Source spectral types
end
3.8.21 lambdaMin, lambdaMax & lambdaStep
Parameters de ning the range of wavelengths over which photon uxes should be integrated when calcu-
lating the count rate(Sec. 4.2).
This should be chosen such that the contribution to the count rate is negligible beyond this range.
However, the spectral les(Sec. 3.4) and instrument les(Sec. 3.5) (e.g. lters) must cover at least this
range.
The lambdaStep parameter de nes the step size to be used for the numerical integration.
Example:
lambdaMin 100.0 # Shortest wavelength (nm)
lambdaMax 1000.0 # Longest wavelength (nm)
lambdaStep 2.0 # Integration step (nm)
4 The Simulation
This section describes how the simulation is performed by OSIM.
4.1 Coordinate Transformation
The OSIM input le speci es the coordinates of each source as a right ascension and declination ô.
The attitude of the spacecraft is speci ed by the right ascension 0 and declination ô 0 of its -X axis and
the position angle  0 about this axis. The position angle is zero when the spacecraft Z axis is in the plane
containing the X axis and North (declination = +90) vector, and increases anticlockwise from North (i.e.
North-East-South-West).
The position angle should not be confused with the spacecraft roll angle, which is measured relative
to the Sun. The position angle remains constant throughtout an exposure, whilst the roll angle may
vary slightly. The Cosmic Simulator (CSIM) will derive the position angle from the roll angle using the
position of the Sun.

XMM-Newton Science Simulator Page: 14
This coordinate system is used for specifying the spacecraft attitude, instead of quaternions, because it
is easy to specify the right ascension and declination of the centre of the eld-of-view. However, it leads
to singularities when the declination is exactly 90 degrees.
The position of a star, with respect to the spacecraft -X axis can be expressed as follows:
sin  sin  = sin( 0 ) cos ô (1)
cos  sin  = cos ô 0 sin ô cos( 0 ) sin ô 0 cos ô (2)
where  is the angular separation of the spacecraft and star
and  is the position angle of the star w.r.t. the spacecraft -X axis
For small , the angular coordinates of the star, in the Y-Z plane, relative to the -X axis are:
y =  sin(  0 ) (3)
z =  cos(  0 ) (4)
where  is in radians.
The conversion to pixel coordinates (u; v) involves dividing by the angular size of a pixel and translating
so that required pixel is on the optical axis:
u = fy
s
+ b
N u
2 c (5)
v = fz
s
+ b
N v
2 c (6)
where N u is the number of pixels in the U direction
N v is the number of pixels in the V direction
f is the focal length
and s is the pixel spacing
For example, when N u and N v are both 128, the optical axis (x = 0; y = 0) passes through the centre of
pixel (64,64), where the pixels are numbered from 0 to N 1.
The focal length of the telescope is multiplied by the magni cation factor of the magni er, when this is
selected.
OSIM does not take into account the image inversion caused by the telescope, since it is rather arbitrary
which pixel is numbered zero.
The symbols used above, correspond to the following keywords in the input le(Sec. 3.2):
0 alpha
ô 0 delta
 0 pos
and the following keywords in the con guration le(Sec. 3.3):

XMM-Newton Science Simulator Page: 15
N u xpixels
N v ypixels
f focalLength
s pixelSize
4.2 Count rate calculation
The count rate is calculated by dividing the ux density, at wavelength , by the photon energy hc
 , to
give the photon ux. This is then integrated over the range of wavelengths min to max and multiplied
by the telescope entrance area to give the total count rate:
r = A
Z max
min
F ()T ()() 
hc
d (7)
where A is the entrance area of the telescope
 is the wavelength
F is the stellar Flux per unit wavelength
T is the transmission of the optical system
 is the photocathode quantum eôciency
h is Planck's constant
and c is the speed of light
The transmission T () is made up of the following components:
T () = T p ()T s ()T d ()T f ()Tw ()T a ()T c () (8)
where T p is the primary mirror re ectance
T s is the secondary mirror re ectance
T d is the dichroic re ectance
T f is the lter transmission
Tw is the detector window transmission
T a is the open area ratio of the MCP
and T c is the ratio between measured and expected count rates
Each source in the input le speci es a spectral type t and a magnitude V . OSIM has a set of tables,
giving the ux F 0 of standard spectral types for magnitude V=0.
The source ux density is calculated as follows:
F () = F 0 ()100 V
5 (9)
OSIM does not implement CCD readout frames or Poisson noise. Therefore, the total count is simply
the count rate r multiplied by the exposure time  :
c = r (10)

XMM-Newton Science Simulator Page: 16
Since the sources are regarded as point sources, this represents the number of counts at a single point in
the focal plane. The application of the Point Spread Function subsequently distributes this total number
of counts amongst a number of neighbouring pixels.
The symbols used above, correspond to the following keywords in the con guration le(Sec. 3.3):
S area
F 0 () spectral les
T p () primary
T s () secondary
T d () dichroic
Tw () window
T a () oa ratio
T c () cr ratio
() cathode
T f () lter les
 exposureTime
min lambdaMin
max lambdaMax
The source spectra are speci ed by tables giving the ux density, for various spectral types, as a function
of wavelength. Similarly, the transmission and re ection coeôcients of the optical components and
the photocathode quantum eôciency are tabulated as a function of wavelength. The con guration le
speci es the name of the les containing each of these tables.
Cubic-spline interpolation coeôcients are calculated for each of the tables. The integration is then
carried out numerically, by the trapezoidal method, using interpolated values for a sequence of closely-
spaced wavelengths. The integration step size is controlled by the following additional parameter in the
con guration le:
lambdaStep
The tables should cover at least the range lambdaMin to lambdaMax, otherwise extrapolation will take
place, leading to unreliable results (OSIM warns if this happens).
The wavelengths in the tables need not be equally spaced. More accurate interpolation will be achieved
if the wavelengths are closely spaced in regions where the response is varying sharply.
4.3 Background count rate
The sky background is calculated in a similar way to the source count rate, but using a uniform ux
density per unit solid angle, instead of ux densities of discrete sources.
The background is made up of two components, the zodiacal light and the di use galactic background.
Separate spectra can be speci ed for each of these (analogous to the source spectral types). In addition,
the zodiacal and di use background components have separate scaling factors.
The background count rate r b is given by:
r b = A
Z max
min
F b ()T ()d() 
hc
(11)

XMM-Newton Science Simulator Page: 17
where the background ux density F b is given by:
F b () = S(K z F z () +K g F g ()) (12)
where S is the solid angle subtended by a pixel in the sky
F z is the zodiacal ux per unit solid angle
F g is the di use galactic ux per unit solid angle
K z is a scaling factor for the zodiacal ux
and K g is a scaling factor for the di use galactic ux
The pixel solid angle S is:
S = ( s
f
) 2 (13)
where s is length of the side of a pixel
and f is the focal length
The focal length takes into account the magni er, if present.
The symbols used above, correspond to the following keywords in the input le(Sec. 3.2):
F z zodSpect
F g diffuseSpect
K z zodiacal
K g diffuse
As a temporary feature, it is also possible to specify an additional background component background,
in Hz=deg 2 .
4.4 Magni er
The con guration le speci es the name of a special lter, which is to be used as the magni er. For
example:
magnifier magnifier # Magnifier name
This magni er is selected when the con guration parameter filter is set to magnifier:
filter magnifier
OSIM then uses the le magnifier.sptm for the transmission coeôcients of the magni er and also
increases the e ective focal length of the telescope by the factor magnification, which is also speci ed
in the con guration le:
magnification 4.0 # Magnification factor

XMM-Newton Science Simulator Page: 18
4.5 Point Spread Function
The image is convolved with a Gaussian Point Spread Function (PSF) :
(u; v) = exp ( u 2 + v 2
2 2
) (14)
where  is related to the FWHM  as follows:
2 2 =  2
4 ln 2 (15)
The PSF is the convolution of the optical PSF, representing the optical abberations, and the detector
PSF, representing the MCP `splash'.
These are both assumed to be Gaussian, and can consequently be combined into a single Gaussian PSF
with FHWM given by:
 =
q
 2
o f 2 +  2
d (16)
where  o is the optical FWHM (in radians)
 d is the detector FWHM (in metres)
and f is the focal length
Note that the optical FWHM is speci ed as an angle, whereas the detector FWHM is speci ed as a
distance in the focal plane. The conversion from angles to distances involves the focal length of the
telescope and depends on whether the magni er is in place.
The symbols used above, correspond to the following keywords in the con guration le(Sec. 3.3), with
appropriate conversion of units:
 0 opticalFWHM
 d detectorFWHM
f focalLength
The convolution with the PSF does not use discrete convolution with a sampled PSF mask. This would
lead to each Gaussian peak being centered on a pixel. Subsequent centroiding (which may be implemented
as a future enhancement) would therefore nd each source exactly in the middle of a CCD pixel. It is
therefore important that convolution is implemented in such a way that it preserves the position of the
source within the pixel.
The total number of counts calculated for each source are spread over a number of neighbouring pixels
by the PSF.
When the PSF is very narrow (less than about 0.8 arcsec, or 0.2 arcsec with the magni er), it has no
e ect, since almost all the energy occurs in a single pixel.

XMM-Newton Science Simulator Page: 19
4.6 Image Generation
The image is generated as follows:
 An image array of xpixels by ypixels is created, with each pixel set to zero.
 Each source from the input le is processed in turn:
{ The source coordinates (ra and dec) are transformed(Sec. 4.1) into detector (pixel)
coordinates.
{ The Point Spread Function(Sec. 4.5) (PSF) is multiplied by the count rate(Sec. 4.2)
for the spectral type of the source.
{ The PSF is centered on the star position and sampled at the pixels positions.
{ The background(Sec. 4.3) count rate is added to each pixel.
{ Integer count values are derived by multiplying the count rate by the exposure time
and rounding to the nearest integer.
 The image is written to the output le.
CCD readout frames and Poisson noise are not implemented in this version of OSIM.
5 Limitations
 No warning is given if the sources le contains sources with unknown spectral types. These
sources are simply ignored.
 OSIM does not implement the star-tracker
 OSIM does not implement multiple windowing
6 Tips and Tricks
6.1 Simulating sub-pixels
OSIM currently does not implement centroiding, which would increase the image size from 256x256
pixels to 2048x2048 sub-pixels (or 1024 x 1024 twixels with detector binning).
However, it is possible to simulate sub-pixels partially, by reducing the parameter pixelSize by a factor
of four. The detectorFWHM should be reduced to a suitable value.
It is possible to increase xpixels and ypixels to 1024, although this will make OSIM much slower. It
is therefore better to just reduce the pixelSize and leave the image size as 256 x 256 (or 512 x 512),
representing an image window.
References