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  

|
September 09, 2021 05:58AM
An update:

I think that my code to merge the distinct time windows (of the self and non-self runs) is a disaster. With the code displayed in my first post, AFNI would try to do the following:

1. It would assume that it has to take each time window in the two for loops (for SelfTimeWindows & for NonSelfTimeWindows) and resave them under the output names of SelfTimeWindows and NonSelfTimeWindows.
2. This means that AFNI would try to take every single time window, respectively of both self vs. non-self, and copy them over and over again into the same single output files of SelfTimeWindows and NonSelfTimeWindows.

Obviously, that is nonsense. The correct code has to be the following:

directory=/users/philipp/desktop/fmri/dataset/subjects
for subject in subj1_exp1
do
cd $directory/$subject/TimeWindows
echo "Processing $subject ... $SelfTimeWindows ... $NonSelfTimeWindows ..."

3dTcat \
-prefix SelfTimeWindow \
-session $directory/$subject/TimeWindows \
-verb \
-tr 1.0 \
Self21-75+tlrc Self199-253+tlrc Self427-481+tlrc Self489-543+tlrc Self549-603+tlrc Self659-713+tlrc 'Self837-891+tlrc 'Self893-947+tlrc Self955-1009+tlrc Self1013-1067+tlrc

3dTcat \
-prefix NonSelfTimeWindow \
-session $directory/$subject/TimeWindows \
-verb \
-tr 1.0 \
NonSelf81-135+tlrc NonSelf137-191+tlrc NonSelf257-311+tlrc NonSelf367-421+tlrc NonSelf605-659+tlrc NonSelf717-771+tlrc NonSelf779-833+tlrc NonSelf1073-1127+tlrc NonSelf1127-1179+tlrc
done

Now, this code above takes all individual (previously cut) time windows and merges them together in one run. And this is done for both self vs. nonself time windows respectively. Two runs are the output of this code: 1 that merged all self-trials together, and 1 that merged all nonself trials together.

However, the problem with the square brackets remains. I could continue from here on, but it would be nicer if the previous step of cutting the time windows would actually work with Zsh while not using square brackets. Or, if there is another way around this, how to keep square brackets in the outpit filenames but being able to open and process them later in AFNI while using Zsh.

Thanks everybody,

Philipp



Edited 1 time(s). Last edit at 09/09/2021 06:00AM by Philipp.
Subject Author Posted

Square brackets and AFNI - How to really use them in Zsh?

Philipp September 09, 2021 04:58AM

Re: Square brackets and AFNI - How to really use them in Zsh?

Philipp September 09, 2021 05:58AM

Re: Square brackets and AFNI - How to really use them in Zsh?

rick reynolds September 09, 2021 09:10AM

Re: Square brackets and AFNI - How to really use them in Zsh?

rick reynolds September 09, 2021 09:17AM

Re: Square brackets and AFNI - How to really use them in Zsh?

Philipp September 09, 2021 11:50AM

Re: Square brackets and AFNI - How to really use them in Zsh?

rick reynolds September 09, 2021 12:05PM