Dear AFNI people,
I have problem with 3dCalc that I hope someone can help explain. I am trying to perform a simple calculation on two files (input1 and input2) in order. Input1 file is preprocessed data and input2 is the mean across the entire time series. I am trying to get the output file to express percent signal change, however with the first command I get some very awkward looking data with 0 values and noise around the brain (this file is output_bad+orig and I can upload it if needed). However, when I add the (step(b - 4839)) part to the expression (which includes the clip value obtained by using 3dCliplevel) the data looks just the way it is supposed to (this is file output_good+orig). I have tried to complete all the steps in the (((a-b)/b)*100) part of the expression sequentially and subtraction works fine, but when I get to the division by “b” which is input2+orig, 3dCalc seems to run into problems and outputs the same distorted data as before. I am not sure why this should be the case, as the equation is very simple, yet adding the step with the clip value “fixes” the problem. I am simply hoping someone can explain what is happening here and if I am completely overlooking something?
3dcalc -a input1+orig -b input2+orig -expr '(((a-b)/b)*100)' -prefix output_bad+orig
3dcalc -a input1+orig -b input2+orig -expr '(((a-b)/b)*100)*(step(b - 4839))' -prefix output_good+orig
Thank you.
Alan Anticevic