Patent Document ID: 10152519
Application ID: 15060260
Patent Status: 1

Claim One:
1. A method for identifying one or more substances in a sample, the method comprising performing, by a computer system: shining a light beam on the sample; measuring a sample spectrum of the sample by detecting light transmitted or reflected by the sample using a detector, the sample spectrum having an intensity value for each of a plurality of wavelengths; for each of a plurality of reference substances: retrieving, from a database, a reference spectrum for the respective reference substance, the reference spectrum having intensity values for the plurality of wavelengths; initially selecting one or more correction values for one or more correction parameters to be applied to at least one of the sample spectrum and the reference spectrum, the one or more correction parameters corresponding to at least one of a clipping correction, a horizontal shift correction, a vertical offset correction, or a baseline correction; for each of a plurality of iterations: applying the one or more correction values for the one or more correction parameters to at least one of the sample spectrum and the reference spectrum; computing a similarity score between the sample spectrum and the reference spectrum resulting from application of the one or more correction values, the similarity score determined using differences between the intensity values of the reference spectrum and corresponding intensity values of the sample spectrum; determining whether the similarity score satisfies one or more convergence criteria; upon determining that the similarity score satisfies the one or more convergence criteria, identifying the similarity score as an optimized similarity score corresponding to one or more optimized values of the one or more correction parameters; and upon determining that the similarity score does not satisfy the one or more convergence criteria, updating the one or more correction values for use in performing another iteration until the similarity score satisfies the one or more convergence criteria; and comparing the optimized similarity score to a threshold to determine whether the sample contains the reference substance; and outputting data about one or more of the plurality of reference substances that have optimized similarity scores that are above the threshold.