2011-03-04 04:26:31 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
export GDFONTPATH
|
|
|
|
GDFONTPATH=$GDFONTPATH:/usr/share/fonts/truetype/ttf-liberation/
|
|
|
|
|
|
|
|
if ! [ "$1" ]; then
|
2011-03-05 01:28:59 +02:00
|
|
|
echo "usage: $0 prefix ..." 1>&2
|
2011-03-04 04:26:31 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2011-03-05 01:28:59 +02:00
|
|
|
cat <<EOF
|
|
|
|
<HTML>
|
|
|
|
<TABLE cellpadding="0" cellspacing="0">
|
|
|
|
EOF
|
2011-03-04 04:26:31 +02:00
|
|
|
|
2011-03-05 01:28:59 +02:00
|
|
|
last=
|
|
|
|
for prefix in "$@"; do
|
|
|
|
echo $prefix 1>&2
|
2011-03-04 04:26:31 +02:00
|
|
|
|
2011-03-05 01:28:59 +02:00
|
|
|
if [ "${last%-*}" = "${prefix%-*}" ]; then
|
|
|
|
color=
|
|
|
|
else
|
|
|
|
color=' bgcolor="#a0e0ff"'
|
|
|
|
fi
|
|
|
|
last=$prefix
|
2011-03-06 00:34:07 +02:00
|
|
|
|
|
|
|
echo "<TR$color><TH>$prefix<TD align=\"center\">Offset"
|
2011-03-05 01:28:59 +02:00
|
|
|
f=2405
|
|
|
|
while [ $f -le 2480 ]; do
|
2011-03-06 00:34:07 +02:00
|
|
|
echo "<TD align=\"center\">$f MHz"
|
2011-03-05 01:28:59 +02:00
|
|
|
f=`expr $f + 5`
|
|
|
|
done
|
|
|
|
|
2011-03-06 00:34:07 +02:00
|
|
|
echo "<TR>"
|
|
|
|
echo "<TD><A href=\"$prefix.png\"><IMG src=\"$prefix-small.png\"></A>"
|
|
|
|
echo "<TD align="right">-0.5 MHz"
|
|
|
|
|
2011-03-06 01:25:27 +02:00
|
|
|
>_peak
|
|
|
|
|
2011-03-05 01:28:59 +02:00
|
|
|
f=2405
|
|
|
|
while [ $f -le 2480 ]; do
|
2011-03-06 01:25:27 +02:00
|
|
|
echo -n "$f " >>_peak
|
|
|
|
./viz -f LiberationSans-Bold -m -p $prefix-$f.png \
|
|
|
|
-o $f.fft $prefix $f >>_peak
|
2011-03-05 01:28:59 +02:00
|
|
|
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
|
|
|
|
|
2011-03-06 00:34:07 +02:00
|
|
|
echo "<TR>"
|
2011-03-06 01:25:27 +02:00
|
|
|
echo "<TD><A href=\"$prefix-peak.png\"><IMG src=\"$prefix-peak-small.png\"></A>"
|
2011-03-06 00:34:07 +02:00
|
|
|
echo "<TD align="right">+0.5 MHz"
|
|
|
|
|
2011-03-05 01:28:59 +02:00
|
|
|
f=2405
|
|
|
|
while [ $f -le 2480 ]; do
|
|
|
|
f1=`expr $f + 1`
|
2011-03-06 01:25:27 +02:00
|
|
|
echo -n "$f1 " >>_peak
|
|
|
|
./viz -f LiberationSans-Bold -m -p $prefix-$f1.png \
|
|
|
|
-o $f1.fft $prefix $f1 >>_peak
|
2011-03-05 01:28:59 +02:00
|
|
|
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
|
2011-03-04 04:26:31 +02:00
|
|
|
|
2011-03-06 00:34:07 +02:00
|
|
|
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
|
2011-03-06 01:25:27 +02:00
|
|
|
|
|
|
|
sort -n _peak >_tmp
|
|
|
|
./vizp -f LiberationSans-Bold -p $prefix-peak.png $prefix _tmp
|
|
|
|
rm -f _peak _tmp
|
|
|
|
convert -resize '15%' $prefix-peak.png $prefix-peak-small.png
|
|
|
|
|
2011-03-06 00:34:07 +02:00
|
|
|
done
|
2011-03-05 01:28:59 +02:00
|
|
|
cat <<EOF
|
|
|
|
</TABLE>
|
|
|
|
EOF
|