{"action":"created","issue":{"url":"https://api.github.com/repos/brian-team/brian2/issues/744","repository_url":"https://api.github.com/repos/brian-team/brian2","labels_url":"https://api.github.com/repos/brian-team/brian2/issues/744/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/744/comments","events_url":"https://api.github.com/repos/brian-team/brian2/issues/744/events","html_url":"https://github.com/brian-team/brian2/issues/744","id":174831198,"number":744,"title":"Why HH neurons fire without any input?","user":{"login":"tigerwlin","id":8147698,"avatar_url":"https://avatars.githubusercontent.com/u/8147698?v=3","gravatar_id":"","url":"https://api.github.com/users/tigerwlin","html_url":"https://github.com/tigerwlin","followers_url":"https://api.github.com/users/tigerwlin/followers","following_url":"https://api.github.com/users/tigerwlin/following{/other_user}","gists_url":"https://api.github.com/users/tigerwlin/gists{/gist_id}","starred_url":"https://api.github.com/users/tigerwlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tigerwlin/subscriptions","organizations_url":"https://api.github.com/users/tigerwlin/orgs","repos_url":"https://api.github.com/users/tigerwlin/repos","events_url":"https://api.github.com/users/tigerwlin/events{/privacy}","received_events_url":"https://api.github.com/users/tigerwlin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brian-team/brian2/labels/invalid","name":"invalid","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-02T19:24:28Z","updated_at":"2016-09-05T12:23:14Z","closed_at":"2016-09-05T12:23:14Z","body":"Hi All,\r\n\r\nI am very new to Brian2, apologize if this is a naive or duplicate question. I am just trying this example online (http://brian2.readthedocs.io/en/2.0rc3/examples/COBAHH.html)\r\n\r\nI made all the excitatory and inhibitory synapses to be 0, so no synaptic inputs, my neurons should stay at resting potentials right? But the neurons still spikes. I am confused about where the stimulus come from to make my neurons spike? Thank you so much if anyone can explain this to me.\r\n\r\nHere is my code:\r\n```python\r\nfrom brian2 import *\r\nimport numpy as np\r\nimport hdf5storage\r\nimport os\r\n\r\n# Parameters\r\narea = 20000*umetre**2\r\nCm = (1*ufarad*cm**-2) * area\r\ngl = (5e-5*siemens*cm**-2) * area\r\n\r\nEl = -60*mV\r\nEK = -90*mV\r\nENa = 50*mV\r\ng_na = (100*msiemens*cm**-2) * area\r\n#g_na = (0*msiemens*cm**-2) * area\r\ng_kd = (30*msiemens*cm**-2) * area\r\n#g_kd = (0*msiemens*cm**-2) * area\r\nVT = -63*mV\r\n# Time constants\r\ntaue = 5*ms\r\ntaui = 10*ms\r\n# Reversal potentials\r\nEe = 0*mV\r\nEi = -80*mV\r\nwe = 0*nS # 6*nS  # excitatory synaptic weight\r\nwi = 0*nS #67*nS  # inhibitory synaptic weight\r\n\r\n# The model\r\neqs = Equations('''\r\ndv/dt = (gl*(El-v)+ge*(Ee-v)+gi*(Ei-v)-\r\n         g_na*(m*m*m)*h*(v-ENa)-\r\n         g_kd*(n*n*n*n)*(v-EK))/Cm : volt\r\ndm/dt = alpha_m*(1-m)-beta_m*m : 1\r\ndn/dt = alpha_n*(1-n)-beta_n*n : 1\r\ndh/dt = alpha_h*(1-h)-beta_h*h : 1\r\ndge/dt = -ge*(1./taue) : siemens\r\ndgi/dt = -gi*(1./taui) : siemens\r\nalpha_m = 0.32*(mV**-1)*(13*mV-v+VT)/\r\n         (exp((13*mV-v+VT)/(4*mV))-1.)/ms : Hz\r\nbeta_m = 0.28*(mV**-1)*(v-VT-40*mV)/\r\n        (exp((v-VT-40*mV)/(5*mV))-1)/ms : Hz\r\nalpha_h = 0.128*exp((17*mV-v+VT)/(18*mV))/ms : Hz\r\nbeta_h = 4./(1+exp((40*mV-v+VT)/(5*mV)))/ms : Hz\r\nalpha_n = 0.032*(mV**-1)*(15*mV-v+VT)/\r\n         (exp((15*mV-v+VT)/(5*mV))-1.)/ms : Hz\r\nbeta_n = .5*exp((10*mV-v+VT)/(40*mV))/ms : Hz\r\n''')\r\n\r\nP = NeuronGroup(50, model=eqs, threshold='v>-20*mV', refractory=3*ms,\r\n                method='exponential_euler')\r\nPe = P[:40]\r\nPi = P[40:]\r\nCe = Synapses(Pe, P, on_pre='ge+=we')\r\nCi = Synapses(Pi, P, on_pre='gi+=wi')\r\nCe.connect(p=0.1)\r\nCi.connect(p=0.1)\r\n\r\n# Initialization\r\n#P.v = 'El + (randn() * 5 - 5)*mV'\r\n#P.ge = '(randn() * 1.5 + 4) * 10.*nS'\r\n#P.gi = '(randn() * 12 + 20) * 10.*nS'\r\nP.v = 'El'\r\nP.ge = '0*nS'\r\nP.gi = '0*nS'\r\n\r\n# Record a few traces\r\nM = StateMonitor(P, 'v', record=True)\r\nrun(10 * second, report='stdout')\r\n\r\n#---------------------store connections--------------------------------\r\nexN = len(Ce.i)\r\ninN = len(Ci.i)\r\nexConn = np.vstack((np.array(Ce.i)+1,np.array(Ce.j)+1,np.ones((1,exN))))\r\ninConn = np.vstack((np.array(Ci.i)+41,np.array(Ci.j)+1,-1*np.ones((1,inN))))\r\nConn = np.hstack((exConn,inConn))\r\nnp.savetxt('network.txt', Conn.transpose(), delimiter=',', fmt='%d')\r\nos.system(\"python transferConn.py 1\")\r\n#----------------------------------------------------------------------\r\nhdf5storage.savemat('./tmp/test_neuron.mat', {'data': np.array(M.v[:,::10]).transpose(),'conn': Conn}, format='7.3')\r\n```"},"comment":{"url":"https://api.github.com/repos/brian-team/brian2/issues/comments/244734495","html_url":"https://github.com/brian-team/brian2/issues/744#issuecomment-244734495","issue_url":"https://api.github.com/repos/brian-team/brian2/issues/744","id":244734495,"user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T12:23:14Z","updated_at":"2016-09-05T12:23:14Z","body":"Hi. For questions like this it is better to write a mail to the list (which of course you did as well, I answered there). I'll close this issue as invalid, as this is not a bug in Brian."}}
{"actor":{"display_login":"mstimberg"}}