source: BAORadio/AmasNancay/etude_rawonoff.pic@ 526

Last change on this file since 526 was 525, checked in by campagne, 14 years ago

spiapp analysis script (jec)

File size: 8.3 KB
Line 
1
2set cols ( blue red black green purple orange cyan violet yellow )
3
4set toppath "/sps/baoradio/AmasNancay/JEC"
5set source "Abell85"
6set srclower "abell85"
7set date "20110428"
8# implicitement firstcycle =1
9set lastcycle 12
10set lastP1cycle 13
11
12#set showFigs ( 0 0 0 0 0 0 0 )
13
14
15
16#####################################
17#Plots RAW ON-OFF (RAW = WO calibrations)
18#####################################
19openppf ${toppath}/${source}/${date}${srclower}/diffOnOffRaw_${date}_${srclower}.ppf
20
21
22#specONOFFRaw<i> Matrix 2 x 8192 : i=0...
23#specONOFFRawMean Matrix 2 x 8192
24#specONOFFRaw2ChanMean Vector 8192 x 1
25
26
27#####################################
28#Plots RAW ON-OFF with mean computed among the cycles AND(or NOT) the Channels
29#####################################
30
31#if ( $showFigs[0] == 1 ) then
32echo "Figure 1.........."
33
34del sallcyclev0
35objaoper specONOFFRawMean row 0 sallcyclev0
36del sallcyclev1
37objaoper specONOFFRawMean row 1 sallcyclev1
38
39newwin 1 1
40graphicatt "xylimits=1250,1500,-0.01,0.01"
41plot2d specONOFFRaw2ChanMean (n/8192)*250+1250 val n>0 "black cpts nsta notit"
42plot2d sallcyclev0 (n/8192)*250+1250 val n>0 "same blue cpts nsta notit"
43plot2d sallcyclev1 (n/8192)*250+1250 val n>0 "same red cpts nsta notit"
44settitle "ON-OFF $source Ch 0 (blue) Ch 1 (red) Mean (black) All cycles"
45setaxelabels "Freq. (MHz)" "I (a.u)"
46
47#endif
48
49#####################################
50#Plots RAW ON-OFF chan 0 & 1 separaed and cycle per cycle
51#####################################
52
53
54#if ( $showFigs[1] == 1 ) then
55echo "Figure 2.........."
56
57newwin 1 1
58graphicatt "xylimits=1250,1500,-0.01,0.01"
59del sc1v0
60objaoper specONOFFRaw1 row 0 sc1v0
61plot2d sc1v0 (n/8192)*250+1250 val n>0 "$cols[0] cpts nsta notit"
62for ic 2:${lastP1cycle}
63 k = ${ic}-floor(${ic}/${#cols})*${#cols}
64 del sc${ic}v0
65 objaoper specONOFFRaw${ic} row 0 sc${ic}v0
66 plot2d sc${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
67end
68settitle "ON-OFF $source Ch 0 cycle per cycle"
69setaxelabels "Freq. (MHz)" "I (a.u)"
70
71newwin 1 1
72graphicatt "xylimits=1250,1500,-0.01,0.01"
73del sc1v1
74objaoper specONOFFRaw1 row 1 sc1v1
75plot2d sc1v1 (n/8192)*250+1250 val n>0 "$cols[0] cpts nsta notit"
76for ic 2:${lastP1cycle}
77 k = ${ic}-floor(${ic}/${#cols})*${#cols}
78 del sc${ic}v1
79 objaoper specONOFFRaw${ic} row 1 sc${ic}v1
80 plot2d sc${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
81end
82settitle "ON-OFF $source Ch 1 cycle per cycle"
83setaxelabels "Freq. (MHz)" "I (a.u)"
84
85#endif
86
87#####################################
88# Plots RAW no calibration at all and no Diff ON-OFF
89#####################################
90openppf ${toppath}/${source}/${date}${srclower}/dataRaw_${date}_${srclower}.ppf
91
92#if ( $showFigs[2] == 1 ) then
93echo "Figure 3........."
94
95newwin 2 2
96graphicatt "xylimits=1250,1500,0.95,1.05"
97
98### #
99### On Ch 0 # On Ch 1
100######################
101### Off Ch 0# Off Ch 1
102### #
103
104set mode On
105set first 1
106for ic 1:${lastP1cycle}
107 k = ${ic}-floor(${ic}/${#cols})*${#cols}
108 del sm${mode}c${ic}v0
109 objaoper specRaw${mode}${ic} row 0 sm${mode}c${ic}v0
110 if ( ${first} == 1 ) then
111 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
112 else
113 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
114 endif
115 set first 0
116end
117settitle "$source Raw: On Ch 0"
118
119set first 1
120for ic 1:${lastP1cycle}
121 k = ${ic}-floor(${ic}/${#cols})*${#cols}
122 del sm${mode}c${ic}v1
123 objaoper specRaw${mode}${ic} row 1 sm${mode}c${ic}v1
124 if ( ${first} == 1 ) then
125 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
126 else
127 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
128 endif
129 set first 0
130end
131settitle "$source Raw: On Ch 1"
132
133set mode Off
134set first 1
135for ic 1:${lastP1cycle}
136 k = ${ic}-floor(${ic}/${#cols})*${#cols}
137 del sm${mode}c${ic}v0
138 objaoper specRaw${mode}${ic} row 0 sm${mode}c${ic}v0
139 if ( ${first} == 1 ) then
140 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
141 else
142 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
143 endif
144 set first 0
145end
146settitle "$source Raw: Off Ch 0"
147
148set first 1
149for ic 1:${lastP1cycle}
150 k = ${ic}-floor(${ic}/${#cols})*${#cols}
151 del sm${mode}c${ic}v1
152 objaoper specRaw${mode}${ic} row 1 sm${mode}c${ic}v1
153 if ( ${first} == 1 ) then
154 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
155 else
156 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
157 endif
158 set first 0
159end
160settitle "$source Raw: Off Ch 1"
161
162#endif
163
164#####################################
165#Plots RAW ON-OFF MEAN REDUCED chan 0 & 1 separaed and cycle per cycle
166#####################################
167
168#if ( $showFigs[3] == 1 ) then
169echo "Figure 4.........."
170
171newwin 1 1
172graphicatt "xylimits=1250,1500,-0.01,0.01"
173del sc1v0
174objaoper redMeanONOFFRaw1 row 0 sc1v0
175plot2d sc1v0 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit"
176for ic 2:${lastP1cycle}
177 k = ${ic}-floor(${ic}/${#cols})*${#cols}
178 del sc${ic}v0
179 objaoper redMeanONOFFRaw${ic} row 0 sc${ic}v0
180 plot2d sc${ic}v0 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit"
181end
182settitle "ON-OFF Mean 32bins $source Ch 0 cycle per cycle"
183setaxelabels "Freq. (MHz)" "I (a.u)"
184
185
186newwin 1 1
187graphicatt "xylimits=1250,1500,-0.01,0.01"
188del sc1v1
189objaoper redMeanONOFFRaw1 row 1 sc1v1
190plot2d sc1v1 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit"
191for ic 2:${lastP1cycle}
192 k = ${ic}-floor(${ic}/${#cols})*${#cols}
193 del sc${ic}v1
194 objaoper redMeanONOFFRaw${ic} row 1 sc${ic}v1
195 plot2d sc${ic}v1 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit"
196end
197settitle "ON-OFF Mean 32bins $source Ch 1 cycle per cycle"
198setaxelabels "Freq. (MHz)" "I (a.u)"
199
200
201#endif
202
203#####################################
204#Plots RAW ON-OFF SIGMA REDUCED chan 0 & 1 separaed and cycle per cycle
205#####################################
206
207
208#if ( $showFigs[4] == 1 ) then
209echo "Figure 5.........."
210
211newwin 1 1
212graphicatt "xylimits=1250,1500,0,0.01"
213del sc1v0
214objaoper redSigmaONOFFRaw1 row 0 sc1v0
215plot2d sc1v0 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit"
216for ic 2:${lastP1cycle}
217 k = ${ic}-floor(${ic}/${#cols})*${#cols}
218 del sc${ic}v0
219 objaoper redSigmaONOFFRaw${ic} row 0 sc${ic}v0
220 plot2d sc${ic}v0 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit"
221end
222settitle "ON-OFF Sigma over 32bins $source Ch 0 cycle per cycle"
223setaxelabels "Freq. (MHz)" "I (a.u)"
224
225newwin 1 1
226graphicatt "xylimits=1250,1500,0,0.01"
227del sc1v1
228objaoper redSigmaONOFFRaw1 row 1 sc1v1
229plot2d sc1v1 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit"
230for ic 2:${lastP1cycle}
231 k = ${ic}-floor(${ic}/${#cols})*${#cols}
232 del sc${ic}v1
233 objaoper redSigmaONOFFRaw${ic} row 1 sc${ic}v1
234 plot2d sc${ic}v1 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit"
235end
236settitle "ON-OFF Sigma over 32bins $source Ch 1 cycle per cycle"
237setaxelabels "Freq. (MHz)" "I (a.u)"
238
239#endif
240
241#####################################
242#Plots RAW ON-OFF MEAN REDUCED chan 0 & 1 separaed ALL cycles
243#####################################
244
245#if ( $showFigs[5] == 1 ) then
246echo "Figure 6.........."
247
248newwin 1 1
249graphicatt "xylimits=1250,1500,-0.01,0.01"
250del scallv0
251del scallv1
252
253objaoper redMeanONOFFRawAll row 0 scallv0
254objaoper redMeanONOFFRawAll row 1 scallv1
255plot2d scallv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"
256plot2d scallv1 (n/32)*250+1250 val n>0 "red same marker=fcircle,7 nsta notit"
257settitle "ON-OFF Mean 32bins $source Ch 0 (blue) Ch 1 (red) All cycles"
258setaxelabels "Freq. (MHz)" "I (a.u)"
259
260#endif
261
262#####################################
263#Plots RAW ON-OFF SIGMA REDUCED chan 0 & 1 separaed and cycle per cycle
264#####################################
265
266
267#if ( $showFigs[5] == 1 ) then
268echo "Figure 6.........."
269
270newwin 1 1
271graphicatt "xylimits=1250,1500,0,0.01"
272del scallv0
273del scallv1
274objaoper redSigmaONOFFRawAll row 0 scallv0
275objaoper redSigmaONOFFRawAll row 1 scallv1
276plot2d scallv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"
277plot2d scallv1 (n/32)*250+1250 val n>0 "red same marker=fcircle,7 nsta notit"
278settitle "ON-OFF Sigma over 32bins $source Ch 0 (blue) Ch 1 (red) All cycles"
279setaxelabels "Freq. (MHz)" "I (a.u)"
280
281#endif
Note: See TracBrowser for help on using the repository browser.