Skip to content

Commit fa2dacf

Browse files
committed
STYLE: Made PEP8-compliant \ENH: Finished mri_ls_LDA testing
1 parent a8824f8 commit fa2dacf

File tree

3 files changed

+99
-110
lines changed

3 files changed

+99
-110
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
3-
"""The freesurfer module provides basic functions for interfacing with freesurfer tools.
3+
"""The freesurfer module provides basic functions for interfacing with
4+
freesurfer tools.
45
56
Change directory to provide relative paths for doctests
67
>>> import os
@@ -769,22 +770,36 @@ def _gen_filename(self, name):
769770
return self._list_outputs()[name]
770771
return None
771772

773+
772774
class MS_LDAInputSpec(FSTraitedSpec):
773-
lda_labels = traits.List(traits.Int(), argstr='-lda %s', mandatory=True, minlen=2, maxlen=2, sep=' ', position=1,
775+
lda_labels = traits.List(traits.Int(), argstr='-lda %s', mandatory=True,
776+
minlen=2, maxlen=2, sep=' ', position=1,
774777
desc='pair of class labels to optimize')
775-
weight_file = traits.File(argstr='-weight %s', mandatory=True, position=2, desc='filename for the LDA weights (input or output)')
776-
output_synth = traits.File(exists=False, argstr='-synth %s', mandatory=True, position=3, desc='filename for the synthesized output volume')
777-
label_file = traits.File(exists=True, argstr='-label %s', position=4, desc='filename of the label volume')
778-
mask_file = traits.File(exists=True, argstr='-mask %s', position=5, desc='filename of the brain mask volume')
779-
shift = traits.Int(argstr='-shift %d', position=6, desc='shift all values equal to the given value to zero')
780-
conform = traits.Bool(argstr='-conform', position=7, desc='Conform the input volumes (brain mask typically already conformed)')
781-
use_weights = traits.Bool(argstr='-W', position=8, desc='Use the weights from a previously generated weight file')
782-
images = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, copyfile=False, desc='list of input FLASH images' )
778+
weight_file = traits.File(argstr='-weight %s', mandatory=True,
779+
position=2,
780+
desc='filename for the LDA weights (input or output)')
781+
output_synth = traits.File(exists=False, argstr='-synth %s',
782+
mandatory=True, position=3,
783+
desc='filename for the synthesized output volume')
784+
label_file = traits.File(exists=True, argstr='-label %s', position=4,
785+
desc='filename of the label volume')
786+
mask_file = traits.File(exists=True, argstr='-mask %s', position=5,
787+
desc='filename of the brain mask volume')
788+
shift = traits.Int(argstr='-shift %d', position=6,
789+
desc='shift all values equal to the given value to zero')
790+
conform = traits.Bool(argstr='-conform', position=7,
791+
desc='Conform the input volumes (brain mask typically already conformed)')
792+
use_weights = traits.Bool(argstr='-W', position=8,
793+
desc='Use the weights from a previously generated weight file')
794+
images = InputMultiPath(File(exists=True), argstr='%s', mandatory=True,
795+
copyfile=False, desc='list of input FLASH images')
796+
783797

784798
class MS_LDAOutputSpec(TraitedSpec):
785799
weight_file = File(exists=True, desc='')
786800
vol_synth_file = File(exists=True, desc='')
787801

802+
788803
class MS_LDA(FSCommand):
789804
"""Perform LDA reduction on the intensity space of an arbitrary # of FLASH images
790805
@@ -821,7 +836,8 @@ def _format_arg(self, name, spec, value):
821836
if name is 'use_weights':
822837
if self.inputs.use_weights is True:
823838
self._verify_weights_file_exists()
824-
else: return ''
839+
else:
840+
return ''
825841
# TODO: Fix bug when boolean values are set explicitly to false
826842
return super(MS_LDA, self)._format_arg(name, spec, value)
827843

nipype/interfaces/freesurfer/tests/deleteme.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)