Compensating for effects of temperature changes other than those to be measured