(standard_in) 1: illegal character: M
(standard_in) 1: illegal character: R
(standard_in) 1: syntax error
[WARNING]: TR from /home/aqureshi2/work/Research/Projects/Coma/scanner_testing/CBIG/BIDS/sub-Jacob/ses-1/func/sub-Jacob_ses-1_task-BOLD10_acq-4ME2p5_echo-1_bold.json is not consistent with TR from /home/aqureshi2/work/Research/Projects/Coma/scanner_testing/CBIG/BIDS/sub-Jacob/ses-1/func/sub-Jacob_ses-1_task-BOLD10_acq-4ME2p5_echo-1_bold.nii.gz header. TR from json: MR, TR from image header: 1540. Will follow TR from image header.
(standard_in) 1: illegal character: M
(standard_in) 1: illegal character: R
(standard_in) 1: syntax error
But the .json file was correct:
cat $json_file
{
"Modality": "MR",
"MagneticFieldStrength": 3,
"ImagingFrequency": 123.263256,
....
"RepetitionTime": 1.54,
...
}
ChatGPT suggested changing line 164 from:
cat $json_file | tr -d '\n' | awk -F '[:,}]' '/"RepetitionTime"/{print $2}' | tr -d '"'
to this:
cat $json_file | tr -d '\n' | awk -F'"RepetitionTime"[ \t]*:[ \t]*' '{print $2}' | awk -F'[,}]' '{print $1}' | tr -d '"'
And it fixed the problem.
I am not sure if this was specific to my .json file, or whether it would apply universally. But I thought I'd let you know.
Thanks,
Abid