Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions nipype/interfaces/spm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
spm.SPMCommand().version
"""

# Standard library imports
from __future__ import print_function
from builtins import range
from builtins import object

__docformat__ = 'restructuredtext'

# Standard library imports
import os
from copy import deepcopy

Expand All @@ -38,6 +35,8 @@
from ... import logging
logger = logging.getLogger('interface')

__docformat__ = 'restructuredtext'


def func_is_3d(in_file):
"""Checks if input functional files are 3d."""
Expand Down Expand Up @@ -216,7 +215,8 @@ class SPMCommandInputSpec(BaseInterfaceInputSpec):
usedefault=True)
use_mcr = traits.Bool(desc='Run m-code using SPM MCR')
use_v8struct = traits.Bool(True, min_ver='8', usedefault=True,
desc=('Generate SPM8 and higher compatible jobs')
desc=('Generate SPM8 and higher '
'compatible jobs')
)


Expand Down Expand Up @@ -476,14 +476,15 @@ def _make_matlab_command(self, contents, postscript=None):
end\n
"""
if self.mlab.inputs.mfile:
if isdefined(self.inputs.use_v8struct) and self.inputs.use_v8struct:
if (isdefined(self.inputs.use_v8struct) and
self.inputs.use_v8struct):
mscript += self._generate_job('jobs{1}.spm.%s.%s' %
(self.jobtype, self.jobname),
contents[0])
else:
if self.jobname in ['st', 'smooth', 'preproc', 'preproc8',
'fmri_spec', 'fmri_est', 'factorial_design',
'defs']:
'fmri_spec', 'fmri_est',
'factorial_design', 'defs']:
# parentheses
mscript += self._generate_job('jobs{1}.%s{1}.%s(1)' %
(self.jobtype, self.jobname),
Expand Down
Loading