Error for 3dDeconvolve -force script

I am getting a few error messages when attempting to run a script to contrast activity across conditions. Here is the script I am running:
3dDeconvolve -force_TR 2 -input scaled_allruns+orig -mask retrieval_mask+orig -concat ‘1D: 0 60 120 180 240 300’ \

-polort 1 \
-num_stimts 4 \
-stim_times 1 stimtimes_list ‘BLOCK(2,1)’ \
-stim_times 2 stimtimes_write ‘BLOCK(2,1)’ \
-stim_times 3 stimtimes_draw ‘BLOCK(2,1)’ \
-stim_times 4 stimtimes_new ‘BLOCK(2,1)’ \
-stim_label 1 write_tar \
-stim_label 2 list_tar \
-stim_label 3 draw_tar \
-stim_label 4 new_tar \
-gltsym ‘SYM: draw_tar -write_tar’ \
-gltsym ‘SYM: draw_tar -list_tar’ \
-gltsym ‘SYM: draw_tar -new_tar’ \
-gltsym ‘SYM: list_tar -write_tar’ \
-gltsym ‘SYM: list_tar -new_tar’ \
-gltsym ‘SYM: write_tar -new_tar’ \
-glt_label 1 draw_write \
-glt_label 2 draw_list \
-glt_label 3 draw_new \
-glt_label 4 list_write \
-glt_label 5 list_new \
-glt_label 6 write_new \
-fitts fitts_event \
-fout -tout -rout -bucket decon_sa_event \
-x1D X.xmat.1D -xjpeg X.jpg

Here is the error I am getting:
** ERROR: mri_read_ascii_ragged_fvect: couldn’t open file stimtimes_list
** FATAL ERROR: ‘-stim_times 1’ can’t read file ‘stimtimes_list’ [nopt=15]

I’ve checked to ensure that the stimtimes files are properly named, so I am unsure how to proceed. Please advise.
Thank you,

Sorry, I forgot about this somewhere…

What does file_tool say about the file?

file_tool -test -infile stimtimes_list
  • rick

Hi Rick,

For some reason, I am getting the following message:
** failed to check size for file ‘stimtimes_list’

I’ve triple checked the name of the file and it matches, does this mean there is something wrong with the file?

Thank you!

Hi Nicole,

Strange, maybe that file is corrupted somehow. Do you have a different version to compare it with?

What is the output of:

ls -l stimtimes_list
file stimtimes_list
  • rick

Hi Rick,

I’ve tried for multiple participants and am getting the same error.

When I ran your script, I got the following
ls: stimtimes_list: No such file or directory

However, I’ve double checked and the stimtimes_list text file IS in the directory.

Any advice?

Thank you so much,

Hi Nicole,

At least we are zeroing in on this. It seems likely that either the name is not quite what it seems to be, or maybe they are not in the directory the script is trying to access them from.

What is the output from these commands (please copy-and-paste to be careful)?

ls -l | grep times
\ls | \grep stimtimes_list | od -xc
  • rick

Hi Rick,

Here is the output (copy+pasted).

v1040-wn-rt-c-79-105:Allruns nikkistuart$ ls -l | grep times
-rwxrwxrwx@ 1 nikkistuart staff 437 11 Jul 12:00 stimtimes_draw.rtf
-rwxrwxrwx@ 1 nikkistuart staff 428 11 Jul 12:09 stimtimes_list.rtf
-rwxrwxrwx@ 1 nikkistuart staff 587 11 Jul 12:11 stimtimes_new.rtf
-rwxrwxrwx@ 1 nikkistuart staff 390 11 Jul 12:10 stimtimes_write.rtf
v1040-wn-rt-c-79-105:Allruns nikkistuart$ \ls | \grep stimtimes_list | od -xc
0000000 7473 6d69 6974 656d 5f73 696c 7473 722e
s t i m t i m e s _ l i s t . r
0000020 6674 000a
t f \n


Ah, that clarifies things. There are probably 2 issues. One is that the files end in the extension .rtf, which is not included in your 3dDeconvolve command. The other is that rtf (rich text format) will probably not work in any case. That is a format to make text look pretty, but it is not for processing as unix ASCII text.

Such files should be saved in raw text format.

So what is the output of:

file_tool -test -infile stimtimes_list.rtf
  • rick

Hi Rick,

Here is the output of that command line:

file ‘stimtimes_list.rtf’: missing final newline
stimtimes_list.rtf has 0 bad characters

stimtimes_list.rtf file type: UNIX
file ‘stimtimes_list.rtf’, line 8 : consider space before ''
file ‘stimtimes_list.rtf’, line 9 : consider space before ''
file ‘stimtimes_list.rtf’, line 10 : consider space before ''
file ‘stimtimes_list.rtf’, line 11 : consider space before ''
file ‘stimtimes_list.rtf’, line 12 : consider space before ''

Well, maybe the file is okay, but those warnings about backslash characters are concerning. I though you had posted a copy of this file, and there was nothing but numbers in it. Are there slashes in the file? Maybe you should re-post it, just to be sure.

If you would like to, mail me the actual file(s), and I will see whether anything seems odd.

But maybe you just need to add the .rtf suffixes, so that 3dDeconvolve knows the full file names.

  • rick

Hi Rick,

I haven’t added any backslashes into the files, copy and pasted is one of the files below:
2 17 32 104
0 13 21 30 95
0 10 16 43 103
18 31 83 94 99
11 61 66 84
6 16 26 47

I will also email you an example of one of the files.

Thank you,

Hi Rick,

Adding .rtf to the file names allowed me to run the script.

Thank you for all your help,