AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
April 27, 2005 04:03PM
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
Subject Author Posted

3dCalc division problem

Alan Anticevic April 27, 2005 04:03PM

Re: 3dCalc division problem

Robert Cox April 27, 2005 04:37PM

Re: 3dCalc division problem

Alan Anticevic April 27, 2005 04:41PM