Exemple #1
0
	plot_3d(abs(outaxon/outsoma), dpplist, distlist, 'Ratio of Threshold vs. DPP (Axon vs. Soma)', 'DPP Amplitude [nA]', 'Electrode Distance [microns]', 'Stimulation Threshold Ratio', myvmax = 100)

	save_obj(outsoma,'outsoma-tt17.p')
	save_obj(outaxon,'outaxon-tt17.p')

#looking at waveforms directly dpp
if TEST_TYPE == 18:
	dur1 = .4
	dur2 = .1
	amp = 500
	dppamp = 300
	y = 10

	stim_params = [mydelay, dur1, dur2, mysimtime, mydt, myrho]

	[t,i] = pdl.make_dppbal(mydelay, dur1, dur2, dppamp, amp, mysimtime, mydt)
	sim = pdl.Simulation(cell,mydt,sim_time = mysimtime)
	sim.set_exstim([t,i],x_dist = x_soma, y_dist = y, rho = myrho)
	sim.go()
	sim.show(showAx=0)
	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
Exemple #2
0
import matplotlib.pyplot as plt
import pyneurlib as pdl

x,y = pdl.make_dppbal(1,.5,.1,.9e3,1.2e3,10,.01)
plt.plot(x,y)
plt.show()
Exemple #3
0
import pyneurlib as pdl
import matplotlib.pyplot as plt

plt.figure()
t,x = pdl.make_triphasic(100, 150, 1.5, 450, .1)
plt.plot(t,x-2)
t,x = pdl.make_dppbal(100, 200, 50, 100, 1, 1.5, 500, .1)
plt.plot(t,x+2)
plt.ylabel('Amplitude (nA)')
plt.xlabel('Time (us)')
plt.title('Triphasic and Depolarizing Pre-Pulse Waveforms')
plt.show()

savefig('waveform_2.png')
savefig('waveform_2.svg')