Lmfit Py Versions Save

Non-Linear Least Squares Minimization, with flexible Parameter settings, based on scipy.optimize, and with many additional classes and methods for curve fitting.

1.0.2

3 years ago

Version 1.0.2 officially supports Python 3.9 and has dropped support for Python 3.5. The minimum version of the following dependencies were updated: asteval>=0.9.21, numpy>=1.18, and scipy>=1.3.

New features:

  • added two-dimensional Gaussian lineshape and model (PR #642; @mpmdean)
  • all built-in models are now registered in lmfit.models.lmfit_models; new Model class attribute valid_forms (PR #663; @rayosborn)
  • added a SineModel (PR #676; @lneuhaus)
  • add the run_mcmc_kwargs argument to Minimizer.emcee to pass to the emcee.EnsembleSampler.run_mcmc function (PR #694; @rbnvrw)

Bug fixes:

  • ModelResult.eval_uncertainty should use provided Parameters (PR #646)
  • center in lognormal model can be negative (Issue #644, PR #645; @YoshieraHuang)
  • restore best-fit values after calculation of covariance matrix (Issue #655, PR #657)
  • add helper-function not_zero to prevent ZeroDivisionError in lineshapes and use in exponential lineshape (Issue #631, PR #664; @s-weigand)
  • save last_internal_values and use to restore internal values if fit is aborted (PR #667)
  • dumping a fit using the lbfgsb method now works, convert bytes to string if needed (Issue #677, PR #678; @leonfoks)
  • fix use of callable Jacobian for scalar methods (PR #681; @mstimberg)
  • preserve float/int types when encoding for JSON (PR #696; @jedzill4)
  • better support for saving/loading of ExpressionModels and assure that init_params and init_fit are set when loading a ModelResult (PR #706)

Various:

  • update minimum dependencies (PRs #688, #693)
  • improvements in coding style, docstrings, CI, and test coverage (PRs #647, #649, #650, #653, #654; #685, #668, #689)
  • fix typo in Oscillator (PR #658; @flothesof)
  • add example using SymPy (PR #662)
  • allow better custom pool for emcee() (Issue #666, PR #667)
  • update NIST Strd reference functions and tests (PR #670)
  • make building of documentation cross-platform (PR #673; @s-weigand)
  • relax module name check in test_check_ast_errors for Python 3.9 (Issue #674, PR #675; @mwhudson)
  • fix/update layout of documentation, now uses the sphinx13 theme (PR #687)
  • fixed DeprecationWarnings reported by NumPy v1.2.0 (PR #699)
  • increase value of tiny and check for it in bounded parameters to avoid "parameter not moving from initial value" (Issue #700, PR #701)
  • add max_nfev to basinhopping and brute (now supported everywhere in lmfit) and set to more uniform default values (PR #701)
  • use Azure Pipelines for CI, drop Travis (PRs #696 and #702)

1.0.1

4 years ago

Version 1.0.1 Release Notes

Version 1.0.1 is the last release that supports Python 3.5. All newer version will require 3.6+ so that we can use formatting-strings and rely on dictionaries being ordered.

New features:

  • added thermal distribution model and lineshape (PR #620; @mpmdean)
  • introduced a new argument max_nfev to uniformly specify the maximum number of function evalutions (PR #610) Please note: all other arguments (e.g., maxfev, maxiter, ...) will no longer be passed to the underlying solver. A warning will be emitted stating that one should use max_nfev.
  • the attribute call_kws was added to the MinimizerResult class and contains the keyword arguments that are supplied to the solver in SciPy.

Bug fixes:

  • fixes to the load and __setstate__ methods of the Parameter class
  • fixed failure of ModelResult.dump() due to missing attributes (Issue #611, PR #623; @mpmdean)
  • guess_from_peak function now also works correctly with decreasing x-values or when using pandas (PRs #627 and #629; @mpmdean)
  • the Parameter.set() method now correctly first updates the boundaries and then the value (Issue #636, PR #637; @arunpersaud)

Various:

  • fixed typo for the use of expressions in the documentation (Issue #610; @jkrogager)
  • removal of PY2-compatibility and unused code and improved test coverage (PRs #619, #631, and #633)
  • removed deprecated isParameter function and automatic conversion of an uncertainties object (PR #626)
  • inaccurate FWHM calculations were removed from built-in models, others labeled as estimates (Issue #616 and PR #630)
  • corrected spelling mistake for the Doniach lineshape and model (Issue #634; @rayosborn)
  • removed unsupported/untested code for IPython notebooks in lmfit/ui/*

1.0.0

4 years ago

Version 1.0.0 supports Python 3.5, 3.6, 3.7, and 3.8

New features:

  • no new features are introduced in 1.0.0.

Improvements:

  • support for Python 2 and use of the six package are removed. (PR #612)

Various:

  • documentation updates to clarify the use of emcee. (PR #614)

0.9.15

4 years ago

Version 0.9.15 is the last release that supports Python 2.7; it now also fully suports Python 3.8.

New features, improvements, and bug fixes:

  • move application of parameter bounds to setter instead of getter (PR #587)
  • add support for non-array Jacobian types in least_squares (Issue #588, @ezwelty in PR #589)
  • add more information (i.e., acor and acceptance_fraction) about emcee fit (@j-zimmermann in PR #593)
  • "name" is now a required positional argument for Parameter class, update the magic methods (PR #595)
  • fix nvars count and bound handling in confidence interval calculations (Issue #597, PR #598)
  • support Python 3.8; requires asteval >= 0.9.16 (PR #599)
  • only support emcee version 3 (i.e., no PTSampler anymore) (PR #600)
  • fix and refactor prob_func in confidence interval calculations (PR #604)
  • fix adding Parameters with custom user-defined symbols (Issue #607, PR #608; thanks to @gbouvignies for the report)

Various:

  • bump requirements to LTS version of SciPy/ NumPy and code clean-up (PR #591)
  • documentation updates (PR #596, and others)
  • improve test coverage and Travis CI updates (PR #595, and others)
  • update pre-commit hooks and configuration in setup.cfg

To-be deprecated:

  • function Parameter.isParameter and conversion from uncertainties.core.Variable to value in _getval (PR #595)

0.9.15rc1

4 years ago

version 0.9.15rc1

Version 0.9.15 is the last release that supports Python 2.7; it now also fully supports Python 3.8.

New features, improvements, and bug fixes:

  • move application of parameter bounds to setter instead of getter (PR #587)
  • add support for non-array Jacobian types in least_squares (Issue #588, @ezwelty in PR #589)
  • add more information (i.e., acor and acceptance_fraction) about emcee fit (@j-zimmermann in PR #593)
  • "name" is now a required positional argument for Parameter class, update the magic methods (PR #595)
  • fix nvars count and bound handling in confidence interval calculations (Issue #597, PR #598)
  • support Python 3.8; requires asteval >= 0.9.16 (PR #599)
  • only support emcee version 3 (i.e., no PTSampler anymore) (PR #600)
  • fix and refactor prob_bunc in confidence interval calculations (PR #604)
  • fix adding Parameters with custom user-defined symbols (Issue #607, PR #608; thanks to @gbouvignies for the report)

Various:

  • bump requirements to LTS version of SciPy/ NumPy and code clean-up (PR #591)
  • documentation updates (PR #596, and others)
  • improve test coverage and Travis CI updates (PR #595, and others)
  • update pre-commit hooks and configuration in setup.cfg

To-be deprecated:

  • function Parameter.isParameter and conversion from uncertainties.core.Variable to value in _getval (PR #595)

0.9.14

4 years ago

New features:

  • the global optimizers shgo and dual_annealing (new in SciPy v1.2) are now supported (Issue #527; PRs #545 and #556)
  • eval method added to the Parameter class (PR #550 by @zobristnicholas)
  • avoid ZeroDivisionError in printfuncs.params_html_table (PR #552 by @aaristov and PR #559)
  • add parallelization to brute method (PR #564, requires SciPy v1.3)

Bug fixes:

  • consider only varying parameters when reporting potential issues with calculating errorbars (PR #549) and compare value to both min and max (PR #571)
  • guard against division by zero in lineshape functions and FWHM and height expression calculations (PR #545)
  • fix issues with restoring a saved Model (Issue #553; PR #554)
  • always set result.method for emcee algorithm (PR #558)
  • more careful adding of parameters to handle out-of-order constraint expressions (Issue #560; PR #561)
  • make sure all parameters in Model.guess() use prefixes (PRs #567 and #569)
  • use inspect.signature for PY3 to support wrapped functions (Issue #570; PR #576)
  • fix result.nfev``` for brute`` method when using parallelization (Issue #578; PR #579)

Various:

  • remove "missing" in the Model class (replaced by nan_policy) and "drop" as option to nan_policy (replaced by omit) deprecated since 0.9 (PR #565).
  • deprecate 'report_errors' in printfuncs.py (PR #571)
  • updates to the documentation to use jupyter-sphinx to include examples/output (PRs #573 and #575)
  • include a Gallery with examples in the documentation using sphinx-gallery (PR #574 and #583)
  • improve test-coverage (PRs #571, #572 and #585)
  • add/clarify warning messages when NaN values are detected (PR #586)
  • several updates to docstrings (Issue #584; PR #583, and others)
  • update pre-commit hooks and several docstrings

0.9.14rc1

4 years ago

0.9.13

5 years ago

0.9.12

5 years ago

0.9.12.rc2

5 years ago