The sequence:
fit_something = fitting.LevMarLSQFitter()
fitted = fit_something(initial_guess_and_model,x,y,acc=accuracy,maxiter=maximumum_iterations)
will provide a fitted model, and in the dictionary “fit_info” there will be a lot of interesting information.
But I do not seem to find a simple way to answer the question: was convergence reached?
This would be answered by the returned paramters of scipy.optimize.leasts, namely:
ier
mesg
(this function seems to be called internally by astropy.modeling.fitting.LevMarLSQFitter
if I understand well)
How could I get this information?