iminuit/probfit — pull request #46 by cdeil (2013-05-11 18:24:57+00:00)
Title: Tutorial update

This PR branch is based on #44, the only change is the updated IPython notebook.

To compare the notebooks:
* [old](http://nbviewer.ipython.org/urls/raw.github.com/iminuit/probfit/master/tutorial/tutorial.ipynb)
* [new](http://nbviewer.ipython.org/urls/raw.github.com/cdeil/probfit/tutorial/tutorial/tutorial.ipynb)

The examples didn't change, but I tried to improve the documentation, naming and formatting while working through the tutorial myself.
@piti118 Let me know if you don't like it at all or some of the changes.

I'll try and give a short summary / motivation for the changes:
* My motivation for not using `from probfit import something` and not making use of all the import from the `--pylab` option is actually described at the top of the notebook. Basically: few and always explicit imports are better because when reading the code it is more clear which function / class comes from where.
* Use the name `fitter = iminuit.Minuit(...)` throughout, where before it was `m` or `minuit` instead of `fitter`. I think `m` is too short to avoid name conflicts for some users sooner or later and `minuit` would be perfect, except that the other pyminuits use `import minuit` and one thing iminuit wants is to make it easy for those users to switch, so `minuit` can't be used for the `Minuit` instance.
* Use longer and more descriptive names so that the code is (hopefully) easier to read.
* Added more explanations about `errordef`. Specifically I was confused why it was auto-set to `0.5` before in the binned likelihood example.
* Removed a few cases where MIGRAD called `print_fmin()` and then you explicitly called `print_fmin()` again to avoid duplicate results output. Added `print_level=0` and `pedantic=False` in some places to remove irrelevant output to shorten it. (The tutorial is already a very long document and it's a bit hard to find something specific ... but the IPython folks are implementing some navigation, so hopefully that will improve soon).
* I've changed all the formatting to be Python 3 and PEP8 compliant and a little more readable I hope.