Changeset 640 for BAORadio/AmasNancay/trunk
- Timestamp:
- Jan 18, 2012, 3:14:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/AmasNancay/trunk/imgdrift.pic
r639 r640 12 12 #first script executed 13 13 clearscript image 14 clearscript doImage 14 15 15 16 #mergeimg should be executed before timeevol, fwhnInt … … 23 24 defscript image 24 25 # 26 #compute (ON-OFF)/OFFn with OFF computed from the first 30s of each image 25 27 set cycle $1 26 28 openppf ${path}/img_${date}_${source}_cycle${cycle}.ppf 27 29 del ich0 30 del zCh0 28 31 objaoper img${cycle} slicexz 0 ich0 29 32 c++exec TMatrix<r_4>zCh0(ich0(Range(0),Range::all()),false); \ 30 33 for (sa_size_t i=1;i<50;i++){zCh0+=ich0(Range(i),Range::all());} \ 31 zCh0/=50.; \32 for (sa_size_t i=0;i<ich0.NRows();i++){ich0(Range(i),Range::all())-=zCh0; }34 zCh0/=50.; KeepObj(zCh0);\ 35 for (sa_size_t i=0;i<ich0.NRows();i++){ich0(Range(i),Range::all())-=zCh0;ich0(Range(i),Range::all()).Div(zCh0);} 33 36 # 34 37 rename ich0 ich${cycle}0 38 rename zCh0 tsys${cycle}0 35 39 36 40 del ich1 41 del zCh1 37 42 objaoper img${cycle} slicexz 1 ich1 38 43 c++exec TMatrix<r_4>zCh1(ich1(Range(0),Range::all()),false); \ 39 44 for (sa_size_t i=1;i<50;i++){zCh1+=ich1(Range(i),Range::all());} \ 40 zCh1/=50.; \41 for (sa_size_t i=0;i<ich1.NRows();i++){ich1(Range(i),Range::all())-=zCh1; }45 zCh1/=50.; KeepObj(zCh1);\ 46 for (sa_size_t i=0;i<ich1.NRows();i++){ich1(Range(i),Range::all())-=zCh1;ich1(Range(i),Range::all()).Div(zCh1);} 42 47 # 43 48 rename ich1 ich${cycle}1 44 45 endscript 46 ####################### 49 rename zCh1 tsys${cycle}1 50 51 endscript 52 ####################### 53 ################### 54 defscript doImage 55 56 for ic ${fcycle}:${maxcycle} 57 echo "process ${ic}" 58 image $ic 59 end 60 endscript 47 61 48 62 … … 161 175 end 162 176 163 echo "Coucou......"164 165 177 #intensite en ft du temps avec image cumulee 166 178 del i0evol … … 192 204 plot2d i1evol n val 1 'same red cpts notit nsta' 193 205 settitle "${srcMaj} Drift Scan [1405,1415]MHz all cycles Ch 0 (blue) Ch 1 (red)" 194 setaxelabels 't(a.u)' 'I (a.u)' 206 setaxelabels 't(a.u)' '(I-OFF)/OFF (a.u)' 207 208 209 #Tsys en ft du temps 210 c++exec sa_size_t nrows=(${lcycle}-${fcycle}+1); \ 211 sa_size_t ncols=ich${fcycle}0.NCols(); \ 212 TMatrix<r_4>Tsys0evol(nrows,ncols); TMatrix<r_4>Tsys1evol(nrows,ncols); \ 213 KeepObj(Tsys0evol); KeepObj(Tsys1evol); 214 215 for ic ${fcycle}:${maxcycle} 216 c++exec sa_size_t curRow=(${ic}-${fcycle}); \ 217 cout << "ic, curRow, next : "<<${ic}<<" "<<curRow<<endl; \ 218 Tsys0evol(Range(curRow),Range::all())=tsys${ic}0(Range(0),Range::all()); \ 219 Tsys1evol(Range(curRow),Range::all())=tsys${ic}1(Range(0),Range::all()); 220 end 221 222 del T0evol 223 del T1evol 224 #1405,1415 MHz => range [5080,5405] 225 c++exec TMatrix<r_4>tmp0(Tsys0evol(Range::all(),Range(5080,5405)),false); \ 226 TVector<r_4>T0evol(Tsys0evol.NRows()); \ 227 for(sa_size_t i=0;i<tmp0.NRows();++i){ \ 228 double mean,sigma; \ 229 MeanSigma(tmp0(Range(i),Range::all()),mean,sigma); \ 230 T0evol(i) = mean; \ 231 } \ 232 KeepObj(T0evol); \ 233 TMatrix<r_4>tmp1(Tsys1evol(Range::all(),Range(5080,5405)),false); \ 234 TVector<r_4>T1evol(Tsys1evol.NRows()); \ 235 for(sa_size_t i=0;i<tmp1.NRows();++i){ \ 236 double mean,sigma; \ 237 MeanSigma(tmp1(Range(i),Range::all()),mean,sigma); \ 238 T1evol(i) = mean; \ 239 } \ 240 KeepObj(T1evol); 241 242 newwin 243 setaxesatt 'grid' 244 graphicatt '' 245 plot2d T0evol n+${fcycle} val 1 'blue cpts notit nsta' 246 plot2d T1evol n+${fcycle} val 1 'same red cpts notit nsta' 247 settitle "${srcMaj} Drift Scan [1405,1415]MHz all cycles Ch 0 (blue) Ch 1 (red)" 248 setaxelabels 'cycle num.' 'OFF/Gain (a.u)' 249 195 250 196 251 endscript 197 ################### 198 #for ic ${fcycle}:${maxcycle} 199 #echo "process $ic" 200 #image $ic 201 #end 202 252
Note: See TracChangeset
for help on using the changeset viewer.