Statistics
| Revision:

root / utils / AnaPath @ 3

History | View | Annotate | Download (1.7 kB)

1
#!/bin/bash
2
if [ $# -lt 4 ]; then
3
 echo "Use: $0 File.out MaxCyc PathName NGeomF [x column]"
4
 exit
5
fi
6

    
7
Fout=$1
8
ItMax=$2
9
Nom=$3
10
NGeomF=$4
11

    
12
xcol=1
13
if [ $# -eq 5 ]; then
14
xcol=$5
15
fi
16

    
17
export LANG=C
18

    
19
echo "#ItMax=$ItMax"
20
echo "#Nom=$Nom"
21
echo "#NGeomF"=$NGeomF
22

    
23
if [ -s ${Nom}_cart.0 ]; then
24
 Ext=_cart
25
elif [ -s ${Nom}.0 ]; then
26
 Ext=""
27
else
28
 echo "Cannot find ${Nom}.0 nor ${Nom}_cart.0 -- ERROR"
29
 exit
30
fi
31
 echo "Using files ${Nom}${Ext}.XX"
32

    
33
if [ -s $Nom.datl ]; then
34
 it=1
35
 while [ -s $Nom.datl_${it} ]
36
  do
37
 let it=it+1
38
 done
39
 echo "Moving $Nom.datl into $Nom.datl_${it}"
40
 mv $Nom.datl $Nom.datl_${it}
41
fi
42
echo "Creating $Nom.datl"
43

    
44
for i in `seq 0 $ItMax`
45
 do
46
  xyz2path  ${Nom}${Ext}.$i 
47
 cat Scan.dat >> $Nom.datl
48
 echo " " >> $Nom.datl
49
 echo " " >> $Nom.datl
50
done 
51

    
52
icol=`tail -1 Scan.dat | wc -w`
53

    
54
cat << EOF > ${Nom}_l.gplot
55
#!/usr/bin/gnuplot -persist
56
 set pointsize 2
57
 xcol=$xcol
58
EOF
59

    
60

    
61
for i in `seq 1 $ItMax`
62
do
63
 echo "plot \"$Nom.datl\" i 0 u xcol:$icol w lp " >> ${Nom}_l.gplot
64
 echo "replot \"$Nom.datl\" i $i u xcol:$icol w lp " >> ${Nom}_l.gplot
65
 echo "pause -1" >> ${Nom}_l.gplot
66
done
67
 echo "pause -1" >> ${Nom}_l.gplot
68

    
69

    
70
chmod u+x  ${Nom}_l.gplot
71

    
72
cat << EOF > ${Nom}_l2.gplot
73
#!/usr/bin/gnuplot -persist
74
 set pointsize 2
75
 xcol=$xcol
76
EOF
77

    
78
echo "plot \"$Nom.datl\" i 0 u xcol:$icol w lp " >>  ${Nom}_l2.gplot
79
for i in `seq 1 $ItMax`
80
do
81
 echo "replot \"$Nom.datl\" i $i u xcol:$icol w lp " >>  ${Nom}_l2.gplot
82
done
83

    
84
chmod u+x  ${Nom}_l2.gplot
85

    
86
cat << EOF > ${Nom}_l3.gplot
87
#!/usr/bin/gnuplot -persist
88
 set pointsize 2
89
EOF
90

    
91
 echo "plot \"$Nom.datl\" i 0 u 0:$icol w lp " >>  ${Nom}_l3.gplot
92
for i in `seq 1 $ItMax`
93
do
94
 echo "replot \"$Nom.datl\" i $i u 0:$icol w lp " >>  ${Nom}_l3.gplot
95
done
96

    
97
chmod u+x  ${Nom}_l3.gplot