opensourcebrain/HodgkinHuxleyTutorial
0
1/*****2 3A file to create info widgets, plots, save variables etc. in OSB4 5*****/6 7G.addWidget(Widgets.POPUP);8Popup1.setMessage("The <b>Hodgkin-Huxley model</b> is a mathematical model that describes how action potentials in neurons are initiated and propagated. It is a set of nonlinear differential equations that approximates the electrical characteristics of excitable cells such as neurons. <br/><br/>You can run your own simulations of this model by signing up to OSB and logging in. <br/><br/>There is also <a target='_blank' href='http://hodgkin-huxley-tutorial.readthedocs.io/en/latest/'>a tutorial for the HH model</a>, which has been developed as part of the <a target='_blank' href='http://www.openworm.org/'>OpenWorm project</a>.");9Popup1.setName("Description");10Popup1.setPosition(1074,142)11Popup1.setSize(391.8,454.8)12 13 14var Plot1 = G.addWidget(Widgets.PLOT);15Plot1.setName("Hodgkin-Huxley Spiking Neuron");16 17Plot1.setPosition(120, 90);18Plot1.setSize(230,465);19Plot1.plotData(HHCellSingleAP.hhpop[0].v);20 21var Plot2 = G.addWidget(Widgets.PLOT);22 23Plot2.setName("Gating Variables");24Plot2.setPosition(120,350);25Plot2.setSize(285,465)26Plot2.plotData(HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.h.q);27Plot2.plotData(HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.m.q);28Plot2.plotData(HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.kChans.kChan.n.q);29 30Plot2.setLegend(HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.h.q,"Sodium h.q");31Plot2.setLegend(HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.m.q,"Sodium m.q");32Plot2.setLegend(HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.kChans.kChan.n.q,"Potassium n.q");33 34 35Instances.getInstance("HHCellSingleAP.hhpop[0].v");36HHCellSingleAP.hhpop[0].v.setWatched(true);37 38Instances.getInstance("HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.m.q");39HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.m.q.setWatched(true);40Instances.getInstance("HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.h.q");41HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.naChans.naChan.h.q.setWatched(true);42Instances.getInstance("HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.kChans.kChan.n.q");43HHCellSingleAP.hhpop[0].bioPhys1.membraneProperties.kChans.kChan.n.q.setWatched(true);44 