Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BusraBulut222
Copy link
Collaborator

@BusraBulut222 BusraBulut222 commented Jul 11, 2023

Purpose

Upper and lower bounds aren't apply during the mono T2 fitting

Approach

Modify the mono T2 file accordingly, also fix checkbox was not working before, and now M0 is forced to be fixed when T2 is fixed.

Open Questions and Pre-Merge TODOs

  • Use github checklists. When solved, check the box and explain the answer.

  • Review that changed source files/lines are related to the pull request/issue
    If any files/commits were accidentally included, cherry-pick them into another branch.

  • Review that changed source files/lines were not accidentally deleted
    Fix appropriately if so.

  • Test new features or bug fix
    If not implemented/resolved adequately, solve it or inform the developer by requesting changes in your review.
    Preferably, set breakpoints in the locations that the code was changed and follow allong line by line to see if the code behaves as intended.

Manual GUI tests (general)
  • Does the qMRLab GUI open?
  • Can you change models?
  • Can you load a data folder for a model?
  • Can you view data?
  • Can you zoom in the image?
  • Can you pan out of the image?
  • Can you view the histogram of the data?
  • Can you change the color map?
  • Can you fit dataset (Fit data)?
  • Can you save/load the results?
  • Can you open the options panel?
  • Can you change option parameters?
  • Can you save/load option paramters?
  • Can you select a voxel?
  • Can you fit the data of that voxel ("View data fit")?
  • Can you simulate and fit a voxel ("Single Voxel Curve")?
  • Can you run a Sensitivity Analysis?
  • Can you simulate a Multi Voxel Distribution?

@mathieuboudreau mathieuboudreau self-requested a review July 11, 2023 17:22
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #488 (44d6c23) into master (036ff20) will decrease coverage by 0.80%.
The diff coverage is 44.44%.

❗ Current head 44d6c23 differs from pull request most recent head eace5a2. Consider uploading reports for the commit eace5a2 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #488      +/-   ##
==========================================
- Coverage   47.40%   46.61%   -0.80%     
==========================================
  Files         260      260              
  Lines        8648     8654       +6     
==========================================
- Hits         4100     4034      -66     
- Misses       4548     4620      +72     
Flag Coverage Δ
matlab 46.61% <44.44%> (-0.01%) ⬇️
octave ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Models/T2_relaxometry/mono_t2.m 64.47% <44.44%> (-2.67%) ⬇️

... and 18 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 036ff20...eace5a2. Read the comment docs.

Copy link
Member

@mathieuboudreau mathieuboudreau left a comment

Choose a reason for hiding this comment

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

Thanks for noticing this issue @BusraBulut222 and pushing this PR to fix it!

After reflecting a bit, I realized that the "Fix" checkbox isn't meant to select if the bounds were being applied, but instead to -Fix- the value to a specific value during fitting. I've adjusted the behaviour accordingly; when the "Fix" checkbox is checked, it will set the lb and ub values to the st value. I don't think this would be super useful to a lot of folks, but maybe fixing the M0 for a homogenous phantom would be useful to some.

The only downside now of limiting the fit to the lb and ub is that it slows down the fits (which is inevitable when setting bounds). Maybe in the future someone could introduce an option button in the pannel to set boundless fitting, as was the previous behaviour.

Thanks again!

@mathieuboudreau
Copy link
Member

mathieuboudreau commented Jul 12, 2023

Since we changed the fitting bounds for this model, this resulted in voxels with values out of those bounds to get thresholded, so the test comparing it to our archived fitting results failed. There is no way around this for this type of change except updating the archived results on OSF, which I did, and now the tests pass.

Thanks again for your contribution @BusraBulut222!

@mathieuboudreau mathieuboudreau merged commit e8c3312 into master Jul 12, 2023
mathieuboudreau added a commit that referenced this pull request Aug 6, 2024
* Filter doesn't work on octave, patch it (#483)

* Bug fixed : bounds for fitting mono T2 (#488)

* Bug fixed : bounds for fitting mono T2

* Fix the -Fix- behaviour

* Update mono_t2 full dataset (now ver 3) and partial dataset (now ver 2) on osf

---------

Co-authored-by: Mathieu Boudreau <[email protected]>

* Fix nifti scaling bug when saving qMRI maps (#495)

Only happens if the input files had scale factors set, as their header are used for a template.

* Fix isempty bug for doc data download (#496)

* Correct excitation flip angles in R1 and A calculations when B1 input exists (#497)

* Correct flip angles in R1, A, and MTsat calculations when B1 input exists

* Revert inclusion of B1 correction in MTsat(Inds) following discussion & threads (for now, at least)

* Factor out B1 multiplications

* MP2RAGE: Add magnitude-only data functionality (#498)

---------

Co-authored-by: BusraBulut222 <[email protected]>
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