def b0_indices(in_bval, max_b=10.0):
 import numpy as np
 bval = np.loadtxt(in_bval)
 return np.argwhere((bval <= max_b)).flatten().tolist()

def b0_indices ( in_bval , max_b = 10.0 ) : import numpy as np bval = np . loadtxt ( in_bval ) return np . argwhere ( ( bval <= max_b ) ) . flatten ( ) . tolist ( )
extract the indices of slices in a b-values file with a low b value .