Ignore:
Timestamp:
Jan 17, 2012, 2:15:02 PM (12 years ago)
Author:
campagne
Message:

improve interactive drift analysis (jec)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BAORadio/AmasNancay/trunk/imgdrift.pic

    r638 r639  
    1010set path "/sps/baoradio/AmasNancay/JEC/${srcMaj}"
    1111
     12#first script executed
    1213clearscript image
     14
     15#mergeimg should be executed before timeevol, fwhnInt
     16clearscript mergeimg
     17clearscript timeevol
     18clearscript fwhmInt
     19
     20#script independant from mergeimg
     21clearscript timeevol2
    1322#######################
    1423defscript image
     
    3746#######################
    3847
    39 for ic ${fcycle}:${maxcycle}
    40 echo "process $ic"
    41 image $ic
    42 end
    43 
     48
     49#######################
     50defscript mergeimg
     51#
    4452del ich0Tot
    4553del ich1Tot
     
    6674newwin
    6775disp ich1Tot 'lut=lin,-0.1,3.5 colbr128 showcmap=top'
    68 
    69 #intensite en ft du temps
     76endscript
     77#######################
     78defscript timeevol
     79#
     80#intensite en ft du temps avec image cumulee
    7081del rg0Tot
    7182del rg1Tot
     
    96107plot2d rg0Tot (n*170)/273 val 1 'blue cpts notit nsta'
    97108plot2d rg1Tot (n*170)/273 val 1 'same red cpts notit nsta'
    98 settitle "${srcMaj} Drift Scan [1405,1415]MHz 2cycles Ch 0 (blue) Ch 1 (red)"
     109settitle "${srcMaj} Drift Scan [1405,1415]MHz  all cycles Ch 0 (blue) Ch 1 (red)"
    99110setaxelabels 't(sec)' 'I (a.u)'
    100 
     111endscript
     112
     113#######################
     114defscript fwhmInt
     115#
    101116#spectre de frequence canal en temps [120,146] FWHM.
    102117#
     
    124139plot2d s0 (n/8192)*250+1250 val n>0 'blue cpts notit nsta'
    125140plot2d s1 (n/8192)*250+1250 val 1 'same red cpts notit nsta'
    126 settitle "${srcMaj} Drift Scan 2cycles Ch 0 (blue) Ch 1 (red)"
     141settitle "${srcMaj} Drift Scan all cycles Ch 0 (blue) Ch 1 (red)"
    127142setaxelabels 'Freq. (MHz)' 'I (a.u)'
    128 
     143endscript
     144#######################
     145#######################
     146defscript timeevol2
     147
     148#append all images
     149del ch0evol
     150del ch1evol
     151c++exec sa_size_t nrows=(${nframes}+1)*(${lcycle}-${fcycle}+1); \
     152        sa_size_t ncols=ich${fcycle}0.NCols(); \
     153        TMatrix<r_4>ch0evol(nrows,ncols); TMatrix<r_4>ch1evol(nrows,ncols); \
     154        KeepObj(ch0evol); KeepObj(ch1evol);
     155
     156for ic ${fcycle}:${maxcycle}
     157  c++exec sa_size_t curRow=(${ic}-${fcycle})*(${nframes}+1); sa_size_t nextm1CurRow=curRow+(${nframes}+1)-1; \
     158          cout << "ic, curRow, next : "<<${ic}<<" "<<curRow<<" "<<nextm1CurRow<<endl; \
     159          ch0evol(Range(curRow,nextm1CurRow),Range::all())=ich${ic}0(Range(0,${nframes}),Range::all()); \
     160          ch1evol(Range(curRow,nextm1CurRow),Range::all())=ich${ic}1(Range(0,${nframes}),Range::all());
     161end
     162
     163echo "Coucou......"
     164
     165#intensite en ft du temps avec image cumulee
     166del i0evol
     167del i1evol
     168#1405,1415 MHz => range [5080,5405]
     169c++exec TMatrix<r_4>tmp0(ch0evol(Range::all(),Range(5080,5405)),false); \
     170        TVector<r_4>i0evol(ch0evol.NRows()); \
     171        for(sa_size_t i=0;i<tmp0.NRows();++i){ \
     172          double mean,sigma; \
     173          MeanSigma(tmp0(Range(i),Range::all()),mean,sigma); \
     174          i0evol(i) = mean; \
     175        } \
     176        KeepObj(i0evol); \
     177        TMatrix<r_4>tmp1(ch1evol(Range::all(),Range(5080,5405)),false); \
     178        TVector<r_4>i1evol(ch1evol.NRows()); \
     179        for(sa_size_t i=0;i<tmp1.NRows();++i){ \
     180          double mean,sigma; \
     181          MeanSigma(tmp1(Range(i),Range::all()),mean,sigma); \
     182          i1evol(i) = mean; \
     183        } \
     184        KeepObj(i1evol);
     185
     186
     187
     188newwin
     189setaxesatt 'grid'
     190graphicatt ''
     191plot2d i0evol n  val 1 'blue cpts notit nsta'
     192plot2d i1evol n  val 1 'same red cpts notit nsta'
     193settitle "${srcMaj} Drift Scan [1405,1415]MHz all cycles Ch 0 (blue) Ch 1 (red)"
     194setaxelabels 't(a.u)' 'I (a.u)'
     195       
     196endscript
     197###################
     198#for ic ${fcycle}:${maxcycle}
     199#echo "process $ic"
     200#image $ic
     201#end
     202
Note: See TracChangeset for help on using the changeset viewer.