-
Notifications
You must be signed in to change notification settings - Fork 113
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
Dynam units #746
Dynam units #746
Conversation
Wip: framework only. See comment in src/modlunit/units.c
If variable does not exist or is not 0 or 1, then _nrnunit_use_legacy_ is left at its default value.
@nrnhines : is this ready for review or still any work is pending? |
Getting very close. Just want to consult with @adamjhn a bit about whether there is a place in rxd that is called by finitialize so it can test whether h.nrnunit_use_legacy() has changed and if so, update things that depended on NA (avogadro's number). |
… functions. (#753) * Stop caching constants in rxd and moved calls to constants.NA into functions. This avoids storing constants on import which will be inconsistent if you then switch to using the legacy values. * Check for changes to nrnunit_use_legacy and reinitialize potentially relevant parts of the rxd model.
This reverts commit ec78ca0.
@pramodk @alexsavulescu This is ready for review. Note: BBP models may need |
LegacyFR no longer a configure option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Regarding NRN_ENABLE_LEGACY_FR
, wouldn't it be more convenient to have it OFF
by default?
Modern constants updated to codata2018 values. The units test wasn't activated since it did not begin with 'test_' h.Avogadro_constant available from hoc.
@ramcdougal @adamjhn To aid in single sourcing the definition of modern physical constants, I went ahead with your original suggestion and introduced |
|
||
def switch_units(legacy): | ||
try: | ||
h.nrnunit_use_legacy(legacy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nrnhines : is this documented somewhere in user docuemtnaiton now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #599
Closes #324
Closes #519
Linked to neuronsimulator/progref-py#30