Edited loop in photon_gen.c to use NPHOT, see #114