Skip to content
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

Fix mono_t2.m not returning offset value and not using it in plot #490

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gabuzi
Copy link

@gabuzi gabuzi commented Sep 27, 2023

Due to limited time on my side, I cannot do the extended tests (saving/loading of models, etc.) since we do not need this functionality at the moment. I have verified that this works as expected for doing the fits, though.

For this reason, I marked the PR as a draft.

Purpose

Describe the problem or feature in addition to a link to the issues.
Fixes #489 upstream such that offset fit result is propagated and the plot equation & fit is consistent with its options.

Approach

How does this change address the problem?
Write offset to returned fit results struct if model fits with offset.
Maybe consider returning offset = 0 if no offset was used to maintain structure of output.
equation() was changed to include the offset in the returned equation.
plot() was changed to print offset in title if it's present.

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?
Specifications
  • Version:
  • Platform:
  • Subsystem:

@mathieuboudreau
Copy link
Member

@agahkarakuzu do you think this PR should be quickly integrated considering our other user in #492?

@agahkarakuzu
Copy link
Member

@mathieuboudreau adding an optional field dynamically may be the only source of potential issue I can think off the top of my head. Can you test this in GUI? My MATLAB licence is behaving.

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (5523e30) 47.34% compared to head (61015c9) 46.51%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #490      +/-   ##
==========================================
- Coverage   47.34%   46.51%   -0.83%     
==========================================
  Files         260      260              
  Lines        8667     8675       +8     
==========================================
- Hits         4103     4035      -68     
- Misses       4564     4640      +76     
Flag Coverage Δ
matlab 46.51% <50.00%> (-0.01%) ⬇️
octave ?

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

Files Coverage Δ
src/Models/T2_relaxometry/mono_t2.m 61.90% <50.00%> (-2.57%) ⬇️

... 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 5523e30...61015c9. Read the comment docs.

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.

mono_t2 model does not output or plot Offset value if options.OffsetTerm = true
3 participants