Skip to content

Commit

Permalink
Update dmriprep/utils/vectors.py
Browse files Browse the repository at this point in the history
Co-Authored-By: Ariel Rokem <arokem@gmail.com>
  • Loading branch information
2 people authored and dPys committed Mar 24, 2020
1 parent 66f8b48 commit 7e1b11e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dmriprep/utils/vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,9 @@ def bvecs2ras(affine, bvecs, norm=True, bvec_norm_epsilon=0.2):

def nonoverlapping_qspace_samples(sample_bval, sample_bvec, all_bvals,
all_bvecs, cutoff=2):
"""Ensure that none of the training samples are too close to the sample to predict.
Parameters
"""
Checks the q-space overlap (within some distance) between a sample
and a collection of q-space points.
Parameters
----------
Expand Down Expand Up @@ -453,6 +454,7 @@ def _rasb_to_bvec_list(in_rasb):
----------
in_rasb : str or os.pathlike
File path to a RAS-B gradient table.
Returns
-------
List of b-vectors as floats.
Expand Down Expand Up @@ -480,4 +482,4 @@ def _rasb_to_bval_floats(in_rasb):
import numpy as np

ras_b_mat = np.genfromtxt(in_rasb, delimiter="\t")
return [float(bval) for bval in ras_b_mat[:, 3] if bval > 0]
return [float(bval) for bval in ras_b_mat[:, 3] if bval > 0]

0 comments on commit 7e1b11e

Please sign in to comment.