Created
October 20, 2014 22:54
-
-
Save danielballan/1c2db3d4f2f7780cf52f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"kernelspec": { | |
"codemirror_mode": { | |
"name": "python", | |
"version": 2 | |
}, | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"name": "", | |
"signature": "sha256:b84058c20c113467d382111be47210f8d95380d854ebfcde361ea5531fdd148a" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Interactive Curve-Fitting in the IPython Notebook\n", | |
"\n", | |
"**Important:** Widgets will not display in \"static\" notebooks until IPython 3.0. They must be backed by a live IPython kernel. Therefore, to view the full widget display, you must download this notebook and run it locally using IPython 2.x or greater." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"%matplotlib inline\n", | |
"from lmfit import Model, Fitter\n", | |
"import numpy as np" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## `lmfit`\n", | |
"The [lmfit package](http://cars9.uchicago.edu/software/python/lmfit/) provides layers of high-level interfaces to the nonlinear optimization and curve fitting algorithms in scipy.\n", | |
"* `Parameter` objects allow fit parameters to be bounded (`min`, `max`) or held fixed (`vary=False`).\n", | |
"* The `Model` class provides a general way to wrap a user-defined function as a fitting model.\n", | |
"* `Fitter` provides a curve-fitting workflow akin to popular GUI-based tools while retaining programmatic access to the underlying objects.\n", | |
"\n", | |
"`BaseFitter` introduces no new dependencies; `MPLFitter` requires matplotlib; `NotebookFitter` uses IPython's rich display to represent each `Parameter` as a group of IPython widgets. `Fitter` will point to the richest implementation available.\n", | |
"\n", | |
"## Interactive Fitting Widget\n", | |
"\n", | |
"Select any model from the drop-down menu.\n", | |
"\n", | |
"Text input widgets will appear corresponding to the parameters for that model. If the model supports automatic guessing, the values will be initialized according to `model.guess(data, ...)`, and an auto-guess button will be available to re-generate these values at any time.\n", | |
"\n", | |
"The values in the text input widgets will serve as an initial guess, and they can be edited by the user. Text inputs for `min` and `max` appear when the associated checkboxes are checked. At all times, `fitter.current_params` is maintained in sync with the values shown in the widget.\n", | |
"\n", | |
"When satisfied with the initial guess, click \"Fit\". The plot will update to show the data, the initial guess fit (gray), and the best fit (red). The attribute `fitter.current_result` will contain the result object created by the latest execution of `fit`. The text widgets and the property `fitter.current_params` will be updated from the initial fit to the latest best fit." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"data = np.array([1,2,3,4,5,4,3,2])\n", | |
"x = np.arange(len(data))\n", | |
"\n", | |
"fitter = Fitter(data, x=x)\n", | |
"\n", | |
"fitter" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAWgAAAEACAYAAACeQuziAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XecnFX1x/HPgdCrUqQFQVFBQClKCyVSk9BBaiDUAFGK\nIEUUOTlSBEFKooKEllCCBKkSQFqQoiAY+EmxgAKhg9RQBc7vj/vE3dSd3Z2Z+8w85/167YvNZnbm\ny2T3u3fv3HsfcXdCCCGUz2y5A4QQQpixKOgQQiipKOgQQiipKOgQQiipKOgQQiipKOgQQiipPrXc\nSESeBt4GPgH+6+5rNTJUCCGEGgsacKC/u7/eyDAhhBA6dGeKQxqWIoQQwnRqLWgHbhORB0VkaCMD\nhRBCSGqd4ujn7i+KyGLArSLyN3e/u5HBQgih6moqaHd/sfjvqyJyDbAWcDeAiMRhHiGE0APuPuup\nY3ef5RswL7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5c/SUu7/k7g8X708mbR5aKm+q7nH3KVvn5yS9xtEyZSEi\ny5COmj0faNWdtC2ZW0QWAjZw9wshvVbWiuVc2BR4akblDL0r6BltYlm6F/cXekhEliMdgXp/3iTd\nIyKzicjDwMvAne7e47N1MzgTOApo1UOzHLhNRB4UkaG5w3TT8sCrInKRiPxFREaJyLy5Q/XQrsDl\nM/vL3hR0vLpYAsX0xlXAYcVIumW4+6fuvhqwDLChiPTPHKkmIrIV8Iq7T6RFR6FAP3dfHRgIfLeY\n8msVfYA1gF+5+xrAu8AP8kbqPhGZk3St0nEzu01vCvp5oG+nP/cljaJDk4jIHKQrEV/q7tfmztNT\nxa+nN5KuBdcK1gO2KeZxxwIbi8iYzJm6xd1fLP77KnANacqyVTwHPOfufy7+fBWpsFvNQOCh4t9g\nhnpT0A8CXxKR5YqfBLsA1/fi/kI3iIgAFwCPu/tZufN0l4gsKiILF+/PA2wGTMybqjbu/kN37+vu\ny5N+Rb3D3YfkzlUrEZlXRBYo3p8P2BxomdVM7v4SMElEvlx8aFPgsYyRemo30g/4merqLI6ZavVN\nLCIyFtgIWEREJgHHu/tFmWN1Rz/SJXf+T0SmFNux7n5zxkzdsSQwungVezbgEne/PXOmnmq16b7P\nAdekn/H0AS5z99/njdRthwCXFYPDp4B9MufpluIH46bALOf/Y6NKCCGUVK82qoQQQmicKOgQQiip\nKOgQQiipKOgQQiipKOgQQiipKOgQQiipKOgQQiipKOgQQiip/wcFjs8SPjzhdAAAAABJRU5ErkJg\ngg==\n", | |
"text": [ | |
"<matplotlib.figure.Figure at 0x111bdc210>" | |
] | |
} | |
], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"fitter.current_result.values" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 3, | |
"text": [ | |
"{'amplitude': 26.028242079115383,\n", | |
" 'center': 3.9949292338671754,\n", | |
" 'fwhm': 5.2960363977622071,\n", | |
" 'sigma': 2.2490196268768767}" | |
] | |
} | |
], | |
"prompt_number": 3 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Reuse the Fitter on Different Data\n", | |
"\n", | |
"Unlike `Model`, `Fitter` is \"stateful;\" it remembers that it has been called, and it uses each best fit as the initial guess for the next fit (unless a new guess is provided).\n", | |
"\n", | |
"Execute the cell below and revisit to the fitter above. (Or create a new view below; multiple views of the same instance of `fitter` all stay in sync.) Clicking \"Fit\" will use the most recent best fit to `data` as the initial guesss for fitting `other_data`." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"other_data = np.array([10, 11, 12, 11, 10, 8, 7, 6])\n", | |
"fitter.data = other_data" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 4 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Select a User-Defined Model\n", | |
"\n", | |
"Any subclass of `Model` will be included in the drop-down menu. Look for 'UserDefinedModel' in the menu below." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"def func(x, a=1):\n", | |
" \"a very simple model indeed\"\n", | |
" return x + a\n", | |
"\n", | |
"class UserDefinedModel(Model):\n", | |
" def __init__(self, *args, **kwargs):\n", | |
" super(UserDefinedModel, self).__init__(func, *args, **kwargs)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 5 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"data = np.array([1,2,3,4,5,4,3,2])\n", | |
"x = np.arange(len(data))\n", | |
"\n", | |
"fitter = Fitter(data, x=x)\n", | |
"\n", | |
"fitter" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEACA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7X1f5+RnrJVw43cxGEPLzQHdfVe85zdoDPxB40d1fcveNwELgmCZtqyncfQnwn3nP\nMRzuvtrdn6j8ex3wDLBjvlMNjbu/XfnnSGALoFRBYmYfAGYCP2CAk/wFV7q5zWxbYKq7Xwfg7pvK\nGN4VRwArNhfe0LwAnwBUb/TlytckY2a2M7Af8HC+kwyNmY0wsyeA3wOL3X153jMN0XeBc4F38x5k\nmBy4z8weNbM5eQ8zBLsAa8zsh2b2mJldY2Zj8h5qmL4I/HigJzQrwHVmtAAqh09+CpxV2RMvDXd/\n1933BT4AHFamXgsz+zTwB3d/nBLuxVYc4u77ATOA0yuHFMugA9gf+J677w+8BZyf70hDZ2YjgaOA\nnwz0vGYF+CvAxKrHEwl74ZIRM9sS+BnwT+7+i7znGa7Kn7+/BD6a9yxDcDBwdOU48s3ANDO7IeeZ\nhsTdX6v89xrgVsJh0TJ4GXjZ3R+pPP4pIdDLZgawtPL5b1azAvxRYDcz27nym+QLwG1N2pb0YWYG\nXAssd/fL855nqMzsvWa2XeXfo4FPAI/nO9XgufuF7j7R3Xch/Bn8L+5+Ut5zDZaZjTGzrSv/HgtM\nJ7SPFp67rwZWmdnulS8dATyd40jDNYvwy39Aad2JWcPdN5nZGcDdhBNQ15bpCggAM7sZ+Djw3yo3\nLF3s7j/MeazBOgQ4AVhmZj3Bd4G735XjTEMxHri+chZ+BHCju9+f80xJlO2Q4vuBW8N+AB3ATe5+\nT74jDcmZwE2VnccVwOyc5xmSyi/NI4CG5x50I4+ISEmpTlZEpKQU4CIiJaUAFxEpKQW4iEhJKcBF\nREpKAS4iUlIKcBGRklKAi4iU1P8HYteoNaQXVzAAAAAASUVORK5CYII=\n", | |
"text": [ | |
"<matplotlib.figure.Figure at 0x113c1a2d0>" | |
] | |
} | |
], | |
"prompt_number": 6 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"See the docstring for more, including complete access to the plot elements." | |
] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment