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 10, 2016 08:36PM
Hi all,

I've been using the script below to identify and censor TRs with signal and motion outliers in my data. However, I've noticed that the options reporting statistics from these censor files does not seem to match the file content. In the censor file, shouldn't there be a zero for an omitted TR and a 1 for an included TR, and these should correspond to the TRs indicated by -show_trs_censored?

For example, when I use this script on one of my subjects (105), it says all 39 TRs will be censored but the censor file starts with three 1s (I plan to adjust my threshold up from 0.3 for the Euclidean norm). Also, the censor file combining the signal and motion outliers is the same as the censor file for just the motion outliers, even when there are signal outliers.

Please note there were 78 TRs total, and they were split into even and odd TRs (39 each). The script below is for the even TRs. Any thoughts are appreciated.

Cheers,
Alain


#!/bin/tcsh -xef

##########################################################################
#fMRI signal outliers

#Create a file that will allow us to censor TRs with outliers at more than 10% of brain voxels

1deval -a outcount.101.breathhold.E.1D -expr "1-step(a-0.1)" > out.censor.101.breathhold.E.1D

#Determine exactly how many TRs were censored and which TRs were censored, based on signal outliers

1d_tool.py -infile out.censor.101.breathhold.E.1D -quick_censor_count 0 -show_trs_censored comma

#Motion outliers

#Determine maximum motion displacement (mm) before censoring

1d_tool.py -infile dfile.breathhold.E.1D -show_max_displace

#Create a file that will allow us to censor TRs where the Euclidean norm of the motion parameter derivative is more than 0.3 (~mm/degrees). This is a good value for healthy adults, but I may need to increase this cut-off depending on the number of TRs that are being censored

1d_tool.py -infile dfile.breathhold.E.1D -set_nruns 1 -set_tr 4 -show_censor_count -censor_prev_TR -censor_motion 0.3 motion.101.breathhold.E

#Determine maximum motion displacement with censoring

1d_tool.py -infile dfile.breathhold.E.1D -show_max_displace -censor_infile motion.101.breathhold.E_censor.1D

#Display a list of the TRs censored based on motion, and the total number of censored TRs.

1d_tool.py -infile motion.101.breathhold.E_censor.1D -quick_censor_count 0 -show_trs_censored comma

#Create a "combined" censor file for use in 3dDeconvolve (i.e., that combines signal and motion outliers). This is when the censoring will actually take place. If a subject does not have any censored TRs, then I do not need to re-run 3dDeconvolve.

1deval -a motion.101.breathhold.E_censor.1D -b out.censor.101.breathhold.E.1D -expr "a*b" > censor.101.breathhold.E_combined.1D

#Display a list of the TRs censored based on motion and outliers combined and the total number of censored TRs (last line).

1d_tool.py -infile censor.101.breathhold.E_combined.1D -quick_censor_count 0 -show_trs_censored comma
Subject Author Posted

Interpreting censor files

Alain August 10, 2016 08:36PM

Re: Interpreting censor files

rick reynolds August 11, 2016 08:39AM

Re: Interpreting censor files

Alain August 12, 2016 10:39AM

Re: Interpreting censor files

rick reynolds August 12, 2016 01:29PM

Re: Interpreting censor files

Alain August 12, 2016 06:16PM