photon purity plotting fixes