# This script is executed when you push the TCAL button on the control
# menu for LISE
#
# first add path for lise programs
#
PATH=${PATH}:/src/lise
#
# read possible name of spectrum
#
SPNAM=`cat spnam.tmp`
#
# if any parameters are given, take parameter as spectrum name
#
if test $# -eq 1
   then
   SPNAM=$1
fi
#
# erase error spectrum for this spectrum
#
rm ${SPNAM}.err
#
# ask for limits of spectrum
#
echo "please type in lower bound"
LB=`line`
echo "please type in upper bound"
UB=`line`
#
# ask for time difference between peaks
#
echo Please type in the time difference between two peaks
TDIFF=`line`
#
# ask for minimum distance between peaks
#
echo "Please type in the minimum distance (in channels) between peaks"
MINDIFF=`line`
#
# now call tcal routine, set minimum peak hight to arithmetic mean
# and print peak positions
#
tcal ${SPNAM}[${LB}:${UB}] -t $TDIFF -diff $MINDIFF -mean -peak
#
# show result for 15 seconds before the window will be removed
#
sleep 15
