Module Import alias Import alias Import alias Import alias Import alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Str Assign NameStore BinOpAdd NameLoad Str ImportFrom alias If UnaryOpNot Call NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Call NameLoad NameLoad NameLoad Print NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpAdd Str NameLoad NameLoad Str For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad Str Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad attr Num NameLoad Str Assign NameStore SubscriptLoad NameLoad Slice Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad NameLoad Str NameLoad NameLoad Str NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpAdd Str NameLoad NameLoad Str For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad Str Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad attr Num NameLoad Str Assign NameStore SubscriptLoad NameLoad Slice Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad NameLoad Str NameLoad NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad NameLoad Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str Call NameLoad Call NameLoad Call NameLoad NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore ListLoad Assign NameStore ListLoad If CompareEq NameLoad Str body Assign NameStore ListLoad With Call NameLoad NameLoad NameStore body For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot CompareEq Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num body Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad Num NameLoad body If CompareLt Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListComp BinOpPow NameLoad Num comprehension NameStore SubscriptLoad NameLoad Index NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad orelse ImportFrom alias Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad For NameStore Call NameLoad Num NameLoad body If CompareLt SubscriptLoad NameLoad Index NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad ListLoad body Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Print BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call NameLoad AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword ListLoad Str Str keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword ListLoad Str Str keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword NameLoad keyword ListLoad Str Str keyword Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Str Assign NameStore Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad
N/A N/A sys N/A math N/A time N/A os N/A commands N/A sct_utils sct msct_image Image sct_image split_data msct_parser Parser Param N/A N/A __init__ N/A N/A self N/A N/A N/A N/A self debug 0 N/A N/A self average 0 N/A N/A self remove_tmp_files 1 N/A N/A self verbose 1 N/A N/A self bval_min 100 N/A N/A main N/A N/A fname_data fname_bvecs fname_bvals path_out average verbose remove_tmp_files N/A N/A N/A start_time N/A N/A time time N/A N/A status path_sct N/A N/A commands getstatusoutput echo $SCT_DIR N/A N/A param debug N/A N/A fname_data N/A path_sct /testing/data/errsm_23/dmri/dmri.nii.gz N/A fname_bvecs N/A path_sct /testing/data/errsm_23/dmri/bvecs.txt N/A average 1 N/A verbose 1 N/A N/A N/A sct printv 
Input parameters: verbose N/A N/A N/A sct printv N/A   input file ............ fname_data verbose N/A N/A N/A sct printv N/A   bvecs file ............ fname_bvecs verbose N/A N/A N/A sct printv N/A   bvals file ............ fname_bvals verbose N/A N/A N/A sct printv N/A   average ............... N/A str average verbose N/A fname_data N/A N/A N/A os path abspath fname_data N/A fname_bvecs N/A N/A N/A os path abspath fname_bvecs N/A N/A path_data file_data ext_data N/A N/A sct extract_fname fname_data N/A N/A N/A sct printv 
Create temporary folder... verbose N/A path_tmp N/A N/A sct slash_at_the_end N/A tmp. N/A N/A time strftime %y%m%d%H%M%S 1 N/A N/A N/A sct run N/A mkdir  path_tmp verbose N/A N/A N/A sct printv 
Copy files into temporary folder... verbose N/A ext .nii N/A dmri_name dmri N/A b0_name b0 N/A b0_mean_name N/A b0_name _mean N/A dwi_name dwi N/A dwi_mean_name N/A dwi_name _mean sct_convert convert N/A N/A N/A convert fname_data N/A N/A path_tmp dmri_name ext N/A N/A N/A N/A sct printv ERROR in convert. 1 error N/A N/A N/A sct run N/A N/A N/A N/A cp  fname_bvecs path_tmp bvecs verbose N/A N/A N/A os chdir path_tmp N/A im_dmri N/A Image N/A dmri_name ext N/A N/A N/A sct printv 
Get dimensions data... verbose N/A N/A nx ny nz nt px py pz pt N/A im_dmri dim N/A N/A N/A sct printv N/A N/A N/A N/A N/A N/A N/A ..  N/A str nx  x  N/A str ny  x  N/A str nz  x  N/A str nt verbose N/A fname_bvals N/A N/A index_b0 index_dwi nb_b0 nb_dwi N/A identify_b0 fname_bvecs fname_bvals N/A param bval_min verbose N/A N/A N/A sct printv 
Split along T dimension... verbose N/A im_dmri_split_list N/A split_data im_dmri 3 N/A im_d im_dmri_split_list N/A N/A N/A N/A im_d save N/A N/A N/A sct printv 
Merge b=0... verbose N/A cmd N/A N/A N/A sct_image -concat t -o  b0_name ext  -i  N/A it N/A range nb_b0 N/A N/A cmd N/A N/A N/A N/A N/A cmd dmri_name _T N/A N/A N/A str N/A index_b0 N/A it zfill 4 ext , N/A cmd N/A cmd N/A -1 N/A N/A status output N/A N/A sct run cmd N/A param verbose N/A average N/A N/A N/A N/A sct printv 
Average b=0... verbose N/A N/A N/A sct run N/A N/A N/A N/A N/A N/A sct_maths -i  b0_name ext  -o  b0_mean_name ext  -mean t verbose N/A cmd N/A N/A N/A sct_image -concat t -o  dwi_name ext  -i  N/A it N/A range nb_dwi N/A N/A cmd N/A N/A N/A N/A N/A cmd dmri_name _T N/A N/A N/A str N/A index_dwi N/A it zfill 4 ext , N/A cmd N/A cmd N/A -1 N/A N/A status output N/A N/A sct run cmd N/A param verbose N/A average N/A N/A N/A N/A sct printv 
Average DWI... verbose N/A N/A N/A sct run N/A N/A N/A N/A N/A N/A sct_maths -i  dwi_name ext  -o  dwi_mean_name ext  -mean t verbose N/A N/A N/A os chdir .. N/A N/A N/A sct printv 
Generate output files... verbose N/A N/A N/A sct generate_output_file N/A N/A path_tmp b0_name ext N/A N/A path_out b0_name ext_data verbose N/A N/A N/A sct generate_output_file N/A N/A path_tmp dwi_name ext N/A N/A path_out dwi_name ext_data verbose N/A average N/A N/A N/A N/A sct generate_output_file N/A N/A path_tmp b0_mean_name ext N/A N/A path_out b0_mean_name ext_data verbose N/A N/A N/A sct generate_output_file N/A N/A path_tmp dwi_mean_name ext N/A N/A path_out dwi_mean_name ext_data verbose N/A N/A remove_tmp_files 1 N/A N/A N/A N/A sct printv 
Remove temporary files... verbose N/A N/A N/A sct run N/A rm -rf  path_tmp verbose N/A elapsed_time N/A N/A N/A time time start_time N/A N/A N/A sct printv N/A N/A 
Finished! Elapsed time:  N/A str N/A int N/A round elapsed_time s verbose N/A N/A N/A sct printv 
To view results, type:  verbose N/A average N/A N/A N/A N/A sct printv fslview b0 b0_mean dwi dwi_mean &
 verbose N/A N/A N/A N/A sct printv fslview b0 dwi &
 verbose N/A identify_b0 N/A N/A fname_bvecs fname_bvals bval_min verbose N/A N/A N/A N/A N/A sct printv 
