Skip to content

Scipy curve_fit fails after running for a long time #2

@jadball

Description

@jadball

Hello,

I'm trying to follow this process with our Pilatus 2M CdTe detector, but the curve fit doesn't seem to converge:

python3.7/site-packages/scipy/optimize/minpack.py in curve_fit(f, xdata, ydata, p0, sigma, absolute_sigma, check_finite, bounds, method, jac, **kwargs)
    787         cost = np.sum(infodict['fvec'] ** 2)
    788         if ier not in [1, 2, 3, 4]:
--> 789             raise RuntimeError("Optimal parameters not found: " + errmsg)
    790     else:
    791         # Rename maxfev (leastsq) to max_nfev (least_squares), if specified.

RuntimeError: Optimal parameters not found: Number of calls to function has reached maxfev = 21200.

I wanted to make sure I wasn't making any obvious mistakes? The only significant difference I can see is that we have many more rings at this distance and wavelength - the rings get pretty dim so are harder to pick up at the edges. Can provide raw scan data if needed. I've pushed to my fork - https://github.com/jadball/EigerPowderSpatial/ so you have the flts and parameters (I got the rough beam centres from the detector translation motors and then fitted the distances, tilts and beam centre with ImageD11).

The hkl2 histogram I get looks very different too:

image

Thanks,

James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions