change the calculation of the wavelength for a spectrum