Python code for creating and using linear-regression based calibration curve