The photoionization and dissociative photoionization of H2, HD, and D2