Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 813 Bytes

README.md

File metadata and controls

51 lines (38 loc) · 813 Bytes

Prerequisites

Install

  • Local:
python setup.py bdist_wheel
  • From GitHub
pip install git+https://github.com/ziemowit-s/spiking_neural_agents.git

Test

Brian2

import brian2
brian2.test()

NEURON

from spikeagents.neuron import h, gui
import matplotlib.pyplot as plt

soma = h.Section(name='soma')
soma.L = 20
soma.diam = 20
soma.insert('hh')

iclamp = h.IClamp(soma(0.5))
iclamp.delay = 10
iclamp.dur = 1
iclamp.amp = 0.9

v = h.Vector().record(soma(0.5)._ref_v) # Membrane potential vector
t = h.Vector().record(h._ref_t) # Time stamp vector

h.finitialize(-65)
h.continuerun(40)

plt.plot(t, v)
plt.xlabel('t (ms)')
plt.ylabel('v (mV)')
plt.show()