Statistics
| Revision:

root / utils / AnaPathrel @ 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"
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
export LANG=C
13 1 equemene
14 1 equemene
echo "#ItMax=$ItMax"
15 1 equemene
echo "#Nom=$Nom"
16 1 equemene
echo "#NGeomF"=$NGeomF
17 1 equemene
18 1 equemene
if [ -s ${Nom}_cart.0 ]; then
19 1 equemene
 Ext=_cart
20 1 equemene
elif [ -s ${Nom}.0 ]; then
21 1 equemene
 Ext=""
22 1 equemene
else
23 1 equemene
 echo "Cannot find ${Nom}.0 nor ${Nom}_cart.0: ERROR"
24 1 equemene
 exit
25 1 equemene
fi
26 1 equemene
 echo "Using files ${Nom}${Ext}.XX"
27 1 equemene
28 1 equemene
if [ -s $Nom.datl ]; then
29 1 equemene
 it=1
30 1 equemene
 while [ -s $Nom.datl_${it} ]
31 1 equemene
  do
32 1 equemene
 let it=it+1
33 1 equemene
 done
34 1 equemene
 echo "Moving $Nom.datl into $Nom.datl_${it}"
35 1 equemene
 mv $Nom.datl $Nom.datl_${it}
36 1 equemene
fi
37 1 equemene
echo "Creating $Nom.datl"
38 1 equemene
39 1 equemene
for i in `seq 0 $ItMax`
40 1 equemene
 do
41 1 equemene
  xyz2path  ${Nom}${Ext}.$i
42 1 equemene
 cat Scan.dat >> $Nom.datl
43 1 equemene
 echo " " >> $Nom.datl
44 1 equemene
 echo " " >> $Nom.datl
45 1 equemene
done
46 1 equemene
47 1 equemene
E0=`head -1 Scan.dat | awk '{print $NF}' `
48 1 equemene
49 1 equemene
cat << EOF > ${Nom}_l.gplot
50 1 equemene
#!/usr/bin/gnuplot -persist
51 1 equemene
 set pointsize 2
52 1 equemene
 Eref=$E0
53 1 equemene
 Conv=627.51
54 1 equemene
EOF
55 1 equemene
56 1 equemene
for i in `seq 1 $ItMax`
57 1 equemene
do
58 1 equemene
 echo "plot \"$Nom.datl\" i 0 u 1:(\$2-Eref)*Conv w lp " >> ${Nom}_l.gplot
59 1 equemene
 echo "replot \"$Nom.datl\" i $i u 1:(\$2-Eref)*Conv w lp " >> ${Nom}_l.gplot
60 1 equemene
 echo "pause -1" >> ${Nom}_l.gplot
61 1 equemene
done
62 1 equemene
 echo "pause -1" >> ${Nom}_l.gplot
63 1 equemene
64 1 equemene
cat << EOF > ${Nom}_l2.gplot
65 1 equemene
#!/usr/bin/gnuplot -persist
66 1 equemene
 set pointsize 2
67 1 equemene
 Eref=$E0
68 1 equemene
 Conv=627.51
69 1 equemene
EOF
70 1 equemene
71 1 equemene
 echo "plot \"$Nom.datl\" i 0 u 1:(\$2-Eref)*Conv w lp " >>  ${Nom}_l2.gplot
72 1 equemene
for i in `seq 1 $ItMax`
73 1 equemene
do
74 1 equemene
 echo "replot \"$Nom.datl\" i $i u 1:(\$2-Eref)*Conv w lp " >>  ${Nom}_l2.gplot
75 1 equemene
done
76 1 equemene
77 1 equemene
cat << EOF > ${Nom}_l3.gplot
78 1 equemene
#!/usr/bin/gnuplot -persist
79 1 equemene
 set pointsize 2
80 1 equemene
 Eref=$E0
81 1 equemene
 Conv=627.51
82 1 equemene
EOF
83 1 equemene
84 1 equemene
 echo "plot \"$Nom.datl\" i 0 u 0:(\$2-Eref)*Conv w lp " >>  ${Nom}_l3.gplot
85 1 equemene
for i in `seq 1 $ItMax`
86 1 equemene
do
87 1 equemene
 echo "replot \"$Nom.datl\" i $i u 0:(\$2-Eref)*Conv w lp " >>  ${Nom}_l3.gplot
88 1 equemene
done
89 1 equemene
90 1 equemene
chmod u+x ${Nom}_l.gplot ${Nom}_l2.gplot ${Nom}_l3.gplot