Photon production by Onset of Magnetic field