Inversion using Euler deconvolution of the magnetic gradient tensor