Closed sparsh-989 closed 3 weeks ago
for the below test file from brian2 import * import brian2tools.mdexport
set_device('markdown', filename='model1_description') defaultclock.dt = 0.01*ms
diameter = 1um length = 300um Cm = 1*uF/cm*2 Ri = 150ohm*cm N = 200 morpho = Cylinder(diameter=diameter, length=length, n=N)
gL = 1e-4*siemens/cm2 EL = -70mV eqs = ''' Im = gL (EL - v) : amp/meter2 I : amp (point current) '''
neuron = SpatialNeuron(morphology=morpho, model=eqs, Cm=Cm, Ri=Ri, method='exponential_euler') neuron.v = EL la = Ri * Cm**(0.5)
print("Electrotonic length: %s" % la)
neuron.I[0] = 0.02nA # injecting at the left end run(100ms, report='text')
Below is the added functionallity https://gist.github.com/sparsh989/41b4168241a6d8b319a51138b80e8602