Identify b=0 and DWI images... verbose N/A index_b0 N/A N/A index_dwi N/A N/A N/A fname_bvals N/A N/A bvecs N/A N/A N/A open fname_bvecs f N/A N/A line f N/A N/A bvecs_new N/A map float N/A N/A line split N/A N/A N/A bvecs append bvecs_new N/A N/A N/A N/A len N/A N/A bvecs N/A 0 N/A 3 N/A N/A N/A N/A sct printv   WARNING: bvecs file is 3xn instead of nx3. Consider using sct_dmri_transpose_bvecs. verbose warning N/A N/A N/A sct printv   Transpose bvecs... verbose N/A bvecs N/A zip bvecs N/A nt N/A len bvecs N/A it N/A xrange 0 nt N/A N/A N/A N/A N/A math sqrt N/A N/A math fsum N/A N/A i 2 N/A i N/A bvecs N/A it 0.01 N/A N/A N/A N/A index_b0 append it N/A N/A N/A N/A index_dwi append it N/A dipy.io read_bvals_bvecs N/A N/A bvals bvecs N/A read_bvals_bvecs fname_bvals fname_bvecs N/A nt N/A len bvals N/A N/A N/A sct printv 
Identify b=0 and DWI images... verbose N/A it N/A xrange 0 nt N/A N/A N/A N/A bvals N/A it bval_min N/A N/A N/A N/A index_b0 append it N/A N/A N/A N/A index_dwi append it N/A N/A index_b0 N/A N/A N/A N/A N/A sct printv ERROR: no b=0 images detected. Maybe you are using non-null low bvals? in that case use flag -bvalmin. Exit program. 1 error N/A N/A N/A sys exit 2 N/A nb_b0 N/A len index_b0 N/A nb_dwi N/A len index_dwi N/A N/A N/A sct printv N/A N/A N/A   Number of b=0:  N/A str nb_b0 N/A str index_b0 verbose N/A N/A N/A sct printv N/A N/A N/A   Number of DWI:  N/A str nb_dwi N/A str index_dwi verbose N/A N/A index_b0 index_dwi nb_b0 nb_dwi N/A usage N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A os path basename __file__ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Part of the Spinal Cord Toolbox <https://sourceforge.net/projects/spinalcordtoolbox>

