def get_max_sq(cell, amp, x_dist_val,y): #square wave [t,i]=pdl.make_square(mydelay,mydur,amp,mysimtime,mydt) sim = pdl.Simulation(cell,mydt,sim_time = mysimtime) sim.set_exstim([t,i],x_dist=x_dist_val,y_dist = y,rho = myrho) sim.go() _,som_rec,ax_rec = sim.get_recording() return som_rec,ax_rec
plt.figure() plt.plot(t,i) thr = ptl.get_thresh(cell, 'dppbal', init_amp, init_step, x_soma, y, stim_params, cnt_lim = cntlim, dpp_amp = dppamp) print thr #looking at waveforms directly square if TEST_TYPE == 19: dur = .1 amp = 300 y = 1 cntlim = 30 stim_params = [mydelay, dur, mysimtime, mydt, myrho] [t,i] = pdl.make_square(mydelay, dur, amp, mysimtime, mydt) sim = pdl.Simulation(cell,mydt,sim_time = mysimtime) sim.set_exstim([t,i],x_dist = x_axon, y_dist = y, rho = myrho) sim.go() sim.show() #plt.figure() #plt.plot(t,i) thr = ptl.get_thresh(cell, 'sq', init_amp, init_step, x_soma, y, stim_params, cnt_lim = cntlim) print thr #looking at waveforms directly triphasic if TEST_TYPE == 20: dur = .3 #amp = 200 amp = 2000
mysimtime = 8 myrho = 7900 mydelay = 1.5 #dur1 = .5 dur1 = 4 dur2 = .1 dpAmp = .1e3 stimAmp = .6e3 x_dist_val = 55 for x_dist_val in [0,15,55,250]: [t,i]=pdl.make_dpp(mydelay,dur1,dur2,mydt,mysimtime,dpAmp,stimAmp) sim = pdl.Simulation(cell,mydt,sim_time = mysimtime) sim.set_exstim([t,i],x_dist=x_dist_val,y_dist=3,rho = myrho) sim.go() plt.figure() sim.show(showAx=False) plt.plot(t,i/max(i)*20) [t,i]=pdl.make_square(mydelay+dur1,stimAmp,dur2,mysimtime,mydt) sim = pdl.Simulation(cell,mydt,sim_time = mysimtime) sim.set_exstim([t,i],x_dist=x_dist_val,y_dist=3,rho = myrho) sim.go() sim.show(showAx=False) plt.plot(t,i/max(i)*20)