Skip to content

Commit

Permalink
Merge pull request #839 from karanphil/adding_tol_to_msmt_fodf
Browse files Browse the repository at this point in the history
Adding tolerance argument to fodf msmt
  • Loading branch information
arnaudbore authored Dec 14, 2023
2 parents 6991762 + f61cf0f commit 955ca62
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/scil_fodf_msmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def _build_arg_parser():
'--mask', metavar='',
help='Path to a binary mask. Only the data inside the '
'mask will be used for computations and reconstruction.')
p.add_argument(
'--tolerance', type=int, default=20,
help='The tolerated gap between the b-values to '
'extract and the current b-value. [%(default)s]')

add_force_b0_arg(p)
add_sh_basis_args(p)
Expand Down Expand Up @@ -136,6 +140,7 @@ def main():
if mask.shape != data.shape[:-1]:
raise ValueError("Mask is not the same shape as data.")

tol = args.tolerance
sh_order = args.sh_order

# Checking data and sh_order
Expand Down Expand Up @@ -165,9 +170,10 @@ def main():
if not csf_frf.shape[1] == 4:
raise ValueError('CSF frf file did not contain 4 elements. '
'Invalid or deprecated FRF format')
ubvals = unique_bvals_tolerance(bvals, tol=20)
ubvals = unique_bvals_tolerance(bvals, tol=tol)
msmt_response = multi_shell_fiber_response(sh_order, ubvals,
wm_frf, gm_frf, csf_frf)
wm_frf, gm_frf, csf_frf,
tol=tol)

# Loading spheres
reg_sphere = get_sphere('symmetric362')
Expand Down

0 comments on commit 955ca62

Please sign in to comment.