A system includes a magnetic device for writing to and reading from a
magnetic medium and a sensor disposed adjacent to the magnetic device and
proximate to the magnetic medium. The sensor generates signals related to
thermal variations in the sensor caused by changes in a distance between
the magnetic device and the magnetic medium.