TIR Corner Cube Simulation Code

The programs below have extension .pyprog. Once saved to your machine, rename to .py

You will also need to create a directory called Images in the same directory as the ccr.py and ccr_tools.py files.

This code is for simulating the polarization states and diffraction patterns for corner cube prisms employing total internal reflection. The code accompanies a paper to be published in 2012 as a working manifestation of the mathematical treatement therein.

The code has extensive commenting inside, including instructions on command line arguments to affect the case being run. Running ccr.py with no command line arguments generates a list of optional input parameters. Any number of these may be supplied, in consecutive order.

The code makes use of several Python modules: numpy, matplotlib, Python Imaging Library (PIL), and pyfits. We ran ours on Python 2.5.4, with the following module versions, though we do not believe the code to be terribly sensitive to version specifics:

We offer no support of this product. It is provided as a courtesy, and we hope others are able to run the code successfully or at least use it to verify or clarify the mathematical model described in the paper. Extensive comments in the code should help the user select appropriate options and configure to suit needs.

The underlying mathematics were developed by Murphy and Goodrow, while the coding is largely contributed by Goodrow.