diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index 871fc558c9..1d6a2e1fee 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -217,13 +217,16 @@ def _create_ev_files(self, cwd, runinfo, runidx, ev_parameters, self._create_ev_file(evfname, evinfo) # add ev orthogonalization for i in range(1, num_evs[0] + 1): + initial = ev_ortho.substitute(c0=i, c1=0, orthogonal=1) for j in range(0, num_evs[0] + 1): try: orthogonal = int(orthogonalization[i][j]) except (KeyError, TypeError, ValueError, IndexError): orthogonal = 0 - ev_txt += ev_ortho.substitute( - c0=i, c1=j, orthogonal=orthogonal) + if orthogonal == 1 and initial not in ev_txt: + ev_txt += initial + "\n" + ev_txt += ev_ortho.substitute(c0=i, c1=j, + orthogonal=orthogonal) ev_txt += "\n" # add contrast info to fsf file if isdefined(contrasts):