From 4a9205de96433f80767f470c1ecbd9767e081d80 Mon Sep 17 00:00:00 2001 From: carolFrohlich Date: Mon, 14 Dec 2015 13:14:45 -0500 Subject: [PATCH] explicitly set f-test contrasts to 0 --- nipype/interfaces/fsl/model.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index 96d0746d17..a78cf54451 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -252,13 +252,16 @@ def _create_ev_files( element=count, ctype=ctype, val=val) ev_txt += "\n" - if con[0] in list(con_map.keys()): - for fconidx in con_map[con[0]]: - ev_txt += contrast_ftest_element.substitute( - cnum=ftest_idx.index(fconidx) + 1, - element=tidx, - ctype=ctype, - val=1) + + for fconidx in ftest_idx: + fval=0 + if con[0] in con_map.keys() and fconidx in con_map[con[0]]: + fval=1 + ev_txt += contrast_ftest_element.substitute( + cnum=ftest_idx.index(fconidx) + 1, + element=tidx, + ctype=ctype, + val=fval) ev_txt += "\n" # add contrast mask info