Skip to content

Add integrated equation of motion to ReSurfEMG - #413

Merged
rspwarnaar merged 26 commits into
mainfrom
dev/ieqm
Aug 5, 2026
Merged

Add integrated equation of motion to ReSurfEMG#413
rspwarnaar merged 26 commits into
mainfrom
dev/ieqm

Conversation

@rspwarnaar

@rspwarnaar rspwarnaar commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add the integrated equation of motion, as described by Graßhoff 2023 to ReSurfEMG

Related Issues

N/A

Changes Introduced

List the major changes made in this PR:

  • Added subpackage modelling, with modules tau_estimation, integrated_equation_of_motion, fit
  • Added module pneumatic to preprocessing with methods to compute volume from flow
  • Updated postprocessing.baseline moving_baseline method with an omit_nan boolean
  • Updated postprocessing.event_detection find_linked_peaks method with a tolerance argument
  • Added neural_expiratory_time method to postprocessing.event_detection
  • Added percentile_snr method to postprocessing.features

Motivation and Context

Methods accompany a research paper and increase the robustness of EMG-based assessment of respiratory effort

Testing

Describe how you tested your changes. Include:

  • Unit tests added or updated
  • Notebook added showing the pipeline for the baseline profile in the paper

Checklist

  • I have read the contributing guidelines
  • My code follows the project's coding style
  • I have added tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • All existing and new tests pass

Additional Notes

Any other context or information reviewers should know?

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.49123% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
resurfemg/postprocessing/features.py 92.50% 6 Missing ⚠️
resurfemg/modelling/tau_estimation.py 96.72% 2 Missing ⚠️
resurfemg/postprocessing/event_detection.py 91.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@rspwarnaar
rspwarnaar marked this pull request as ready for review July 31, 2026 16:12
@rspwarnaar
rspwarnaar requested a review from ChiaraM96 July 31, 2026 16:13
Comment thread resurfemg/preprocessing/pneumatic.py Outdated
Comment thread resurfemg/preprocessing/pneumatic.py
Comment thread resurfemg/modelling/tau_estimation.py Outdated
Comment thread resurfemg/modelling/tau_estimation.py Outdated
Comment thread resurfemg/modelling/integrated_equation_of_motion.py
Comment thread resurfemg/modelling/integrated_equation_of_motion.py Outdated
Comment thread notebooks/researcher_interface/2026_VVUQ_iEqM/2026_vvuq_iEqM.ipynb
Comment thread resurfemg/postprocessing/features.py
Comment thread resurfemg/postprocessing/event_detection.py Outdated
Comment thread resurfemg/postprocessing/event_detection.py
Comment thread resurfemg/postprocessing/event_detection.py Outdated
Comment thread resurfemg/modelling/tau_estimation.py Outdated
Comment thread resurfemg/modelling/tau_estimation.py
Comment thread resurfemg/modelling/tau_estimation.py
Comment thread resurfemg/modelling/tau_estimation.py
Comment thread tests/modelling_tests/tau_estimation_test.py
Comment thread tests/modelling_tests/tau_estimation_test.py Outdated
Comment thread tests/modelling_tests/ieqm_test.py

@ChiaraM96 ChiaraM96 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I finished going over the changes and I flagged down a few small bugs to address before merging - while they didn't seem to affect the results with the current synthetic data, they may become an issue with real data.

Other than that, it all looks nice and clean!

@rspwarnaar

Copy link
Copy Markdown
Collaborator Author

@ChiaraM96 Thanks Chiara. That was really helpful. Could you checkout the new changes?

@ChiaraM96
ChiaraM96 self-requested a review August 5, 2026 07:08

@ChiaraM96 ChiaraM96 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Everything looks clean and merge-ready!

Added details for release 1.1.1, including new features, updates, and maintenance tasks.
@rspwarnaar
rspwarnaar merged commit f327312 into main Aug 5, 2026
16 checks passed
@rspwarnaar rspwarnaar linked an issue Aug 5, 2026 that may be closed by this pull request
3 tasks
@rspwarnaar rspwarnaar removed a link to an issue Aug 5, 2026
3 tasks
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.

2 participants