fix annoying index problem (len=1025) in calc wavelength