-
Notifications
You must be signed in to change notification settings - Fork 532
[ENH] Improvements on fsl.Smooth #1341
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
def _format_arg(self, name, trait_spec, value): | ||
if name == 'fwhm': | ||
sigma = float(value) / np.sqrt(8 * np.log(2)) | ||
return super(Smooth, self)._format_arg(name, trait_spec, sigma) | ||
return super(Smooth, self)._format_arg(name, trait_spec, value) | ||
|
||
def _parse_inputs(self, skip=None): |
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.
i think you can have mandatory=True
for the fields, which should take care of the need to do this.
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.
Ok, I wasn't sure.
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.
Ok, it does, but only refers to the first of the xor parameters specified on the error message. For now it's ok.
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.
Mmmm it's a bit worse than that. Sometimes it asks for the new sigma, sometimes for the old fwhm. We should print all the xor parameters in the message (or simplify it).
I still think there is the broader issue that we now print the argument string in the help but provide no information about possible internal reformatting of arguments. This also probably isn't the only place in our fsl interfaces where we accept a |
Yep, my idea was to give a short-term answer to the problem raised by @poldrack . I have also updated the documentation and mentioned the conversion of the argument, and showed it with an example commandline. I agree this should be definitely extended to other interfaces and, if possible, take on the broader issue you point out. But I would do this in a separate issue/PR so that this one goes through. |
sigma
which passes value as given, and made it compatible with the inputfwhm
.Fixes #1324