bids-standard / bids-2-devel

Discussions and suggestions of backwards incompatible changes to BIDS
https://bids.neuroimaging.io/
Creative Commons Attribution 4.0 International
10 stars 1 forks source link

Allow tabs in .bvec/.bval #9

Open tsalo opened 3 years ago

tsalo commented 3 years ago

dcm2niix and dicm2nii historically output .bvec/.bval that are tab separated. BIDS 1.0.0 specifies that those files should be space separated. A compromise might involve specifying those files as whitespace separated.

Original authors: Unknown

jbteves commented 3 years ago

Parsing whitespace is trivial in most languages, we could offer examples of how to parse this in major languages. Examples: Python

vals = valstr.split()

MATLAB

vals = strsplit(valstr)
neurolabusc commented 3 years ago

To clarify, prior to the creation of BIDS, dcm2niix would generate tab separated bvec and bval files. During the development of BIDS, @chrisgorgo strongly advocated for space separated bvec and bval files when BIDS files were created. Therefore, current versions of dcm2niix will generate tab-delimited files for -b n and space separated files for -b y. FSL and all the other tools I know of have no preference between these two. I liked tab-separated files simply because if you copy-paste text into a spreadsheet like Excel, it will treat space-delimited data as a single string, while tab-delimited data is pasted into separate columns. I have no strong preference, and happy to change my software, and believe that the impact of the-b switch on these files is unintuitive for most users (so happy to use one convention in future). But as @chrisgorgo made an explicit change, I suspect he has thoughts on this.