bidskit
bidskit copied to clipboard
.bval and .bvec export depends on dwi filename
Hi !
I think .bval and .bvec files don't get exported unless the file name for the diffusion sequence finishes with 'dwi'.
If I set the following in the Protocol_Translator.json file, the .bval and .bvec are not exported to the bids/<sub-ID>/<ses-ID>/dwi
folder::
{
"ep2d_diff_mddw_30dir_mono_SMS2_DFC":[
"dwi",
"DWIorig",
"UNASSIGNED"
]
}
However, if I change to the following, the .bval and .bvec files do get exported::
{
"ep2d_diff_mddw_30dir_mono_SMS2_DFC":[
"dwi",
"dwi",
"UNASSIGNED"
]
}
I think the issue might come from here: https://github.com/jmtyszka/bidskit/blob/05cd799fb25436e7f3a922f9f2846760d98b42fc/bidskit/translate.py#L194-L199
Hum, unless it's due to BIDS naming conventions ? In that case, mentioning it in the Editing the Translator Dictionary section would be helpful. I also found that assigning names with underscores leads to run labels being inserted in the middle of the filename. Would be helpful to have a warning not to name files with underscores in the Quick Start Guide.
I encountered the same issue. Setting the "EXCLUDE_BIDS_Name" portion in the json to a string ending in 'dwi' as suggested by @davidrs06 indeed fixed it.