Skip to content

Commit

Permalink
Merge pull request #39 from jhlegarreta/CallDIPYFuncsWithKeywordArgs
Browse files Browse the repository at this point in the history
ENH: Use keyword arguments when calling  DIPY keyword arg functions
  • Loading branch information
effigies authored Jan 13, 2025
2 parents 12e1422 + bc347ed commit 0a3360a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/dwi_gp_estimation_signal_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def main() -> None:
y_pred = load_api(args.dwi_pred_data_fname, nb.Nifti1Image).get_fdata()

bvals, bvecs = read_bvals_bvecs(str(args.bval_data_fname), str(args.bvec_data_fname))
gtab = gradient_table(bvals, bvecs)
gtab = gradient_table(bvals, bvecs=bvecs)

# Pick one voxel randomly
rng = np.random.default_rng(1234)
Expand Down
2 changes: 1 addition & 1 deletion src/nifreeze/model/_dipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,5 @@ def _rasb2dipy(gradient):
from dipy.core.gradients import gradient_table

warnings.filterwarnings("ignore", category=UserWarning)
retval = gradient_table(gradient[3, :], gradient[:3, :].T)
retval = gradient_table(gradient[3, :], bvecs=gradient[:3, :].T)
return retval
2 changes: 1 addition & 1 deletion src/nifreeze/testing/simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def create_single_shell_gradient_table(

# Add a b0 value to the gradient table
bvals, bvecs = add_b0(bvals, bvecs)
return gradient_table(bvals, bvecs)
return gradient_table(bvals, bvecs=bvecs)


def get_query_vectors(
Expand Down

0 comments on commit 0a3360a

Please sign in to comment.