Python temperature refinement