In-situ spectrometers