nipype
nipype copied to clipboard
fsl.FNIRT does not generate fieldcoeff_file when it is an output connection
Summary
When using fsl.FNIRT you have to set fieldcoeff_file=True in the inputs even when the fieldcoeff_file output is connected to a downstream node.
Actual behavior
No fieldcoeff_file is written and the downstream node errors out.
Expected behavior
Shouldn't there be an association between the input and output traits fieldcoeff_file be written with a default filename and passed to the downstream node? It's been so long that I've dealt with the Interface guts that I forget how this works ...
@mwaskom looks like there is no default value for fieldcoeff_file - thus it doesn't get extracted for the outputs dict unless explicitly specified since it's left Undefined
So remind me, to fix this I need to add genfile=True in the input spec and then add fieldcoeff_file to this list?
If fieldcoeff_file can always be created, just adding default=True should suffice. If not, then this is intended behavior, as I don't believe interfaces' outputs can be dependent on workflow connections with this current engine
By "can always be created" you mean can be created by an interface with only the mandatory inputs set?
How is the suffix determined with default=True? Is there an example Interface you can point me to?
By "can always be created" you mean can be created by an interface with only the mandatory inputs set?
Yes, that's a better way to say it :+1:
How is the suffix determined with default=True? Is there an example Interface you can point me to?
By setting default=True, I believe it'll go down this path by default and automatically generate the file. The suffix is determined from a hardcoded dict filemap
@mwaskom is this all set?
No, it needs a PR, I just haven't had time for it.
i did like to help