{"action":"created","issue":{"url":"https://api.github.com/repos/nest/nestml/issues/398","repository_url":"https://api.github.com/repos/nest/nestml","labels_url":"https://api.github.com/repos/nest/nestml/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/nest/nestml/issues/398/comments","events_url":"https://api.github.com/repos/nest/nestml/issues/398/events","html_url":"https://github.com/nest/nestml/issues/398","id":284281398,"number":398,"title":"Regarding automatic conversion to \"Neuroscience\" units","user":{"login":"PTraeder","id":1043126,"avatar_url":"https://avatars3.githubusercontent.com/u/1043126?v=4","gravatar_id":"","url":"https://api.github.com/users/PTraeder","html_url":"https://github.com/PTraeder","followers_url":"https://api.github.com/users/PTraeder/followers","following_url":"https://api.github.com/users/PTraeder/following{/other_user}","gists_url":"https://api.github.com/users/PTraeder/gists{/gist_id}","starred_url":"https://api.github.com/users/PTraeder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PTraeder/subscriptions","organizations_url":"https://api.github.com/users/PTraeder/orgs","repos_url":"https://api.github.com/users/PTraeder/repos","events_url":"https://api.github.com/users/PTraeder/events{/privacy}","received_events_url":"https://api.github.com/users/PTraeder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-23T02:49:23Z","updated_at":"2018-03-14T17:13:11Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"As previously discussed, the current code automatically converts variables of e.g. type `s` to the respective NEST unit (here: `ms`).\r\n\r\nThis is fine for expressions that directly resolve to a higher/lower magnitude of one of the defined \"neuroscience\" units:\r\n`nS, Gohm, ms, pF, mV, pA`\r\n\r\nIn the generated code, NESTML variables of e.g. type `s` are then subject to a factor of `1000` to convert the runtime value in seconds to  the corresponding amount of milliseconds. \r\nAt the same time, a NESTML variables of type `ns` would, in the corresponding C++ code, be multiplied by  `0.000001`.\r\n\r\nHowever 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 in `10^3 * 10^12`. While this would be **a** solution, it does not make much sense to me.\r\n\r\n**Should we handle units like coulomb, newton, etc which are not themselves \"neuroscience\" units in any way?**\r\n@heplesser @jougs @DimitriPlotnikov @Silmathoron \r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nest/nestml/issues/comments/373102224","html_url":"https://github.com/nest/nestml/issues/398#issuecomment-373102224","issue_url":"https://api.github.com/repos/nest/nestml/issues/398","id":373102224,"user":{"login":"heplesser","id":1059644,"avatar_url":"https://avatars3.githubusercontent.com/u/1059644?v=4","gravatar_id":"","url":"https://api.github.com/users/heplesser","html_url":"https://github.com/heplesser","followers_url":"https://api.github.com/users/heplesser/followers","following_url":"https://api.github.com/users/heplesser/following{/other_user}","gists_url":"https://api.github.com/users/heplesser/gists{/gist_id}","starred_url":"https://api.github.com/users/heplesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heplesser/subscriptions","organizations_url":"https://api.github.com/users/heplesser/orgs","repos_url":"https://api.github.com/users/heplesser/repos","events_url":"https://api.github.com/users/heplesser/events{/privacy}","received_events_url":"https://api.github.com/users/heplesser/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T17:13:11Z","updated_at":"2018-03-14T17:13:11Z","author_association":"NONE","body":"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\r\n- 1 pA * 1 ms = 1fC\r\n- 1 pF * 1 mV = 1fC\r\n\r\nSo electrical charge should be expressed in femto-Coulomb."}}
{"actor":{"display_login":"heplesser"}}