Module brain
[show private | hide private]
[frames | no frames]

Module brain

Classes
BRAIN  

Exceptions
StringOrVarException The exception that says that something went wrong in StringOrVar conversion.

Function Summary
  AreaTest()
Test new area abstractions.
  EnumeratedTest()
Test brain with column having enumerated cells (each cell is its own cellgroup) FIXME: remove explicit StandardStuff
  InitParms(parms, pt, defaults)
Classes use this to initialize their parameters.
  mysort(l)
mysort sorts in place *and* returns sorted list
  PrintParms(pt, parms, name, optarg)
Classes use this to print out their parameters.
  StringOrVar(vv)
Returns a string for whatever vv is, returning the TYPE if a one of the BRAIN classes.
  Test1()
This is designed to generate identical .in file as the original full_ivo.py model.

Variable Summary
str __version__ = '5.0'

Function Details

AreaTest()

Test new area abstractions.

EnumeratedTest()

Test brain with column having enumerated cells (each cell is its own cellgroup) FIXME: remove explicit StandardStuff

InitParms(parms, pt, defaults=None)

Classes use this to initialize their parameters.

defaults is a dictionary of values to set in the parameter dictionary returned, unless overridden by a setting for the same key in the argument parms.

mysort(l)

mysort sorts in place *and* returns sorted list

The builtin sort function does not return the sort list, it sorts in place only, so to iterate over a dictionary like this: for a in d.keys().sort(): does not work because that returns None so this works: for a in mysort(d.keys()): NOTE: 2.4 has sorted()

PrintParms(pt, parms, name, optarg=None)

Classes use this to print out their parameters.

This is smart enough to print list items as multiple lines with the same parameter name.

FIXME: factor out the new split line while loop

StringOrVar(vv)

Returns a string for whatever vv is, returning the TYPE if a one of the BRAIN classes.

If vv is a string, return that. If it is an int or float, convert it to a string. Else assume it is a variable, and return that variable's TYPE parameter.

Better to let exceptions happen rather than trap them. Trapping them makes it hard to figure out where error occured, unless you dump call trace (how do you do that?)

Test1()

This is designed to generate identical .in file as the original full_ivo.py model. Test2() may contain some simplifications that result in a functionally identical .in file that looks a little different; e.g., all synapses are defined per-layer for consistency even when they don't have to be.

Variable Details

__version__

Type:
str
Value:
'5.0'                                                                  

Generated by Epydoc 2.1 on Sat Apr 16 14:14:53 2005 http://epydoc.sf.net