This PR adds the new fitting framework based on lmfit (version 0.8rc3 or newer required) and many other improvements.
Fitting Framework overview
This framework is based on the MultiFitter object defined in the module mfit. MultiFitter can compute histograms and KDE on multi-channel data (typically applied to burst-data, for example E or S). It 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 realGUI for the notebook).
For the common case of fitting E or S histograms the function bext.bursts_fitter() allow to quicky create a MultiFitter object (with optional weights) for a given Data object. The fitter object is saved as Data.E_fitter and Data.S_fitter.
Between the updated notebooks (in particular the see the usALEX notebook) and the reference documentation this new fitting infrastructure should be sufficiently documented.
Other Changes
Plots
Rewritten timetrace and ratetrace plot functions Now we have only 4 functions timetrace, timetrace_single, ratetrace, ratetrace_single with a uniform interface. The argument bursts=True can be used to overlay bursts, and scroll=True will generate an interactive scroll-bar when using the QT backend (%matplotlib qt in the notebook).
Rewrite burst size histogram plot: now we have hist_size and hist_size_all
Rewritten hist_fret and hist_S (using hist_burst_data)
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
This PR adds the new fitting framework based on lmfit (version 0.8rc3 or newer required) and many other improvements.
Fitting Framework overview
This framework is based on the
MultiFitter
object defined in the modulemfit
.MultiFitter
can compute histograms and KDE on multi-channel data (typically applied to burst-data, for example E or S). It can also find KDE peak position and fit the histograms with different models usinglmfit
. Thanks to lmfit we can fix a parameter, set bounds or algebraic constrains, we have complete error reports and correlations. Moreover the newModel
infrastructure allows to build models very easily, like with a GUI (there is also a real GUI for the notebook).For the common case of fitting E or S histograms the function
bext.bursts_fitter()
allow to quicky create aMultiFitter
object (with optional weights) for a givenData
object. The fitter object is saved asData.E_fitter
andData.S_fitter
.Between the updated notebooks (in particular the see the usALEX notebook) and the reference documentation this new fitting infrastructure should be sufficiently documented.
Other Changes
Plots
timetrace
,timetrace_single
,ratetrace
,ratetrace_single
with a uniform interface. The argumentbursts=True
can be used to overlay bursts, andscroll=True
will generate an interactive scroll-bar when using the QT backend (%matplotlib qt
in the notebook).hist_size
andhist_size_all
hist_fret
andhist_S
(usinghist_burst_data
)scatter_fret_size
Analysis
Data.burst_sizes_ich()
as to compute burst sizes with optional gamma correction and optionalnaa
. Old function to compute burst size removed.bext.asymmetry
) and revise corresponding plot (hist_asymmetry
)bext.burst_data()
.Infrastructure
import fretbursts as fb
Launch IPython Notebook Here.bat
to quickly run installation notebook.