Show
Ignore:
Timestamp:
02/12/10 11:29:45 (2 years ago)
Author:
apdavison
Message:

Some documentation updates

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/doc/lowlevelapi.txt

    r629 r707  
    2525    >>> setup() 
    2626     
    27 ``setup()`` takes various optional arguments: setting the simulation timestep (there is currently no support in the API for variable timestep methods although native simulator code can be used to select this option where the simulator supports it), setting the minimum and maximum synaptic delays, and turning debugging output on and off, e.g.:: 
    28  
    29     >>> setup(timestep=0.1, min_delay=0.1, max_delay=0.5, debug=False) 
    30      
    31 Debugging information is written to a log file in the working directory. 
     27``setup()`` takes various optional arguments: setting the simulation timestep (there is currently no support in the API for variable timestep methods although native simulator code can be used to select this option where the simulator supports it) and setting the minimum and maximum synaptic delays, e.g.:: 
     28 
     29    >>> setup(timestep=0.1, min_delay=0.1, max_delay=0.5) 
     30     
     31In previous versions, ``setup()`` took a ``debug`` argument for configuring logging. To allow more flexibility, configuration of logging must now be done separately. There is a convenience function in the ``pyNN.utility`` module to simplify this:: 
     32 
     33    >>> from pyNN.utility import init_logging 
     34    >>> init_logging("logfile", debug=True) 
     35     
     36or you can configure the Python ``logging`` module directly. 
    3237 
    3338Creating neurons 
     
    8186    >>> create(IF_curr_alpha, cellparams={'tau_m': 'bar'}) 
    8287    Traceback (most recent call last): 
    83       File "/usr/lib/python/site-packages/pyNN/nest1.py", line 228, in create 
     88      File "<stdin>", line 1, in ? 
     89        create(IF_curr_alpha, cellparams={'tau_m': 'bar'}) 
     90      File "/usr/lib/python/site-packages/pyNN/common.py", line 655, in create 
     91        all_cells, mask_local, first_id, last_id = simulator.create_cells(cellclass, cellparams, n) 
     92      File "/usr/lib/python/site-packages/pyNN/neuron/simulator.py", line 287, in create_cells 
    8493        celltype = cellclass(cellparams) 
    85       File "/usr/lib/python/site-packages/pyNN/nest1.py", line 68, in __init__ 
    86         common.IF_curr_alpha.__init__(self,parameters) # checks supplied parameters and adds default 
    87       File "/usr/lib/python/site-packages/pyNN/common.py", line 113, in __init__ 
    88         self.parameters = self.checkParameters(parameters, with_defaults=True) 
    89       File "/usr/lib/python/site-packages/pyNN/common.py", line 90, in checkParameters 
    90         raise InvalidParameterValueError, (type(supplied_parameters[k]), type(default_parameters[k])) 
    91     InvalidParameterValueError: (<type 'str'>, <type 'float'>) 
    92  
     94      File "/usr/lib/python/site-packages/pyNN/neuron/cells.py", line 442, in __init__ 
     95        cells.IF_curr_alpha.__init__(self, parameters) # checks supplied parameters and adds default 
     96      File "/usr/lib/python/site-packages/pyNN/common.py", line 460, in __init__ 
     97        self.parameters = self.__class__.checkParameters(parameters, with_defaults=True) 
     98      File "/usr/lib/python/site-packages/pyNN/common.py", line 494, in checkParameters 
     99        raise InvalidParameterValueError(err_msg) 
     100    InvalidParameterValueError: For tau_m in IF_curr_alpha, expected <type 'float'>, got <type 'str'> (bar) 
    93101     
    94102If you wish to do something with the cell after creating it: record from it, change a parameter, connect it to another cell, you should assign the return value of the function to a variable, e.g.:: 
     
    180188     
    181189Positions must always be in 3D, and may be given as integers or floating-point values, and as tuples or as numpy arrays. 
    182 No specific scale of units is assumed, although many parts of PyNN do assume a Euclidean coordinate system. 
     190No specific coordinate system or scale of units is assumed, although many parts of PyNN do assume a Euclidean coordinate system. 
    183191 
    184192Injecting current 
     
    235243In this case, use the ``compatible_output=False`` argument to the ``end()`` function. 
    236244 
    237 Considerable enhancements to file formats are planned for future releases of PyNN, including recording to binary (HDF5) rather than text files, support for variable time-step recording, and user-specified output formats. 
     245For recording to binary (e.g. HDF5) rather than text files, see the chapter on file formats. 
    238246 
    239247Running a simulation 
     
    244252    >>> run(1000.0) 
    245253     
     254 
     255Repeating a simulation 
     256====================== 
     257 
     258If you wish to reset network time to zero to run a new simulation with the same 
     259network (with different parameter values, perhaps), use the ``reset()`` function. 
     260Note that this does not change the network structure, nor the choice of which 
     261neurons to record (from previous ``record()`` calls). 
     262 
     263     
    246264Finishing up 
    247265============