Skip to content

STY: Re-use and define global variables for dMRI model #208

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jhlegarreta
Copy link
Contributor

  • STY: Re-use the lower-bound b and S0 thresholds from dMRI data module
  • STY: Define the S0 clipping percentile as a global variable

@jhlegarreta jhlegarreta requested a review from oesteban August 12, 2025 23:53
@jhlegarreta jhlegarreta force-pushed the sty/misc-dmri-model-fixes2 branch from b815683 to ece34d6 Compare August 12, 2025 23:55
@@ -79,7 +79,7 @@ def __init__(self, dataset: DWI, max_b: float | int | None = None, **kwargs):
f"DWI dataset is too small ({dataset.gradients.shape[0]} directions)."
)

if max_b is not None and max_b > B_MIN:
if max_b is not None and max_b > DEFAULT_LOWB_THRESHOLD:
Copy link
Contributor Author

@jhlegarreta jhlegarreta Aug 12, 2025

Choose a reason for hiding this comment

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

Note that as explained in cd9f6ca, the b0 lower bound is changed from 1e-6 to 1e-5.

Copy link

codecov bot commented Aug 13, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.96%. Comparing base (bb3d129) to head (6a26bcb).

Files with missing lines Patch % Lines
src/nifreeze/model/dmri.py 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #208   +/-   ##
=======================================
  Coverage   73.96%   73.96%           
=======================================
  Files          24       24           
  Lines        1402     1402           
  Branches      166      166           
=======================================
  Hits         1037     1037           
  Misses        299      299           
  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.

Re-use the lower-bound b and S0 thresholds from dMRI data module in the
dMRI model for the sake of consistency.

The data module minimum S0 value is 1e-5 as opposed to the 1e-6 value
that was being used in the model module.
Define the S0 clipping percentile in the dMRI model as a global
variable and document its purpose.
@jhlegarreta jhlegarreta force-pushed the sty/misc-dmri-model-fixes2 branch from ece34d6 to 6a26bcb Compare August 13, 2025 00:37
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