Description
When I run the following command:
deconvolve = afni.Deconvolve()
deconvolve.inputs.in_files = [scaled_file]
deconvolve.inputs.mask = mask_file
deconvolve.inputs.ortvec = (regressors_file, 'regressors')
deconvolve.inputs.out_file = 'output1.nii.gz'
deconvolve.inputs.reml_script = 'output2.REML_cmd'
deconvolve.inputs.polort=4
deconvolve.inputs.x1D = 'output.1D.xmat.1D'
deconvolve.inputs.stim_times = [(1, 'sub-109_ses-pre_twoback_2.txt', 'BLOCK(30,1)'),
(2, 'sub-109_ses-pre_zeroback_2.txt', 'BLOCK(30,1)')]
deconvolve.inputs.stim_label = [(1, 'TwoBack'),(2, 'ZeroBack')]
deconvolve.inputs.gltsym = [('SYM: TwoBack -ZeroBack'),('SYM: ZeroBack -TwoBack')]
deconvolve.inputs.glt_label = [(1, 'TwoBack-ZeroBack'),(2, 'ZeroBack-TwoBack')]
res = deconvolve.run()
I get the error:
TraitError: Cannot set the undefined 'reml_script' attribute of a 'DeconvolveInputSpec' object.
If I leave this line out, I get the following error:
TraitError: The 'reml_script' trait of a DeconvolveOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/home/output1.REML_cmd' <class 'str'> was specified.
If I go to this directory and create a file called output1.REML_cmd then this does not create an error.
This is because apparently reml_script must already exist, and I do not have this script in the current directory. I have two questions. First, is it possible that the first error can be fixed? Second, and perhaps more importantly, is it possible that the code can create an output1.REML_cmd file if one does not currently exist (to avoid that error message)?
Thanks!
Python 3.7