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  

|
August 02, 2018 01:29PM
Hi All,

My understanding is that during 3ddeconvolve the GLM automatically creates a baseline regression that models baseline shifts between and within runs (via the polort function). This is all incorporated to the output file: stats.subj+tlrc. After 3ddeconvolve has run my script concatenates all of the runs in my task (named: all_runs+subj+tlrc). I have four runs that were all collected during one fMRI session. I am assuming that the concatenated file (all_runs) is just that and do not include any adjustments for scanner drifts or jumps in values between scans. Is this correct?

If so, is there a way to concatenate the time series across all of the runs and adjust for scanner drift and shifts in values between runs?

If my logic is incorrect, thanks for clarifying the steps. Below is my 3ddeconvolve script for reference:


# run the regression analysis
3dDeconvolve -input pb04.{$subj}.r*.scale+tlrc.HEAD \
-censor motion_{$subj}_censor.1D \
-polort 3 \
-num_stimts 17 \
-num_glt 12 \
-stim_times 1 {$subj}_FMN1_FA.txt 'BLOCK(6,1)' \
-stim_label 1 FA \
-stim_times 2 {$subj}_FMN2_MA.txt 'BLOCK(6,1)' \
-stim_label 2 MA \
-stim_times 3 {$subj}_FMN3_NA.txt 'BLOCK(6,1)' \
-stim_label 3 NA \
-stim_times 4 {$subj}_FMN4_FW.txt 'GAM' \
-stim_label 4 FW \
-stim_times 5 {$subj}_FMN5_MW.txt 'GAM' \
-stim_label 5 MW \
-stim_times 6 {$subj}_FMN6_NW.txt 'GAM' \
-stim_label 6 NW \
-stim_times 7 {$subj}_FMN7_FNW.txt 'GAM' \
-stim_label 7 FNW \
-stim_times 8 {$subj}_FMN8_MNW.txt 'GAM' \
-stim_label 8 MNW \
-stim_times 9 {$subj}_FMN9_NNW.txt 'GAM' \
-stim_label 9 NNW \
-stim_times 10 {$subj}_FMN10_F.txt 'BLOCK(3,1)' \
-stim_label 10 F \
-stim_times 11 {$subj}_FMN11_G.txt 'BLOCK(4,1)' \
-stim_label 11 G \
-stim_file 12 motion_demean.1D'[0]' -stim_base 12 -stim_label 12 roll \
-stim_file 13 motion_demean.1D'[1]' -stim_base 13 -stim_label 13 pitch \
-stim_file 14 motion_demean.1D'[2]' -stim_base 14 -stim_label 14 yaw \
-stim_file 15 motion_demean.1D'[3]' -stim_base 15 -stim_label 15 dS \
-stim_file 16 motion_demean.1D'[4]' -stim_base 16 -stim_label 16 dL \
-stim_file 17 motion_demean.1D'[5]' -stim_base 17 -stim_label 17 dP \
-gltsym 'SYM: FA -MA' \
-glt_label 1 FA-MA \
-gltsym 'SYM: FA -NA' \
-glt_label 2 FA-NA \
-gltsym 'SYM: MA -NA' \
-glt_label 3 MA-NA \
-gltsym 'SYM: FW -FNW' \
-glt_label 4 FW-FNW \
-gltsym 'SYM: MW -MNW' \
-glt_label 5 MW-MNW \
-gltsym 'SYM: FW -MW' \
-glt_label 6 FW-MW \
-gltsym 'SYM: FNW -MNW' \
-glt_label 7 FNW-MNW \
-gltsym 'SYM: FW -NW' \
-glt_label 8 FW-NW \
-gltsym 'SYM: FNW -NNW' \
-glt_label 9 FNW-NNW \
-gltsym 'SYM: MW -NW' \
-glt_label 10 MW-NW \
-gltsym 'SYM: MNW -NNW' \
-glt_label 11 MNW-NNW \
-gltsym 'SYM: NW -NNW' \
-glt_label 12 NW-NNW \
-fout -tout -x1D X.xmat.1D -xjpeg X.jpg \
-x1D_uncensored X.nocensor.xmat.1D \
-fitts fitts.{$subj} \
-errts errts.{$subj} \
-bucket stats.{$subj}


# if 3dDeconvolve fails, terminate the script
if ( $status != 0 ) then
echo '---------------------------------------'
echo '** 3dDeconvolve error, failing...'
echo ' (consider the file 3dDeconvolve.err)'
exit
endif


# display any large pairwise correlations from the X-matrix
1d_tool.py -show_cormat_warnings -infile X.xmat.1D |& tee out.cormat_warn.txt

# create an all_runs dataset to match the fitts, errts, etc.
3dTcat -prefix all_runs.{$subj} pb04.{$subj}.r*.scale+tlrc.HEAD
Subject Author Posted

concatenating time series across runs while accounting for scanner drift and value changes

shanaadise August 02, 2018 01:29PM

Re: concatenating time series across runs while accounting for scanner drift and value changes

rick reynolds August 06, 2018 10:07AM

Re: concatenating time series across runs while accounting for scanner drift and value changes

shanaadise September 10, 2018 11:40AM

Re: concatenating time series across runs while accounting for scanner drift and value changes

rick reynolds September 12, 2018 12:16PM

Re: concatenating time series across runs while accounting for scanner drift and value changes

shanaadise September 12, 2018 06:43PM

Re: concatenating time series across runs while accounting for scanner drift and value changes

rick reynolds September 12, 2018 08:19PM

Re: concatenating time series across runs while accounting for scanner drift and value changes

shanaadise September 13, 2018 11:24AM