-
Notifications
You must be signed in to change notification settings - Fork 15
Bugfix: _energy_ratio handling NaN at the end of EDC #112
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
base: develop
Are you sure you want to change the base?
Conversation
f-brinkmann
left a comment
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.
Thanks for the effort. The code and behavior seems fine to me. I wonder, if and how we should describe this in the docs for already existing parameters. How about adding something like this to the description of the time limit in clarity (and other pull requests):
'If the value exceeds the duration of the EDC or coincides with a NaN-value, it is clipped to the last valid sample of the EDC.'
pyrato/parameters.py
Outdated
| last_valid_1) | ||
| limits_energy_decay_curve2_idx = np.minimum(limits_energy_decay_curve2_idx, | ||
| last_valid_2) |
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.
To much indention, I think:
| last_valid_1) | |
| limits_energy_decay_curve2_idx = np.minimum(limits_energy_decay_curve2_idx, | |
| last_valid_2) | |
| last_valid_1) | |
| limits_energy_decay_curve2_idx = np.minimum(limits_energy_decay_curve2_idx, | |
| last_valid_2) |
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 I would keep it really brief, like you proposed, as this function would only be very rarely used by users without the surrounding energy-parameter function.
Which issue(s) are closed by this pull request?
Closes #111
Changes proposed in this pull request: