Strange Radcor Output

Hi AFNI team,

I have a subject that has a weird radcor output for the first 2 of their 4 runs. Out of all of our subjects (over 200), this is the only person that has this and it's just for these 2 runs. Nothing abnormal happened during their scan according to our logs and the rest of this person's data is very clean. Is this anything I should be concerned about? I attached one of the runs in question along with a normal one from the same subject. These images are from the volreg radcor output, but Tcat looks basically the same.


Sincerely,
Ian

Wow! Thaaaat is an interesting combination of normal (inside the brain) and odd (outside the brain).

I would probably first look at the raw time series for those runs---put the pb00tcat dset for those runs as underlay in the GUI, and open graph windows, and surf around (both inside and outside the brain) to see if there looks like any weird pattern.

Second, I'd be tempted to run instacorr on that data to see how things look both inside and outside it. I'm attaching a script (to be part of a pending APQC update!) to help speed up instacorring. It is called run_instacorr_pbrun.tcsh. Can you put it in your results directory, and then execute it there by running by providing 2 args, a pb-number and a run-number, like:

tcsh run_instacorr_pbrun.tcsh pb00 r01

Wait a couple seconds for it to setup (you will see an overlay appear). Then, if you hold down Shift+Ctrl and click around, you should see global correlation patterns from a small ball around that. Surf around inside and outside the brain. Anything look weird/structured there?

--pt

-------------------- the script: run_instacorr_pbrun.tcsh -------------------

#!/bin/tcsh

# This script was created by the afni_proc.py quality control (APQC)
# generator.  
#
# It's purpose is to facilitate investigating the properties of the
# raw/unprocessed input data, using the AFNI GUI's InstaCorr functionality.  
#
# As described in the popup help, users should just need to hold down
# the Ctrl+Shift keys and then left-click and move the mouse around
# (dragging or re-clicking).  Watch the correlation patterns to that
# seed location change, and this often provides an excellent way to
# understand the data.
#
# In this script, one *must* provide 2 command line args: a pb label (pb00, 
# pb01, etc.), and a run number (r01, r02, r03, etc.).
#
# Additionally, one *can* also add three numbers on the command line
# to represent the starting location (RAI coordinate notation) of the 
# initial seed.

# ver = 1.4
# -------------------------------------------------------------------------




set pb  = "$1"
set run = "$2"

if ( "${run}" == "" ) then
    echo "** Exiting: this program requires 2 cmd line args to run:"
    echo "   + a pb label (pb00, pb01, etc.)"
    echo "   + a run number (r01, r02, r03, etc.)."
    echo "   Additionally, you can then put 3 numbers as an initial"
    echo "   seed location coordinate"
    exit 1
endif

# ----- find main dset of IC
set dset_ulay = `find . -maxdepth 1 -name "${pb}.*.${run}.*.HEAD" | cut -b3-`

