arbor
arbor copied to clipboard
d-lambda CV policy
Hi,
I saw that there are some references to the so-called d-lambda rule for spatial discretisation (described in Hines&Carnevale, 2001 https://doi.org/10.1177%2F107385840100700207) in the code and now closed discussions (#702 for example). As it is quite often encountered, would it not make sense to provide a high level arbor.cv_policy_d_lambda
method for some chosen frequency?
It does indeed make sense! The only reason why we don't have one currently, is that we haven't implemented it.
There is a complication in that while the calculation is straightforward for cylindrical cables, it can get a bit hairy when the morphology is highly variable. We haven't spent the time to get this correct, yet.
Good. I see a rudimentary d-lambda rule implementation was used here: https://github.com/arbor-sim/arbor/commit/df3bc45d5aff6021a49821c425c25faf887e4eb0#diff-e4675578f301beb2d65392d4b89a0c6be4c0fbf841829d64d0e3b05320a362f6R53, but the needed function length_constant
was renamed and finally removed at some later point here it looks like: https://github.com/arbor-sim/arbor/commit/b7361a1fd796d0acb13d776cc8cd8aba2f21df69#diff-e4675578f301beb2d65392d4b89a0c6be4c0fbf841829d64d0e3b05320a362f6
Some equivalent code for the d_lambda
rule (or rather the needed f_lambda
function) implementation used in NEURON is found here: https://www.neuron.yale.edu/neuron/static/docs/d_lambda/d_lambda.html. Looks like a fairly straightforward iteration over each segment belonging to a branch in order to compute the lambda lengths before setting nseg
.
If we have a branch which looks like (excuse the ASCII) ======------
, with greater attenuation in the thin tail, NEURON will divide the branch up equally into its nseg
segments, but the attenuation across each segment will differ from one end to the other. Similarly, NEURON does not need to worry about the situation where the resistivity or membrane capacitance varies along the cable.
In principle, we can accommodate the heterogeneity of the cable geometry or electrical properties to produce CVs each individually satisfying the attenuation requirement. There would have to be a bit of flexibility too, to avoid the possibility of a tiny left-over CV at the end of the cable, perhaps by making a few attempts at getting a more even fit.
Hi, I fully support that an implementation should account for the heterogeneity of the cable diameters. If tiny CVs may be left over (with very short length in units of lambda), I suppose one could consider the frequency parameter a lower limit, meaning one could achieve a more even distribution by incrementing the frequency. But that may end up in an iterative procedure which is probably not something you would like.