Skip to content

Conversation

jhlegarreta
Copy link
Contributor

Refactor motion-related data computation functions into reusable code from the PET notebook.

Rename the existing FD function to distinguish it from the refactored function.

@jhlegarreta jhlegarreta requested a review from mnoergaard July 24, 2025 23:51
@jhlegarreta jhlegarreta force-pushed the ref/refactor-fd-funct-pet-nb branch 4 times, most recently from b3b6e5b to d2810bf Compare July 25, 2025 00:12
@jhlegarreta
Copy link
Contributor Author

I'm leaving writing testing functions for a separate PR.

Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 35.29412% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.52%. Comparing base (19af931) to head (aec5793).

Files with missing lines Patch % Lines
src/nifreeze/registration/utils.py 35.29% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #188      +/-   ##
==========================================
- Coverage   74.00%   73.52%   -0.49%     
==========================================
  Files          24       24              
  Lines        1404     1420      +16     
  Branches      166      166              
==========================================
+ Hits         1039     1044       +5     
- Misses        299      310      +11     
  Partials       66       66              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return np.sum(np.abs(d_translations) + np.abs(rotation_displacement), axis=1)


def extract_motion_parameters(affine: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this module is the most appropriate place for this function.

@jhlegarreta jhlegarreta force-pushed the ref/refactor-fd-funct-pet-nb branch 2 times, most recently from b086604 to 0426355 Compare August 2, 2025 00:37
@jhlegarreta jhlegarreta force-pushed the ref/refactor-fd-funct-pet-nb branch from 0426355 to 04a5ac9 Compare August 22, 2025 22:37
Refactor motion-related data computation functions into reusable code
from the PET notebook.

Rename the existing FD function to distinguish it from the refactored
function.
@jhlegarreta jhlegarreta force-pushed the ref/refactor-fd-funct-pet-nb branch from 04a5ac9 to aec5793 Compare August 22, 2025 22:40
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.

1 participant