예제 #1
0
def mkgap(i):
    if rank == i:
        gap = h.HalfGap(cell.soma(0.5))
        halfgaps.append(gap)
        pc.source_var(cell.soma(0.5)._ref_v, i, sec=cell.soma)
        gap = pc.target_var(gap, gap._ref_vgap, i + 1)
    if rank == (i + 1) % nhost:
        gap = h.HalfGap(cell.soma(0.5))
        halfgaps.append(gap)
        pc.source_var(cell.soma(0.5)._ref_v, i + 1, sec=cell.soma)
        gap = pc.target_var(gap, gap._ref_vgap, i)
예제 #2
0
def mkhalfgap(sid, vseg, gapseg, g):
    if vseg != None: pc.source_var(vseg._ref_v, sid, sec=vseg.sec)
    if gapseg != None:
        hg = h.HalfGap(gapseg)
        pc.target_var(hg, hg._ref_vgap, sid)
        hg.g = g
        hglist.append(hg)
예제 #3
0
    def __init__(self, target, section, conductance=0, record_all=0, Dt=0.1):

        self.record_all = record_all
        if record_all:
            print "Recording all in Gapj"
        # Decide what kind of connection to create based on the source and target types
        if target.whatami == 'goc':
            self.whatami = "gapj_goc2goc"

        elif target.whatami == 'stl':
            self.whatami = "gapj_stl2stl"
        else:
            print "What the hell are you doing?!?"

        self.gapj = h.HalfGap(.5, sec=section)
        self.gapj.g = conductance  # nanoSiemens
        self.d = 1e9  # distance set by default to infinite
        self.CC = 1e9  # expected coupling coefficient

        if record_all:
            self.record = {}
            self.record['v_local'] = h.Vector()
            self.record['v_remote'] = h.Vector()
            self.record['i_local'] = h.Vector()

            self.record['v_remote'].record(self.gapj._ref_vgap, Dt)
            self.record['v_local'].record(section(.5)._ref_v, Dt, sec=section)
            self.record['i_local'].record(self.gapj._ref_i, Dt)
예제 #4
0
파일: ring.py 프로젝트: schloegl/ringtest
    def mk_halfgap(self, sid_tar, sid_src, seg):

        # target exists
        settings.pc.source_var(seg._ref_v, sid_tar, sec=seg.sec)
        hg = h.HalfGap(seg)
        settings.pc.target_var(hg, hg._ref_vgap, sid_src)
        hg.g = 0.04    # do not randomize as must be same for other side of gap
        self.halfgap_list.append(hg)
 def create_halfgaps(self, conduct_range):
     self.gaps = [0, 0]
     (pre_soma_dx, pre_axon_dx) = self.pre.give_dxs()
     (post_soma_dx, post_axon_dx) = self.post.give_dxs()
     # Create HalfGap Objects
     self.gaps[0] = h.HalfGap(self.pre.axon(1 - (pre_axon_dx / 2)))
     self.gaps[1] = h.HalfGap(self.post.soma(0 + (post_soma_dx / 2)))
     # Identify cathode vs anode
     self.gaps[0].isanode = 1
     self.gaps[1].isanode = -1
     # Set voltage pointers
     h.setpointer(
         self.post.soma(0 + (post_soma_dx) / 2)._ref_v, 'vgap',
         self.gaps[0])
     h.setpointer(
         self.pre.axon(1 - (pre_axon_dx) / 2)._ref_v, 'vgap', self.gaps[1])
     # Set conductance min and max
     self.gaps[0].gmin = conduct_range[0]
     self.gaps[1].gmin = conduct_range[0]
     self.gaps[0].gmax = conduct_range[1]
     self.gaps[1].gmax = conduct_range[1]
if (rank == 0):
    stim = h.IClamp(.5)
    stim.amp = 0.5
    stim.dur = 0.1
    soma.gnabar_hh = 0
    soma.gkbar_hh = 0
    soma.el_hh = -65
    soma.gl_hh = .001

    soma2.gnabar_hh = 0
    soma2.gkbar_hh = 0
    soma2.el_hh = -65
    soma2.gl_hh = .001

gap = h.HalfGap(.5, sec=soma)
gap.g = .01  # nS

gap2 = h.HalfGap(.5, sec=soma2)
gap2.g = .01  # nS

pc.source_var(soma(.5)._ref_v, rank)
pc.source_var(soma2(.5)._ref_v, rank)

vvec = h.Vector()
print gap.vgap

pc.target_var(gap2._ref_vgap, (rank + 1) % 2)
vvec.record(gap._ref_i)

pc.setup_transfer()
예제 #7
0
def mkhgap(sid, seg, g):
    hg = h.HalfGap(seg)
    hg.g = g
    pc.target_var(hg, hg._ref_vgap, sid)
    hglist.append(hg)