genphot - generate test rays
genphot parameters
genphot generates parallel rays from two dimensional geometric sources oriented in the X-Y plane. The rays share an arbitrary direction vector. The rays are written in bpipe format.
The shape of the filled area is specified with the geo parameter. The center of the area is specified by x and y; the area may be rotated, with rotation angle specified by phi.
The area may be filled with a grid of rays, or randomly (uniformly) filled. This is specified with the dist parameter. If random filling is used, the seed1, seed2, and block parameters must be specified. If grid filling is used, the nx and ny parameters must be specified.
The energy distribution of the rays may be specified with the
spectrum parameter. The bins must not overlap, all values of
counts must be non-negative, and the minimum energy for a bin must
always be less than the maximum energy. If spectrum is set to
``none'' or omitted, the energy of the ray is specified by the energy
keyword. The way that the spectrum is sampled is specified by the
energy_dist
parameter. Note that several of the options for the
latter will override the photdens
parameter.
genphot uses an IRAF-compatible parameter interface.
The destination for the output rays. If it is the string stdout
, it
writes to the standard output stream. It writes bpipe formatted
rays.
The geometric form that the rays may fill. See OUTPUT SHAPES for more information.
The ray pattern used to fill the geometric area.
It is one of
uniform
,
grid
.
See RAY DISTRIBUTION for more information.
The parameter regulates the number of rays output. For points, it is the number of rays. For one dimensional shapes, it is the number of rays/mm. For two dimensional shapes it is the number of rays/mm^2.
If the ray distribution (dist) is grid
, it is ignored.
The first random number seed. It can range from 1 to 2147483562, inclusive.
used only if dist is uniform
.
The second random number seed. It can range from 1 to 2147483398, inclusive.
used only if dist is uniform
.
The starting block in the random number stream. It can range from
0 to 1048575, inclusive. used only if dist is uniform
.
The X
coordinate of the center of the field to fill.
The Y
coordinate of the center of the field to fill.
The Z
coordinate of the rays.
The rotation angle of the field, in degrees.
The spherical coordinate elevation angle of photon direction in degrees
The spherical coordinate azimuthal angle of photon direction in degrees
The height of the rectangle. Used only if geo is rect-peri
or
rect-fill
.
The width of the rectangle. Used only if geo is rect-peri
or
rect-fill
.
The major axis of the ellipse. Used only if geo is ellipse-fill
.
The minor axis of the ellipse. Used only if geo is ellipse-fill
.
The radius of the circle. Used only if geo is circ-peri
.
The inner radius of the annulus. Used only if geo is annulus-fill
.
The outer radius of the annulus. Used only if geo is annulus-fill
.
The number of grid sites in the X
direction. Used only if dist is
grid
.
The number of grid sites in the Y direction. Used only if dist is
grid
.
A file containing the energy spectrum to sample, in RDB format. If it is
stdin
, the spectrum is read from the standard input stream.
The columns are emin (the minimum energy in the bin), emax (the
maximum energy in the bin), and counts (the number of counts within
the bin). If the spectrum is either not specified or is specified as
none
, the energy will be read from the parameter file.
How the spectrum specified by the spectrum keyword is sampled. It may be one of:
sample
Sample the spectrum according to the relative probability of the input bins. After a bin is selected, an energy is uniformly sampled from within the bin's limits.
picket
Sample the spectrum according to the relative probability of the input bins. The output energies are the minimum energies of the bins.
min
The energies will be the minimum energies of the bins. This option
also limits the number of photons output to be equal to the number of
bins. It thus overrides the photdens parameter. The only column
required in the RDB table is emin
.
max
The energies will be the maximum energies of the bins. This option
also limits the number of photons output to be equal to the number of
bins. It thus overrides the photdens parameter. The only column
required in the RDB table is emin
.
ave
The energies will be the averages of the bin limits. This option
also limits the number of photons output to be equal to the number of
bins. It thus overrides the photdens parameter. The only columns
required in the RDB table are emin
and emax
.
the energy to assign to the ray. used only if spectrum
is ``none'' or
not specified.
A list of debug flags. None are presently defined.
Print some documentation and exit.
Print the version and exit.
genphot can fill a variety of output shapes. This is controlled by the geo parameter, which can have the following values:
rect-peri
The perimeter of a rectangle. See the height and width parameters.
p=item rect-fill
A filled rectangle. See the height and width parameters.
ellipse-fill
A filled ellipse. See the maj and min parameters.
circ-peri
The perimeter of a circle. See the radius parameter.
annulus-fill
A filled annulus. See the ri and ro parameters.
point
A point. In this case, the photdens parameter specifies the number of photons to generate.
How the rays fill the desired output shape is controlled by the dist parameter.
It can have one of the following values:
uniform
Fill the space uniformly (randomly).
grid
Place rays on a grid. The nx and ny parameters control the grid spacing within the smallest rectangle which encloses the output shape. The actual number of rays output depends upon how much of the rectangular grid is within the output shape.
Copyright 2006 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
This documents version 1.1.2 of genphot.
Diab Jerius <djerius@cfa.harvard.edu>
Ivan Stern
David Grumm