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

Refactor 'amp' and 'hypamp' variables in Step for correct unit conversion #167

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

ilkilic
Copy link
Contributor

@ilkilic ilkilic commented Jan 15, 2024

No description provided.

@ilkilic ilkilic self-assigned this Jan 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (2db0f81) 70.22% compared to head (16763d1) 70.41%.

Files Patch % Lines
bluepyefe/recording.py 83.33% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@AurelienJaquier AurelienJaquier left a 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.

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"])
Copy link
Collaborator

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.

Copy link
Collaborator

@AurelienJaquier AurelienJaquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@ilkilic
Copy link
Contributor Author

ilkilic commented Jan 16, 2024

added the unit conversion in 'set_amplitudes_ecode'

@ilkilic ilkilic merged commit ae362c5 into master Jan 16, 2024
4 checks passed
@ilkilic ilkilic deleted the standardize-trace-amplitude branch January 16, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants