baff A program for computing the location and size of baffles within a length of tubing. Given a length of tubing with entry and exit apertures (e.g. the last lens and the image surface), compute the location and size of baffles that will put the entire tube wall in the shadow of one of the openings. The basic premise is similar to that given in Rutten and van Venrooij ("Telescope Optics -- Evaluation and Design", Willman-Bell, Inc., 1988) chapter 19.2. However, the starting point for this algorithm is the reflectance point for the extreme rays from the openings. Baffle locations on either side of that are computed iteratively. Within the algorithm, allowance is made for baffle aperture tolerances and some shadow overlap. The baffle opening tolerances are expressed in terms -0,+tolerance; the aperture is not allowed to be smaller, but may be as larger by the tolerance. The original algorithm seems to depict that the the shadows just touch at the tube wall. This may provide minimal coverage, but does not allow for errors. This modified algorithm allows the shadows to overlap by a given amount, allowing some tolerance on the positioning of the baffles within the tube. This program is written to be executed in a Unix/Linux environment. However, modification, specifically with respect to input arguments, is possible. The invocation is: baff [options] where the options are: -d tube_diam The interior diameter of the tube. -l tube_leng The separation of the entry and exit apertures. Any sagittas should be subtracted out. -e entry_semidiameter The semidiameter of the entry aperture. -x exit_radius The semidiameter of the exit aperture. -s shadow_overlap The amount of overlap of the shadows from the entry and exit apertures. -b baffle_tolerance The tolerance allowed for the baffle aperture semidiameter. All dimensional inputs are floating point numbers. Dimensions here are irrelevant, but must be consistently used. The output is a simple table of the baffle separations, positions, and semidiameters, proceeding from the entry to the exit. In addition, the amount of extra shadow from the first and last baffles is given. This is the amount that the first or last shadow would extend beyond the end of the tube.