sum). The rdb
summary file contains the determined beam center and max pinhole flux for each
of the various pinhole diameters which are used in the study.
b-c-simplex is a module which determines the center of a beam by
using the downhill simplex method. The ``function'' that b-c-simplex maximizes
is simply the amount of flux through a pinhole of given diameter. In essence,
b-c-simplex moves this pinhole around, following the flux gradient, until it
finds the location where the most rays are passing through. The particular
downhill simplex algorithm which is employed by this module is called MinimiseND
and is part of the Amoeba package. This simplex minimization is run once each
for a variety of different pinhole diameters. Unfortunately, the actual list of
diameters can only be modified by actually changing the source code.
b-c-simplex accepts a phot/dpde ray stream as input, and writes a
summary of the results in an rdb file, including the determined (x,y) center and
max pinhole flux for each pinhole diameter. As this module is a perl script, it
calls three other modules (projray, phot2bpipe, and pinhole), all of which must
have accessible parameter files in order for b-c-simplex to run properly.
A brief explanation of the MinimiseND function calls is in order.
MinimiseND takes five parameters, and all but one are set by the user through
the b-c-simplex parameter file. (The lone internalized parameter is the
minimization function itself, i.e., the pinhole scan). The user must input
an initial guess for the center (
xinit
and
yinit
), a characteristic
spacing
parameter (which determines how big the searching steps are), the
tolerance
(which determines to what accuracy the beam center must be located,
in terms of a percent change in pinhole flux between iterations), and the max
number of iterations (
max_iter
) to be allowed for the MinimiseND run. The
MinimiseND function returns the x,y coordinates of the determined beam center
and the scan function's maximum. One further note about MinimiseND: Although
b-c-simplex is concerned with flux maximization, MinimiseND is a minimization
function. This problem is corrected by simply minimizing the negative of the
pinhole flux.
A word or two should also be mentioned about the pinhole scan function.
Before any ``scanning'' is done, the rays are projected to the user-specified
axial location if the
project
option has been chosen. Then they are piped
through the pinhole module, with the number of x and y lattices both set to
one, and the xoffset and yoffset parameters set to whatever has been passed in
by the MinimseND parameters. (Note: These two parameters are the only
parameters of the scan function). Since the pinhole module writes the scan
results to a file, a parsing function must be called to read in the actual flux
value. Finally, the negative of this flux value is returned to MinimseND.