A sample of a metal salt is heated in a flame. Energy transferred by heating causes some electrons in the metal atoms to occupy allowed orbits farther from their nuclei. The electrons remain in the atoms. A sensor detects visible radiation from the flame.
Explain the atomic changes that produce the radiation detected by the sensor.