From c70c32a54cfef31bffe0cef466eb14d18db2d127 Mon Sep 17 00:00:00 2001 From: Baxter Rogers Date: Fri, 12 Apr 2024 16:57:07 -0500 Subject: [PATCH] float --- src/create_json.py | 2 +- src/fmriprep-prep-nojson.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/create_json.py b/src/create_json.py index 8cf48a8..f3678b5 100755 --- a/src/create_json.py +++ b/src/create_json.py @@ -21,7 +21,7 @@ tr = nii.header['pixdim'][4] # fmriprep minimum needed fields -json_data['RepetitionTime'] = f'{tr}' +json_data['RepetitionTime'] = float(tr) ## Slice timing # Assumes slices are evenly spaced in the TR (i.e. not a sparse diff --git a/src/fmriprep-prep-nojson.sh b/src/fmriprep-prep-nojson.sh index 16d1179..2700986 100755 --- a/src/fmriprep-prep-nojson.sh +++ b/src/fmriprep-prep-nojson.sh @@ -56,6 +56,10 @@ if [ "${slicetiming}" = "ABIDE" ]; then export slicetiming=$(slicetiming_ABIDE.py --subject_label "${sub}") fi +# If subject, session have _, drop it because it's not compatible with BIDS +# file naming +sub=${sub//_/} +ses=${ses//_/} # Rename and relocate files according to bids scheme