Refs #8385 Refactor code to sum spectra.