ph_survey2


NAME

ph_survey2 - much like ph_survey, it runs beam-center on the same input ray stream for a variety of different pinhole parameters, but also repeats each run a number of times with different random initial coordinates.


PARAMETERS

ph_survey2 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 files in which the ph_survey2 results will be written. (Actually, the filenames will be tag _res and tag _res2, the second file being a summary of the first). The rdb _res file will contain the determined beam center and required number of iterations for each beam-center run which ph_survey2 performs, and the _res2 file will contain the average center for all of the runs of a given parameter combination, along with a (radial) rms spread value and the average required number of iterations in beam-center.

xinit real
This is the x-coordinate of the location where the user wishes the ph_survey2 program to start, i.e., in all of the beam-center runs made using the first (and largest) pinhole diameter, the pinholes will be centered around this x-value. For other pinhole diameters, the pinholes will be centered at the beam's center as determined by the set of runs immediately preceding it.

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

photdens real
This is merely a ``database parameter'', i.e., one that is not necessary for the ph_survey2 module itself, but which provides information about the input rays which could be useful in the database. For instance, by specifying the photon density explicitly, the same ph_survey2 run can be performed on ray streams which only differ in photon density, and the database can thus keep records on both runs, and distinguish between them (rather than simply erasing the old data). The photon density should be provided in counts per square millimeter, for clarity.

shell integer
This is another ``database parameter'', which specifies which shell the incoming rays were reflected from. (Please see photdens for my ``definition'' of a ``database parameter'').

numrand integer
This parameter tells ph_survey2 how many different "random initial coordinate" runs it should make for each parameter combination, in order to accurately and efficently determine the center of the beam.

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 in the beam-center module.

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

.


DESCRIPTION

Like ph_survey, ph_survey2 is a module which allows the user to run the beam-center procedure on the same input ray stream with many different combinations of pinhole parameters. Both modules vary the number of pinholes used, and their diameter and spacing, using a nested ``for loop'' to run beam-center on every possible combination of these three parameters. The major difference between ph_survey and ph_survey2 is that for each of these parameter combinations, where ph_survey only performs one beam-center run, ph_survey2 makes multiple calls to beam-center, each time with a different, randomly generated initial (x,y) coordinate for the pinhole scans to be centered about. The coordinate is chosen within one pinhole radius of the presumed center, and is equally likely to be anywhere within this range.

The other major difference between ph_survey and ph_survey2 is that two result file databases are generated in the latter's case instead of just one. One of the databases is very similar to that of ph_survey, as it contains the determined beam-center and required iterations for each call to beam-center, along with the ``diameter, spacing, number'' parameter combination, and the specifics of the input ray stream (photon density and shell number). In addition, it includes the initial random coordinates and the run number for that particular parameter combination. The second database is basically a summary of the first database, and gives a summary of the overall results for each parameter combination, including: the average (x,y) center, the average number of iterations which beam-center took to locate the centers, and the rms of the determined centers (in radial units). Note that, like ph_survey, ph_survey2 accepts only photons of phot/dpde format.

The only module that ph_survey2 calls is beam-center, so this is the only procedure which must have an accessible parameter file in order for ph_survey2 to run properly. Note that beam-center has many internal parameters which are not set through ph_survey2, and which must be set by the user directly, in accordance with preference. These parameters include quickscan, rms_error, xtol, ytol, simultol, max_iter, project, z, ringfract, tma_defaults, focus, rho_f, radius, and delete_output. Not all of these parameters are essential for the running of ph_survey2. For example, the rho_f parameter is only used if the user wants the beam-center procedures to be run with project equal to ``ring''.

As mentioned before, ph_survey2 is basically just a script which calls beam-center many times using many different parameter combinations. It is fairly easy for the user to modify these parameter sets (the pinhole diameter, spacing, and number) which are looped over by ph_survey2, although this is not able to be done via the parameter file. The user must actually alter the three lines in the source code which provide these lists. After ph_survey2 calls beam-center each time, it reads in the determined center from the actual summary file generated by beam-center, and then updates the rdb-formatted results files. The databases are updated in the following manner: First, each is checked to determine if there is already an entry with the same input parameters, and if so, that old entry is deleted. Then the results from the most recent beam-center run are written to these results files.

One final note should be made about the ph_survey2 procedure. Although the pinholes are initially centered around the user-specified initial x and y coordinates (in those beam-center runs which use the first and largest diameter), a quite different center is used for the other beam-center runs. The situation is as follows: Ideally, we want to adjust the presumed center so that it represents the most accurate guess so far. This adjustment is performed each time the pinhole diameter is changed in the outer loop. Since the direction of pinhole size is from larger to smaller size, this means that typically the presumed center becomes more and more accurate as the survey continues. From empirical observation, it appears that the most accurate centers are determined from the parameter combination of 7 pinholes and 1/2 spacing. Hence the determined center from this run is saved and used as the center for all of those subsequent runs which use the next smallest pinhole diameter.


AUTHOR

C.C. Carpenter