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

Fixing the skip_b0_check function #1113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karanphil
Copy link
Contributor

@karanphil karanphil commented Dec 18, 2024

Quick description

See issue #1108 for more details. In summary, I realized that the skip_b0_check option forces the b0_threshold to become the minimal b-value, which doesn't work in some cases. Many scripts used the check_b0_threshold function without saving the outputted threshold, because we did not want to overwrite the b0_threshold. However, the warning message from check_b0_threshold with skip_b0_check still said that the b0_threshold was changed to the minimal b-value, which was false in this case.

A simple fix was to add a overwrite_with_min option to check_b0_threshold, so that if it is False, the warning says that the script will continue without b0s, as it does. I added this overwrite_with_min=False option to all scripts that had will_overwrite_with_min=False when calling add_skip_b0_check_arg. I also changed the help when this will_overwrite_with_min option is False (it was not doing what was said).

Closes #1108

...

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Provide data, screenshots, command line to test (if relevant)

...

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.53%. Comparing base (c352faf) to head (61ea9bd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1113      +/-   ##
==========================================
- Coverage   69.54%   69.53%   -0.01%     
==========================================
  Files         448      448              
  Lines       24069    24074       +5     
  Branches     3289     3290       +1     
==========================================
+ Hits        16739    16741       +2     
- Misses       5938     5940       +2     
- Partials     1392     1393       +1     
Components Coverage Δ
Scripts 70.25% <ø> (ø)
Library 68.59% <57.14%> (-0.02%) ⬇️

Copy link
Contributor

@arnaudbore arnaudbore left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Argument skip_b0_check always overwrites with minimum
2 participants