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  

|
February 11, 2015 08:46AM
Hi,
I would like to adapt this standard data scaling code to a dataset that has
multiple rows with one row for each voxel, and multiple columns representing the time axis.

3dcalc -a dataset.1D -b mean.1D	    \
-expr 'min(200, a/b*100)*step(a)*step(b)'  \
-prefix dataset.scaled

Unfortunately, I could not find a way to trick 3dcalc to treat these files as voxel time series and the code above gives an error.
I assume "1deval" has to be used, but I am not familiar enough with the syntax. Could you help me writing the code that does the following? :
-loop over each row of dataset.1D
-calculate the expression above with "1deval" (each row has to be transposed first, since 1deval only accepts columns)
"-a dataset.1D -b mean.1D"
-if necessary, remove the headers the .1D files before calculating.
-glue all outputs together again with 1dcat.
-transpose the result again, since 3dDeconvolve would like one row per voxel.

Or maybe you have an idea for a simpler solution. Thanks a lot!



Edited 1 time(s). Last edit at 02/11/2015 09:18AM by rick reynolds.
Subject Author Posted

3dcalc & 1D file with multiple rows

paranoidandroid February 11, 2015 08:46AM

Re: 3dcalc & 1D file with multiple rows

rick reynolds February 11, 2015 09:17AM

Re: 3dcalc & 1D file with multiple rows

Daniel Glen February 11, 2015 03:48PM

Re: 3dcalc & 1D file with multiple rows

rick reynolds February 11, 2015 08:44PM

Re: 3dcalc & 1D file with multiple rows

paranoidandroid February 17, 2015 05:39AM