I am currently working on a model that uses the McIntyre MRG axon converted from hoc to python. In this model, I am looking for the threshold current value that would generate an action potential within the axon. The stimulation in this setup comes from a single point source electrode located 2 mm above the middle node of the axon that is generating a singular rectangular current pulse.
The basic setup code for the stimulation is found below, where the electrode_current variable is an array that represents the stimulus over time, used to scale the extracellular potential at each time step. I have checked to make sure that the entirety of the array is used within the run-time parameters.
Code: Select all
h.tstop = 40
h.dt = 0.02
h.v_init = -80
h.finitialize(h.v_init)
while h.t < h.tstop:
for i in range(0, 21):
axon1.nodes[i].e_extracellular = node_voltages[i]*test_current*(electrode_current[stim_counter])
for i in range(0, 40):
axon1.MYSA[i].e_extracellular = MYSA_voltages[i]*test_current*(electrode_current[stim_counter])
for i in range(0, 40):
axon1.FLUT[i].e_extracellular = FLUT_voltages[i]*test_current*(electrode_current[stim_counter])
for i in range(0, 120):
axon1.STIN[i].e_extracellular = STIN_voltages[i]*test_current*(electrode_current[stim_counter])
stim_counter += 1
h.fadvance()