pinhole - The pinhole program tabulates the photons, from a data stream (the binary pipe), which make it through the pinholes laid out in a rectangular grid and output the results in an rdb table format. The pinhole program also passes the photons which make through the pinholes to the binary pipe for further analysis.
The pinholes are laid out on an X-Y cartesian plane whose origin lies at the center of the plate. For example, A 7 by 5 and a 2 by 4 rectangular grid are shown below:
Y
^
|
|
o o o o o o o
|
|
|
|
o o o o o o o
|
|
|
|
---o---o---o---o---o---o---o---->
| X
|
|
|
o o o o o o o
|
|
|
|
o o o o o o o
|
|
A 7 x 5 Grid Layout.
Y
^
|
|
o o | o o
|
|
---------------|---------------->
| X
|
o o | o o
|
|
A 2 x 4 Grid Layout.
Each grid site contains a number pinholes of different diameter size. A photon with position ( x, y ) is said to be passed thourgh a circular pinhole if the following equation holds:
2 2 2
( x - x ) + ( y - y ) < r
o o i
where ( x , y ) is the center of the pinhole of radius r o o i
The output stream contains an additional data field named pinholeId which is a three dimensional array to label the pinhole which the photon passes through. The first two elements of the array denote the location of the grid where the photon passes through. For an odd number of grid points, the origin of the grid is taken to be center of the grid. For an even number of grid points, the origin is taken to be the lower right hand corner closest to the center of the grid. The third of three elements of photonId is the aperture which the photon passes through, but the value output is dependent on the flag dupphoton. If dupphoton=no then, the third element is the smallest aperture which the photon passes through. If dupphoton=yes, then a photon will be written to the output stream for every photon which passes the aperture.
A list of arbitrary length to indicate the diameter size (mm) of apertures.
If dupphoton=yes then the pinhole program will duplicate the photon to the output stream. If dupphoton=no then the photon is not to be duplicated for all the apertures at the grid points.
The input stream where the photons will be read from.
The number of sites along the X-direction.
The number of sites along the Y-direction.
The output stream.
The rdb pinhole Id file to correlate the pinholes id.
The name of the output file which contains the results of executing the program. The content of the file is an /rdb table which contains the number of photons which passes through each grid points and apertures.
The x-offset (mm) of grid from image center
The y-offset (mm) of grid from image center
The x-spacing (mm) of between site centers
The y-spacing (mm) of between site centers
The parameter must be set to yes or 1 if the photon input stream is sorted along the X-direction. This is necessary for `large' grid.
An integer between 0 and 4, inclusive, to denote the level of messages to be displayed.
If set to yes or 1 then print the version number then terminate.
See the parameter interface for a detailed explanations of this parameter. By setting mode=h the program will no longer querry the user for parameters.