DispersionFit.fit(num_poles=3, num_tries=100, tolerance_rms=0.0, plot=True, globalopt=True, bound=inf)

Fits data a number of times and returns best results.

  • num_poles (int, optional) – Number of poles in model.

  • num_tries (int, optional) – Number of optimizations to run with different initial guess.

  • tolerance_rms (float, optional) – RMS error below which the fit is successful and result is returned.

  • plot (bool, optional) – Plot the results at the end.

  • globalopt (bool, optional) – Perform global optimization (if False, does local optimization).

  • bound (float, optional) – Free parameters are bound between [-bound, +bound].


(coeffs, rms_error) optimization result array and RMS error.

Return type