source: BAORadio/AmasNancay/v3/etude_onoff.pic@ 639

Last change on this file since 639 was 556, checked in by campagne, 14 years ago

generalise the process to download the files for final analysis (jec)

File size: 10.0 KB
Line 
1
2set cols ( blue red black green purple orange cyan violet yellow )
3
4set toppath "/sps/baoradio/AmasNancay/JEC"
5set source "Abell${1}"
6set srclower "abell${1}"
7set date "${2}"
8
9
10#####################################
11#Plots ON-OFF with all calibrations
12#####################################
13openppf ${toppath}/${source}/diffOnOff_${date}_${srclower}.ppf
14
15
16#specONOFF<i> Matrix 2 x 8192 : i=0...
17#specONOFFMean Matrix 2 x 8192
18#specONOFF2ChanMean Vector 8192 x 1
19
20
21#####################################
22#Plots with different Means: per channel and all
23#####################################
24del sallcyclev0
25objaoper specONOFFMean row 0 sallcyclev0
26del sallcyclev1
27objaoper specONOFFMean row 1 sallcyclev1
28
29newwin 1 1
30graphicatt "xylimits=1250,1500,-0.5,0.5"
31plot2d specONOFF2ChanMean (n/8192)*250+1250 val n>0 "black cpts nsta notit"
32plot2d sallcyclev0 (n/8192)*250+1250 val n>0 "same blue cpts nsta notit"
33plot2d sallcyclev1 (n/8192)*250+1250 val n>0 "same red cpts nsta notit"
34settitle "ON-OFF ${source}/${date} Ch 0 (blue) Ch 1 (red) Mean (black) All cycles"
35setaxelabels "Freq. (MHz)" "I (Jy)"
36
37#####################################
38#Examine fluctuations sigma for the combination of all cycles
39#####################################
40cp sallcyclev0 specv0
41cp sallcyclev1 specv1
42c++compile reducing
43c++link reducing.so doreduc
44call doreduc
45
46newwin 1 1
47graphicatt "xylimits=1250,1500,-0.01,0.01"
48 del redMeanv0
49 del redMeanv1
50 objaoper reducedMeanDiffOnOff row 0 redMeanv0
51 objaoper reducedMeanDiffOnOff row 1 redMeanv1
52 plot2d redMeanv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"
53 plot2d redMeanv1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit"
54settitle "Red Mean ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
55setaxelabels "Freq. (MHz)" "I (Jy)"
56
57newwin 1 1
58graphicatt "xylimits=1250,1500,0,0.001"
59 del redSigmav0
60 del redSigmav1
61 objaoper reducedSigmaDiffOnOff row 0 redSigmav0
62 objaoper reducedSigmaDiffOnOff row 1 redSigmav1
63 plot2d redSigmav0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"
64 plot2d redSigmav1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit"
65settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
66setaxelabels "Freq. (MHz)" "I (Jy)"
67
68
69#####################################
70#Plots ON-OFF with all calibrations: chan 0 & 1 separaed and cycle per cycle
71#####################################
72newwin 1 1
73graphicatt "xylimits=1250,1500,-0.5,0.5"
74del sc1v0
75objaoper specONOFF1 row 0 sc1v0
76plot2d sc1v0 (n/8192)*250+1250 val n>0 "$cols[0] cpts nsta notit"
77for ic 2:13
78 k = ${ic}-floor(${ic}/${#cols})*${#cols}
79 del sc${ic}v0
80 objaoper specONOFF${ic} row 0 sc${ic}v0
81 plot2d sc${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
82end
83settitle "ON-OFF ${source}/${date} Ch 0 cycle per cycle"
84setaxelabels "Freq. (MHz)" "I (Jy)"
85
86newwin 1 1
87graphicatt "xylimits=1250,1500,-0.5,0.5"
88del sc1v1
89objaoper specONOFF1 row 1 sc1v1
90plot2d sc1v1 (n/8192)*250+1250 val n>0 "$cols[0] cpts nsta notit"
91for ic 2:13
92 k = ${ic}-floor(${ic}/${#cols})*${#cols}
93 del sc${ic}v1
94 objaoper specONOFF${ic} row 1 sc${ic}v1
95 plot2d sc${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
96end
97settitle "ON-OFF ${source}/${date} Ch 1 cycle per cycle"
98setaxelabels "Freq. (MHz)" "I (Jy)"
99
100
101#####################################
102# Plots RAW no calibration at all
103#####################################
104openppf ${toppath}/${source}/dataRaw_${date}_${srclower}.ppf
105newwin 2 2
106graphicatt "xylimits=1250,1500,0.95,1.05"
107
108### #
109### On Ch 0 # On Ch 1
110######################
111### Off Ch 0# Off Ch 1
112### #
113
114set mode On
115set first 1
116for ic 1:13
117 k = ${ic}-floor(${ic}/${#cols})*${#cols}
118 del sm${mode}c${ic}v0
119 objaoper specRaw${mode}${ic} row 0 sm${mode}c${ic}v0
120 if ( ${first} == 1 ) then
121 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
122 else
123 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
124 endif
125 set first 0
126end
127settitle "${source}/${date} Raw: On Ch 0"
128
129set first 1
130for ic 1:13
131 k = ${ic}-floor(${ic}/${#cols})*${#cols}
132 del sm${mode}c${ic}v1
133 objaoper specRaw${mode}${ic} row 1 sm${mode}c${ic}v1
134 if ( ${first} == 1 ) then
135 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
136 else
137 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
138 endif
139 set first 0
140end
141settitle "${source}/${date} Raw: On Ch 1"
142
143set mode Off
144set first 1
145for ic 1:13
146 k = ${ic}-floor(${ic}/${#cols})*${#cols}
147 del sm${mode}c${ic}v0
148 objaoper specRaw${mode}${ic} row 0 sm${mode}c${ic}v0
149 if ( ${first} == 1 ) then
150 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
151 else
152 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
153 endif
154 set first 0
155end
156settitle "${source}/${date} Raw: Off Ch 0"
157
158set first 1
159for ic 1:13
160 k = ${ic}-floor(${ic}/${#cols})*${#cols}
161 del sm${mode}c${ic}v1
162 objaoper specRaw${mode}${ic} row 1 sm${mode}c${ic}v1
163 if ( ${first} == 1 ) then
164 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
165 else
166 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
167 endif
168 set first 0
169end
170settitle "${source}/${date} Raw: Off Ch 1"
171
172#####################################
173# Plots BAO calibration included
174#####################################
175openppf ${toppath}/${source}/dataBAOCalib_${date}_${srclower}.ppf
176newwin 2 2
177#graphicatt "xylimits=1250,1500,0.95,1.05"
178graphicatt ""
179
180
181### #
182### On Ch 0 # On Ch 1
183######################
184### Off Ch 0# Off Ch 1
185### #
186
187set mode On
188set first 1
189for ic 1:13
190 k = ${ic}-floor(${ic}/${#cols})*${#cols}
191 del sm${mode}c${ic}v0
192 objaoper specBAOCalib${mode}${ic} row 0 sm${mode}c${ic}v0
193 if ( ${first} == 1 ) then
194 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
195 else
196 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
197 endif
198 set first 0
199end
200settitle "${source}/${date} BAOCalib: On Ch 0"
201
202set first 1
203for ic 1:13
204 k = ${ic}-floor(${ic}/${#cols})*${#cols}
205 del sm${mode}c${ic}v1
206 objaoper specBAOCalib${mode}${ic} row 1 sm${mode}c${ic}v1
207 if ( ${first} == 1 ) then
208 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
209 else
210 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
211 endif
212 set first 0
213end
214settitle "${source}/${date} BAOCalib: On Ch 1"
215
216set mode Off
217set first 1
218for ic 1:13
219 k = ${ic}-floor(${ic}/${#cols})*${#cols}
220 del sm${mode}c${ic}v0
221 objaoper specBAOCalib${mode}${ic} row 0 sm${mode}c${ic}v0
222 if ( ${first} == 1 ) then
223 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
224 else
225 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
226 endif
227 set first 0
228end
229settitle "${source}/${date} BAOCalib: Off Ch 0"
230
231set first 1
232for ic 1:13
233 k = ${ic}-floor(${ic}/${#cols})*${#cols}
234 del sm${mode}c${ic}v1
235 objaoper specBAOCalib${mode}${ic} row 1 sm${mode}c${ic}v1
236 if ( ${first} == 1 ) then
237 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
238 else
239 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
240 endif
241 set first 0
242end
243settitle "${source}/${date} BAOCalib: Off Ch 1"
244
245#####################################
246# Plots BAO+RT calibration included
247#####################################
248openppf ${toppath}/${source}/dataBAORTCalib_${date}_${srclower}.ppf
249newwin 2 2
250#graphicatt "xylimits=1250,1500,0.95,1.05"
251graphicatt ""
252
253
254### #
255### On Ch 0 # On Ch 1
256######################
257### Off Ch 0# Off Ch 1
258### #
259
260set mode On
261set first 1
262for ic 1:13
263 k = ${ic}-floor(${ic}/${#cols})*${#cols}
264 del sm${mode}c${ic}v0
265 objaoper specBAORTCalib${mode}${ic} row 0 sm${mode}c${ic}v0
266 if ( ${first} == 1 ) then
267 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
268 else
269 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
270 endif
271 set first 0
272end
273settitle "${source}/${date} BAORTCalib: On Ch 0"
274
275set first 1
276for ic 1:13
277 k = ${ic}-floor(${ic}/${#cols})*${#cols}
278 del sm${mode}c${ic}v1
279 objaoper specBAORTCalib${mode}${ic} row 1 sm${mode}c${ic}v1
280 if ( ${first} == 1 ) then
281 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
282 else
283 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
284 endif
285 set first 0
286end
287settitle "${source}/${date} BAORTCalib: On Ch 1"
288
289set mode Off
290set first 1
291for ic 1:13
292 k = ${ic}-floor(${ic}/${#cols})*${#cols}
293 del sm${mode}c${ic}v0
294 objaoper specBAORTCalib${mode}${ic} row 0 sm${mode}c${ic}v0
295 if ( ${first} == 1 ) then
296 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
297 else
298 plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
299 endif
300 set first 0
301end
302settitle "${source}/${date} BAORTCalib: Off Ch 0"
303
304set first 1
305for ic 1:13
306 k = ${ic}-floor(${ic}/${#cols})*${#cols}
307 del sm${mode}c${ic}v1
308 objaoper specBAORTCalib${mode}${ic} row 1 sm${mode}c${ic}v1
309 if ( ${first} == 1 ) then
310 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
311 else
312 plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
313 endif
314 set first 0
315end
316settitle "${source}/${date} BAORTCalib: Off Ch 1"
317
Note: See TracBrowser for help on using the repository browser.