#! /bin/sh
# sutvband -- reconstruct individual chirps from the sum of chirps
# produced by PSsugabor or Xsugabor

demo=tvband

perc=99

echo "Run PSsugabor or Xsugabor before running this script!"

## reconstruct 100hz-5hz trace
sutvband <vibrodata.4 tf=.4,.5,.7 \
	f=50,55,100,110 f=40,45,50,55 f=5,10,40,45 >recon.1
supsgraph <recon.1 perc=$perc \
	title="Reconstruction of 100hz-5hz data"\
	label1="Time (sec)" label2="" >${demo}.1.eps
sugabor <recon.1 band=.5 |
supsimage perc=$perc \
	title="Gabor Transform"\
	label1="Time (sec)" label2="Freq (hz)" >${demo}.2.eps

## reconstruct 40hz-50hz trace
sutvband <vibrodata.4 tf=.4,.6  f=30,35,45,50 f=35,40,50,55 > recon.2
supsgraph <recon.2 perc=$perc \
	title="Reconstruction of 40hz-50hz data"\
	label1="Time (sec)" label2="" >${demo}.3.eps

sugabor <recon.2 band=.5 |
supsimage perc=$perc \
	title="Gabor Transform"\
	label1="Time (sec)" label2="Freq (hz)" >${demo}.4.eps

## reconstruct 5hz-120hz trace
sutvband <vibrodata.4 tf=.3,.4,.5 f=5,10,30,35 f=35,40,50,55 \
	f=55,60,130,140 >recon.3
supsgraph <recon.3 perc=$perc \
	title="Reconstruction of 5hz-120hz data"\
	label1="Time (sec)" label2="" >${demo}.5.eps
sugabor <recon.3 band=.5 |
supsimage perc=$perc \
	title="Gabor Transform"\
	label1="Time (sec)" label2="Freq (hz)" >${demo}.6.eps

echo 
echo "Output PostScript files:"

echo -n "     "
for i in ${demo}.*.eps
do
	 echo -n "$i "
done
echo
echo "You may view these with your PostScript Previewer"

exit 0

exit 0
