File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -703,7 +703,7 @@ def get_q_vectors(self):
703
703
acquisition.
704
704
"""
705
705
bvals , bvecs = self .get_bvals_bvecs ()
706
- if bvals is None and bvecs is None :
706
+ if bvals is None or bvecs is None :
707
707
return None
708
708
return bvecs * bvals [:, np .newaxis ]
709
709
@@ -728,7 +728,7 @@ def get_bvals_bvecs(self):
728
728
# All bvals within volume should be the same
729
729
assert not np .any (np .diff (bvals , axis = 0 ))
730
730
bvals = bvals [0 ]
731
- if 'diffusion' not in self .image_defs :
731
+ if 'diffusion' not in self .image_defs . dtype . names :
732
732
return bvals , None
733
733
bvecs = self .image_defs ['diffusion' ][reorder ].reshape (
734
734
(n_slices , n_vols , 3 ), order = 'F' )
Original file line number Diff line number Diff line change @@ -350,13 +350,13 @@ def test_diffusion_parameters_v4():
350
350
assert_almost_equal (bvals , DTI_PAR_BVALS )
351
351
# no b-vector info in V4 .PAR files
352
352
assert_equal (bvecs , None )
353
- assert_equal (dti_hdr .get_q_vectors (), None )
353
+ assert_equal (dti_v4_hdr .get_q_vectors (), None )
354
354
355
355
356
356
def test_null_diffusion_params ():
357
357
# Test non-diffusion PARs return None for diffusion params
358
358
for par , fobj in gen_par_fobj ():
359
- if basename (par ) in ('DTI.PAR' , 'NA.PAR' ):
359
+ if basename (par ) in ('DTI.PAR' , 'DTIv40.PAR' , ' NA.PAR' ):
360
360
continue
361
361
gen_info , slice_info = parse_PAR_header (fobj )
362
362
with suppress_warnings ():
You can’t perform that action at this time.
0 commit comments