nest / nest-simulator

The NEST simulator
http://www.nest-simulator.org
GNU General Public License v2.0
539 stars 365 forks source link

Compartmental model documentation: inconsistency in unit of measure of some parameters #2382

Closed epastorelli closed 1 year ago

epastorelli commented 2 years ago

Describe the flaw In NEST 3.3 compartmental model documentation (https://nest-simulator.readthedocs.io/en/v3.3/models/cm_default.html), capacitances and conductances are expressed respectively in uF and uS. In cm_tree.cpp, lines 488-489 (print_tree function), they are reported as nF and uS. In the given examples receptors_and_current.py and two_comps.py (https://github.com/nest/nest-simulator/blob/master/pynest/examples/compartmental_model) they are used as pF and nS.

Suggest an improvement Fix to the correct unit of measure. In my opinion those used in the examples should be the correct ones: capacitances in pF and conductances in nS

github-actions[bot] commented 2 years ago

Issue automatically marked stale!

WillemWybo commented 2 years ago

Thank you very much for raising this issue. The compartmental model actually exerts no control over the units, meaning that it's up to the user to choose units that fit. The unit of time will always be ms though, and it's reasonable to assume that the unit of voltage is always mV. If for instance, capacitance is expressed in nF, that means that the capacitive currents will be in nF mV / ms = nA. By consequence, conductance units must be in uS in this case for the associated currents to be uS mV = nA. That means that the weights of conductance based synapses must also be specified in uS. Conversely, if the capacitance is specified in pF, then the conductances must be in nS. The units in the example are thus correct, but not the only choice.

As for a solution, I would propose correcting the units in the doc-table, but specifying that this is but a particular choice of units. I would further propose removing the units from the print_tree function (which should probably become python-callable in one way or another for debugging purposes) to avoid confusion.

My excuses that it took so long to answer, I wasn't aware of this issue, could I and/or @JoshuaBoettcher be assigned to compartmental model related issues in the future? @terhorstd

github-actions[bot] commented 2 years ago

Issue automatically marked stale!

jessica-mitchell commented 1 year ago

@WillemWybo As far as I can tell, this issue is resolved by your comment. I will close this.