vectorize fid wavelength index function