How to return the index of refraction at a specific wavelength