Package qubx_single :: Module dur_hist :: Class AllExponentials
[hide private]
[frames] | no frames]

Class AllExponentials

source code

        object --+    
                 |    
qubx.fit.BaseCurve --+
                     |
                    AllExponentials

This class implements a method to find all significant exponential components of a duration histogram, published in

Exponential Sum-Fitting of Dwell-Time Distributions without Specifying Starting Parameters David Landowne,* Bin Yuan, and Karl L. Magleby* Biophysical Journal Volume 104 June 2013 2383-2391

Instance Methods [hide private]
 
__init__(self, expr='0.0', locals={})
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
report(self, *args) source code
 
eval(self, param_vals, xx, vvv=[])
Returns yy = f[param_vals](xx, *vvv).
source code
 
get_initial_params(self, xx, x0=None, x1=None)
Adjusts can_fit, returns initial param values spaced evenly between min(xx) and max(xx) on log axis.
source code
 
get_params_minus_ends(self, params)
Adjusts can_fit, returns updated param values spaced evenly between smallest and largest legit expo in input params.
source code
 
get_params_minus_negligible(self, params, cutoff, stepno)
Adjusts can_fit, returns updated param values with the smallest expos removed.
source code
 
get_params_combined(self, params, fitter, xx, yy, vvv, ww, ssr)
Adjusts can_fit, returns updated, fitted param values with near-identical time constants combined into one expo, and final ssr
source code
 
get_fit_with_fewer(self, params, fitter, xx, yy, vvv, ww, map_func)
One at a time, removes each exponential and re-fits; adjusts can_fit, returns reduced params, ssr of trial with max likelihood.
source code
 
try_fit_with_fewer(self, params, fitter, xx, yy, vvv, ww, ll0, map_func) source code
 
get_minimal_fit(self, params, fitter, xx, yy, vvv, ww, ssr0, significance)
Adjusts can_fit, returns fully reduced params, ssr.
source code
 
get_params_minus_brief_errs(self, params, xx)
Returns params, stripped of brief erroneous components.
source code
 
run_generator(self, xx, yy, params, ww=None, fitter=None, map_func=<built-in function map>, significance=None)
Modifies params; yields percent complete after each step.
source code
 
run(self, xx, yy, ww=None, fitter=None, map_func=<built-in function map>, significance=None)
Returns fitted list of (tau, area) of all significant exponentials.
source code

Inherited from qubx.fit.BaseCurve: set_vars

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from qubx.fit.BaseCurve: can_fit, can_resample, expr, hi, lo, name, param_defaults, params, pool

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, expr='0.0', locals={})
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • expr - optional string to further specify curve
  • locals - optional dict of names available in expr
Overrides: object.__init__
(inherited documentation)

eval(self, param_vals, xx, vvv=[])

source code 

Returns yy = f[param_vals](xx, *vvv). For vvv, you should previously have set_vars(v_names).

Parameters:
  • param_vals - list of float, corresponding to self.params
  • xx - numpy.array of x values
  • vvv - variable series corresponding to set_vars; list of numpy.array
Returns:
numpy.array of y values
Overrides: qubx.fit.BaseCurve.eval
(inherited documentation)