Package topo :: Package numbergen :: Module basic :: Class ExponentialDecay
[hide private]
[frames] | no frames]

Class ExponentialDecay

source code


Function object that provides a value that decays according to an exponential function, based on topo.sim.time().

Returns starting_value*base^(-time/time_constant).

See http://en.wikipedia.org/wiki/Exponential_decay.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__call__(self) source code

Inherited from NumberGenerator: __abs__, __add__, __div__, __floordiv__, __mod__, __mul__, __neg__, __pos__, __pow__, __radd__, __rdiv__, __rfloordiv__, __rmod__, __rmul__, __rpow__, __rsub__, __rtruediv__, __sub__, __truediv__

Inherited from param.parameterized.Parameterized: __getstate__, __init__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_default, set_dynamic_time_fn, set_param, state_pop, state_push, verbose, warning

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  starting_value = param.Number(1.0, doc= "Value used for time z...
Value used for time zero.
  ending_value = param.Number(0.0, doc= "Value used for time inf...
Value used for time infinity.
  time_constant = param.Number(10000, doc= ...
Time scale for the exponential; large values give slow decay.
  base = param.Number(e, doc= ...
Base of the exponent; the default yields starting_value*exp(-t/time_constant).
  time_fn = param.Callable(default= topo.sim.time, doc= ...
Function to generate the time used for the decay.
  name = <param.parameterized.String object at 0xb1ff9ac>
String identifier for this object.

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self)
(Call operator)

source code 
Overrides: NumberGenerator.__call__

Class Variable Details [hide private]

starting_value

Value used for time zero.
Value:
param.Number(1.0, doc= "Value used for time zero.")

ending_value

Value used for time infinity.
Value:
param.Number(0.0, doc= "Value used for time infinity.")

time_constant

Time scale for the exponential; large values give slow decay.
Value:
param.Number(10000, doc= """
        Time scale for the exponential; large values give slow decay.""")

base

Base of the exponent; the default yields starting_value*exp(-t/time_constant). Another popular choice of base is 2, which allows the time_constant to be interpreted as a half-life.
Value:
param.Number(e, doc= """
        Base of the exponent; the default yields starting_value*exp(-t/time_consta\
nt).
        Another popular choice of base is 2, which allows the
        time_constant to be interpreted as a half-life.""")

time_fn

Function to generate the time used for the decay.
Value:
param.Callable(default= topo.sim.time, doc= """
        Function to generate the time used for the decay.""")