Skip to content

Commit 5126cc3

Browse files
committed
Merge pull request #1296 from carolFrohlich/master
explicitly set f-test contrasts to 0
2 parents 3b9e5bf + 4a9205d commit 5126cc3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

nipype/interfaces/fsl/model.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,16 @@ def _create_ev_files(
252252
element=count,
253253
ctype=ctype, val=val)
254254
ev_txt += "\n"
255-
if con[0] in list(con_map.keys()):
256-
for fconidx in con_map[con[0]]:
257-
ev_txt += contrast_ftest_element.substitute(
258-
cnum=ftest_idx.index(fconidx) + 1,
259-
element=tidx,
260-
ctype=ctype,
261-
val=1)
255+
256+
for fconidx in ftest_idx:
257+
fval=0
258+
if con[0] in con_map.keys() and fconidx in con_map[con[0]]:
259+
fval=1
260+
ev_txt += contrast_ftest_element.substitute(
261+
cnum=ftest_idx.index(fconidx) + 1,
262+
element=tidx,
263+
ctype=ctype,
264+
val=fval)
262265
ev_txt += "\n"
263266

264267
# add contrast mask info

0 commit comments

Comments
 (0)