[525] | 1 | echo ".... execute ON" |
---|
| 2 | exec analdata 20110416abell85 151300 On datacycle 1 |
---|
| 3 | echo ".... execute OFF" |
---|
| 4 | exec analdata 20110416abell85 151300 Off datacycle 1 |
---|
| 5 | |
---|
| 6 | echo ".... execute Merging" |
---|
| 7 | |
---|
| 8 | c++compile offset |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | # |
---|
| 12 | #follow cycle to cycle variation of calibration coeff |
---|
| 13 | # |
---|
| 14 | vecfrascii calibOnCh0 20110416abell85-On-1346MHz-Ch0Cycles.txt |
---|
| 15 | vecfrascii calibOnCh1 20110416abell85-On-1346MHz-Ch1Cycles.txt |
---|
| 16 | vecfrascii calibOffCh0 20110416abell85-Off-1346MHz-Ch0Cycles.txt |
---|
| 17 | vecfrascii calibOffCh1 20110416abell85-Off-1346MHz-Ch1Cycles.txt |
---|
| 18 | |
---|
| 19 | del diff0 |
---|
| 20 | del diff1 |
---|
| 21 | |
---|
| 22 | set ncount 0 |
---|
| 23 | set first 1 |
---|
| 24 | |
---|
| 25 | for 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 |
---|
| 55 | end |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | newvec nmean 1 $ncount nodisp |
---|
| 59 | #coef RT @ 1346MHz Ouest - Est associees a Ch 0 et 1 |
---|
| 60 | set xcal ( 27.724 22.543 ) |
---|
| 61 | line2vec calib $xcal |
---|
| 62 | del difftot |
---|
| 63 | c++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 | # |
---|
| 72 | for ic ${firstcycle}:${ncycles} |
---|
| 73 | c++exec diffcycle${ic}v0*=calib[0];diffcycle${ic}v1*=calib[1]; |
---|
| 74 | end |
---|
| 75 | |
---|
| 76 | del modiff0 moddiff1 |
---|
| 77 | set first 1 |
---|
| 78 | for 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 |
---|
| 102 | end |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | newwin 1 1 |
---|
| 106 | setaxesatt $defatt |
---|
| 107 | graphicatt "$defatt xylimits=1250,1500,-1.,1." |
---|
| 108 | set first 1 |
---|
| 109 | for 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 |
---|
| 118 | end |
---|
| 119 | settitle "Diff. On-Off No Corr. $source Ch 0 cycles [$firstcycle,$lastcycle]" |
---|
| 120 | setaxelabels "Freq. (MHz)" "I (Jy)" |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | newwin 1 1 |
---|
| 124 | setaxesatt $defatt |
---|
| 125 | graphicatt "$defatt xylimits=1250,1500,-1.,1." |
---|
| 126 | set first 1 |
---|
| 127 | for 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 |
---|
| 136 | end |
---|
| 137 | settitle "Diff. On-Off No Corr. $source Ch 1 cycles [$firstcycle,$lastcycle]" |
---|
| 138 | setaxelabels "Freq. (MHz)" "I (Jy)" |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | newwin 1 1 |
---|
| 142 | setaxesatt $defatt |
---|
| 143 | graphicatt "$defatt xylimits=1250,1500,-50.,50." |
---|
| 144 | plot2d diff0 (n/8192)*250+1250 val*1000 n>0 "blue cpts nsta notit" |
---|
| 145 | plot2d diff1 (n/8192)*250+1250 val*1000 n>0 "red same cpts nsta notit" |
---|
| 146 | plot2d difftot (n/8192)*250+1250 val*1000 n>0 "black same cpts nsta notit" |
---|
| 147 | settitle "Mean diff calib No Corr. per cycle ON-OFF Int. $source cycles [$firstcycle,$lastcycle]" |
---|
| 148 | setaxelabels "Freq. (MHz)" "Int. (mJy)" |
---|
| 149 | |
---|
| 150 | newwin 1 1 |
---|
| 151 | graphicatt "$defatt" |
---|
| 152 | n/plot difftot.val*1000 n>1090&&n<4000 ! ! "black notit" |
---|
| 153 | n/plot diff0.val*1000 n>1090&&n<4000 ! ! "blue same notit" |
---|
| 154 | n/plot diff1.val*1000 n>1090&&n<4000 ! ! "red same notit" |
---|
| 155 | settitle "Diff ON-OFF No Corr. $source [$firstcycle,$lastcycle] 1280MHz - 1370MHz" |
---|
| 156 | setaxelabels "mJy" " " |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | newwin 1 1 |
---|
| 161 | setaxesatt $defatt |
---|
| 162 | graphicatt "$defatt xylimits=1250,1500,-1.,1." |
---|
| 163 | set first 1 |
---|
| 164 | for 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 |
---|
| 173 | end |
---|
| 174 | settitle "Diff. On-Off With Corr. $source Ch 0 cycles [$firstcycle,$lastcycle]" |
---|
| 175 | setaxelabels "Freq. (MHz)" "I (Jy)" |
---|
| 176 | |
---|
| 177 | newwin 1 1 |
---|
| 178 | setaxesatt $defatt |
---|
| 179 | graphicatt "$defatt xylimits=1250,1500,-1.,1." |
---|
| 180 | set first 1 |
---|
| 181 | for 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 |
---|
| 190 | end |
---|
| 191 | settitle "Diff. On-Off With Corr. $source Ch 1 cycles [$firstcycle,$lastcycle]" |
---|
| 192 | setaxelabels "Freq. (MHz)" "I (Jy)" |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | |
---|
| 198 | del modifftot |
---|
| 199 | c++exec modiff0/=nmean[0]; modiff1/=nmean[0]; \ |
---|
| 200 | TVector<r_4> modifftot(modiff0,false);modifftot+=modiff1;modifftot/=2.; \ |
---|
| 201 | KeepObj(modifftot); |
---|
| 202 | |
---|
| 203 | newwin 1 1 |
---|
| 204 | setaxesatt $defatt" |
---|
| 205 | graphicatt "$defatt xylimits=1250,1500,-50.,50." |
---|
| 206 | plot2d modiff0 (n/8192)*250+1250 val*1000 n>0 "blue cpts nsta notit" |
---|
| 207 | plot2d modiff1 (n/8192)*250+1250 val*1000 n>0 "red same cpts nsta notit" |
---|
| 208 | plot2d modifftot (n/8192)*250+1250 val*1000 n>0 "black same cpts nsta notit" |
---|
| 209 | settitle "Mean diff ON-OFF With Corr. $source cycles [$firstcycle,$lastcycle]" |
---|
| 210 | setaxelabels "Freq. (MHz)" "Int. (mJy)" |
---|
| 211 | |
---|
| 212 | newwin 1 1 |
---|
| 213 | graphicatt "$defatt" |
---|
| 214 | n/plot modifftot.val*1000 n>1090&&n<4000 ! ! "black notit" |
---|
| 215 | n/plot modiff0.val*1000 n>1090&&n<4000 ! ! "blue same notit" |
---|
| 216 | n/plot modiff1.val*1000 n>1090&&n<4000 ! ! "red same notit" |
---|
| 217 | settitle "Diff ON-OFF With Corr. $source [$firstcycle,$lastcycle] 1280MHz - 1370MHz" |
---|
| 218 | setaxelabels "mJy" " " |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | newwin 1 1 |
---|
| 222 | setaxesatt $defatt" |
---|
| 223 | graphicatt "$defatt xylimits=1250,1500,-50.,50." |
---|
| 224 | plot2d difftot (n/8192)*250+1250 val*1000 n>0 "blue cpts nsta notit" |
---|
| 225 | plot2d modifftot (n/8192)*250+1250 val*1000 n>0 "red same cpts nsta notit" |
---|
| 226 | settitle "Mean diff ON-OFF NO Corr (blue) With Corr (red) $source cycles [$firstcycle,$lastcycle]" |
---|
| 227 | setaxelabels "Freq. (MHz)" "Int. (mJy)" |
---|