Thank you so much Jesper! Amazing.
Derek
________________________________________
From: FSL - FMRIB's Software Library [[log in to unmask]] on behalf of Jesper Andersson [[log in to unmask]]
Sent: Thursday, January 21, 2016 3:36 AM
To: [log in to unmask]
Subject: Re: [FSL] .ecclog/ eddy parameters txt files
Hi there Derek,
here is a script that should give you similar output to what ec_plot used to give for eddy_correct. I can’t quite remember if the currently released version produces the .eddy_movement_rms file, but if not it will be part of the next release.
Jesper
#!/bin/sh
#
# Adapted from ec_plot to produce similar plots for eddy.
# Pass it exactly the same string as you used for the --out
# argument when running eddy.
#
# Jesper
if [ $# -ne 1 ] ; then
echo "Usage: `basename $0` <eddy output basename>"
exit 1;
fi
parfile=${1}.eddy_parameters
if [ ! -f $parfile ]; then
echo "$parfile not found"
exit 1
fi
sed 's/[\t ][\t ]*/ /g' < $parfile | cut -d' ' -f 1-3 > eddy_trans.txt
sed 's/[\t ][\t ]*/ /g' < $parfile | cut -d' ' -f 4-6 > eddy_rot.txt
echo "x" > grot_labels.txt
echo "y" >> grot_labels.txt
echo "z" >> grot_labels.txt
$FSLDIR/bin/fsl_tsplot -i eddy_rot.txt -t 'Eddy Current estimated rotations (radians)' -l grot_labels.txt -o eddy_rot.png
$FSLDIR/bin/fsl_tsplot -i eddy_trans.txt -t 'Eddy Current estimated translations (mm)' -l grot_labels.txt -o eddy_trans.png
rmsfile=${1}.eddy_movement_rms
if [ -f $rmsfile ]; then
echo "absolute" > grot_labels.txt
echo "relative" >> grot_labels.txt
$FSLDIR/bin/fsl_tsplot -i $rmsfile -t 'Eddy Current estimated mean displacement (mm)' -l grot_labels.txt -o eddy_disp.png
fi
# clean up temp files
/bin/rm grot_labels.txt eddy_rot.txt eddy_trans.txt
On 20 Jan 2016, at 16:58, Derek Pisner <[log in to unmask]> wrote:
> Jesper,
>
> Is there a way to readily convert the motion parameters txt file output from new EDDY into an .ecclog format parameters file like the one produced by old eddy_correct? I ask because I would like to run the old quality control ec_plot script after running the new EDDY correction with TOPUP. Alternatively, is there an update ec_plot script floating around that can simply use the output from new EDDY?
>
> Thanks,
> Derek
|