Methods, sensors, and systems for determining a concentration of glucose in a medium of a living animal are disclosed. Determining the glucose concentration may involve emitting excitation light from a light source to indicator molecules, generating a raw signal indicative of the amount of light received by a photodetector, purifying and normalizing the raw signal, and converting the normalized signal to a glucose concentration. The purification may involve removing noise ( e.g ., offset and/or distortion) from the raw signal. The purification and normalization may involve tracking the cumulative emission time that the light source has emitted the excitation light and tracking the implant time that has elapsed since the optical sensor was implanted. The purification and normalization may involve measuring the temperature of the sensor. The purification, normalization, and conversion may involve using parameters determined during manufacturing, in vitro testing, and/or in vivo testing.