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

Additional units #574

Closed
romainbrette opened this Issue Oct 15, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@romainbrette
Member

romainbrette commented Oct 15, 2015

For concentrations, the standard unit is molar (M). It's unfortunately not an ISI unit, as it's mol/liter. However in physiology one generally uses mM, which is mol/m**3. So maybe we could add mM as a unit? If it doesn't make sense, then we could just have it as shorthand for mol/m**3.
Speaking of which: mol could also be added, as it's the standard abbreviation of mole.
Also it seems that we don't have kelvin (temperature).
Finally, how about liter/litre?

Could we also have a few useful constants?
e.g.:
R (gaz constant)
F (Faraday constant)
There's of course the issue of how to name them (no so sure).

@thesamovar

This comment has been minimized.

Show comment
Hide comment
@thesamovar

thesamovar Oct 15, 2015

Member

When we do from brian2 import * I think we should only have unit names that are safe, i.e. no one letter names. What about something like from brian2.constants import R, F so that you have to explicitly say which constants you want? For molar I didn't quite follow it, but I don't think we should add non-SI units: so writing mM as a shorthand for mol/m3 seems like the better solution to me.

Member

thesamovar commented Oct 15, 2015

When we do from brian2 import * I think we should only have unit names that are safe, i.e. no one letter names. What about something like from brian2.constants import R, F so that you have to explicitly say which constants you want? For molar I didn't quite follow it, but I don't think we should add non-SI units: so writing mM as a shorthand for mol/m3 seems like the better solution to me.

@romainbrette

This comment has been minimized.

Show comment
Hide comment
@romainbrette

romainbrette Oct 16, 2015

Member

Yes absolutely. Your idea for constants is good.
For molar and others: yes I agree; we could have molar, mM, and uM as shorthands.
The only thing I'm wondering is for specifying units in equations: would mM work? (if not I think it's ok to have mol/m3)
How about kelvin?

Member

romainbrette commented Oct 16, 2015

Yes absolutely. Your idea for constants is good.
For molar and others: yes I agree; we could have molar, mM, and uM as shorthands.
The only thing I'm wondering is for specifying units in equations: would mM work? (if not I think it's ok to have mol/m3)
How about kelvin?

@mstimberg

This comment has been minimized.

Show comment
Hide comment
@mstimberg

mstimberg Apr 28, 2017

Member

All this was implemented in #821

Member

mstimberg commented Apr 28, 2017

All this was implemented in #821

@mstimberg mstimberg closed this Apr 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment