Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with handling of units of electrode parameters in Brian #452

Open
appukuttan-shailesh opened this issue Mar 1, 2017 · 0 comments
Labels
Milestone

Comments

@appukuttan-shailesh
Copy link
Contributor

appukuttan-shailesh commented Mar 1, 2017

Consider the following snippet of code:

c = DCSource(amplitude=0.5)
print c.amplitude
c.amplitude += 0.0
print c.amplitude

The output from Brian is:

5e-10
5e-19

Note the difference. This arises owing to the conversion from nA to A for the Brian implementation. During the increment (with 0.0 here), the value is re-converted from nA to A, resulting in the extra 1e-9.

When running the same on NEURON, things are safe as there is no conversion involved:

0.5
0.5

Things seem to be in order with the NEST implementation (which also involves conversion of units):

<larray: base_value=500.0 shape=None dtype=<type 'float'>, operations=[(<built-in function div>, 1000.0)]>
<larray: base_value=500.0 shape=None dtype=<type 'float'>, operations=[(<built-in function div>, 1000.0)]>

@apdavison : It would also be useful (if feasible) to ensure that printing the parameters across the various simulator backends results in values with same units.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants