function oparams = fitfun(f,eps,params0)
    oparams = fminsearch(@errorfun,params0);
    function error = errorfun(params)
        error = sum(abs(eps-lorentzian(f,params)).^2);
    end
end