1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-23 04:14:03 +02:00
ben-wpan/usrp/sps/row
Werner Almesberger bcd6e09189 usrp/sps/: added min/avg/max summary image
- range: generate min/avg/max data from FFT files
- vizr: plot the output of "range"
- row: make "viz" keep the FFT output and use it to generate the summary
2011-03-05 19:34:07 -03:00

78 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
export GDFONTPATH
GDFONTPATH=$GDFONTPATH:/usr/share/fonts/truetype/ttf-liberation/
if ! [ "$1" ]; then
echo "usage: $0 prefix ..." 1>&2
exit 1
fi
cat <<EOF
<HTML>
<TABLE cellpadding="0" cellspacing="0">
EOF
last=
for prefix in "$@"; do
echo $prefix 1>&2
if [ "${last%-*}" = "${prefix%-*}" ]; then
color=
else
color=' bgcolor="#a0e0ff"'
fi
last=$prefix
echo "<TR$color><TH>$prefix<TD align=\"center\">Offset"
f=2405
while [ $f -le 2480 ]; do
echo "<TD align=\"center\">$f MHz"
f=`expr $f + 5`
done
echo "<TR>"
echo "<TD><A href=\"$prefix.png\"><IMG src=\"$prefix-small.png\"></A>"
echo "<TD align="right">-0.5 MHz"
f=2405
while [ $f -le 2480 ]; do
./viz -f LiberationSans-Bold -p $prefix-$f.png \
-o $f.fft $prefix $f
convert -resize '15%' $prefix-$f.png $prefix-$f-small.png
echo "<TD><A href=\"$prefix-$f.png\"><IMG src=\"$prefix-$f-small.png\"></A>"
f=`expr $f + 5`
done
echo "<TR>"
echo "<TD>"
echo "<TD align="right">+0.5 MHz"
f=2405
while [ $f -le 2480 ]; do
f1=`expr $f + 1`
./viz -f LiberationSans-Bold -p $prefix-$f1.png \
-o $f1.fft $prefix $f1
convert -resize '15%' $prefix-$f1.png $prefix-$f1-small.png
echo "<TD><A href=\"$prefix-$f1.png\"><IMG src=\"$prefix-$f1-small.png\"></A>"
f=`expr $f + 5`
done
ffts=`
f=2405
while [ $f -le 2480 ]; do
echo $f.fft
echo \`expr $f + 1\`.fft
f=\`expr $f + 5\`
done`
./range >_tmp
./vizr -f LiberationSans-Bold -p $prefix.png $prefix _tmp
rm -f $ffts _tmp
convert -resize '15%' $prefix.png $prefix-small.png
done
cat <<EOF
</TABLE>
EOF