This script calculates the baffle positions in a telescope tube according to the algorithm given in Rutten & van Venrooij' book "Telescope Optics Evaluation and Design" (Willmann-Bell pub.).
The telescope tube is modelled as a cylinder with a given Inner Diameter (ID) and Length, with a cap on each end. Each cap has an opening (or aperture) of a given diameter centered in it. The purpose of the baffles is to keep stray light entering the tube from the first end (entry), scattering off the tube wall, and leaving the tube at the other end (exit). The baffles cannot, however, are not allowed cut through the direct light path from the entry opening to the exit opening, or light used to form the final image may be lost.
Actually making and installing the baffles is often another question. To allow for slop, a hole tolerance is provided in this modified algorithm. This tolerance is defined so that the holes may be made larger than the design, but not smaller. An overlap allowance is also provided. This overlap allowance provides a certain percentage of double coverage on the portion of the tube wall between two adjacent baffles. This allows the positioning of the baffles along the tube to also be a little forgiving.
Finally, for those who want to absolutely minimize the number of baffles, an offset parameter is provided. This parameter slides the baffles up or down the tube.
After selecting the input values, hitting the Calculate button provides the results. Each baffle is numbered and provided with a position in the tube and the minimum hole diameter. The positions of the baffles start with zero at the entry point of the tube. The maximum reflectance point position is also given. At each end of the tube, the last baffle typically protects more of the tube wall than is remaining. The amount of overage is given.
The output provides for up to 11 baffles to be displayed at a time. If there are more than 11 baffles, use of the ">>" button will display the last baffle currently given and the next ten. The "<<" button returns to the previous display.
I have unabashedly copied the GUI structure from the Vacuum Pan Calculator of Matt Considine. I much appreciate his efforts before me.