def read_temp(self):
    self.write(self._ctrl_meas, bytes([(((self.sampling << 5) | (self.sampling << 2)) | 1)]), 1)
    time.sleep(self.measure_delay)
    d = self.read(self._temp, 3)
    (msb, lsb, xlsb) = d
    raw_t = ((((msb << 16) | (lsb << 8)) | xlsb) >> 4)
    var1 = (((raw_t / 16384.0) - (self.T1 / 1024.0)) * float(self.T2))
    var2 = ((((raw_t / 131072.0) - (self.T1 / 8192.0)) * ((raw_t / 131072.0) - (self.T1 / 8192.0))) * self.T3)
    self.t_fine = (var1 + var2)
    t = ((var1 + var2) / 5120.0)
    return t
def read_temp(self):
    self.write(self._ctrl_meas, bytes([(((self.sampling << 5) | (self.sampling << 2)) | 1)]), 1)
    time.sleep(self.measure_delay)
    d = self.read(self._temp, 3)
    (msb, lsb, xlsb) = d
    raw_t = ((((msb << 16) | (lsb << 8)) | xlsb) >> 4)
    var1 = (((raw_t / 16384.0) - (self.T1 / 1024.0)) * float(self.T2))
    var2 = ((((raw_t / 131072.0) - (self.T1 / 8192.0)) * ((raw_t / 131072.0) - (self.T1 / 8192.0))) * self.T3)
    self.t_fine = (var1 + var2)
    t = ((var1 + var2) / 5120.0)
    return t