#! /bin/csh -f
# Last edited on 1999-11-14 05:37:16 by hcgl

set usage = "$0 RUN"

if ( $#argv != 1 ) then
  echo "usage: ${usage}"; exit 1
endif
set run = "$1"; shift

foreach band ( `cat bands-filter.txt | sort +0 -1nr` )
 echo "band = ${band}"
 set pltfile = "RUN-${run}/f${band}-cvc.plt"
 set epsfile = "RUN-${run}/f${band}-cvc-plt.eps"
 @ maxCurves = ( ${band} + 1 ) * 4
 echo ${pltfile}
 set curves = ( `ls [0-9][0-9][0-9][0-9]/f${band}.cvc | head -${maxCurves}` )
 cat ${curves} \
   | ${STOLFIHOME}/tese/bin/make-encoded-curv-histogram \
   | sort \
   > ${pltfile}
 draw-encoded-curv-histogram \
   ${pltfile} \
   ${epsfile} \
   "encoded curvatures - band ${band}"
 ghostview ${epsfile}
end  