DESCRIPTION
  Separate b=0 and DW images from diffusion dataset.

USAGE
   N/A N/A N/A os path basename __file__  -i <dmri> -b <bvecs>

MANDATORY ARGUMENTS
  -i <dmri>        diffusion data
  -b <bvecs>       bvecs file

OPTIONAL ARGUMENTS
  -a {0,1}         average b=0 and DWI data. Default= N/A str N/A param_default average 
  -m <bvals>       bvals file. Used to identify low b-values (in case different from 0).
  -o <output>      output folder. Default = local folder.
  -v {0,1}         verbose. Default= N/A str N/A param_default verbose 
  -r {0,1}         remove temporary files. Default= N/A str N/A param_default remove_tmp_files 
  -h               help. Show this message

EXAMPLE
   N/A N/A N/A os path basename __file__  -i dmri.nii.gz -b bvecs.txt -a 1
 N/A N/A N/A sys exit 2 N/A get_parser N/A N/A N/A N/A N/A param_default N/A Param N/A parser N/A Parser __file__ N/A N/A N/A N/A parser usage set_description Separate b=0 and DW images from diffusion dataset. N/A N/A N/A parser add_option name -i type_value image_nifti description Diffusion data mandatory True example dmri.nii.gz N/A N/A N/A parser add_option name -b type_value file description bvecs file mandatory False example bvecs.txt deprecated_by -bvec N/A N/A N/A parser add_option name -bvec type_value file description bvecs file mandatory True example bvecs.txt N/A N/A N/A parser add_option name -a type_value multiple_choice description average b=0 and DWI data. mandatory False example N/A 0 1 default_value N/A str N/A param_default average N/A N/A N/A parser add_option name -m type_value file description bvals file. Used to identify low b-values (in case different from 0). mandatory False deprecated_by -bval N/A N/A N/A parser add_option name -bval type_value file description bvals file. Used to identify low b-values (in case different from 0). mandatory False N/A N/A N/A parser add_option name -bvalmin type_value float description B-value threshold (in s/mm2) below which data is considered as b=0. mandatory False example 50 N/A N/A N/A parser add_option name -o type_value folder_creation description Output folder. mandatory False default_value ./ deprecated_by -ofolder N/A N/A N/A parser add_option name -ofolder type_value folder_creation description Output folder. mandatory False default_value ./ N/A N/A N/A parser add_option name -v type_value multiple_choice description Verbose. mandatory False example N/A 0 1 default_value N/A str N/A param_default verbose N/A N/A N/A parser add_option name -r type_value multiple_choice description remove temporary files. mandatory False example N/A 0 1 default_value N/A str N/A param_default remove_tmp_files N/A parser N/A N/A N/A __name__ __main__ N/A N/A param N/A Param N/A param_default N/A Param N/A parser N/A get_parser N/A arguments N/A N/A parser parse N/A N/A sys argv N/A 1 N/A fname_data N/A arguments N/A -i N/A fname_bvecs N/A arguments N/A -bvec N/A fname_bvals N/A path_out N/A average N/A param average N/A verbose N/A param verbose N/A remove_tmp_files N/A param remove_tmp_files N/A N/A -bval arguments N/A N/A fname_bvals N/A arguments N/A -bval N/A N/A -bvalmin arguments N/A N/A N/A param bval_min N/A arguments N/A -bvalmin N/A N/A -a arguments N/A N/A average N/A arguments N/A -a N/A N/A -ofolder arguments N/A N/A path_out N/A arguments N/A -ofolder N/A N/A -v arguments N/A N/A verbose N/A int N/A arguments N/A -v N/A N/A -r arguments N/A N/A remove_tmp_files N/A int N/A arguments N/A -r N/A N/A main fname_data fname_bvecs fname_bvals path_out average verbose remove_tmp_files