Scipy curve_fit and AIC/BIC Metrics

Hello,

I’m applying some models with MRI data. I’m implementing scipy’s curve_fit function, and I’m curious how I can obtain the AIC/BIC info (i.e., log likelihood)?

def func:
   ....model...

vcurve = np.vectorize(func, excluded=set([1]))
popt, pcov = curve_fit(vcurve,
                               y,
                               x,
                               p0=[init_params])

Many thanks,

Tom