source: BAORadio/AmasNancay/trunk/etude_data.pic @ 549

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

mv to trunk c'ted (jec)

File size: 7.3 KB
Line 
1echo ".... execute ON"
2exec analdata 20110416abell85 151300 On datacycle 1
3echo ".... execute OFF"
4exec analdata 20110416abell85 151300 Off datacycle 1
5
6echo ".... execute Merging"
7
8c++compile offset
9
10
11#
12#follow cycle to cycle variation of calibration coeff
13#
14vecfrascii calibOnCh0   20110416abell85-On-1346MHz-Ch0Cycles.txt
15vecfrascii calibOnCh1   20110416abell85-On-1346MHz-Ch1Cycles.txt
16vecfrascii calibOffCh0  20110416abell85-Off-1346MHz-Ch0Cycles.txt
17vecfrascii calibOffCh1  20110416abell85-Off-1346MHz-Ch1Cycles.txt
18
19del diff0
20del diff1
21
22set ncount 0
23set first 1
24
25for ic ${firstcycle}:${ncycles}
26  echo "...... cycle $ic"
27  ncount = $ncount + 1
28  k = ${ic} -1
29  del diffcycle${ic}v0 diffcycle${ic}v1
30  if ( $first == 1 ) then
31     set first 0
32     c++exec \
33        TVector<r_4> sigcalOnv0(sumc${ic}mOnv0,false); sigcalOnv0/=calibOnCh0[$k]; \
34        TVector<r_4> sigcalOnv1(sumc${ic}mOnv1,false); sigcalOnv1/=calibOnCh1[$k]; \
35        TVector<r_4> sigcalOffv0(sumc${ic}mOffv0,false); sigcalOffv0/=calibOffCh0[$k]; \
36        TVector<r_4> sigcalOffv1(sumc${ic}mOffv1,false); sigcalOffv1/=calibOffCh1[$k]; \
37        TVector<r_4> diffcycle${ic}v0 = sigcalOnv0-sigcalOffv0; \
38        TVector<r_4> diffcycle${ic}v1 = sigcalOnv1-sigcalOffv1; \
39        TVector<r_4> diff0(diffcycle${ic}v0,false); \
40        TVector<r_4> diff1(diffcycle${ic}v1,false); \
41        KeepObj(diff0);KeepObj(diff1); \
42        KeepObj(diffcycle${ic}v0); KeepObj(diffcycle${ic}v1);
43  else
44     c++exec \
45        TVector<r_4> sigcalOnv0(sumc${ic}mOnv0,false); sigcalOnv0/=calibOnCh0[$k]; \
46        TVector<r_4> sigcalOnv1(sumc${ic}mOnv1,false); sigcalOnv1/=calibOnCh1[$k]; \
47        TVector<r_4> sigcalOffv0(sumc${ic}mOffv0,false); sigcalOffv0/=calibOffCh0[$k]; \
48        TVector<r_4> sigcalOffv1(sumc${ic}mOffv1,false); sigcalOffv1/=calibOffCh1[$k]; \
49        TVector<r_4> diffcycle${ic}v0 = sigcalOnv0-sigcalOffv0; \
50        TVector<r_4> diffcycle${ic}v1 = sigcalOnv1-sigcalOffv1; \
51        diff0+=diffcycle${ic}v0; \
52        diff1+=diffcycle${ic}v1; \
53        KeepObj(diffcycle${ic}v0); KeepObj(diffcycle${ic}v1);
54  endif
55end
56
57
58newvec nmean 1 $ncount nodisp
59#coef RT @ 1346MHz Ouest - Est associees a Ch 0 et 1
60set xcal ( 27.724 22.543 )
61line2vec calib $xcal
62del difftot
63c++exec diff0/=nmean[0]; diff1/=nmean[0]; \
64        diff0*=calib[0];diff1*=calib[1]; \
65        TVector<r_4> difftot(diff0,false);difftot+=diff1;difftot/=2.; \
66        KeepObj(difftot);
67
68
69#
70#Calibrate and Offset Correction
71#
72for ic ${firstcycle}:${ncycles}
73  c++exec diffcycle${ic}v0*=calib[0];diffcycle${ic}v1*=calib[1];
74end
75
76del modiff0 moddiff1
77set first 1
78for ic ${firstcycle}:${ncycles}
79  echo "modif ...... cycle $ic"
80 
81  del inarr outarr  modiffc${ic}v0
82  cp  diffcycle${ic}v0 inarr
83  c++link offset.so meanoffset
84  call meanoffset 1285 1335 1355 1450
85  cp outarr modiffc${ic}v0
86
87  del inarr outarr modiffc${ic}v1
88  cp  diffcycle${ic}v1 inarr
89  c++link offset.so meanoffset
90  call meanoffset 1285 1335 1355 1450
91  cp outarr modiffc${ic}v1
92
93  if ( $first == 1 ) then
94     set first 0
95     c++exec \
96       TVector<r_4> modiff0(modiffc${ic}v0,false); \
97       TVector<r_4> modiff1(modiffc${ic}v1,false); \
98       KeepObj(modiff0);KeepObj(modiff1);
99  else
100     c++exec modiff0+=modiffc${ic}v0;  modiff1+=modiffc${ic}v1;
101  endif
102end 
103
104
105newwin 1 1
106setaxesatt $defatt
107graphicatt "$defatt xylimits=1250,1500,-1.,1."
108set first 1
109for ic ${firstcycle}:${ncycles}
110  echo "...... cycle $ic"
111  k = ${ic}-floor(${ic}/${#cols})*${#cols}
112  if ( $first == 1 ) then
113     set first 0
114     plot2d  diffcycle${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
115  else
116     plot2d  diffcycle${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
117  endif
118end
119settitle "Diff. On-Off No Corr. $source Ch 0 cycles [$firstcycle,$lastcycle]"
120setaxelabels "Freq. (MHz)" "I (Jy)"
121
122
123newwin 1 1
124setaxesatt $defatt
125graphicatt "$defatt xylimits=1250,1500,-1.,1."
126set first 1
127for ic ${firstcycle}:${ncycles}
128  echo "...... cycle $ic"
129  k = ${ic}-floor(${ic}/${#cols})*${#cols}
130  if ( $first == 1 ) then
131     set first 0
132     plot2d  diffcycle${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
133  else
134     plot2d  diffcycle${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
135  endif
136end
137settitle "Diff. On-Off No Corr. $source Ch 1 cycles [$firstcycle,$lastcycle]"
138setaxelabels "Freq. (MHz)" "I (Jy)"
139
140
141newwin 1 1
142setaxesatt $defatt
143graphicatt "$defatt xylimits=1250,1500,-50.,50."
144plot2d diff0  (n/8192)*250+1250 val*1000 n>0 "blue cpts nsta notit"
145plot2d diff1  (n/8192)*250+1250 val*1000 n>0 "red same cpts nsta notit"
146plot2d difftot  (n/8192)*250+1250 val*1000 n>0 "black same cpts nsta notit"
147settitle "Mean diff calib No Corr. per cycle ON-OFF Int.  $source cycles [$firstcycle,$lastcycle]"
148setaxelabels "Freq. (MHz)" "Int. (mJy)"
149
150newwin 1 1
151graphicatt "$defatt"
152n/plot difftot.val*1000 n>1090&&n<4000 ! ! "black  notit"
153n/plot diff0.val*1000 n>1090&&n<4000 ! ! "blue same notit"
154n/plot diff1.val*1000 n>1090&&n<4000 ! ! "red same notit"
155settitle "Diff ON-OFF No Corr. $source [$firstcycle,$lastcycle] 1280MHz - 1370MHz"
156setaxelabels "mJy" " "
157
158
159
160newwin 1 1
161setaxesatt $defatt
162graphicatt "$defatt xylimits=1250,1500,-1.,1."
163set first 1
164for ic ${firstcycle}:${ncycles}
165  echo "...... cycle $ic"
166  k = ${ic}-floor(${ic}/${#cols})*${#cols}
167  if ( $first == 1 ) then
168     set first 0
169     plot2d  modiffc${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
170  else
171     plot2d  modiffc${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
172  endif
173end
174settitle "Diff. On-Off With Corr. $source Ch 0 cycles [$firstcycle,$lastcycle]"
175setaxelabels "Freq. (MHz)" "I (Jy)"
176
177newwin 1 1
178setaxesatt $defatt
179graphicatt "$defatt xylimits=1250,1500,-1.,1."
180set first 1
181for ic ${firstcycle}:${ncycles}
182  echo "...... cycle $ic"
183  k = ${ic}-floor(${ic}/${#cols})*${#cols}
184  if ( $first == 1 ) then
185     set first 0
186     plot2d  modiffc${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit"
187  else
188     plot2d  modiffc${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit"
189  endif
190end
191settitle "Diff. On-Off With Corr. $source Ch 1 cycles [$firstcycle,$lastcycle]"
192setaxelabels "Freq. (MHz)" "I (Jy)"
193
194
195
196
197 
198del modifftot
199c++exec modiff0/=nmean[0]; modiff1/=nmean[0]; \
200        TVector<r_4> modifftot(modiff0,false);modifftot+=modiff1;modifftot/=2.; \
201        KeepObj(modifftot);
202
203newwin 1 1
204setaxesatt $defatt"
205graphicatt "$defatt xylimits=1250,1500,-50.,50."
206plot2d modiff0  (n/8192)*250+1250 val*1000 n>0 "blue cpts nsta notit"
207plot2d modiff1  (n/8192)*250+1250 val*1000 n>0 "red same cpts nsta notit"
208plot2d modifftot  (n/8192)*250+1250 val*1000 n>0 "black same cpts nsta notit"
209settitle "Mean diff ON-OFF With Corr.  $source cycles [$firstcycle,$lastcycle]"
210setaxelabels "Freq. (MHz)" "Int. (mJy)"
211
212newwin 1 1
213graphicatt "$defatt"
214n/plot modifftot.val*1000 n>1090&&n<4000 ! ! "black  notit"
215n/plot modiff0.val*1000 n>1090&&n<4000 ! ! "blue same notit"
216n/plot modiff1.val*1000 n>1090&&n<4000 ! ! "red same notit"
217settitle "Diff ON-OFF With Corr. $source [$firstcycle,$lastcycle] 1280MHz - 1370MHz"
218setaxelabels "mJy" " "
219
220
221newwin 1 1
222setaxesatt $defatt"
223graphicatt "$defatt xylimits=1250,1500,-50.,50."
224plot2d difftot  (n/8192)*250+1250 val*1000 n>0 "blue  cpts nsta notit"
225plot2d modifftot  (n/8192)*250+1250 val*1000 n>0 "red same  cpts nsta notit"
226settitle "Mean diff ON-OFF NO Corr (blue) With Corr (red)  $source cycles [$firstcycle,$lastcycle]"
227setaxelabels "Freq. (MHz)" "Int. (mJy)"
Note: See TracBrowser for help on using the repository browser.