Skip to content

Commit 33dfa1c

Browse files
committed
✨ reg_physio: siemphysdat manual TR setting (2022-10 Luna 7T)
1 parent 54f6398 commit 33dfa1c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

preproc_functions/reg_physio

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
# use retroicor on pre-slice/motion functional input
66
#
77

8-
REG_PHYSIO_GLOBALS=(prefix funcFile use_physio physio_resp physio_card physio_func_info)
8+
REG_PHYSIO_GLOBALS=(prefix funcFile use_physio physio_resp physio_card physio_func_info tr)
99
reg_physio() {
1010
# skip if we have nothing to do
1111
[ -z "$use_physio" ] && return 0
1212
[ -r .reg_physio_complete ] && return 0
1313

14+
# manually set tr. supported in siemphysdat as of 2022-10
15+
[ -n "${tr:-}" ] &&
16+
args="--changetr $tr -t all -n $(3dinfo -nt "$prefix$funcFile.nii.gz")" ||
17+
args="-t all"
18+
1419
# write what we use to a file (and do nothing if it fails)
1520
print_vars_in REG_PHYSIO_GLOBALS || :
1621

@@ -27,7 +32,7 @@ reg_physio() {
2732
[ -d xx_retroicor.results ] && rm -r xx_retroicor.results
2833

2934
# extract time -- this is likely to fail. physio is often bad
30-
rel "siemphysdat $physio_resp $physio_card $physio_func_info -t all -o $spfix"
35+
rel "siemphysdat $physio_resp $physio_card $physio_func_info $args -o $spfix"
3136

3237
# file with our prefix modified in the last 3 minutes
3338
local retrots=$(find -maxdepth 1 -type f -iname "$spfix*slibase.1D" -mmin -3 -print -quit)

0 commit comments

Comments
 (0)