-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor 'amp' and 'hypamp' variables in Step for correct unit conversion #167
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 70.22% 70.41% +0.19%
==========================================
Files 35 35
Lines 2223 2221 -2
==========================================
+ Hits 1561 1564 +3
+ Misses 662 657 -5 ☔ View full report in Codecov by Sentry. |
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.
You will also have to change set_amplitudes_ecode in recording to also use to_nA.
bluepyefe/recording.py
Outdated
if "amp" in reader_data: | ||
amp = to_nA(reader_data["amp"], reader_data["i_unit"]) | ||
if "hypamp" in reader_data: | ||
hypamp = to_nA(reader_data["hypamp"], reader_data["i_unit"]) |
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 think there is also the possibility of having amp and hypamp in config_data. I would suggest checking for i_unit in config and amp in config, i_unit in config and amp in reader, i_unit in reader and amp in config, and i_unit in reader and amp in reader. So that we are sure of not missing any case.
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 great!
added the unit conversion in 'set_amplitudes_ecode' |
No description provided.