Contents¶
- Getting started with Non-Linear Least-Squares Fitting
- Downloading and Installation
- Release Notes
- Version 1.3.2 Release Notes (July 19, 2024)
- Version 1.3.1 Release Notes (April 19, 2024)
- Version 1.3.0 Release Notes (April 4, 2024)
- Version 1.2.2 Release Notes (July 14, 2023)
- Version 1.2.1 Release Notes (May 02, 2023)
- Version 1.2.0 Release Notes (April 05, 2023)
- Version 1.1.0 Release Notes (November 27, 2022)
- Version 1.0.3 Release Notes (October 14, 2021)
- Version 1.0.2 Release Notes (February 7, 2021)
- Version 1.0.1 Release Notes
- Version 1.0.0 Release Notes
- Version 0.9.15 Release Notes
- Version 0.9.14 Release Notes
- Version 0.9.13 Release Notes
- Version 0.9.12 Release Notes
- Version 0.9.10 Release Notes
- Version 0.9.9 Release Notes
- Version 0.9.6 Release Notes
- Version 0.9.5 Release Notes
- Version 0.9.4 Release Notes
- Version 0.9.3 Release Notes
- Version 0.9.0 Release Notes
- Getting Help
- Frequently Asked Questions
- What’s the best way to ask for help or submit a bug report?
- Why did my script break when upgrading from lmfit 0.8.3 to 0.9.0?
- I get import errors from IPython
- How can I fit multi-dimensional data?
- How can I fit multiple data sets?
- How can I fit complex data?
- How should I cite LMFIT?
- I get errors from NaN in my fit. What can I do?
- Why are Parameter values sometimes stuck at initial values?
- Why are uncertainties in Parameters sometimes not determined?
- Can Parameters be used for Array Indices or Discrete Values?
Parameter
andParameters
- Performing Fits and Analyzing Outputs
- The
minimize()
function - Writing a Fitting Function
- Types of Data to Use for Fitting
- Choosing Different Fitting Methods
MinimizerResult
– the optimization result- Getting and Printing Fit Reports
- Using a Iteration Callback Function
- Using the
Minimizer
class Minimizer.emcee()
- calculating the posterior probability distribution of parameters
- The
- Modeling Data and Curve Fitting
- Motivation and simple example: Fit data to Gaussian profile
- The
Model
classModel
Model
class MethodsModel
class Attributes- Determining parameter names and independent variables for a function
- Explicitly specifying
independent_vars
- Functions with keyword arguments
- Defining a
prefix
for the Parameters - Initializing model parameter values
- Using parameter hints
- Data Types for data and independent data with
Model
- Saving and Loading Models
- The
ModelResult
class - Composite Models : adding (or multiplying) Models
- Built-in Fitting Models in the
models
module- Peak-like models
GaussianModel
LorentzianModel
SplitLorentzianModel
VoigtModel
PseudoVoigtModel
MoffatModel
Pearson4Model
Pearson7Model
StudentsTModel
BreitWignerModel
LognormalModel
DampedOscillatorModel
DampedHarmonicOscillatorModel
ExponentialGaussianModel
SkewedGaussianModel
SkewedVoigtModel
ThermalDistributionModel
DoniachModel
- Linear and Polynomial Models
- Periodic Models
- Step-like models
- Exponential and Power law models
- Two dimensional Peak-like models
- User-defined Models
- Example 1: Fit Peak data to Gaussian, Lorentzian, and Voigt profiles
- Example 2: Fit data to a Composite Model with pre-defined models
- Example 3: Fitting Multiple Peaks – and using Prefixes
- Example 4: Using a Spline Model
- Peak-like models
- Calculation of confidence intervals
- Bounds Implementation
- Using Mathematical Constraints
- Examples gallery
- Examples from the documentation