@@ -61,9 +61,7 @@ class PopulateIntendedForOpts(TypedDict, total=False):
61
61
62
62
63
63
LOCKFILE = "heudiconv.lock"
64
- DW_IMAGE_IN_FMAP_FOLDER_WARNING = (
65
- "Diffusion-weighted image saved in non dwi folder ({folder})"
66
- )
64
+ DW_IMAGE_WRONG_SUFFIX_WARNING = "Diffusion-weighted image saved as non dwi ({prefix})"
67
65
lgr = logging .getLogger (__name__ )
68
66
69
67
@@ -896,7 +894,7 @@ def save_converted_files(
896
894
bvals , bvecs = res .outputs .bvals , res .outputs .bvecs
897
895
bvals = list (bvals ) if isinstance (bvals , TraitListObject ) else bvals
898
896
bvecs = list (bvecs ) if isinstance (bvecs , TraitListObject ) else bvecs
899
- if prefix_dirname .endswith ("dwi" ):
897
+ if prefix .endswith ("dwi" ):
900
898
outname_bvecs , outname_bvals = prefix + ".bvec" , prefix + ".bval"
901
899
safe_movefile (bvecs , outname_bvecs , overwrite )
902
900
safe_movefile (bvals , outname_bvals , overwrite )
@@ -907,9 +905,7 @@ def save_converted_files(
907
905
os .remove (ftr )
908
906
lgr .debug ("%s and %s were removed since not dwi" , bvecs , bvals )
909
907
else :
910
- lgr .warning (
911
- DW_IMAGE_IN_FMAP_FOLDER_WARNING .format (folder = prefix_dirname )
912
- )
908
+ lgr .warning (DW_IMAGE_WRONG_SUFFIX_WARNING .format (prefix = prefix ))
913
909
lgr .warning (
914
910
".bvec and .bval files will be generated. This is NOT BIDS compliant"
915
911
)
0 commit comments