Measurement of temperature is based on