tritemio/FRETBursts — pull request #18 by tritemio (2014-09-15 20:56:53+00:00)
Title: Fitting Framework and other improvements

This PR adds the new fitting framework based on [lmfit](https://github.com/lmfit/lmfit-py/) (version 0.8rc3 or newer required).

# Fitting Framework overview

This framework is based on the `MultiFitter` object defined in the modeule `mfit`. This object can compute histograms and KDE on multi-channel data. Can also find KDE peak position and fit the histograms with different models using `lmfit`. Thanks to lmfit we can fix a parameter, set bounds or algebraic constrains, we have complete error reports and correlations. Moreover the new `Model` infrastructure allows to build models very easily, like with a GUI (there is also a **real** [GUI for the notebook](https://github.com/lmfit/lmfit-py/pull/123)).

The notebooks (in particular the usALEX) have been updated with extensive example of E or S fitting.

# Other Changes

## Plots
- Rewritten timetrace and ratetrace plot functions Now we have: `timetrace`, `timetrace_single`, `ratetrace`, `ratetrace_single` with uniform interface.
- Rewrite burst size histogram plot: now we have `hist_size` and `hist_size_all`
- Plot improvements to: `scatter_fret_size`

## Analysis

- Add method `Data.burst_sizes_ich()` as to compute burst sizes with optional gamma correction and optional `naa`. Old function to compute burst size removed.
- Fix old function to compute burst asymmetry (`bext.asymmetry`) and revise corresponding plot (`hist_asymmetry`)
- Get all the bursts data as a pandas DataFrame with `bext.burst_data()`.

## Infrastructure

- Imports cleanups allowing using fretbursts as `import fretbursts as fb`
- Support PyQT4 by default. Now FRETBursts is compatible with both PyQT4 or PySide
- Fixes and cleanups to the GUI code for burst picking (now prints more info per burst)
- Add windows script `Launch IPython Notebook Here.bat` to quickly run installation notebook.
- Docs updates
- Added extensive tests of the fuse-burst algorithm with 2 independent implementations
- More tests for bursts data consistency