Skip to content

Commit 0f84c67

Browse files
committed
Change lgr info about bvecs/bvals in non-dwi folder as a warning
Also, set a variable with the message, for future checks in unit test
1 parent 9746fe6 commit 0f84c67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

heudiconv/convert.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
)
4242

4343
LOCKFILE = 'heudiconv.lock'
44+
DW_IMAGE_IN_FMAP_FOLDER_WARNING = 'Diffusion-weighted image saved in non dwi folder ({folder})'
4445
lgr = logging.getLogger(__name__)
4546

4647

@@ -684,8 +685,8 @@ def save_converted_files(res, item_dicoms, bids_options, outtype, prefix, outnam
684685
os.remove(res.outputs.bvals)
685686
lgr.debug("%s and %s were removed since not dwi", res.outputs.bvecs, res.outputs.bvals)
686687
else:
687-
lgr.info("Diffusion-weighted image saved in non dwi folder (%s)", prefix_dirname)
688-
lgr.info(".bvec and .bval files will be generated. This is NOT BIDS compliant")
688+
lgr.warning(DW_IMAGE_IN_FMAP_FOLDER_WARNING.format(folder= prefix_dirname))
689+
lgr.warning(".bvec and .bval files will be generated. This is NOT BIDS compliant")
689690
outname_bvecs, outname_bvals = prefix + '.bvec', prefix + '.bval'
690691
safe_movefile(res.outputs.bvecs, outname_bvecs, overwrite)
691692
safe_movefile(res.outputs.bvals, outname_bvals, overwrite)

0 commit comments

Comments
 (0)