示例#1
0
文件: brunel.py 项目: schmitts/arbor
 def connections_on(self, gid):
     connections=[]
     # Add incoming excitatory connections.
     for i in sample_subset(gid, 0, self.ncells_exc_, self.in_degree_exc_):
         connections.append(arbor.connection((i,0), 0, self.weight_exc_, self.delay_))
     # Add incoming inhibitory connections.
     for i in sample_subset(gid, self.ncells_exc_, self.ncells_exc_ + self.ncells_inh_, self.in_degree_inh_):
         connections.append(arbor.connection((i,0), 0, self.weight_inh_, self.delay_))
     return connections
示例#2
0
    def connections_on(self, gid):
        # Todo: optimise!!
        pop_id, index = self.get_pop_index(gid)
        conns = []
        for proj in self.nl_network.projections:
            if pop_id == proj.postsynaptic:
                w = self.proj_weights[proj.id]
                in_w = w.T[index]
                d = self.proj_delays[proj.id]
                in_d = d.T[index]
                print_v(
                    "Incoming connections for gid %i (%s[%s]), w: %s; d: %s" %
                    (gid, pop_id, index, in_w, in_d))
                for src_index in range(len(in_w)):
                    if in_w[src_index] > 0:
                        src_gid = self.get_gid(proj.presynaptic, src_index)
                        conns.append(
                            arbor.connection(
                                (src_gid, "detector"),
                                "syn",
                                in_w[src_index],
                                in_d[src_index],
                            ))

        print_v("Making connections for gid %i (%s[%s]): %s" %
                (gid, pop_id, index, conns))
        return conns
示例#3
0
 def connections_on(self, gid):
     src = (gid - 1) % self.ncells
     w = 0.01
     d = 5
     return [
         arbor.connection(arbor.cell_member(src, 0),
                          arbor.cell_member(gid, 0), w, d)
     ]
示例#4
0
 def connections_on(self, gid):
     if (gid == 0) or (gid % self.ncells_per_chain > 0):
         return []
     else:
         src = gid - 1
         w = 0.05
         d = 10
         return [arbor.connection((src, 'detector'), 'syn', w, d)]
示例#5
0
文件: brunel.py 项目: halfflat/arbor
    def connections_on(self, gid):
        gen = RandomState(gid + self.seed_)
        connections = []
        # Add incoming excitatory connections.
        connections = [
            arbor.connection((i, "src"), "tgt", self.weight_exc_, self.delay_)
            for i in sample_subset(gen, gid, 0, self.ncells_exc_,
                                   self.in_degree_exc_)
        ]
        # Add incoming inhibitory connections.
        connections += [
            arbor.connection((i, "src"), "tgt", self.weight_inh_,
                             self.delay_) for i in sample_subset(
                                 gen, gid, self.ncells_exc_, self.ncells_exc_ +
                                 self.ncells_inh_, self.in_degree_inh_)
        ]

        return connections
示例#6
0
 def connections_on(self, gid):
     src = (gid-1)%self.ncells
     w = 0.01 # 0.01 μS on expsyn
     d = 5 # ms delay
     return [arbor.connection((src,'detector'), 'syn', w, d)]
示例#7
0
 def connections_on(self, gid):
     src = (gid-1)%self.ncells
     w = 0.01
     d = 5
     return [arbor.connection((src,'detector'), 'syn', w, d)]