#! /bin/csh -f
# Last edited on 2005-01-17 02:48:21 by stolfi

# Plots the Fourier transforms (actually sine transforms)
# of the two shape functions of a candidate.

set usage = "???";

set afft = "$1"; shift;
set bfft = "$1"; shift;

set atmp = "/tmp/$$-a.fft"
set btmp = "/tmp/$$-b.fft"

cat ${afft} \
  | egrep '^ *[-+]?[0-9]+ *$' \
  > ${atmp}

cat ${bfft} \
  | egrep '^ *[-+]?[0-9]+ *$' \
  > ${btmp}

gnuplot << EOF
set term postscript eps monochrome 14 
set size 1.5,1
plot "${atmp}" using :1 with lines, \
     "${btmp}" using :1 with lines
quit
EOF

/bin/rm -f ${atmp}