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 21, 2017 04:44PM
Thanks, Rick. I'll look into detrending as you suggest.

I have also gone a different route by mean padding the time series to appear continuous. You suggested this here.

As a proof of concept, I want to calculate a sound>no sound contrast using the padded time series. Previously in this thread you showed me how to generate this contrast by specifying my own design matrix using -ortvec and my own -glt contrast. So I wanted to compare the two results with the understanding that the should be identical.

1. I created indices to insert the mean time series in the proper location

1deval -expr 'bool(mod(t+1,4))' -num 240 > pad_times.1D

2. I created a mean volume and appended it to the end of the scan.

3dTstat                                   \
     -prefix dummyMean          \
     -datum 'short'                    \
      pb04.scale+tlrc                \
3dTcat                                    \
     -prefix 1pad.ts                   \
     pb04.scale+tlrc                  \
     dummMean+tlrc
3dTcat                                     \
     -prefix pb05.dummyPad    \
     -1pad.ts+tlrc'[1dcat pad_times.1D']

3. Then I pad the motion (and derivatives) and create a censor file to censor the mean-padded volumes. Initially I created a censor file for volumes that exceed 0.5mm FD, but lets just say that this person did not move so that I have a vector of all 0s.

1deval -expr 'bool(mod(t+1,4))' -num 240 > issues_pad.1D
1d_tool.py                                        \
     -infile MoPar.1D                          \
     -censor_fill_parent isss_pad.1D \
     -write MoPar_pad.1D
1d_tool.py                                        \
     -infile censor.1D                          \
     -censor_fill_parent isss_pad.1D \
     -write censor_pad.1D

4. Then I regress...

3dDeconvolve 												\
	-input $runs -jobs 12										\
	-polort A 	                                                                                                \
	-ortvecMoPar_pad.1D              demean 							\
	-ortvec MoPar_derv_pad.1D    derv 							\
	-censor censor_pad.1D 							                        \
	-num_stimts 2 											\
	-stim_times 1 trials.1D 'BLOCK(0.5,1)' 	            -stim_label 1 trial 	\
	-stim_times 2 catch_trials.1D 'BLOCK(0.5,1)'     -stim_label 2 cat    	\
	-gltsym 'SYM: trial' -glt_label 1 sound 							\
	-overwrite -tout -bucket trial.stats 							        \
	-x1D xmat.1D -x1D_uncensored uncensor.xmat.1D

I have attached 2 images. The one that looks like the auditory cortex was created without padding the time series, but I specified the design matrix using -ortvec and you suggested earlier in this thread. The image where the whole brain is deactivated are the results of the same sound>no sound contrast, same voxelwise threshold (p<0.01) and same cluster correction (arbitrary k=50, just to clear it up) but I used the mean-padding procedure outlined above.

Do you have any recommendations? Thanks for your help!

Dustin
Attachments:
open | download - meanpad.jpg (38.2 KB)
open | download - fir.jpg (42.7 KB)
Subject Author Posted

On ortvec and glts

dmoracze May 31, 2017 03:48PM

Re: On ortvec and glts

rick reynolds June 02, 2017 09:18AM

Re: On ortvec and glts

dmoracze June 02, 2017 12:37PM

Re: On ortvec and glts

dmoracze June 02, 2017 02:17PM

Re: On ortvec and glts

rick reynolds June 02, 2017 03:14PM

Re: On ortvec and glts

rick reynolds June 06, 2017 11:07AM

Re: On ortvec and glts

dmoracze June 06, 2017 11:17AM

Re: On ortvec and glts

dmoracze June 14, 2017 01:49PM

Re: On ortvec and glts

dmoracze June 15, 2017 04:04PM

Re: On ortvec and glts

rick reynolds June 20, 2017 05:12PM

Re: On ortvec and glts

rick reynolds June 21, 2017 11:51AM

Re: On ortvec and glts Attachments

dmoracze June 21, 2017 04:44PM

Re: On ortvec and glts

rick reynolds June 28, 2017 08:57AM

Re: On ortvec and glts Attachments

dmoracze July 14, 2017 11:50AM