@@ -46,6 +46,7 @@ def init_bold_t2s_wf(
46
46
echo_times : ty .Sequence [float ],
47
47
mem_gb : float ,
48
48
omp_nthreads : int ,
49
+ me_t2s_fit_method : ty .Literal ['curvefit' , 'loglin' ] = 'curvefit' ,
49
50
name : str = 'bold_t2s_wf' ,
50
51
):
51
52
r"""
@@ -89,14 +90,16 @@ def init_bold_t2s_wf(
89
90
from niworkflows .interfaces .morphology import BinaryDilation
90
91
91
92
workflow = Workflow (name = name )
92
- if config . workflow . me_t2s_fit_method == 'curvefit' :
93
+ if me_t2s_fit_method == 'curvefit' :
93
94
fit_str = (
94
95
'nonlinear regression. '
95
96
'The T2<sup>★</sup>/S<sub>0</sub> estimates from a log-linear regression fit '
96
97
'were used for initial values'
97
98
)
98
- else :
99
+ elif me_t2s_fit_method == 'loglin' :
99
100
fit_str = 'log-linear regression'
101
+ else :
102
+ fit_str = f'unknown method: { me_t2s_fit_method } '
100
103
101
104
workflow .__desc__ = f"""\
102
105
A T2<sup>★</sup> map was estimated from the preprocessed EPI echoes, by voxel-wise fitting
@@ -116,7 +119,7 @@ def init_bold_t2s_wf(
116
119
dilate_mask = pe .Node (BinaryDilation (radius = 2 ), name = 'dilate_mask' )
117
120
118
121
t2smap_node = pe .Node (
119
- T2SMap (echo_times = list (echo_times ), fittype = config . workflow . me_t2s_fit_method ),
122
+ T2SMap (echo_times = list (echo_times ), fittype = me_t2s_fit_method ),
120
123
name = 't2smap_node' ,
121
124
mem_gb = 2.5 * mem_gb * len (echo_times ),
122
125
)
0 commit comments