Changeset 582


Ignore:
Timestamp:
Oct 21, 2011, 9:09:14 AM (13 years ago)
Author:
campagne
Message:

improve analysis (jec)

Location:
BAORadio/AmasNancay/trunk
Files:
2 edited

Legend:

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

    r577 r582  
     1
     2
     3set source  $1
     4set ncycles $2
     5
     6
     7#set fcalib $3
     8#set f1420low $4
     9#set f1420high $5
     10
     11set fcalib 1410
     12set f1420low 1420.2
     13set f1420high 1420.6
     14
     15
     16
     17nbins1420 = floor((${f1420high}-${f1420low})/250*8192)
     18
     19echo $nbins1420
     20
     21
     22
     23clearscript diffOnOff
     24clearscript evolAt1420Freq
     25clearscript evolAt1420SideFreq
     26clearscript IntAt1420
     27clearscript sigmaRaw1420Side
     28############################################################################
     29
    130defscript evolAtCalibFreq
    231
     
    5685
    5786
    58 #Follow up of the intensity arround the (1420.4 +/- 2) MHz frequency in different calibration conditions
     87#Follow up of the intensity arround the [1420,1421]MHz frequency in different calibration conditions
    5988# NO calibration
    6089# Calibration coeff. mean per Run
     
    6897settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
    6998n/pl onoffevol.onoffRaw11420%cycle ! ! "red cpts notit nsta"
    70 setaxelabels "cycle" "I[1420.4MHz +/- 2MHz] Raw (a.u)" $axedefatt
     99setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Raw (a.u)" $axedefatt
    71100
    72101
     
    75104settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
    76105n/pl onoffevol.onoffRun11420%cycle ! ! "red cpts notit nsta"
    77 setaxelabels "cycle" "I[1420.4MHz +/- 2MHz] Run (a.u)" $axedefatt
     106setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Run (a.u)" $axedefatt
    78107
    79108
     
    82111settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
    83112n/pl onoffevol.onoffCycle11420%cycle ! ! "red cpts notit nsta"
    84 setaxelabels "cycle" "I[1420.4MHz +/- 2MHz] Cycle (a.u)" $axedefatt
    85 
    86 
    87 newh1d hSigmaRaw0 -0.02 0.02 50
    88 newh1d hSigmaRaw1 -0.02 0.02 50
    89 newh1d hSigmaRun0 -0.02 0.02 50
    90 newh1d hSigmaRun1 -0.02 0.02 50
    91 newh1d hSigmaCycl0 -0.02 0.02 50
    92 newh1d hSigmaCycl1 -0.02 0.02 50
     113setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Cycle (a.u)" $axedefatt
     114
     115
     116newh1d hSigmaRaw0 -0.01 0.01 25
     117newh1d hSigmaRaw1 -0.01 0.01 25
     118newh1d hSigmaRun0 -0.01 0.01 25
     119newh1d hSigmaRun1 -0.01 0.01 25
     120newh1d hSigmaCycl0 -0.01 0.01 25
     121newh1d hSigmaCycl1 -0.01 0.01 25
    93122
    94123graphicatt ""
     
    98127n/proj hSigmaRaw1 onoffevol.onoffRaw11420 ! ! ! "same red cpts notit"
    99128settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
    100 setaxelabels "(a.u)" "I[1420.4MHz +/- 2MHz] Raw" $axedefatt
     129setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Raw" $axedefatt
    101130
    102131newwin 1 1
     
    104133n/proj hSigmaRun1 onoffevol.onoffRun11420 ! ! ! "same red cpts notit"
    105134settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
    106 setaxelabels "(a.u)" "I[1420.4MHz +/- 2MHz] Run" $axedefatt
     135setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Run" $axedefatt
    107136
    108137
     
    111140n/proj hSigmaCycl1 onoffevol.onoffCycle11420 ! ! ! "same red cpts notit"
    112141settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
    113 setaxelabels "(a.u)" "I[1420.4MHz +/- 2MHz] Cycle" $axedefatt
     142setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Cycle" $axedefatt
     143
     144
     145endscript
     146##################################################
     147defscript sigmaRaw1420Side
     148
     149
     150newh1d hSigRaw0All -0.01 0.01 25
     151newh1d hSigRaw1All -0.01 0.01 25
     152
     153n/proj hSigRaw0All onoffevol.onoffRaw01420side
     154n/proj hSigRaw1All onoffevol.onoffRaw11420side
     155
     156echo "Resultats sur ${ncycles} cycles (Ch0, Ch1): mean (${hSigRaw0All.mean}, ${hSigRaw1All.mean}) sigma (${hSigRaw0All.sigma}, ${hSigRaw1All.sigma})"
     157
     158newwin 1 1
     159disp  hSigRaw0All "blue cpts notit"
     160disp  hSigRaw1All "red same cpts notit"
     161settitle "Mean and Sigma for 1 cycle"
     162
     163#Ts les 10cycles
     164n10cycles = floor(${ncycles}/10)
     165x10min = ${hSigRaw0All.xmin}
     166x10max = ${hSigRaw0All.xmax}
     167n10bin = ${hSigRaw0All.nbin}
     168
     169       
     170for i 0:${n10cycles}
     171 ic = ${i}*10+1
     172 jc = ${ic}+9
     173 newh1d hSigRaw010c${i} ${x10min} ${x10max} ${n10bin}
     174 newh1d hSigRaw110c${i} ${x10min} ${x10max} ${n10bin}
     175
     176 n/proj hSigRaw010c${i}  onoffevol.onoffRaw01420side (cycle>=${ic})&&(cycle<=${jc})
     177 cp hSigRaw010c${i} h0
     178 mSig010c[i] = ${h0.mean}
     179
     180 n/proj hSigRaw110c${i}  onoffevol.onoffRaw11420side (cycle>=${ic})&&(cycle<=${jc})
     181 cp hSigRaw110c${i} h1
     182 mSig110c[i] = ${h1.mean}
     183end
     184
     185
     186line2vec hSigRaw010c $mSig010c
     187line2vec hSigRaw110c $mSig110c
     188
     189
     190
     191
     192newwin 1 1
     193disp  hSigRaw010c "blue cpts notit"
     194disp  hSigRaw110c "red same cpts notit"
     195settitle "Mean and Sigma for 10 cycles"
     196
     197
     198endscript
     199###########################################
     200defscript evolAt1420SideFreq
     201
     202
     203#Follow up of the intensity arround the [${f1420low},${f1420high}]MHz frequency in different calibration conditions
     204# NO calibration
     205# Calibration coeff. mean per Run
     206# Calibration coeff. per cycles
     207
     208
     209graphicatt "xylimits=0,500,-0.01,0.01"
     210
     211newwin 1 2
     212n/pl onoffevol.onoffRaw01420side%cycle ! ! "blue cpts notit nsta"
     213settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
     214n/pl onoffevol.onoffRaw11420side%cycle ! ! "red cpts notit nsta"
     215setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Raw (a.u)" $axedefatt
     216
     217
     218newwin 1 2
     219n/pl onoffevol.onoffRun01420side%cycle ! ! "blue cpts notit nsta"
     220settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     221n/pl onoffevol.onoffRun11420side%cycle ! ! "red cpts notit nsta"
     222setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Run (a.u)" $axedefatt
     223
     224
     225newwin 1 2
     226n/pl onoffevol.onoffCycle01420side%cycle ! ! "blue cpts notit nsta"
     227settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     228n/pl onoffevol.onoffCycle11420side%cycle ! ! "red cpts notit nsta"
     229setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Cycle (a.u)" $axedefatt
     230
     231
     232newh1d hSigmaSideRaw0 -0.01 0.01 25
     233newh1d hSigmaSideRaw1 -0.01 0.01 25
     234newh1d hSigmaSideRun0 -0.01 0.01 25
     235newh1d hSigmaSideRun1 -0.01 0.01 25
     236newh1d hSigmaSideCycl0 -0.01 0.01 25
     237newh1d hSigmaSideCycl1 -0.01 0.01 25
     238
     239graphicatt ""
     240
     241newwin 1 1
     242n/proj hSigmaSideRaw0 onoffevol.onoffRaw01420side ! ! ! "blue cpts notit"
     243n/proj hSigmaSideRaw1 onoffevol.onoffRaw11420side ! ! ! "same red cpts notit"
     244settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
     245setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Raw" $axedefatt
     246
     247newwin 1 1
     248n/proj hSigmaSideRun0 onoffevol.onoffRun01420side ! ! ! "blue cpts notit"
     249n/proj hSigmaSideRun1 onoffevol.onoffRun11420side ! ! ! "same red cpts notit"
     250settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     251setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Run" $axedefatt
     252
     253
     254newwin 1 1
     255n/proj hSigmaSideCycl0 onoffevol.onoffCycle01420side ! ! ! "blue cpts notit"
     256n/proj hSigmaSideCycl1 onoffevol.onoffCycle11420side ! ! ! "same red cpts notit"
     257settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     258setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Cycle" $axedefatt
     259
     260
     261endscript
     262
     263###########################################
     264defscript IntAt1420
     265
     266
     267#Follow up of the intensity arround the [${f1420low},${f1420high}]MHz
     268#frequency in different calibration conditions with baseline removed
     269# NO calibration
     270# Calibration coeff. mean per Run
     271# Calibration coeff. per cycles
     272
     273
     274graphicatt "xylimits=0,500,-0.1,0.1"
     275
     276newwin 1 2
     277n/pl onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side)%cycle ! ! "blue cpts notit nsta"
     278settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
     279n/pl onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side)%cycle ! ! "red cpts notit nsta"
     280setaxelabels "cycle" "I 1420MHz Raw (a.u)" $axedefatt
     281
     282
     283newwin 1 2
     284n/pl onoffevol.${nbins1420}*(onoffRun01420-onoffRun01420side)%cycle ! ! "blue cpts notit nsta"
     285settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     286n/pl onoffevol.${nbins1420}*(onoffRun11420-onoffRun11420side)%cycle ! ! "red cpts notit nsta"
     287setaxelabels "cycle" "I 1420MHz Run (a.u)" $axedefatt
     288
     289
     290newwin 1 2
     291n/pl onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side)%cycle ! ! "blue cpts notit nsta"
     292settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     293n/pl onoffevol.${nbins1420}*(onoffCycle11420-onoffCycle11420side)%cycle ! ! "red cpts notit nsta"
     294setaxelabels "cycle" "I 1420MHz Cycle (a.u)" $axedefatt
     295
     296
     297newh1d h1420IntRaw0 -0.1 0.1 25
     298newh1d h1420IntRaw1 -0.1 0.1 25
     299newh1d h1420IntRun0 -0.1 0.1 25
     300newh1d h1420IntRun1 -0.1 0.1 25
     301newh1d h1420IntCycl0 -0.1 0.1 25
     302newh1d h1420IntCycl1 -0.1 0.1 25
     303
     304graphicatt ""
     305
     306newwin 1 1
     307n/proj h1420IntRaw0 onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side) ! ! ! "blue cpts notit"
     308n/proj h1420IntRaw1 onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side) ! ! ! "same red cpts notit"
     309settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
     310setaxelabels "(a.u)" "I 1420MHz Raw" $axedefatt
     311
     312newwin 1 1
     313n/proj h1420IntRun0 onoffevol.${nbins1420}*(onoffRun01420-onoffRun01420side) ! ! ! "blue cpts notit"
     314n/proj h1420IntRun1 onoffevol.${nbins1420}*(onoffRun11420-onoffRun11420side) ! ! ! "same red cpts notit"
     315settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     316setaxelabels "(a.u)" "I 1420MHz Run" $axedefatt
     317
     318
     319
     320newwin 1 1
     321n/proj h1420IntCycl0 onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side) ! ! ! "blue cpts notit"
     322n/proj h1420IntCycl1 onoffevol.${nbins1420}*(onoffCycle11420-onoffCycle11420side) ! ! ! "same red cpts notit"
     323settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
     324setaxelabels "(a.u)" "I 1420MHz Cycle" $axedefatt
     325
    114326
    115327
     
    164376#use minuscule for source label
    165377
    166 set source  $1
    167 set ncycles $2
    168 set fcalib $3
     378
     379
    169380
    170381openppf onoffsurvey_${source}-${ncycles}Cycles.ppf
     
    181392
    182393
    183 
    184394#diffOnOff
    185 
    186 
    187 evolAt1420Freq
     395#evolAt1420Freq
     396#evolAt1420SideFreq
     397#IntAt1420
  • BAORadio/AmasNancay/trunk/mergeAnaFiles.cc

    r577 r582  
    251251//Compute the mean of Diff ON-OFF BAO-calibrated spectra and also the mean/sigma of rebinned spectra
    252252//
    253 void meanCalibBAODiffOnOffCycles() throw(string) {
     253void 1meanCalibBAODiffOnOffCycles() throw(string) {
    254254
    255255  list<string> listOfFiles;
     
    286286  sa_size_t chCalibHigh = freqToChan(para.rcalibFreq_ + (para.rcalibBandFreq_*0.5));
    287287  //Lower and Higher freq.  just arround 1420.4MHz Freq. bin to perform mean follow up
    288   sa_size_t ch1420Low  = freqToChan(1420);
    289   sa_size_t ch1420High = freqToChan(1421);
     288  sa_size_t ch1420Low  = freqToChan(1420.4-0.2);
     289  sa_size_t ch1420High = freqToChan(1420.4+0.2);
    290290
    291291  //Lower and Higher freq. on the sides of 1420.4Mhz Freq. bin to perform mean follow up
     
    296296
    297297
    298   if (para.debuglev_>90){
     298  if (para.debuglev_>0){
    299299    cout << "freq. band for follow up [" <<  chCalibLow << ", "<< chCalibHigh << "]" << endl;
    300300    cout << "freq. band for follow up [" <<  ch1420Low << ", "<< ch1420High << "]" << endl;
     301    cout << "freq. band for follow up [" <<  ch1420aLow << ", "<< ch1420aHigh << "]" << endl;
     302    cout << "freq. band for follow up [" <<  ch1420bLow << ", "<< ch1420bHigh << "]" << endl;
    301303  }
    302304 
Note: See TracChangeset for help on using the changeset viewer.