Changeset 1019 for trunk

Show
Ignore:
Timestamp:
11/29/11 16:30:45 (6 months ago)
Author:
pierre
Message:

Fix some minors bugs in the Brian backend. Note that there is a difference still in Brian and NEST that should be solved in order to have the brunel benchmark working. Don't know how neuron behaves. If SpikeSource? are generating several spikes within a time dt, they are queued by Brian, while delivered by NEST (by multiplication of the weight by a number proportional to the number of spikes). I ll see it with Dan here next week.

Location:
trunk/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/brian/__init__.py

    r1001 r1019  
    258258         
    259259        if self._plasticity_model != "static_synapse": 
    260             for key in self._brian_connections.keys: 
     260            for key in self._brian_connections.keys(): 
    261261                synapses = self._brian_connections[key] 
    262262                if self._plasticity_model is "stdp_synapse":  
  • trunk/src/brian/connectors.py

    r1003 r1019  
    8282        for count, tgt in enumerate(projection.pre.local_cells): 
    8383            connector._probabilistic_connect(tgt, 1) 
    84             self.progression(count       
     84            self.progression(count, projection._simulator.state.mpi_rank)       
    8585     
    8686 
     
    9494        for count, tgt in enumerate(projection.pre.local_cells): 
    9595            connector._probabilistic_connect(tgt, self.p_connect) 
    96             self.progression(count) 
     96            self.progression(count, projection._simulator.state.mpi_rank) 
    9797             
    9898 
     
    112112                proba = proba.astype(float)            
    113113            connector._probabilistic_connect(tgt, proba, self.n_connections) 
    114             self.progression(count) 
     114            self.progression(count, projection._simulator.state.mpi_rank) 
    115115 
    116116class FastOneToOneConnector(OneToOneConnector): 
     
    140140                # the float is in case the values are of type numpy.float64, which NEST chokes on 
    141141                projection._divergent_connect(src, [tgt], float(w), float(d), homogeneous) 
    142                 self.progression(count) 
     142                self.progression(count, projection._simulator.state.mpi_rank) 
    143143                count += 1 
    144144        else: 
  • trunk/src/brian/standardmodels/synapses.py

    r957 r1019  
    1515     
    1616    def __init__(self, timing_dependence=None, weight_dependence=None, 
    17                  voltage_dependence=None, dendritic_delay_fraction=0.0): 
     17                 voltage_dependence=None, dendritic_delay_fraction=1.0): 
    1818        assert dendritic_delay_fraction == 0, """Brian does not currently support dendritic delays: 
    1919                                                 for the purpose of STDP calculations all delays 
    2020                                                 are assumed to be axonal.""" 
    21         standardmodels.STDPMechanism.__init__(self, timing_dependence, weight_dependence, 
    22                                       voltage_dependence, dendritic_delay_fraction) 
     21        super(STDPMechanism, self).__init__(timing_dependence, weight_dependence, 
     22                                            voltage_dependence, dendritic_delay_fraction) 
    2323 
    2424 
  • trunk/src/nemo/__init__.py

    r1018 r1019  
    4747    simulator but not by others. 
    4848    """ 
     49    if (timestep < 1): 
     50        raise Exception("It is not currently possible to have a timestep less than 1ms with this simulator") 
     51    if (min_delay < 1): 
     52        raise Exception("It is not currently possible to have a min_delay less than 1ms with this simulator") 
     53     
    4954    common.setup(timestep, min_delay, max_delay, **extra_params) 
    5055    simulator.state = simulator._State(timestep, min_delay, max_delay)