Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use scipy for this. Here is an outline of some code that I have used before.

from scipy import optimize

def err(params,F):
    ...
    return result

optimize.leastsq(err,[parameter names],args=(...))

You can use scipy for this. See https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize.

Here is an outline of some code that I have used before.code.

from scipy import optimize

def err(params,F):
    ...
    return result

optimize.leastsq(err,[parameter names],args=(...))
optimize.minimize(err,[initial values],args=(...))