Calibration training for spectrometer
An encoder spectrograph is used to analyze radiation from one or more samples in various configurations. The radiation is analyzed by spatially modulating the radiation after it has been dispersed by wavelength or imaged along a line. Dual encoder spectrographs may be used to encode radiation using a single modulator. A spectra sorting algorithm is used to determine calibration training spectra for a spectrometer in a spectrometer calibration training mode.
1. A method of determining calibration training spectra for a spectrometer, the method comprising:
analyzing a continuous stream of spectra acquired during a calibration training mode;
logging unique spectra to build calibration training spectra;
determining if a new spectrum is unique within the calibration training spectra by comparing the new spectrum to each spectrum of the existing calibration training spectra;
calculating a residual spectrum by subtracting the new spectrum from an existing calibration training spectrum;
calculating a residual score for the new spectrum for each spectrum of the existing calibration training spectra;
identifying a minimum calculated residual score from the calculated residual scores; and
identifying the spectrum of the calibration training spectra that is the closest match to the new spectrum by identifying the minimum calculated residual score.
2. The method of claim 1 , wherein determining if a new spectrum is unique comprises fitting the new spectrum to each of the calibration training spectra using an amplitude scaling parameter.
3. The method of claim 1 , wherein determining if a new spectrum is unique comprises fitting the new spectrum to each of the calibration training spectra using a power scaling parameter.
4. The method of claim 1 , wherein calculating a residual score for the new spectrum for each of the existing calibration training spectra comprises comparing an integrated absorbance of the residual spectrum to a user-defined threshold.
5. The method of claim 1 , wherein identifying a minimum score comprises sorting the calculated residual scores.
6. The method of claim 1 , further comprising:
responsive to determining the new spectrum is unique, adding the new spectrum to the calibration training spectra.
7. The method of claim 1 , further comprising:
responsive to determining the new spectrum is not unique, determining if the new spectrum corresponds to a higher amplitude version of an existing calibration training spectrum;
responsive to determining the new spectrum corresponds to a higher amplitude version of an existing calibration training spectrum, overwriting the corresponding existing calibration training spectrum with the new spectrum.
8. The method of claim 7 , further comprising:
retaining the new spectrum in the calibration training spectrum.
9. The method of claim 1 , wherein the continuous stream of spectra comprises selected portions of an entire spectrum measured by the spectrometer.