Inversion of temperature measurements in lake sediment