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 05, 2022 10:14PM
Hi, Carolin-

With standard FMRI processing with afni_proc.py, one criterion to censor a particular time point is to:
+ calculate outliers at each voxel, across all time, within the brain mask
+ then count the fraction of outliers within the brain mask (and compare that fractional value to a user-chosen threshold, to decide about censoring there).

That sounds like what you want to do, per ROI? You could use either outlier counts per ROI, or outlier fraction per ROI, per time point?

The following tcsh script loops over two ROIs in an "ROI dset", and calculates the outlier fraction within the "EPI dset" at each point in time, and it dumps that result to a 1D/time-series file; it also simply plots each:
#!/bin/tcsh

set dset_roi = # user puts a dset name here
set dset_epi = # user puts a dset name here

# which ROIs to select (by ROI value)
set all_roival = ( 1 2 )

# loop over each ROI value
foreach roival ( ${all_roival} )
    # compute outlier fraction for each volume, 
    # selecting an ROI value from the $dset_roi to be a mask 
    3dToutcount                                           \
        -mask ${dset_roi}"<${roival}>"                    \
        -fraction -polort 1 -legendre                     \
        ${dset_epi} > out_frac_${roival}.txt
    # plot
    1dplot out_frac_${roival}.txt &
end
You can remove "-fraction" within 3dToutcount, if you want a number of outliers per time point. I "stole" the command from an afni_proc.py-generated script, using the polort level and legendre polynomial aspects.

--pt



Edited 1 time(s). Last edit at 12/23/2022 08:51AM by ptaylor.
Subject Author Posted

what measure is recommended to summarize "spikiness" in an area

carolin31 August 04, 2022 10:29PM

Re: what measure is recommended to summarize "spikiness" in an area

ptaylor August 05, 2022 10:14PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 August 15, 2022 04:02PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 December 21, 2022 01:45PM

Re: what measure is recommended to summarize "spikiness" in an area

ptaylor December 23, 2022 09:15AM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 January 12, 2023 08:54PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 January 23, 2023 05:22PM

Re: what measure is recommended to summarize "spikiness" in an area

ptaylor January 24, 2023 08:18AM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 January 25, 2023 08:54PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 February 08, 2023 08:04PM

Re: what measure is recommended to summarize "spikiness" in an area

rick reynolds February 08, 2023 08:34PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 February 10, 2023 04:12PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 February 13, 2023 10:49PM

Re: what measure is recommended to summarize "spikiness" in an area

rick reynolds February 13, 2023 11:41PM

Re: what measure is recommended to summarize "spikiness" in an area

carolin31 February 14, 2023 01:43PM

Re: what measure is recommended to summarize "spikiness" in an area Attachments

carolin31 March 06, 2023 03:20PM