saotrace.raygen.sources - standard raygen sources
require( 'saotrace.raygen.sources.point' )
raygen specification for a single point source. The point source may have a single energy, multiple energies, a flat spectrum, or a spectrum in a file.
There are two things that really must be specified: the output spectrum and the source position.
This source can handle several different types of spectra. This is all done by setting up a single variable, energy.
Set energy equal to the energy [keV] and the variable `flux' to the flux [photons/s/cm^2]
energy = 1.49
Set energy equal to a table of energies [keV] and the variable `flux' to the flux [photons/s/cm^2].
energy = { 1.49, 4.51 }
Set energy equal to a table of tables, where each subtable contains the energy [keV] and flux [photons/s/cm^2]. e.g.
energy = { {1.49, 0.5}, {4.51, 1.25} }
Set energy equal to a table, with a named element, picket, which is itself a table with the following keys:
- file : name of RDB table - energy : column which contains energy, in keV - flux : column which contains flux
the latter default to 'energy' and 'flux'. if flux is set to the string 'NONE', then all energies will have a flux of 1
energy = { picket = { file = 'foo.rdb' } }
Set energy to a table, with a named element, flat, which is itself a
table with the minimum and maximum energies [keV], and the flux
[photons/s/cm^2] (just like the raygen flat()
generator). For
example,
energy = { flat = { 1.49, 5.0, 0.75 } }
The flux is optional and defaults to 1 photon/s/cm^2.
Set energy to a table, with a named element, specfile, which is itself a table with the following keys:
- file - format - emincol - emaxcol - fluxcol - units - scale
These have the same meaning as the arguments to the raygen provided
spectrum()
function. The file key must be provided. For example,
energy = { specfile = { file = 'foo.rdb' } }
You may combine all of the table based options:
energy = { 1.49 ; specfile = { ... }, flat = { 1.59, 5.0 } }
The different spectra are added together.
The axial distance to the source is given by the variable `z', where z is 0 at CAP datum A, and z increases from the source to the focal plane. If z is not specified, it is -Infinity. Note that the zero point is *not* at the telescope node. This is an issue only if the source is *really* close to the telescope.
The focal plane position of the source may be specified in one of several coordinate systems. The coordinate system is specified via the `coord' variable, which may have one of the following values:
The native raygen polar coordinate system. This is the default. Set the following variables:
theta - off axis angle in arcminutes phi - azimuthal angle in degrees
OSAC elevation and azimuth. Set the following variables:
el - elevation in arcminutes az - azimuth in arcminutes
Mirror Spherical Coordinates. This is the on-orbit polar coordinate system. This makes an assumption about the relative orientations of the MSC and OSAC coordinate systems. Set the following variables:
theta - off axis angle in arcminutes phi - azimuthal angle in degrees
orbit offset pointing. This also makes assumptions about the relative orientations of the orbit HRMA and OSAC coordinate systems. See the POG for more information on offset pointing. Specify the following variables:
yoff - Y offset in arcminutes zoff - Z offset in arcminutes
Diab Jerius, <djerius@cfa.harvard.edu>
Copyright (C) 2011 by the Smithsonian Astrophysical Observatory
This software is released under the GNU General Public License. You may find a copy at http://www.fsf.org/copyleft/gpl.html.