Wavelength Discrimination For Spectroscopy And Spectral Imaging Using A Phased Array