File tree 3 files changed +25
-3
lines changed
3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 29
29
def init_unwarp_wf (
30
30
* ,
31
31
jacobian = True ,
32
+ use_metadata_estimates = False ,
33
+ fallback_total_readout_time = None ,
32
34
free_mem = None ,
33
35
omp_nthreads = 1 ,
34
36
debug = False ,
@@ -117,8 +119,16 @@ def init_unwarp_wf(
117
119
name = "outputnode" ,
118
120
)
119
121
120
- rotime = pe .Node (GetReadoutTime (), name = "rotime" )
122
+ rotime = pe .Node (
123
+ GetReadoutTime (
124
+ use_estimate = use_metadata_estimates ,
125
+ ),
126
+ name = "rotime" ,
127
+ run_without_submitting = True ,
128
+ )
121
129
rotime .interface ._always_run = debug
130
+ if fallback_total_readout_time is not None :
131
+ rotime .inputs .fallback = fallback_total_readout_time
122
132
123
133
# resample is memory-hungry; choose a smaller number of threads
124
134
# if we know how much memory we have to work with
Original file line number Diff line number Diff line change 36
36
37
37
def init_topup_wf (
38
38
grid_reference = 0 ,
39
+ use_metadata_estimates = False ,
40
+ fallback_total_readout_time = None ,
39
41
omp_nthreads = 1 ,
40
42
sloppy = False ,
41
43
debug = False ,
@@ -122,11 +124,15 @@ def init_topup_wf(
122
124
123
125
# Calculate the total readout time of each run
124
126
readout_time = pe .MapNode (
125
- GetReadoutTime (),
127
+ GetReadoutTime (
128
+ use_estimate = use_metadata_estimates ,
129
+ ),
126
130
name = "readout_time" ,
127
131
iterfield = ["metadata" , "in_file" ],
128
132
run_without_submitting = True ,
129
133
)
134
+ if fallback_total_readout_time is not None :
135
+ readout_time .inputs .fallback = fallback_total_readout_time
130
136
# Average each run so that topup is not overwhelmed (see #279)
131
137
runwise_avg = pe .MapNode (
132
138
RobustAverage (num_threads = omp_nthreads ),
Original file line number Diff line number Diff line change 42
42
def init_syn_sdc_wf (
43
43
* ,
44
44
atlas_threshold = 3 ,
45
+ use_metadata_estimates = False ,
46
+ fallback_total_readout_time = None ,
45
47
sloppy = False ,
46
48
debug = False ,
47
49
name = "syn_sdc_wf" ,
@@ -160,10 +162,14 @@ def init_syn_sdc_wf(
160
162
outputnode .inputs .method = 'FLB ("fieldmap-less", SyN-based)'
161
163
162
164
readout_time = pe .Node (
163
- GetReadoutTime (),
165
+ GetReadoutTime (
166
+ use_estimate = use_metadata_estimates ,
167
+ ),
164
168
name = "readout_time" ,
165
169
run_without_submitting = True ,
166
170
)
171
+ if fallback_total_readout_time is not None :
172
+ readout_time .inputs .fallback = fallback_total_readout_time
167
173
168
174
warp_dir = pe .Node (
169
175
niu .Function (function = _warp_dir ),
You can’t perform that action at this time.
0 commit comments