The use of pulsed gradients to define a volume of interest for localized magnetic resonance spectroscopy produces magnetic field perturbations which distort both the free induction decay and the spectrum after Fourier transformation. A technique is presented that removes the artifacts from eddy currents from a sampled free induction decay. To linearize the phase, the nonlinear phase of a reference free induction decay is subtracted from the phase of a sample free induction decay. Next, to move the frequency to resonance and perform a zero-order phase correction, the line fit from a linear regression is subtracted from the phase. After reconstructing the free induction decay, the resulting frequency spectra are sorted into absorption mode and dispersion mode components.