Applying A/D calibration equations in python