From df25ddede06d83573ff71355e8458309048e8ffc Mon Sep 17 00:00:00 2001 From: jackt3 Date: Wed, 6 Oct 2021 16:22:10 +0100 Subject: [PATCH 1/2] Add options to adjust inversion efficiency if background suppression applied --nbsupp allows user to specify the number of background suppression inversion recovery pulses which were applied in the acquisition while --bsupp-eff is used to specify the efficiency of the pulse(s). If --nbsupp is not provided, the correction is skipped. --bsupp-eff defaults to 0.95 if --nbsupp is specified but --bsupp-eff is not. alpha, used in calibration, is adjusted as alpha=alpha*(bsuppeff^nbsupp) if nbsupp is provided. --- oxford_asl.in | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/oxford_asl.in b/oxford_asl.in index 684c8f6..b30d02f 100755 --- a/oxford_asl.in +++ b/oxford_asl.in @@ -155,7 +155,11 @@ Usage_extended() { echo " User supplied PV estimates (--pvgm, --pvwm)" echo " --pvgm : Partial volume estimates for GM" echo " --pvwm : Partial volume estimates for WM" - + echo "" + echo "Background suppression" + echo " --nbsupp= : Number of background suppression inversion pulses (default 0)" + echo " --bsupp-eff= : Efficiency of the background suppression pulses (default 0.95)" + echo "" echo " Epochs " echo " --elen : Length of each epoch in TIs" echo " --eol : Overlap of each epoch in TIs- {deafult: 0}" @@ -943,6 +947,12 @@ takeargs=0;boolarg="";isbool=""; --fast) fast=2 #do a one step analysis (NB generally a good idea to have spatial on for this option) ;; + # background suppression related arguments + --nbsupp) nbsupp=$argument + takeargs=1;; + --bsupp-eff) bsuppeff=$argument + takeargs=1;; + # fieldmap/distorition correction related arguments --fmap) fmap=$argument takeargs=1;; @@ -2304,6 +2314,20 @@ if [ -z $alpha ]; then fi fi +# Adjust alpha to account for the efficiency of background suppression pulses +# if appropriate, defaulting to an assumed pulse efficiency of 0.95 if +# --bsupp-eff wasn't provided as an argument +if [ ! -z $nbsupp ]; then + if [ -z $bsuppeff ]; then + bsuppeff=0.95 + fi + Log "Background suppression has been applied: $nbsupp pulses each with efficiency of $bsuppeff" + bsuppalpha=`echo "scale=10; $bsuppeff^$nbsupp" | bc` + Log "Combined background suppression pulse efficiency: $bsuppalpha" + alpha=`echo "scale=10; $alpha*$bsuppalpha" | bc` + Log "Adjusting inversion efficiency (currently --alpha=$alpha) to account for effect of background suppression pulses: $alpha" +fi + if [ -z $cmethod ]; then # default calibration method is 'voxelwise' unless we have CSF PV estimates or CSF mask has been supplied if [ ! -z $fasthasrun ] || [ ! -z $csf ]; then From 47b69fce057bb49692f773559bafa3c53439376b Mon Sep 17 00:00:00 2001 From: jackt3 Date: Wed, 6 Oct 2021 16:54:50 +0100 Subject: [PATCH 2/2] Bug fix Log statement --- oxford_asl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxford_asl.in b/oxford_asl.in index b30d02f..8eabb56 100755 --- a/oxford_asl.in +++ b/oxford_asl.in @@ -2325,7 +2325,7 @@ if [ ! -z $nbsupp ]; then bsuppalpha=`echo "scale=10; $bsuppeff^$nbsupp" | bc` Log "Combined background suppression pulse efficiency: $bsuppalpha" alpha=`echo "scale=10; $alpha*$bsuppalpha" | bc` - Log "Adjusting inversion efficiency (currently --alpha=$alpha) to account for effect of background suppression pulses: $alpha" + Log "Adjusting inversion efficiency (--alpha) to account for effect of background suppression pulses: $alpha" fi if [ -z $cmethod ]; then