Debugged simplified spectrum calculation.