Patent ID: 7268864

Claim:
A method of measuring a concentration in a liquid using an optical sensor comprising: calibrating an Index of Refraction to a pixel number by generating at least one calibration curve of a known sample under test; acquiring raw data sets by reading out pixel data from an optical detector in the optical sensor in contact with the known sample under test; acquiring background data sets from the optical detector; acquiring air reference data sets from the optical detector; averaging the raw data sets, the background noise data sets, and the air reference data sets to form an averaged raw data set, an averaged background noise data set, and an averaged air reference data set; calculating at least one reflectivity data set; calculating a pixel number correlating to an Index of Refraction at which total internal reflection (TIR) occurs; converting the calculated pixel number to the Index of Refraction using the at least one calibration curve; calculating a temperature compensated Index of Refraction; and converting the temperature compensated Index of Refraction to a concentration for the known sample under test.