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

Argument skip_b0_check always overwrites with minimum #1108

Open
karanphil opened this issue Dec 16, 2024 · 2 comments · May be fixed by #1113
Open

Argument skip_b0_check always overwrites with minimum #1108

karanphil opened this issue Dec 16, 2024 · 2 comments · May be fixed by #1113
Assignees

Comments

@karanphil
Copy link
Contributor

I think there might be a major bug with how we deal with the b0 checks. A bit of context:

  • The argument b0_threshold sets a maximum value for the b0s.
  • The fonction check_b0_threshold in scilpy.gradients.bvec_bval_tools then compares the b0_threshold with the minimal b-value min_bval.
  • By default, if the min_bval is higher than b0_threshold, it will raise an Error.
  • The skip_b0_check allows us to raise a warning instead and overwrite b0_threshold to be the same as min_bval.
  • However, there is no way to raise the warning but keep the b0_threshold as is.
  • The add_skip_b0_check_arg function has a will_overwrite_with_min argument that seems completely useless and even misleading, because it only affects the help message but not the behavior of skip_b0_check. For instance, I tought that will_overwrite_with_min=False would keep the b0_threshold as is. This is important in cases where you have no b0s and don't want to take the lowest shell as a b0.

My question is: What is the use of this will_overwrite_with_min argument, which is even mandatory. Am I missing something?

I think we should find a way to pass the bool value of will_overwrite_with_min to the check_b0_threshold function, or split the function in two (skip_b0_check and overwrite_b0_thr_with_min).

@karanphil
Copy link
Contributor Author

I will do some tests to understand better the edge cases.

@EmmaRenauld
Copy link
Contributor

I thought we did that together and with Max but maybe in the end we forgot to change something. I will try to check again too.

@karanphil karanphil linked a pull request Dec 18, 2024 that will close this issue
13 tasks
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 a pull request may close this issue.

2 participants