What changes occur within atoms that result in the production of EM waves