funcFit - A convenient fitting interface¶
The funcFit package provides a convenient interface to the fitting algorithms provided by the popular SciPy and pymc packages. It implements a very flexible and simple parameter handling mechanism making fitting in Python a much more enjoyable experience.
See also
PyAstronomy’s modelSuite. The funcFit package itself comes with only a few basic fitting models such as a Gaussian. More complex models are provided in the frame of the model suite.
Note
If you use the 2.x series of Python, funcFit requires Python 2.7.x. The 2.6.x series (and prior) has a bug affecting the copying of dynamically created class methods, which has not been (and will not be) corrected. This interferes with many of funcFit’s algorithms.
The tutorial¶
The funcFit tutorial gives you an introduction to the capabilities of the package. The most important aspects are demonstrated by example.
- The funcFit tutorial
- Prerequisites
- What is it good for?
- Diving into the first example
- Using fmin_powell as optimization algorithm
- Introducing a custom model
- Applying relations
- Combining models
- Applying conditional restrictions
- Minimize the Cash statistic
- Using “steppar” to determine confidence intervals
- Use errorConfInterval to determine confidence intervals
- Using custom objective functions
- Using an overbinned model
- Fit two models simultaneously
- The n-dimensional fitting tutorial
- MCMC sampling with funcFit tutorial
- Analyze Markov-Chains using TraceAnalysis
Basic models¶
- Common fitting models
- Single Gaussian with linear continuum
- Multicomponent Gaussian with linear continuum
- Cauchy-Lorentz with linear continuum
- Voigt with linear continuum
- Multicomponent Voigt profile with linear continuum
- Sine fit
- Exponential decay
- Polynomial of degree n
- Hyperbolic secant
- Constant
- Two-dimensional Gaussian
- Multicomponent two-dimensional Gaussian
- Demonstration models