Statistics
| Revision:

root / utils / AnaPath @ 3

History | View | Annotate | Download (1.7 kB)

1 1 equemene
#!/bin/bash
2 1 equemene
if [ $# -lt 4 ]; then
3 1 equemene
 echo "Use: $0 File.out MaxCyc PathName NGeomF [x column]"
4 1 equemene
 exit
5 1 equemene
fi
6 1 equemene
7 1 equemene
Fout=$1
8 1 equemene
ItMax=$2
9 1 equemene
Nom=$3
10 1 equemene
NGeomF=$4
11 1 equemene
12 1 equemene
xcol=1
13 1 equemene
if [ $# -eq 5 ]; then
14 1 equemene
xcol=$5
15 1 equemene
fi
16 1 equemene
17 1 equemene
export LANG=C
18 1 equemene
19 1 equemene
echo "#ItMax=$ItMax"
20 1 equemene
echo "#Nom=$Nom"
21 1 equemene
echo "#NGeomF"=$NGeomF
22 1 equemene
23 1 equemene
if [ -s ${Nom}_cart.0 ]; then
24 1 equemene
 Ext=_cart
25 1 equemene
elif [ -s ${Nom}.0 ]; then
26 1 equemene
 Ext=""
27 1 equemene
else
28 1 equemene
 echo "Cannot find ${Nom}.0 nor ${Nom}_cart.0 -- ERROR"
29 1 equemene
 exit
30 1 equemene
fi
31 1 equemene
 echo "Using files ${Nom}${Ext}.XX"
32 1 equemene
33 1 equemene
if [ -s $Nom.datl ]; then
34 1 equemene
 it=1
35 1 equemene
 while [ -s $Nom.datl_${it} ]
36 1 equemene
  do
37 1 equemene
 let it=it+1
38 1 equemene
 done
39 1 equemene
 echo "Moving $Nom.datl into $Nom.datl_${it}"
40 1 equemene
 mv $Nom.datl $Nom.datl_${it}
41 1 equemene
fi
42 1 equemene
echo "Creating $Nom.datl"
43 1 equemene
44 1 equemene
for i in `seq 0 $ItMax`
45 1 equemene
 do
46 1 equemene
  xyz2path  ${Nom}${Ext}.$i
47 1 equemene
 cat Scan.dat >> $Nom.datl
48 1 equemene
 echo " " >> $Nom.datl
49 1 equemene
 echo " " >> $Nom.datl
50 1 equemene
done
51 1 equemene
52 1 equemene
icol=`tail -1 Scan.dat | wc -w`
53 1 equemene
54 1 equemene
cat << EOF > ${Nom}_l.gplot
55 1 equemene
#!/usr/bin/gnuplot -persist
56 1 equemene
 set pointsize 2
57 1 equemene
 xcol=$xcol
58 1 equemene
EOF
59 1 equemene
60 1 equemene
61 1 equemene
for i in `seq 1 $ItMax`
62 1 equemene
do
63 1 equemene
 echo "plot \"$Nom.datl\" i 0 u xcol:$icol w lp " >> ${Nom}_l.gplot
64 1 equemene
 echo "replot \"$Nom.datl\" i $i u xcol:$icol w lp " >> ${Nom}_l.gplot
65 1 equemene
 echo "pause -1" >> ${Nom}_l.gplot
66 1 equemene
done
67 1 equemene
 echo "pause -1" >> ${Nom}_l.gplot
68 1 equemene
69 1 equemene
70 1 equemene
chmod u+x  ${Nom}_l.gplot
71 1 equemene
72 1 equemene
cat << EOF > ${Nom}_l2.gplot
73 1 equemene
#!/usr/bin/gnuplot -persist
74 1 equemene
 set pointsize 2
75 1 equemene
 xcol=$xcol
76 1 equemene
EOF
77 1 equemene
78 1 equemene
echo "plot \"$Nom.datl\" i 0 u xcol:$icol w lp " >>  ${Nom}_l2.gplot
79 1 equemene
for i in `seq 1 $ItMax`
80 1 equemene
do
81 1 equemene
 echo "replot \"$Nom.datl\" i $i u xcol:$icol w lp " >>  ${Nom}_l2.gplot
82 1 equemene
done
83 1 equemene
84 1 equemene
chmod u+x  ${Nom}_l2.gplot
85 1 equemene
86 1 equemene
cat << EOF > ${Nom}_l3.gplot
87 1 equemene
#!/usr/bin/gnuplot -persist
88 1 equemene
 set pointsize 2
89 1 equemene
EOF
90 1 equemene
91 1 equemene
 echo "plot \"$Nom.datl\" i 0 u 0:$icol w lp " >>  ${Nom}_l3.gplot
92 1 equemene
for i in `seq 1 $ItMax`
93 1 equemene
do
94 1 equemene
 echo "replot \"$Nom.datl\" i $i u 0:$icol w lp " >>  ${Nom}_l3.gplot
95 1 equemene
done
96 1 equemene
97 1 equemene
chmod u+x  ${Nom}_l3.gplot