Statistiques
| Révision :

root / examples / Test / Cart / Dep_tscan_movie @ 1

Historique | Voir | Annoter | Télécharger (2,33 ko)

1
#!/bin/bash
2
export LANG=C
3
if [ $# -lt 3 ]; then
4
 echo "Use: $0 File.out MaxCyc PathName [PES] [T]"
5
 exit
6
fi
7
Fout=$1
8
ItMax=$2
9
Nom=$3
10
PES=$4
11
Tgt=$5
12

    
13
NGplot=${Nom}_movie.gplot
14

    
15
# For gif files (that may be joined into an mpeg)
16
Term=gif
17
Ext=gif
18
# For postscript eps files
19
#Term="postscript eps enhanced color solid"
20
#Ext=eps
21
# DefTerm is the default terminal (=screen)
22
# wxt is better for Linux, but x11 is more general
23
DefTerm=x11
24
if [ ! -s list ]; then
25
 echo "File list is missing"
26
 exit
27
fi
28
awk -f Dep_tgt.awk $Fout 
29
cat <<EOF > $NGplot
30
#!/usr/bin/gnuplot 
31
 set xrange [1.:2.25]
32
 set yrange [-10:190]
33
 set pointsize 2
34
 set style line 1 linetype 3 pointtype 3 linewidth 3
35
 unset key
36
 set term $DefTerm
37
EOF
38
let ItM=ItMax-1
39
for i in `seq 0 $ItM`
40
  do
41
 xyz2scan ${Nom}_cart.${i} > /dev/null
42
 mv Scan.dat ${Nom}_${i}.dat
43
 echo "plot \"HCN_irc.dat\" u 1:3 w l lw 2" >> ${NGplot}
44
 if [ "$PES" != "" ]; then
45
  echo "replot \"HCN_PES_2D.dat\" u 1:2 w l 2, \"HCN_PES_2D.dat\" u 1:(-\$2) w l 2,\"HCN_PES_2D.dat\" u 1:(360-\$2) w l 2" >> ${NGplot}
46
 fi
47
 if [ -s ${Nom}_spline.${i} ]; then
48
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w p ls 1" >> ${NGplot}
49
 echo "replot \"${Nom}_spline.${i}\" u 2:4 w l ls 1" >> ${NGplot}
50
 elif [  -s ${Nom}_dbgtgt_${i}.dat ]; then
51
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w p ls 1" >> ${NGplot}
52
 echo "replot \"${Nom}_dbgtgt_${i}.dat\" u 2:(\$4*180./pi) w l ls 1" >> ${NGplot}
53
 else
54
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w lp ls 1" >> ${NGplot}
55
fi
56
 if [ "$Tgt" != "" ]; then
57
  echo "replot \"${Nom}_tgt_${i}.dat\" u 1:3 w l" >> ${NGplot}
58
 fi
59
 IMov=`echo $i | awk '{ It="000" $1; l=length(It); print substr(It,l-2,3)}' `
60
 cat <<EOF >> ${NGplot}
61
 pause 0.5
62
 set term $Term
63
 set output "${Nom}_${IMov}.$Ext"
64
 replot
65
 unset output
66
 set term $DefTerm
67
EOF
68
 done
69
let i=ItMax
70
 awk -f Path2dat.awk  ${Nom}.${i} > ${Nom}_${i}.dat
71
 echo "plot \"HCN_irc.dat\" u 1:3 w l lw 2" >> ${NGplot}
72
 if [ "$PES" != "" ]; then
73
  echo "replot \"HCN_PES_2D.dat\" u 1:2 w l 2, \"HCN_PES_2D.dat\" u 1:(-\$2) w l 2,\"HCN_PES_2D.dat\" u 1:(360-\$2) w l 2" >> ${NGplot}
74
 fi
75
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w lp ls 1" >> ${NGplot}
76
 IMov=`echo $i | awk '{ It="000" $1; l=length(It); print substr(It,l-2,3)}' `
77
 cat <<EOF >> ${NGplot}
78
 set term $Term
79
 set output "${Nom}_${IMov}.$Ext"
80
 replot
81
 unset output
82
 set term $DefTerm
83
EOF
84

    
85
echo "./${NGplot}      to see the path"
86
chmod u+x ./${NGplot}