The invention provides a method for magnetic imaging of an object. The
method comprises monitoring a magnetic field of sources in the object at
a plurality of magnetic detectors to obtain a corresponding plurality of
sensor outputs, monitoring a position of the object while monitoring the
magnetic field of the sources, modeling the magnetic field of the sources
in the object as a gradient of a scalar potential, the scalar potential
comprising a sum of spherical harmonic functions each multiplied by a
corresponding coefficient, and, compensating for the position of the
object by applying a transformation to the plurality of sensor outputs,
the transformation including, at least in part, a spherical harmonic
translation transformation.