change behavior in photon database to commit only every 100
modified the PointSource class to correctly sample the theta distribution