I fitted an Fe3+ epr spectrum using esfit. (I used the 'scale& quad.baseline lsq2' in the scaling to get a proper fit for the baseline.)
And the fit looks really good.
I took the optimised 'function parameters' after the fit, to stimulate the epr spectra using pepper. But the baseline of the simulated spectra doesn't look good.
The baseline fitted by esfit is not included in the spin system parameters. You would need to do a separate baseline fit (again) after you complete the esfit fitting. For this, have a look at EasySpin's basecorr. In contrast to MATLAB's detrend, it returns the corrected spectrum as well as the fitted baseline. You also get better control when dealing with a matrix of data.