Measuring light absorbance through sample