From c1a12e7a1098cb30470ef6ff8ebab3e366650fdd Mon Sep 17 00:00:00 2001 From: Tim Behrens <behrens@fmrib.ox.ac.uk> Date: Thu, 26 Aug 2004 12:15:47 +0000 Subject: [PATCH] *** empty log message *** --- old_bedpost | 11 +++++++++++ old_bedpost_proc | 12 +++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/old_bedpost b/old_bedpost index d6abde3..3f98c64 100755 --- a/old_bedpost +++ b/old_bedpost @@ -182,6 +182,17 @@ done #postprocessing #postprocess $subjdir +##this will have to change.. +echo "Merging outputs into 4D files" + +${FSLDIR}/bin/avwmerge -z ${subjdir}.bedpost/merged_thsamples `${FSLDIR}/bin/imglob -oneperimage ${subjdir}.bedpost/diff_slices/data_slice_*/th_samples.hdr.gz` +${FSLDIR}/bin/avwmerge -z ${subjdir}.bedpost/merged_phsamples `${FSLDIR}/bin/imglob -oneperimage ${subjdir}.bedpost/diff_slices/data_slice_*/ph_samples.hdr.gz` +${FSLDIR}/bin/avwmerge -z ${subjdir}.bedpost/merged_fsamples `${FSLDIR}/bin/imglob -oneperimage ${subjdir}.bedpost/diff_slices/data_slice_*/f_samples.hdr.gz` +${FSLDIR}/bin/avwmaths ${subjdir}.bedpost/merged_thsamples -Tmean ${subjdir}.bedpost/mean_thsamples +${FSLDIR}/bin/avwmaths ${subjdir}.bedpost/merged_phsamples -Tmean ${subjdir}.bedpost/mean_phsamples +${FSLDIR}/bin/avwmaths ${subjdir}.bedpost/merged_fsamples -Tmean ${subjdir}.bedpost/mean_fsamples + + mkdir -p ${subjdir}.bedpost/xfms xfmdir=${subjdir}.bedpost/xfms echo 1 0 0 0 > ${xfmdir}/eye.mat diff --git a/old_bedpost_proc b/old_bedpost_proc index de71c53..2a7c806 100755 --- a/old_bedpost_proc +++ b/old_bedpost_proc @@ -15,15 +15,17 @@ Usage() { subjdir=$1 nslices=$2 +## Do the zeropadding tim slice=0 while [ $slice -lt $nslices ];do - if [ ! -e ${subjdir}.bedpost/logs/.$slice ] ; then - echo `hostname`_${$} > ${subjdir}.bedpost/logs/.$slice + slicezp=`zeropad $slice 4` + if [ ! -e ${subjdir}.bedpost/logs/.$slicezp ] ; then + echo `hostname`_${$} > ${subjdir}.bedpost/logs/.$slicezp sleep 10 - if [ `hostname`_${$} = `cat ${subjdir}.bedpost/logs/.$slice | sed -n '1p'` ] ; then - nice ${FSLDIR}/bin/diff_pvm --data=${subjdir}/data_slice_$slice --mask=${subjdir}/nodif_brain_mask_slice_$slice -b ${subjdir}/bvals -r ${subjdir}/bvecs --logdir=${subjdir}.bedpost/diff_slices/data_slice_$slice --nj=1300 --bi=300 --se=20 > ${subjdir}.bedpost/logs/log$slice - touch ${subjdir}.bedpost/logs/.${slice}_finished + if [ `hostname`_${$} = `cat ${subjdir}.bedpost/logs/.$slicezp | sed -n '1p'` ] ; then + nice ${FSLDIR}/bin/diff_pvm --data=${subjdir}/data_slice_$slicezp --mask=${subjdir}/nodif_brain_mask_slice_$slicezp -b ${subjdir}/bvals -r ${subjdir}/bvecs --logdir=${subjdir}.bedpost/diff_slices/data_slice_$slicezp --nj=1300 --bi=300 --se=20 > ${subjdir}.bedpost/logs/log$slicezp + touch ${subjdir}.bedpost/logs/.${slicezp}_finished fi fi slice=`echo "$slice + 1" | bc` -- GitLab