def __init__(self, cell):
        def show_val():
            print("Spacer Ra of the model: {}".format(cell.spacer.Ra))
            print(
                'The starting point is {}, end point is {} with increasing steps of {}'
                .format(min_current_var[0], max_current_var[0],
                        step_current_var[0]))

        #Contorl Panel
        sim_control = h.HBox()
        sim_control.intercept(1)
        h.nrncontrolmenu()
        attach_current_clamp(cell)
        h.xpanel('TEST')
        h.xlabel('Choose a  simulation to run')
        h.xbutton('Spike Protocol', (spike_fig, cell))
        h.xbutton('Rheobase Protocol', (fig_rheobase_check, cell))
        h.xbutton('Multiple Rheobase Protocol',
                  (multiple_rheobase_plots_new, cell))
        h.xbutton('Increasing Ra Protocol', (fig_ra_rheobase_spacerL, cell))
        h.xbutton('Increasing spacer_gpas Protocol',
                  (fig_g_rheobase_spacerL, cell))
        h.xbutton('Increasing cell c_m Protcol',
                  (fig_cm_rheobase_spacerL, cell))
        h.xbutton('Combined Protocol Run', (Combined_Protocol, cell))
        h.xpvalue('Rheobase protocol start', min_current_var, 1)
        h.xpvalue('Rheobase protocol end', max_current_var, 1)
        h.xpvalue('Rheobase step size', step_current_var, 1)
        h.xbutton('show value', show_val)
        # h.xvalue('enter value', (this_module, 'val'))
        h.xpanel()
        #Output panel
        g = h.Graph()
        g.addvar('soma(0.5).v', cell.soma(0.5)._ref_v)
        g.addvar('AIS(0.5).v', cell.AIS(0.5)._ref_v)
        g.size(0, 1000, -90, 90)
        h.graphList[0].append(g)
        h.MenuExplore()
        sim_control.intercept(0)
        sim_control.map()
        input()
Example #2
0
 def xpvalue (self,name,ptr,runner=pr):
   "Doesn't work currently"
   h.xpanel("")
   h.xpvalue(name,ptr,1,runner)
   h.xpanel()
Example #3
0
        #Contorl Panel
        sim_control = h.HBox()
        sim_control.intercept(1)
        h.nrncontrolmenu()
        attach_current_clamp(cell)
        h.xpanel('TEST')
        h.xlabel('Choose a  simulation to run')
        h.xbutton('Spike Protocol',(spike_fig, cell))
        h.xbutton('Rheobase Protocol',(fig_rheobase_check, cell))
        h.xbutton('Multiple Rheobase Protocol', (multiple_rheobase_plots_new, cell))
<<<<<<< HEAD
        h.xbutton('Increasing Ra Protocol', (fig_ra_rheobase_spacerL, cell))
        h.xbutton('Increasing spacer_gpas Protocol', (fig_g_rheobase_spacerL, cell))
        h.xbutton('Increasing cell c_m Protcol', (fig_cm_rheobase_spacerL, cell))
        h.xbutton('Combined Protocol Run', (temp_stack_ra_scatter, cell))
        h.xpvalue('Rheobase protocol start', min_current_var, 1)
        h.xpvalue('Rheobase protocol end', max_current_var, 1)
        h.xpvalue('Rheobase step size', step_current_var, 1)
=======
        h.xbutton('Fig 1', (fig1_rheobase_spacer_dend, cell))
        h.xbutton('Fig 2', (fig2_rheobase_spacer_cm, cell))
        h.xbutton('Fig 3', (fig3_rheobase_spacer_rm, cell))
        h.xbutton('Fig 4', (fig1_rheobase_spacer_dend, cell))
        h.xpvalue('enter value', val, 1)
>>>>>>> faea529 (TEST)
        h.xbutton('show value', show_val)
        # h.xvalue('enter value', (this_module, 'val'))
        h.xpanel()
        #Output panel
        g = h.Graph()
        g.addvar('soma(0.5).v', cell.soma(0.5)._ref_v)
Example #4
0
from neuron import h

h('foo = 2')
h.variable_domain('foo', 1, 5)
h.units('foo', 'cm')

h.xpanel("test")
h.xvalue("foo", "foo", 1)
h.xpvalue("foo", h._ref_foo, 1)
h.xpanel()