source: BAORadio/AmasNancay/trunk/etude_rawonoff.pic @ 547

Last change on this file since 547 was 547, checked in by campagne, 13 years ago

move to trunk the previous HEAD (jec)

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