#source en minuscule set source $1 set srcMaj $2 set date $3 set fcycle $4 set lcycle $5 set nframes $6 maxcycle = ${lcycle}+1 set path "/sps/baoradio/AmasNancay/JEC/${srcMaj}" #first script executed clearscript image clearscript doImage #mergeimg should be executed before timeevol, fwhnInt clearscript mergeimg clearscript timeevol clearscript fwhmInt #script independant from mergeimg clearscript timeevol2 ####################### defscript image # #compute (ON-OFF)/OFFn with OFF computed from the first 30s of each image set cycle $1 openppf ${path}/img_${date}_${source}_cycle${cycle}.ppf del ich0 del zCh0 objaoper img${cycle} slicexz 0 ich0 c++exec TMatrixzCh0(ich0(Range(0),Range::all()),false); \ for (sa_size_t i=1;i<50;i++){zCh0+=ich0(Range(i),Range::all());} \ zCh0/=50.; KeepObj(zCh0);\ for (sa_size_t i=0;izCh1(ich1(Range(0),Range::all()),false); \ for (sa_size_t i=1;i<50;i++){zCh1+=ich1(Range(i),Range::all());} \ zCh1/=50.; KeepObj(zCh1);\ for (sa_size_t i=0;iich0Tot(ich${fcycle}0(Range(0,${nframes}),Range::all()),false); \ TMatrixich1Tot(ich${fcycle}1(Range(0,${nframes}),Range::all()),false); \ TVectorncycles(1); ncycles(0)=1; \ KeepObj(ich0Tot); KeepObj(ich1Tot); KeepObj(ncycles); fp1cycle = ${fcycle}+1 for ic ${fp1cycle}:${maxcycle} c++exec ich0Tot+=ich${ic}0(Range(0,${nframes}),Range::all()); \ ich1Tot+=ich${ic}1(Range(0,${nframes}),Range::all()); \ ncycles(0)+=1; end c++exec ich0Tot/=ncycles(0); ich1Tot/=ncycles(0); setaxesatt 'font=helvetica,bold,14 fixedfontsize' newwin disp ich0Tot 'lut=lin,-0.1,3.5 colbr128 showcmap=top' newwin disp ich1Tot 'lut=lin,-0.1,3.5 colbr128 showcmap=top' endscript ####################### defscript timeevol # #intensite en ft du temps avec image cumulee del rg0Tot del rg1Tot #1405,1415 MHz => range [5080,5405] c++exec TMatrixtmp0(ich0Tot(Range::all(),Range(5080,5405)),false); \ TVectorrg0Tot(ich0Tot.NRows()); \ for(sa_size_t i=0;itmp1(ich1Tot(Range::all(),Range(5080,5405)),false); \ TVectorrg1Tot(ich1Tot.NRows()); \ for(sa_size_t i=0;i 8.22kHz plot2d rg0Tot (n*170)/273 val 1 'blue cpts notit nsta' plot2d rg1Tot (n*170)/273 val 1 'same red cpts notit nsta' settitle "${srcMaj} Drift Scan [1405,1415]MHz all cycles Ch 0 (blue) Ch 1 (red)" setaxelabels 't(sec)' 'I (a.u)' endscript ####################### defscript fwhmInt # #spectre de frequence canal en temps [120,146] FWHM. # del s0 del s1 c++exec TMatrixtmp0(ich0Tot(Range(120,146),Range::all()),false); \ TVectors0(ich0Tot.NCols()); \ for(sa_size_t i=0;itmp1(ich1Tot(Range(120,146),Range::all()),false); \ TVectors1(ich1Tot.NCols()); \ for(sa_size_t i=0;i0 'blue cpts notit nsta' plot2d s1 (n/8192)*250+1250 val 1 'same red cpts notit nsta' settitle "${srcMaj} Drift Scan all cycles Ch 0 (blue) Ch 1 (red)" setaxelabels 'Freq. (MHz)' 'I (a.u)' endscript ####################### ####################### defscript timeevol2 #append all images del ch0evol del ch1evol c++exec sa_size_t nrows=(${nframes}+1)*(${lcycle}-${fcycle}+1); \ sa_size_t ncols=ich${fcycle}0.NCols(); \ TMatrixch0evol(nrows,ncols); TMatrixch1evol(nrows,ncols); \ KeepObj(ch0evol); KeepObj(ch1evol); for ic ${fcycle}:${maxcycle} c++exec sa_size_t curRow=(${ic}-${fcycle})*(${nframes}+1); sa_size_t nextm1CurRow=curRow+(${nframes}+1)-1; \ cout << "ic, curRow, next : "<<${ic}<<" "< range [5080,5405] c++exec TMatrixtmp0(ch0evol(Range::all(),Range(5080,5405)),false); \ TVectori0evol(ch0evol.NRows()); \ for(sa_size_t i=0;itmp1(ch1evol(Range::all(),Range(5080,5405)),false); \ TVectori1evol(ch1evol.NRows()); \ for(sa_size_t i=0;iTsys0evol(nrows,ncols); TMatrixTsys1evol(nrows,ncols); \ KeepObj(Tsys0evol); KeepObj(Tsys1evol); for ic ${fcycle}:${maxcycle} c++exec sa_size_t curRow=(${ic}-${fcycle}); \ cout << "ic, curRow, next : "<<${ic}<<" "< range [5080,5405] c++exec TMatrixtmp0(Tsys0evol(Range::all(),Range(5080,5405)),false); \ TVectorT0evol(Tsys0evol.NRows()); \ for(sa_size_t i=0;itmp1(Tsys1evol(Range::all(),Range(5080,5405)),false); \ TVectorT1evol(Tsys1evol.NRows()); \ for(sa_size_t i=0;i