diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2015-08-17 17:48:06 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2015-08-17 17:48:06 +0200 |
commit | 083a75679a2b15cceb13fa80ff1bb9277bd729d5 (patch) | |
tree | 3458407c3a9fe49517eb85859885ebae1464731b /pyspike/DiscreteFunc.py | |
parent | 84f3333317e119cc87c4cb5f9c444ff66f1f7a23 (diff) |
major renaming of spike train order functions
Diffstat (limited to 'pyspike/DiscreteFunc.py')
-rw-r--r-- | pyspike/DiscreteFunc.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pyspike/DiscreteFunc.py b/pyspike/DiscreteFunc.py index 4fd496d..9cc7bd5 100644 --- a/pyspike/DiscreteFunc.py +++ b/pyspike/DiscreteFunc.py @@ -176,7 +176,7 @@ expected." multiplicity = 1.0 return (value, multiplicity) - def avrg(self, interval=None): + def avrg(self, interval=None, normalize=True): """ Computes the average of the interval sequence: :math:`a = 1/N \\sum f_n` where N is the number of intervals. @@ -189,7 +189,10 @@ expected." :rtype: float """ val, mp = self.integral(interval) - return val/mp + if normalize: + return val/mp + else: + return val def add(self, f): """ Adds another `DiscreteFunc` function to this function. |