Spectrometer and spectrograph