Skip to content

Wrapper dev - attribute harmonization and signal normalization #106

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

Merged
merged 10 commits into from
Jun 20, 2025

Conversation

IvanARashid
Copy link

Describe the changes you have made in this PR

Two things in this wrapper update:

  1. Harmonization of standardized algorithm attributes. Some names have been changed, some have been added where missing.
  2. Signal normalization before the fit. Has been added to osipi_fit() and osipi_fit_full_volume()

Checklist

  • Self-review of changed code
  • Added automated tests where applicable
  • Update Docs & Guides

Copy link
Contributor

@etpeterson etpeterson left a comment

Choose a reason for hiding this comment

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

Just the one comment really. Also wondering if this is something to get in before the paper?

args = [data[ijk], use_bvalues]
# Normalize array
single_voxel_data = data[ijk]
single_voxel_data_s0 = single_voxel_data[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is assuming that the first index will be the b=0 data. Probably valid but is that an requirement we want to make? Seems like something someone is going to get caught on at some point.
I actually have an ancient PR that should find the b=0 automatically here: https://github.com/OSIPI/TF2.4_IVIM-MRI_CodeCollection/pull/80/files#diff-3e73b3e25749003f8536e5b52b164fa715d358ea4237220c3a1e32f445be03a7
Would dusting that off be good to include here?

Copy link
Author

Choose a reason for hiding this comment

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

I agree with having something more sophisticated than this. I remember raising this and it sort of barely landed on us just requiring it to be first. But I like the solution of taking the mean of all b0's in this example, and shouldn't be hard to implement as we have all the b-values in an array. So I'll adjust the code to include this functionality.

@IvanARashid
Copy link
Author

Just the one comment really. Also wondering if this is something to get in before the paper?

Yes, since the attributes are included in a figure Oscar generates. Also the signal normalization is a feature we sort of promise in the text, and is needed for the bounds and initial guesses to also be harmonized.

@oliverchampion
Copy link
Collaborator

Looks good to me! Happy to merge

Copy link
Contributor

@etpeterson etpeterson left a comment

Choose a reason for hiding this comment

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

Looks good

@oliverchampion oliverchampion merged commit 122cbe3 into main Jun 20, 2025
29 checks passed
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