Either rock fragments or long cores of rock are brought up from deep down the hole and temperatures are measured at depth.