Open PTraeder opened 6 years ago
Sorry for the late reply... To me, it seems that the only important thing is that any value passed to a C++ expression is expressed in the correct NEST units. However, I think that having a coherent approach would be better so that people don't have to think about it too much.
This is a point that was discussed before here and here and I proposed a coherent "neuroscience system" before, which I think should be the coherent unit system for NEST.
I'll let @heplesser and @jougs give their opinion on this proposed system ;)
Sorry for my very delayed reply. The NEST system of scales for units is based on internal consistency. This we should also apply to units for which we have not yet fixed a scale prefactor. In this case
So electrical charge should be expressed in femto-Coulomb.
Now that we are using astropy, do we care which unit is used in the C++ code for "non-neuroscience" units (i.e. units which do not interact with ms
, mV
, pA
, pF
, nS
, etc).
I don't think so but I would like to make sure it's not the case...
So would there be units other than fC
that we need to fix?
For reminder, to support detailed conductance-based models we need concentrations, volumes, temperatures, and distances, but I don't think this would interact...
As previously discussed, the current code automatically converts variables of e.g. type
s
to the respective NEST unit (here:ms
).This is fine for expressions that directly resolve to a higher/lower magnitude of one of the defined "neuroscience" units:
nS, Gohm, ms, pF, mV, pA
In the generated code, NESTML variables of e.g. type
s
are then subject to a factor of1000
to convert the runtime value in seconds to the corresponding amount of milliseconds. At the same time, a NESTML variables of typens
would, in the corresponding C++ code, be multiplied by0.000001
.However a variable of e.g. type coulomb (
C= s*A
) would not be subject to such a conversion since no "neuroscience" target is defined for coulomb. In my understanding it should be subject to a conversion, in this case we could simply multiply the factors for each of the constituting SI base units (s and A
) which would result in10^3 * 10^12
. While this would be a solution, it does not make much sense to me.Should we handle units like coulomb, newton, etc which are not themselves "neuroscience" units in any way? @heplesser @jougs @DimitriPlotnikov @Silmathoron