Changeset 478 for branches

Show
Ignore:
Timestamp:
11/02/08 18:05:24 (4 years ago)
Author:
pierre
Message:

Fix a bug with the get_min_delay() method

Location:
branches/NeuroToolsOutput/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/NeuroToolsOutput/src/__init__.py

    r475 r478  
    11__version__ = '0.5alpha ( $Rev$)'.replace(' $','') 
    2 __all__ = ["common", "random", "nest1", "nest2", "neuron", "neuron2", "pcsim", 'brian' ] 
     2__all__ = ["common", "random", "cells,", "synapses", "recording", "nest1", "nest2", "neuron", "neuron2", "pcsim", 'brian' ] 
    33# 
  • branches/NeuroToolsOutput/src/brian/recording.py

    r477 r478  
    5050                pass 
    5151        elif self.variable == 'conductance': 
    52             raise Exception("Not implemented yet !") 
     52            try: 
     53                cells = self._device[0].get_record_indices() 
     54                N     = self._device[0].N 
     55                data  = numpy.zeros((N*len(cells), 4)) 
     56                for count, cell in enumerate(cells): 
     57                    data[count*N:(count+1)*N, 0] = 1000*self._device[0][cell] 
     58                    data[count*N:(count+1)*N, 2] = 1000*self._device[1][cell] 
     59                    data[count*N:(count+1)*N, 1] = 1000*self._device.times 
     60                    data[count*N:(count+1)*N, 2] = cell 
     61            except Exception: 
     62                pass 
    5363        return data 
    5464         
  • branches/NeuroToolsOutput/src/cells.py

    r477 r478  
    1 import numpy, copy 
     1import numpy, copy, types 
    22from pyNN.common import build_translations, get_time_step 
    33 
  • branches/NeuroToolsOutput/src/connectors.py

    r477 r478  
    1 from pyNN import random 
    2 from pyNN.common import get_min_delay 
     1from pyNN import random, common 
    32import numpy 
     3 
    44 
    55# ============================================================================== 
     
    1717        self.check_connections = check_connections 
    1818        if delays is None: 
    19             self.delays = get_min_delay() 
     19            self.delays = common.get_min_delay() 
    2020     
    2121    def connect(self, projection):