Photoproduction of pions and the ground state wavefunction of 16O