[Last Change: 15 Feb 2012 (rev 15)]
SAOTrace
Chandra Source definitions
SAOTrace
can simultaneously simulate multiple sources, so it is possible to simulate very complex source fields in a single raytrace run. There is a lot of flexibility in how sources are defined; to accomodate this, sources are defined using the
Lua
scripting language.
Note: For
single point sources you don't need to know much Lua
at all.
What's documented here is the
simplified SAOTrace
interface to its source generating capabilities. There's another, more complex one interface which is usually hidden, but sometimes is used (e.g. in the
load_sources
function )
What is a source?
As far as
SAOTrace
is concerned, a source is composed of
- A two dimensional physical extent
- A position
- A spectrum
For
Chandra simulations, a source is defined by calling a function specific to the type of physical extent (e.g.
point()
) and passing it arguments which specify the position and spectrum. For example, here's a script creating a point source located 10' off-axis with an azimuth of 22° and a monochromatic energy of 1.49 keV:
point{ position = { theta = 10, phi = 22 },
spectrum = 1.49
}
Parameters which define physical quantities (such as
theta
and
phi
) typically require units, but some functions will assume default units. To express physical quantities with units, see
here.
Here's documentation on the three components of sources:
- The following source extents are available:
- How to specify a source's position
- How to specify a source's spectrum