b-c-simplex


NAME

b-c-simplex - determine the center of a beam using the downhill simplex method.


PARAMETERS

b-c-simplex uses the standard parameter interface

input filename
This is simply the input file/stream name, i.e., where the rays are coming from.

tag filename
The tag parameter gives the name of the rdb file in which the b-c-simplex results will be written. (Actually, the filename is tag .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.

spacing real
This parameter is a direct input parameter to the MinimseNd function which is the actual simplex function in b-c-simplex. It is a size-scale parameter which dictates the initial shifting amount (searching radius) for the simplex polygon. It must be given in mm.

tolerance real
This is another direct parameter to the MinimiseND function, and presumably represents the fractional change in flux counts which must be reached between iterations in the simplex minimization.

max_iter integer
This parameter sets the maximum number of iterations for the MinimiseND downhill simplex algorithm.

xinit real
This is the x-coordinate of the location where the user wishes the simplex minimization to start, i.e., the user's best guess as to where the x-coordinate of the beam center might be.

yinit real
Same as xinit, except in reference to the y-coordinate.

project boolean
If set to yes, then the user can project the rays to a certain z value, effectively running the simplex method at that axial location

z real
If project=yes, then this parameter dictates to what z value the rays should be projected.

version boolean
If set to yes, simply print the version and die.

debug string
This parameter gives the user the option of setting various debug flags. As of now, there are no particular debug options in b-c-simplex.

mode string
This specifies which parameter mode b-c-simplex is to be run in. As of now, the only mode is ``a'' mode.

.


DESCRIPTION

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.


AUTHOR

C.C. Carpenter