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
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)