if ( ${#dset_ulay} == 0 ) then
    echo "** Exiting: could not find dset: ${pb}.*.${run}.*.HEAD"
    exit 1
else if ( ${#dset_ulay} == 1 ) then
    echo "++ Found IC dset: ${dset_ulay}"
    set ic_dset   = "${dset_ulay}"
else
    echo "** Exiting: too many (${#dset_ulay}) dsets: ${pb}.*.${run}.*.HEAD"
    exit 1
endif

# ----- find associated vline file, if exists
set dset_vline = ""
set dir_vline  = `find . -maxdepth 1 -type d        \
                      -name "vlines.${pb}.*"        \
                      | cut -b3-`
if ( ${#dir_vline} == 1 ) then
    set dset_vline  = `find ./${dir_vline} -maxdepth 1 -type f        \
                           -name "var.1.*${run}*"                     \
                           | cut -b3-`
endif

# ----- find associated radcor file, if exists
set dset_radcor = ""
set dir_radcor  = `find . -maxdepth 1 -type d       \
                     -name "radcor.${pb}.*"         \
                     | cut -b3-`
if ( ${#dir_radcor} == 1 ) then
    set dset_radcor  = `find ./${dir_radcor} -maxdepth 1 -type f     \
                            -name "radcor.*.${run}*HEAD"             \
                            | cut -b3-`
endif

# ----- make ordered list of dsets to load
set all_load  = ( "${dset_ulay}" "${ic_dset}"       \
                   ${pb}*HEAD                       \
                   ${dset_vline} ${dset_radcor}     \
                   *.HEAD *.nii* )

# ----- finalize remaining parameters

# possible starting seed coordinate (in RAI notation)
set xcoor = "$3"
set ycoor = "$4"
set zcoor = "$5"

if ( "${zcoor}" != "" ) then
    set coord = ( "${xcoor}" "${ycoor}" "${zcoor}" )
else
    set coord = `3dinfo -dc3 "${ic_dset}"`
endif

set voxvol      = `3dinfo -voxvol "${ic_dset}"`
set ic_seedrad  = `echo "${voxvol}"                                      \
                        | awk '{printf "%0.2f",(2*($1)^0.3334);}'`
echo "++ seedcorr radius: ${ic_seedrad}"
set ic_blur     = `echo "${voxvol}"                                      \
                        | awk '{printf "%0.2f",(1.5*($1)^0.3334);}'`
echo "++ blurring radius: ${ic_blur}"

# ===========================================================================
# parameters set by default

setenv AFNI_THRESH_INIT_EXPON  0
setenv AFNI_NOSPLASH           YES
setenv AFNI_SPLASH_MELT        NO
setenv AFNI_STARTUP_WARNINGS   NO
setenv AFNI_NIFTI_TYPE_WARN    NO
setenv AFNI_NO_OBLIQUE_WARNING YES

# InstaCorr parameters

set ic_ignore   = 0
set ic_blur     = ${ic_blur}           # bc the data be unprocessed
set ic_automask = no
set ic_despike  = no
set ic_bandpass = 0,99999
set ic_polort   = 3                    # bc the data be unprocessed
set ic_method   = P

# GUI visualization parameters

set pbar_sign   = "-"
set ncolors     = 99
set topval      = 0.6
set cbar        = "Reds_and_Blues_Inv"
set olay_alpha  = "Quadratic"
set olay_boxed  = "No"
set thresh      = 0.3
set frange      = ${topval}
set crossh      = MULTI
set xh_gap      = -1
set opacity     = 7
set OW          = "OPEN_WINDOW"

# port communication
set portnum = `afni -available_npb_quiet`

# ===========================================================================

afni -q  -no_detach                                                     \
    -npb ${portnum}                                                     \
     -com "SWITCH_UNDERLAY    ${dset_ulay}"                             \
     -com "INSTACORR INIT                                               \
                     DSET=${ic_dset}                                    \
                   IGNORE=${ic_ignore}                                  \
                     BLUR=${ic_blur}                                    \
                 AUTOMASK=${ic_automask}                                \
                  DESPIKE=${ic_despike}                                 \
                 BANDPASS=${ic_bandpass}                                \
                   POLORT=${ic_polort}                                  \
                  SEEDRAD=${ic_seedrad}                                 \
                   METHOD=${ic_method}"                                 \
     -com "INSTACORR SET      ${coord} J"                               \
     -com "SET_THRESHNEW      ${thresh}"                                \
     -com "SET_PBAR_ALL       ${pbar_sign}${ncolors} ${topval} ${cbar}" \
     -com "SET_FUNC_RANGE     ${frange}"                                \
     -com "SET_XHAIRS         ${crossh}"                                \
     -com "SET_XHAIR_GAP      ${xh_gap}"                                \
     -com "SET_FUNC_ALPHA     ${olay_alpha}"                            \
     -com "SET_FUNC_BOXED     ${olay_boxed}"                            \
     -com "$OW sagittalimage  opacity=${opacity}"                       \
     ${all_load:q}  &

sleep 1

set l = `prompt_user -pause \
"      Run InstaCorr on the initial (tcat) dataset\n\n\
\n\
InstaCorr calc using : ${ic_dset}\n\
Initial ulay dataset : ${dset_ulay}\n\
\n\
Wait briefly for the initial correlation patterns to appear.\n\
\n\
To use InstaCorr:\n\
Hold down Ctrl+Shift, and Left-click anywhere in the dataset.\n\
You can hold down Left-click and drag the cursor around, too.\n\
\n\
You will see the (unmasked) wholebrain correlation patterns\n\
from each clicked 'seed' location, updating instantly.\n\
Transparent+boxed thresholding is ON (via 'A' and 'B' buttons).\n\
\n\
To jump to particular coordinates:\n\
+ Right-click -> 'Jump to (xyz)' \n\
+ Enter 3 space-separated coords\n\
+ Then, Right-click -> 'InstaCorr set',\n\
  or use standard Ctrl+Shift and Left-click.\n\
\n\
Alpha (transparent) thresholding is on. To show boxes (outlines),\n\
click the 'B' button above the colorbar in the GUI.\n\
\n\
When done, hit 'OK' to exit.\n"`


if ("$l" != "1") then
    echo "+* Warn: InstaCorr guidance message failed to open"
endif

@Quiet_Talkers -npb_val ${portnum}

cat << EOF
===========================================
++ Goodbye, and thank you for InstaCorring.

EOF
exit 0

Hi Paul,

Apologies for the delay! Looking at the raw time series I didn't notice anything abnormal. I ran the instacorr script you provided and the area outside the brain for the first 2 runs pretty much looks exactly like the images I provided. Everything besides that seems normal.

Sincerely,
Ian

Hi, Ian-

In asking some folks here, there was a question of what the TSNR maps look like---anything interesting in that streaked-background image?

--pt

Hi Paul,

Nope, looks relatively normal! Attaching the Final TSNR images here (r01 volreg ones look similar).

Sincerely,
Ian