For documentation please see http://www.maths.otago.ac.nz/~dbryant/software/phimanual.pdf