source: Sophya/trunk/AddOn/TAcq/dspms.pic

Last change on this file was 3919, checked in by cmv, 15 years ago

modif pour gestion satur et expo FFT shrink, reza+cmv 2/12/2010

File size: 2.5 KB
Line 
1# Script affichage spectre moyennes fait par Monitoring
2if ( $# < 2 ) then
3 echo ' dspms.pic/Erreur - Usage dspms Directory NumFile [BaseDir] '
4 return
5endif
6set dir $1
7set numf $2
8
9set bdir /Raid/PittsDec10
10if ( $# > 2 ) then
11 set bdir $3
12endif
13
14delobjs *
15# openppf /Raid/PittsDec10/$dir/meanspec$numf.ppf
16set flnm $bdir/$dir/meanspec$numf.ppf
17echo '------ Opening file ' $flnm
18openppf $flnm
19del myspec
20mv spectre myspec
21set nchan ${myspec.nrows}
22for i 0:$nchan
23 del smV$i
24 objaoper myspec row $i smV$i
25end
26
27setaxesatt 'font=helvetica,bold,16 fixedfontsize minorticks'
28zone 1
29
30# set exfreq (n+2212)*250/4096+1250
31# set exfreq (n*250/4096+1250)
32## Expression de la frequence pour FFT shrinke
33set exfreq ((n+2049)*250/4096+1250)
34plot2d smV0 $exfreq 10*log10(val) val>1.e-6 'black nsta cpts notit'
35setaxelabels ' Freq (MHz)' 'Spectra - dB' 'font=helvetica,bolditalic,16'
36
37# set cols ( black darkviolet blue navyblue red orange yellow green )
38set cols ( blue red green magenta black darkviolet navyblue orange yellow )
39
40for i 1:${myspec.nrows}
41 plot2d smV$i $exfreq 10*log10(val) val>1.e-6 "$cols[i] cpts nsta same"
42end
43
44if ( $nchan < 3 ) then
45 zny = $nchan
46 znx = 1
47else
48 if ( $nchan < 7 ) then
49 zny = $nchan/2
50 znx = 2
51 else
52 zny = 3
53 znx = 3
54 endif
55endif
56
57defscript dspec
58 zone $znx $zny
59 for i 0:$nchan
60 disp smV$i "$cols[i]"
61 end
62endscript
63
64defscript dspeclg
65 zone $znx $zny
66 for i 0:$nchan
67 disp smV$i "logy $cols[i]"
68 end
69endscript
70
71defscript dhval
72 zone $znx $zny
73 for i 0:$nchan
74 disp hvalV$i "$cols[i]"
75 end
76endscript
77
78defscript dh2
79 zone $znx $zny
80 for i 0:$nchan
81 plot2d h2dV$i x y val>0 "notit nsta $cols[i]"
82 end
83endscript
84
85defscript dexpo
86 zone $znx $zny
87 for i 0:$nchan
88 disp hexpV$i "$cols[i]"
89 n/plot hexpV$i.val%x val>0 ! "nsta same marker=fcircle,9 $cols[i]"
90 end
91endscript
92
93defscript dsatur
94 zone $znx $zny
95 for i 0:$nchan
96 imag saturV$i "zoomx40"
97 end
98endscript
99
100defscript dsatur2
101 zone $znx $zny
102 for i 0:$nchan
103 n/plot saturV$i.val%r+c r!=1||c!=1 ! "marker=fcircle,1 nsta $cols[i]"
104 n/plot saturV$i.val%r+c (r!=1||c!=1)&&val>0.1 ! "marker=fcircle,9 nsta same $cols[i]"
105 end
106endscript
107
108set lines ( B1.V1 B1.V2 B1.V3 B1.V4 B2.V1 B2.V2 B2.V3 B2.V4 )
109textdrawer lines cols 'font=helvetica,bold,16'
110
111# settitle 'Spectre 8 voies FFT - ScalingFactor=9' ' ' 'font=helvetica,bold,18'
112
113newwin
114dspeclg
115newwin
116dspec
117newwin
118dhval
119newwin
120dh2
121newwin
122dexpo
123newwin
124dsatur
125newwin
126dsatur2
127
128echo '----> use dspec dhval and dh2 dexpo dsatur scripts to check value histograms'
129
130
Note: See TracBrowser for help on using the repository browser.