Timegate launch spectrometer for real time and online monitoring