Package topo :: Package outputfns :: Module basic :: Class AttributeTrackingOF
[hide private]
[frames] | no frames]

Class AttributeTrackingOF

source code

                                  object --+            
                                           |            
base.parameterizedobject.ParameterizedObject --+        
                                               |        
                  base.functionfamilies.OutputFn --+    
                                                   |    
                                   OutputFnWithState --+
                                                       |
                                                      AttributeTrackingOF

Keeps track of attributes of a specified ParameterizedObject over time, for analysis or plotting.

Useful objects to track include sheets (e.g. "topo.sim['V1']"), projections ("topo.sim['V1'].projections['LateralInhibitory']"), or an output_function.

Any attribute whose value is a matrix the same size as the activity matrix can be tracked. Only specified units within this matrix will be tracked.

If no object is specified, this function will keep track of the incoming activity over time.

The results are stored in a dictionary named 'values', as (time, value) pairs indexed by the parameter name and unit. For instance, if the value of attribute 'x' is v for unit (0,0) at time t, values['x'][(0,0)]=(t,v).

Updating of the tracked values can be disabled temporarily using the plastic parameter.



Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params) source code
 
__call__(self, x) source code

Inherited from OutputFnWithState: override_plasticity_state, restore_plasticity_state

Inherited from base.functionfamilies.OutputFn: __add__

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __repr__, __setstate__, __str__, as_uninitialized, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, verbose, warning

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

Class Methods [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: params, print_param_defaults

Class Variables [hide private]
  object = <topo.base.parameterizedobject.Parameter object at 0x...
ParameterizedObject instance whose parameters will be tracked.
  attrib_names = <topo.base.parameterclasses.ListParameter objec...
List of names of the function object's parameters that should be stored.
  units = <topo.base.parameterclasses.ListParameter object at 0x...
Matrix coordinates of the unit(s) for which parameter values will be stored.
  step = Number(default= 1, doc= ...
How often to update the tracked values.

Inherited from OutputFnWithState: plastic

Inherited from base.functionfamilies.OutputFn: norm_value

Inherited from base.parameterizedobject.ParameterizedObject: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **params)
(Constructor)

source code 
Overrides: OutputFnWithState.__init__

__call__(self, x)
(Call operator)

source code 
Overrides: base.functionfamilies.OutputFn.__call__

Class Variable Details [hide private]

object

ParameterizedObject instance whose parameters will be tracked.

If this parameter's value is a string, it will be evaluated first (by calling Python's eval() function). This feature is designed to allow circular references, so that the OF can track the object that owns it, without causing problems for recursive traversal (as for script_repr()).

Value:
Parameter(default= None, doc= """
        ParameterizedObject instance whose parameters will be tracked.

        If this parameter's value is a string, it will be evaluated first
        (by calling Python's eval() function).  This feature is designed to
        allow circular references, so that the OF can track the object that
        owns it, without causing problems for recursive traversal (as for
        script_repr()).""")

attrib_names

List of names of the function object's parameters that should be stored.
Value:
ListParameter(default= [], doc= """
        List of names of the function object's parameters that should be stored.""\
")

units

Matrix coordinates of the unit(s) for which parameter values will be stored.
Value:
ListParameter(default= [(0, 0)], doc= """
        Matrix coordinates of the unit(s) for which parameter values will be store\
d.""")

step

How often to update the tracked values.

For instance, step=1 means to update them every time this OF is called; step=2 means to update them every other time.

Value:
Number(default= 1, doc= """
        How often to update the tracked values.

        For instance, step=1 means to update them every time this OF is
        called; step=2 means to update them every other time.""")