Spectrum max value as variable