-
Notifications
You must be signed in to change notification settings - Fork 535
[Issue #1272] Input a list of warping regularization parameters to interfaces.spm.NewSegment #1590
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
Conversation
@@ -845,6 +845,8 @@ class NewSegmentInputSpec(SPMCommandInputSpec): | |||
desc='mni, eastern, subj, none ') | |||
warping_regularization = traits.Float(field='warp.reg', | |||
desc='Aproximate distance between sampling points.') | |||
warping_regularization_12 = traits.List(traits.Float(), minlen=5, maxlen=5, field='warp.reg', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should likely be either or with warping_regularization. a couple of alternatives:
you can make warping regularization use traits.Either(traits.Float, traits.List(traits.Float, minlen, maxlen), desc= ...)
that may keep the interface cleaner. in the description you can add that the list of 5 elements is only supported in SPM 12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion. Added & committed.
traits.List(traits.Float(), | ||
minlen=5, maxlen=5), | ||
field='warp.reg' | ||
desc='Warping regularization \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of the \
you can simply create a tuple
desc=('Warping regularization parameter(s). '
'Accepts float or list of floats (the '
'latter being required by SPM12)')
Still new to the testing infrastructure. Unsure why CircleCI is failing. Looks like lots of isinstance() TypeFailures? |
1 similar comment
That worked! Tests passing. |
Allows the user to submit a list of warping regularization parameters to an spm.NewSegment routine, which appears to be required for some SPM12 workflows. This is a fix for Issue #1272.