Closed pnbabu closed 1 year ago
Here is some potential documentation text:
The Dirac delta function is a mathematical construct used to model an impulse or spike, and it has units of inverse time (such as $\text{ms}^{-1}$) to ensure that the integral of the function over time is equal to one. Physical units such as millivolts (mV) and nanoamperes (nA) can be directly combined with the Dirac delta function to model an impulse in a physical quantity such as voltage or current. In such cases, the Dirac delta function is multiplied by the appropriate unit of the physical quantity, such as mV or nA, to obtain a quantity with units of volts or amperes, respectively. For example, the product of a Dirac delta function and a millivolt (mV) unit can be written as $δ(t) \text{mV}$, where δ(t) is the Dirac delta function and mV is the unit of voltage. This can be interpreted as an impulse in voltage with a magnitude of one millivolt.
Thanks for all the work! I think we should stick to the original intention of the pull request, which was to remove units from spiking input ports. It is not clear at first glance what it means to have a unit next to an input port definition, so there is a high potential for mistakes. We should make it clear in the documentation that the units are 1/s, and the type checking system will take care of any potential inconsistencies. Unfortunately this will mean a little bit of extra syntax in the ODEs and convolutions where the units have to now be manually "multiplied in".
Fixes #727
This is based on #866 which should be merged first.