PhoSim Tutorial 1: How to Get and Download PhoSim

Getting the Code

To obtain the PhoSim package, download a tarball from These are the stable versions. Generally, choose the most recent one. The major releases (twice a year) are labelled vX.Y and the intermediate patches and bug fixes are labelled vX.Y.Z. Unpack the tarball in the usual manner, e.g. 

tar xzf  v-X.Y.Z.tar.gz

[Alternatively, you can download the entire git tree and use git commands as normal (only recommended if you are familiar with git). The master branch is configured to be the most recent stable version (git checkout master) of the major releases. To get a particular version, you can use git checkout vX.Y.Z. You will want to use git pull and git pull --tags routinely. Generally, the revisions between the tags are not stable or tested, so it is probably simpler just to stick to the method above, but if you are very comfortable with git, this is an option.]

Installing PhoSim

PhoSim can be installed on virtually any operating system. It is routinely tested on both Mac OS (BSD Linux) and many different Linux installations. It can even be installed on Windows systems via CygWin. Given the large user base and its lightweight design philosophy, PhoSim should be able to work on any system with minimal effort. Please file a ticket, if there is any problem.

Once the directory hierarchy is in place, the package is installed via:


The configure script provides an option of installing cfitsio and fftw. This is the recommended option.  Alternatively, you can provide paths to existing installations for PhoSim to point to a specific installation.  Additionally, you may need to install tkinter in order for the GUI to function, but the GUI is optional and not required.

Then to compile, PhoSim simply do:


Generally, there should be minimal warnings and a successful compilation with the message "The Photon Simulator has been compiled successfully!". PhoSim does require a somewhat recent c++ compiler that has support for c++14 (usually e.g. g++ > 5.0). At runtime PhoSim will also require python >= 2.6 for the multiprocessing module.

If your installation is successful, please proceed to another tutorial to begin using PhoSim!