Function that takes array, distance and wavelength