mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
Updated frame/word-error-rate script.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6346 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
5ed629a252
commit
59e093032e
42
lib/fer
42
lib/fer
@ -2,33 +2,37 @@
|
|||||||
|
|
||||||
# jt65 end-to-end simulator. Run enough cases to get a given
|
# jt65 end-to-end simulator. Run enough cases to get a given
|
||||||
# number of successful decodes or a given number of errors
|
# number of successful decodes or a given number of errors
|
||||||
|
# For better performance, copy this script and jt65, jt65sim
|
||||||
|
# executables to a ramdisk and run from there.
|
||||||
|
|
||||||
nruns=0
|
nruns=0
|
||||||
ndecodes=0
|
ndecodes=0
|
||||||
ngood=0
|
ngood=0
|
||||||
nbad=0
|
nbad=0
|
||||||
snr=-23.0
|
snr=-26.0
|
||||||
|
|
||||||
while [ $[ $nruns - $ngood ] -lt 50 ]
|
#while [ $[ $nruns - $ngood ] -lt 200 ]
|
||||||
#while [ $ngood -lt 100 ]
|
#while [ $ngood -lt 200 ]
|
||||||
#while [ $nruns -lt 1000 ]
|
while [ $nruns -lt 20000 ]
|
||||||
|
|
||||||
do
|
do
|
||||||
./jt65sim A 1 0.0 $snr 0.0 1 > /dev/null
|
rm 000000_0001.wav
|
||||||
decoded=$( ./jt65 -n 100000 -f 1500 -s 000000_0001.wav )
|
./jt65sim -n 1 -d 0.0 -s \\$snr > /dev/null
|
||||||
# echo $decoded
|
rm decoded.txt
|
||||||
goodone=$( echo $decoded | grep "K1ABC" | wc -l )
|
./jt65 -a 10 -f 1500 -n 10 -s 000000_0001.wav > decoded.txt
|
||||||
nruns=$[$nruns+1]
|
if [ -e decoded.txt ]; then
|
||||||
if [ ! -z "$decoded" ]; then # if decoded string is not empty
|
nd=$( wc -l < decoded.txt )
|
||||||
ndecodes=$[$ndecodes+1]
|
ng=$( grep "K1ABC" decoded.txt | wc -l )
|
||||||
if [ $goodone -eq 1 ] ; then
|
nb=$[$nd-$ng]
|
||||||
ngood=$[$ngood+1]
|
ndecodes=$[$ndecodes + $nd]
|
||||||
else
|
ngood=$[$ngood + $ng]
|
||||||
nbad=$[$nbad+1]
|
nbad=$[$nbad + $nb]
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
nmissed=$[$nruns-$ngood]
|
nruns=$[$nruns + 1]
|
||||||
echo -en nruns: $nruns ndecodes: $ndecodes ngood: $ngood nbad: $nbad nmissed: $nmissed "\r"
|
nmissed=$[$nruns-$ngood]
|
||||||
|
pe=$( echo "scale=5; $nmissed/$nruns" | bc -l )
|
||||||
|
ps=$( echo "scale=5; $ngood/$nruns" | bc -l )
|
||||||
|
echo -en snr: $snr nruns: $nruns ndecodes: $ndecodes ngood: $ngood nbad: $nbad nmissed: $nmissed wer: $pe success: $ps"\r"
|
||||||
done
|
done
|
||||||
echo nruns: $nruns ndecodes: $ndecodes ngood: $ngood nbad: $nbad nmissed: $nmissed
|
echo snr: $snr nruns: $nruns ndecodes: $ndecodes ngood: $ngood nbad: $nbad nmissed: $nmissed wer: $pe success: $ps
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user