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

New feature: phaseslope_max #352

Merged

Conversation

AurelienJaquier
Copy link
Collaborator

@AurelienJaquier AurelienJaquier commented Jan 8, 2024

Pull Request Template

Description

New feature: phaseslope_max. To compute the maximum of the (positive) derivative of voltage. Note that this is sensible to interpolation timestep.

Checklist:

  • Unit tests are added to cover the changes.
  • The changes are mentioned in the documentation.
  • CHANGELOG.md is updated (skip if the change is not important for the changelog).

@AurelienJaquier AurelienJaquier self-assigned this Jan 8, 2024
@AurelienJaquier AurelienJaquier marked this pull request as ready for review January 17, 2024 09:48
phaseslope = diff(voltage) / diff(time)
phaseslope_max = max(phaseslope)

if phaseslope_max.size == 0:
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 this check won't work as intended because phaseslope_max is a scalar. I think this check should be performed before computing the max

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed with a try/except in latest commit

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks! looks great! nice that you switched to numpy.max ;)

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2024

Codecov Report

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

Comparison is base (160db25) 66.04% compared to head (ebfeae7) 66.07%.

Files Patch % Lines
efel/pyfeatures/pyfeatures.py 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #352      +/-   ##
==========================================
+ Coverage   66.04%   66.07%   +0.03%     
==========================================
  Files          33       33              
  Lines        6446     6459      +13     
  Branches     2279     2279              
==========================================
+ Hits         4257     4268      +11     
- Misses        265      267       +2     
  Partials     1924     1924              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AurelienJaquier AurelienJaquier merged commit 6b185cb into BlueBrain:master Jan 17, 2024
9 checks passed
@AurelienJaquier AurelienJaquier deleted the dend-validation-features branch January 17, 2024 11:47
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