Skip to content

changing ANTS input traits, fixes #2245 #2261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 28, 2017
Merged
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions nipype/interfaces/ants/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ class ANTSInputSpec(ANTSCommandInputSpec):
metric = traits.List(traits.Enum('CC', 'MI', 'SMI', 'PR', 'SSD',
'MSQ', 'PSE'), mandatory=True, desc='')

metric_weight = traits.List(traits.Float(), requires=['metric'], desc='')
radius = traits.List(traits.Int(), requires=['metric'], desc='')
metric_weight = traits.List(traits.Float(), value=[1.0], usedefault=True,
requires=['metric'], mandatory=True,
desc='the metric weight(s) for each stage. '
'The weights must sum to 1 per stage.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this a pep8 warning?

Copy link
Collaborator Author

@djarecka djarecka Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line doesn't give any warning, but the files indeed violates many. will edit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will actually review pep8 only for the first part I was changing, will review pep8 for entire file together with other updates


radius = traits.List(traits.Int(), requires=['metric'], mandatory=True, desc='')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no description added.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some description, but originally none of the traits had any description, and most of the still don't have. I can write the description when working on tests. I guess we can keep this PR open for some time

There is any typical value that could be used as default?


output_transform_prefix = Str('out', usedefault=True, argstr='--output-naming %s',
mandatory=True, desc='')
Expand Down