File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,9 @@ def test_parrec2nii_with_data():
283
283
# Writes bvals, bvecs files if asked
284
284
run_command (['parrec2nii' , '--overwrite' , '--keep-trace' ,
285
285
'--bvs' , dti_par ])
286
- assert_almost_equal (np .loadtxt ('DTI.bvals' ), DTI_PAR_BVALS )
286
+ bvecs_trace = np .loadtxt ('DTI.bvecs' ).T
287
+ bvals_trace = np .loadtxt ('DTI.bvals' )
288
+ assert_almost_equal (bvals_trace , DTI_PAR_BVALS )
287
289
img = load ('DTI.nii' )
288
290
data = img .get_data ().copy ()
289
291
del img
@@ -317,8 +319,8 @@ def test_parrec2nii_with_data():
317
319
assert_equal (data_notrace .shape [- 1 ], len (bvecs_notrace ))
318
320
del img
319
321
# ensure correct volume was removed
320
- good_mask = np .logical_or ((bvecs_notrace != 0 ).any (axis = 1 ),
321
- bvals_notrace == 0 )
322
+ good_mask = np .logical_or ((bvecs_trace != 0 ).any (axis = 1 ),
323
+ bvals_trace == 0 )
322
324
assert_almost_equal (data_notrace , data [..., good_mask ])
323
325
assert_almost_equal (bvals_notrace , np .array (DTI_PAR_BVALS )[good_mask ])
324
326
assert_almost_equal (bvecs_notrace , bvecs_LAS [good_mask ])
You can’t perform that action at this time.
0 commit comments