An apparatus comprises a storage medium, a recording head, a source of
electromagnetic radiation, and a control circuit for modulating the
source of electromagnetic radiation in response to a static deviation of
a spacing between the recording head and the storage medium. A method of
compensating a static deviation of a spacing between a recording head and
a storage medium performed by the apparatus, and a method of
precompensating for nonlinear transition shifts in a heat assisted
magnetic recording system, are also provided.