charles1 wrote:I have trouble understanding how these two lines of code work
The approach is explained in the papers written by proponents of anatomical rescaling. Those were published decades ago--early to mid 1980s as I recall. Almost nobody uses that approach any more.
2. How does increasing the diameter of dendritic compartments by a factor greater than 1 (F^(1/3)) affect Ri in the dendritic compartments? Ri is defined as the cytoplasmic resistivity of 1 cm^3 of cytoplasm, in units of ohm-cm.
You may call cytoplasmic resistivity Ri, but in NEURON it is called Ra. Ra is unaffected by anatomical rescaling. ri will not be affected if one does anatomical rescaling properly, i.e. scales both length and diameter.
How does NEURON compute Ri?
From the specified geometry and Ra. See chapter 5 of The NEURON Book. If you don't have that, see
Hines, M.L. and Carnevale, N.T.
The NEURON simulation environment.
Neural Computation 9:1179-1209, 1997
which is available from a link at
http://www.neuron.yale.edu/neuron/nrnpubsIt can be informative to explore the relationship between ri, the anatomical and biophysical specification of a model neurite, and the discretization parameter nseg, by constructing toy models and comparing simulation results with ones own calculations.