def test_ConnectOptions(self):
        """ConnectOptions"""

        nest.ResetKernel()

        copts = nest.sli_func('GetOptions', '/RandomConvergentConnect', litconv=True)
        dopts = nest.sli_func('GetOptions', '/RandomDivergentConnect',  litconv=True)

        ncopts = dict([(k, not v) for k,v in copts.items() if k != 'DefaultOptions'])
        ndopts = dict([(k, not v) for k,v in dopts.items() if k != 'DefaultOptions'])
        
        n = nest.Create('iaf_neuron', 3)

        nest.RandomConvergentConnect(n, n, 1, options=ncopts)
        nest.RandomDivergentConnect (n, n, 1, options=ndopts)

        self.assertEqual(copts,
                         nest.sli_func('GetOptions', '/RandomConvergentConnect', litconv=True))
        self.assertEqual(dopts,
                         nest.sli_func('GetOptions', '/RandomDivergentConnect',  litconv=True))
Beispiel #2
0
def ComputePSPnorm(tauMem, CMem, tauSyn):
  """Compute the maximum of postsynaptic potential
     for a synaptic input current of unit amplitude
     (1 pA)"""

  a = (tauMem / tauSyn)
  b = (1.0 / tauSyn - 1.0 / tauMem)
    
  # time of maximum
  t_max = 1.0/b * ( -nest.sli_func('LambertWm1',-exp(-1.0/a)/a) - 1.0/a )

  # maximum of PSP for current of unit amplitude
  return exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_max/tauMem) - exp(-t_max/tauSyn)) / b - t_max*exp(-t_max/tauSyn))