_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.
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.