-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix units of compute_current #461
Conversation
1e2fe7b
to
55e915d
Compare
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.
see below.
5ff35ca
to
6739599
Compare
4c8b799
to
daaa3b7
Compare
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.
Looks good!
jaxley/modules/base.py
Outdated
voltage_terms = voltage_terms.at[indices].add(voltage_term * 1000.0) | ||
constant_terms = constant_terms.at[indices].add(-constant_term * 1000.0) | ||
else: | ||
# If `current_is_in_mA_per_cm2=False` then the current is assumed as |
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.
I'd remove the backward compatibility here, simply because giving people options will make them lazy to adopt the new convention. it's also confusing if both conventions floating around, and it'll be difficult to debug once things go wrong.
* fix units of compute_current * Enforce new unit convention * Add raise and warn for old channel models * add option to use `current_is_in_mA_per_cm2=False` * Add test * Remove warning * fixups
Closes #274
This is a tricky PR as it will impact users which ported channels themselves. I hope that this is not many people yet, so now is the time to still do it.