Page 1 of 1

cable model with manual diameters and dynamics

Posted: Fri Sep 17, 2021 3:32 am
by shirin
Hi,
I want to simulate a part of dendritic branch by considering diameter changing along the cable. (for example: from 1um to 2um) and I also want to inject currents into different compartments.
This is the rall model code:

Code: Select all

# Passive channels
gL = 1e-4*siemens/cm**2
EL = -70*mV
# Morphology
diameter = 1*um
length = 300*um
Cm = 1*uF/cm**2
Ri = 150*ohm*cm
N = 500
rm = 1 / (gL * pi * diameter)  # membrane resistance per unit length
ra = (4 * Ri)/(pi * diameter**2)  # axial resistance per unit length
la = sqrt(rm / ra) # space length
morpho = Cylinder(diameter=diameter, length=length, n=N)
d1 = 0.5*um
L1 = 200*um
rm = 1 / (gL * pi * d1) # membrane resistance per unit length
ra = (4 * Ri) / (pi * d1**2) # axial resistance per unit length
l1 = sqrt(rm / ra) # space length
morpho.L = Cylinder(diameter=d1, length=L1, n=N)
d2 = (diameter**1.5 - d1**1.5)**(1. / 1.5)
rm = 1/(gL * pi * d2) # membrane resistance per unit length
ra = (4 * Ri) / (pi * d2**2) # axial resistance per unit length
l2 = sqrt(rm / ra) # space length
L2 = (L1 / l1) * l2
morpho.R = Cylinder(diameter=d2, length=L2, n=N)
eqs='''
Im = gL * (EL-v) : amp/meter**2
I : amp (point current)
'''
neuron = SpatialNeuron(morphology=morpho, model=eqs, Cm=Cm, Ri=Ri,
                       method='exponential_euler')
neuron.v = EL
neuron.I[0] = 0.02*nA # injecting at the left end
so I have these questions:
1) Does this code considers this changing diameters? and d1 and d2 are the min and max diameters of the cable?
2) what are the differences of length , L1 ,L2,and l1, l2? I got confused( I also saw the Gerstner book2014 but I didnt get the notations)
3) Is the final units of voltage(potential of each compartments in mV?? because I didnt see any unit conversion of um,cm and so ...
4) if i want to inject current in each time step, for example as a time series for compartment 1 what should I do?sth like this: neuron.I[1] = [1,0.02,0.1,...,1]*nA (len of time)

Re: cable model with manual diameters and dynamics

Posted: Fri Sep 17, 2021 9:59 am
by ted
Can't answer your questions. The code excerpt contains no statement that creates a section or references the properties of a section or segment. There isn't even a reference to any NEURON-specific keyword (pi and names of common units like siemens and um don't count).