e2q function

Convert energy-based quantities into photon-based quantities.