mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-05 04:05:54 +02:00
usrp/sps: further improved scripts, added Makefile
- Makefile (index): generate an illustrated index of all the measurement runs - Makefile (upload): upload images and index to downloads.qi-hardware.com - collect: added optional directory argument, for cases where the destination directory differs from the local directory - collect: hard-coded remote host to run usrp2_rx_cfile.py at - collect: added . to PATH, for execution of a local copy of atrf-txrx - row: generate entire HTML page, not just the table entries - row: accept a list of prefixes to iterate through - row: highlight rows starting a "new" prefix - viz: corrected sprintf formats from +%...f to %+...f - viz: show negative peak power in red
This commit is contained in:
parent
fd27bdc442
commit
7258e10a9a
16
usrp/sps/Makefile
Normal file
16
usrp/sps/Makefile
Normal file
@ -0,0 +1,16 @@
|
||||
RUNS=atusb-sil \
|
||||
atusb-20110214-3 atusb-20110214-4 atusb-20110214-5 \
|
||||
atusb-20110214-6 atusb-20110214-7 \
|
||||
atben-20110115-1 \
|
||||
atben-20110123-1 atben-20110123-2 \
|
||||
atben-20110219-1 atben-20110219-2 atben-20110219-3 \
|
||||
atben-20110219-4 atben-20110219-5
|
||||
|
||||
all:
|
||||
|
||||
upload:
|
||||
rsync -e ssh --progress index.html *.png \
|
||||
www-data@downloads.qi-hardware.com:werner/wpan/20110303/
|
||||
|
||||
index:
|
||||
time ./row $(RUNS) >index.html
|
@ -1,14 +1,29 @@
|
||||
#!/bin/sh
|
||||
if ! [ "$1" ]; then
|
||||
echo "usage: $0 prefix" 2>&1
|
||||
|
||||
PATH=$PATH:.
|
||||
|
||||
if ! [ "$1" ] || [ "$3" ]; then
|
||||
echo "usage: $0 prefix [directory]" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$2" ]; then
|
||||
if [ "${2#/}" = "$2" ]; then
|
||||
dir=`pwd`/$2
|
||||
else
|
||||
dir=$2
|
||||
fi
|
||||
else
|
||||
dir=`pwd`
|
||||
fi
|
||||
|
||||
f=2405
|
||||
while [ $f -le 2480 ]; do
|
||||
echo Center: $f MHz 1>&2
|
||||
f1=`expr $f + 1`
|
||||
atrf-txrx -f $f -p 4 -T -0.5 \
|
||||
'sleep 1; usrp2_rx_cfile.py -d 16 -g 46 -f '$f'M -N 1M '$1-$f
|
||||
"sleep 1; ssh -a -x ws usrp2_rx_cfile.py -d 16 -g 46 -f ${f}M -N 1M $dir/$1-$f"
|
||||
atrf-txrx -f $f -p 4 -T +0.5 \
|
||||
'sleep 1; usrp2_rx_cfile.py -d 16 -g 46 -f '$f1'M -N 1M '$1-$f1
|
||||
"sleep 1; ssh -a -x ws usrp2_rx_cfile.py -d 16 -g 46 -f ${f1}M -N 1M $dir/$1-$f1"
|
||||
f=`expr $f + 5`
|
||||
done
|
||||
|
70
usrp/sps/row
70
usrp/sps/row
@ -4,34 +4,54 @@ export GDFONTPATH
|
||||
GDFONTPATH=$GDFONTPATH:/usr/share/fonts/truetype/ttf-liberation/
|
||||
|
||||
if ! [ "$1" ]; then
|
||||
echo "usage: $0 prefix" 2>&1
|
||||
echo "usage: $0 prefix ..." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prefix=$1
|
||||
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"
|
||||
f=2405
|
||||
while [ $f -le 2480 ]; do
|
||||
echo "<TD align="center">$f MHz"
|
||||
f=`expr $f + 5`
|
||||
done
|
||||
|
||||
echo "<TR><TD align="right">-0.5 MHz"
|
||||
f=2405
|
||||
while [ $f -le 2480 ]; do
|
||||
./viz -f LiberationSans-Bold -p $prefix-$f.png $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><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 $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
|
||||
|
||||
echo "<TR><TH>$prefix"
|
||||
f=2405
|
||||
while [ $f -le 2480 ]; do
|
||||
echo "<TD align="center">$f MHz"
|
||||
f=`expr $f + 5`
|
||||
done
|
||||
|
||||
echo "<TR><TD align="right">-0.5 MHz"
|
||||
f=2405
|
||||
while [ $f -le 2480 ]; do
|
||||
./viz -f LiberationSans-Bold -p $prefix-$f.png $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><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 $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
|
||||
cat <<EOF
|
||||
</TABLE>
|
||||
EOF
|
||||
|
14
usrp/sps/viz
14
usrp/sps/viz
@ -40,16 +40,24 @@ ym=$2 # magnitude of y peak
|
||||
n=$3 # total number of samples
|
||||
span=6.25 # ADC sample rate in MHz / decimation (100 MHz/16)
|
||||
|
||||
if [ ${ym#-} = $ym ]; then
|
||||
ymbar=-$ym
|
||||
ymbarlt=2
|
||||
else
|
||||
ymbar=$ym
|
||||
ymbarlt=1
|
||||
fi
|
||||
|
||||
gnuplot -persist <<EOF
|
||||
$term
|
||||
$output
|
||||
|
||||
set label "$prefix" at graph 0.03, graph 0.93 font "$font,22"
|
||||
set label sprintf("+%.1f dB", $ym) at graph 0.03, graph 0.82 font "$font,18"
|
||||
set label sprintf("%+.1f dB", $ym) at graph 0.03, graph 0.82 font "$font,18"
|
||||
|
||||
set label sprintf("%.1f MHz", $f-0.5) \
|
||||
at graph 0.97, graph 0.93 right font "$font,22"
|
||||
set label sprintf("+%.1f ppm", (($xm/$n-0.5)*$span+0.5)/($f-0.5)*1000000) \
|
||||
set label sprintf("%+.1f ppm", (($xm/$n-0.5)*$span+0.5)/($f-0.5)*1000000) \
|
||||
at graph 0.97, graph 0.82 right font "$font,18"
|
||||
|
||||
set xrange [-2.5:2.5]
|
||||
@ -63,7 +71,7 @@ set xlabel "MHz from nominal frequency of test wave"
|
||||
|
||||
set style fill solid 1
|
||||
plot "_tmp" using ((\$0/$n-0.5)*$span+0.5):(\$1-$ym) with lines notitle, \
|
||||
"<echo -0.9 -$ym 0.2" with boxes notitle
|
||||
"<echo -0.9 $ymbar 0.2" with boxes lt $ymbarlt notitle
|
||||
EOF
|
||||
|
||||
rm -f _tmp
|
||||
|
Loading…
Reference in New Issue
Block a user