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  

|
June 17, 2015 04:27PM
Here's a bash snippet that might enlighten (comments included for tcsh-ers):
labels=(even odd)   # define array
N=${#labels[@]}     # length of array
# $(...) is command substitution; $((...)) is arithmetic
for i in $(seq 0 $((N-1))); do
    # ${array[n]} is array access
    3dTcat -prefix fred.${labels[i]} "fred+orig[$i..\$(N)]"
done
3dTcat -prefix fred.recon \
    $(for i in $(seq 0 $(3dinfo -nvi fred+orig)); do
          # automatic arithmetic expansion inside array access
          echo "fred.${labels[i%N]}+orig[$((i/N))]"
      done)
Note that this still works even if there are an odd number of volumes.

Make sure AFNI_COMPRESSOR is unset when you do this; otherwise it could take hours as AFNI unzips the same dataset over and over.



Edited 4 time(s). Last edit at 06/17/2015 04:48PM by Isaac Schwabacher.
Subject Author Posted

Alternating Phase-encoding direction help

Andrew_Lynn April 17, 2015 07:20PM

Re: Alternating Phase-encoding direction help

Daniel Glen April 19, 2015 05:24PM

Re: Alternating Phase-encoding direction help

Andrew_Lynn June 16, 2015 08:07PM

Re: Alternating Phase-encoding direction help

Isaac Schwabacher June 17, 2015 04:27PM