Edit censor 1D file values in script

I’m sure this is a basic question but I could not find an easy way to it. We use a combination of 3dToutcount and 1deval to generate a binary censor 1D file. We need to replace the first three values of that censor file with 0s (to censor dummy scans). I’ve been doing this manually by opening the files and replacing with 0s. I’m sure there must be a simple way to do this in our script to cut out the manual part, but not sure which of the various 1d file tools to use. Any suggestions?

In 1deval, t is an automatic variable for the time index, so multiply by ispositive(t-2).

That said, it might be preferable to not include such time points at all. With afni_proc.py, those volumes do not make it to the analysis directory. Though that means adjusting timing and stim files to account for the lost time points.

  • rick

Thanks!