set source $1 set ncycles $2 #set fcalib $3 #set f1420low $4 #set f1420high $5 set fcalib 1410 set f1420low 1420.2 set f1420high 1420.6 nbins1420 = floor((${f1420high}-${f1420low})/250*8192) echo $nbins1420 clearscript diffOnOff clearscript evolAt1420Freq clearscript evolAt1420SideFreq clearscript IntAt1420 clearscript sigmaRaw1420Side ############################################################################ defscript evolAtCalibFreq #Follow up of the intensity arround the Calib frequency in different calibration conditions # NO calibration # Calibration coeff. mean per Run # Calibration coeff. per cycles set fcalib $1 newwin 1 2 n/pl onoffevol.onoffRaw0%cycle ! ! "blue cpts notit nsta" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt n/pl onoffevol.onoffRaw1%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[${fcalib}MHz/6.25MHz] Raw (a.u)" $axedefatt newwin 1 2 n/proj hRaw0 onoffevol.onoffRaw0 ! ! ! "blue cpts notit" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt n/proj hRaw1 onoffevol.onoffRaw1 ! ! ! "red cpts notit" settitle "I[${fcalib}MHz/6.25MHz] Raw (a.u)" newwin 1 2 n/pl onoffevol.onoffRun0%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.onoffRun1%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[${fcalib}MHz/6.25MHz] Run (a.u)" $axedefatt newwin 1 2 n/proj hRun0 onoffevol.onoffRun0 ! ! ! "blue cpts notit" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/proj hRun1 onoffevol.onoffRun1 ! ! ! "red cpts notit" settitle "I[${fcalib}MHz/6.25MHz] Run (a.u)" newwin 1 2 n/pl onoffevol.onoffCycle0%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.onoffCycle1%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[${fcalib}MHz/6.25MHz] Cycle (a.u)" $axedefatt newwin 1 2 n/proj hCycle0 onoffevol.onoffCycle0 ! ! ! "blue cpts notit" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/proj hCycle1 onoffevol.onoffCycle1 ! ! ! "red cpts notit" settitle "I[${fcalib}MHz/6.25MHz] Cycle (a.u)" endscript ########################################### defscript evolAt1420Freq #Follow up of the intensity arround the [1420,1421]MHz frequency in different calibration conditions # NO calibration # Calibration coeff. mean per Run # Calibration coeff. per cycles graphicatt "xylimits=0,500,-0.01,0.01" newwin 1 2 n/pl onoffevol.onoffRaw01420%cycle ! ! "blue cpts notit nsta" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt n/pl onoffevol.onoffRaw11420%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Raw (a.u)" $axedefatt newwin 1 2 n/pl onoffevol.onoffRun01420%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.onoffRun11420%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Run (a.u)" $axedefatt newwin 1 2 n/pl onoffevol.onoffCycle01420%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.onoffCycle11420%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Cycle (a.u)" $axedefatt newh1d hSigmaRaw0 -0.01 0.01 25 newh1d hSigmaRaw1 -0.01 0.01 25 newh1d hSigmaRun0 -0.01 0.01 25 newh1d hSigmaRun1 -0.01 0.01 25 newh1d hSigmaCycl0 -0.01 0.01 25 newh1d hSigmaCycl1 -0.01 0.01 25 graphicatt "" newwin 1 1 n/proj hSigmaRaw0 onoffevol.onoffRaw01420 ! ! ! "blue cpts notit" n/proj hSigmaRaw1 onoffevol.onoffRaw11420 ! ! ! "same red cpts notit" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Raw" $axedefatt newwin 1 1 n/proj hSigmaRun0 onoffevol.onoffRun01420 ! ! ! "blue cpts notit" n/proj hSigmaRun1 onoffevol.onoffRun11420 ! ! ! "same red cpts notit" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Run" $axedefatt newwin 1 1 n/proj hSigmaCycl0 onoffevol.onoffCycle01420 ! ! ! "blue cpts notit" n/proj hSigmaCycl1 onoffevol.onoffCycle11420 ! ! ! "same red cpts notit" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Cycle" $axedefatt endscript ################################################## defscript sigmaRaw1420Side newh1d hSigRaw0All -0.01 0.01 25 newh1d hSigRaw1All -0.01 0.01 25 n/proj hSigRaw0All onoffevol.onoffRaw01420side n/proj hSigRaw1All onoffevol.onoffRaw11420side echo "Resultats sur ${ncycles} cycles (Ch0, Ch1): mean (${hSigRaw0All.mean}, ${hSigRaw1All.mean}) sigma (${hSigRaw0All.sigma}, ${hSigRaw1All.sigma})" newwin 1 1 disp hSigRaw0All "blue cpts notit" disp hSigRaw1All "red same cpts notit" settitle "Mean and Sigma for 1 cycle" #Ts les 10cycles n10cycles = floor(${ncycles}/10) x10min = ${hSigRaw0All.xmin} x10max = ${hSigRaw0All.xmax} n10bin = ${hSigRaw0All.nbin} for i 0:${n10cycles} ic = ${i}*10+1 jc = ${ic}+9 newh1d hSigRaw010c${i} ${x10min} ${x10max} ${n10bin} newh1d hSigRaw110c${i} ${x10min} ${x10max} ${n10bin} n/proj hSigRaw010c${i} onoffevol.onoffRaw01420side (cycle>=${ic})&&(cycle<=${jc}) cp hSigRaw010c${i} h0 mSig010c[i] = ${h0.mean} n/proj hSigRaw110c${i} onoffevol.onoffRaw11420side (cycle>=${ic})&&(cycle<=${jc}) cp hSigRaw110c${i} h1 mSig110c[i] = ${h1.mean} end line2vec hSigRaw010c $mSig010c line2vec hSigRaw110c $mSig110c newwin 1 1 disp hSigRaw010c "blue cpts notit" disp hSigRaw110c "red same cpts notit" settitle "Mean and Sigma for 10 cycles" endscript ########################################### defscript evolAt1420SideFreq #Follow up of the intensity arround the [${f1420low},${f1420high}]MHz frequency in different calibration conditions # NO calibration # Calibration coeff. mean per Run # Calibration coeff. per cycles graphicatt "xylimits=0,500,-0.01,0.01" newwin 1 2 n/pl onoffevol.onoffRaw01420side%cycle ! ! "blue cpts notit nsta" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt n/pl onoffevol.onoffRaw11420side%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Raw (a.u)" $axedefatt newwin 1 2 n/pl onoffevol.onoffRun01420side%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.onoffRun11420side%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Run (a.u)" $axedefatt newwin 1 2 n/pl onoffevol.onoffCycle01420side%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.onoffCycle11420side%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Cycle (a.u)" $axedefatt newh1d hSigmaSideRaw0 -0.01 0.01 25 newh1d hSigmaSideRaw1 -0.01 0.01 25 newh1d hSigmaSideRun0 -0.01 0.01 25 newh1d hSigmaSideRun1 -0.01 0.01 25 newh1d hSigmaSideCycl0 -0.01 0.01 25 newh1d hSigmaSideCycl1 -0.01 0.01 25 graphicatt "" newwin 1 1 n/proj hSigmaSideRaw0 onoffevol.onoffRaw01420side ! ! ! "blue cpts notit" n/proj hSigmaSideRaw1 onoffevol.onoffRaw11420side ! ! ! "same red cpts notit" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Raw" $axedefatt newwin 1 1 n/proj hSigmaSideRun0 onoffevol.onoffRun01420side ! ! ! "blue cpts notit" n/proj hSigmaSideRun1 onoffevol.onoffRun11420side ! ! ! "same red cpts notit" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Run" $axedefatt newwin 1 1 n/proj hSigmaSideCycl0 onoffevol.onoffCycle01420side ! ! ! "blue cpts notit" n/proj hSigmaSideCycl1 onoffevol.onoffCycle11420side ! ! ! "same red cpts notit" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Cycle" $axedefatt endscript ########################################### defscript IntAt1420 #Follow up of the intensity arround the [${f1420low},${f1420high}]MHz #frequency in different calibration conditions with baseline removed # NO calibration # Calibration coeff. mean per Run # Calibration coeff. per cycles graphicatt "xylimits=0,500,-0.1,0.1" newwin 1 2 n/pl onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side)%cycle ! ! "blue cpts notit nsta" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt n/pl onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side)%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I 1420MHz Raw (a.u)" $axedefatt newwin 1 2 n/pl onoffevol.${nbins1420}*(onoffRun01420-onoffRun01420side)%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.${nbins1420}*(onoffRun11420-onoffRun11420side)%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I 1420MHz Run (a.u)" $axedefatt newwin 1 2 n/pl onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side)%cycle ! ! "blue cpts notit nsta" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt n/pl onoffevol.${nbins1420}*(onoffCycle11420-onoffCycle11420side)%cycle ! ! "red cpts notit nsta" setaxelabels "cycle" "I 1420MHz Cycle (a.u)" $axedefatt newh1d h1420IntRaw0 -0.1 0.1 25 newh1d h1420IntRaw1 -0.1 0.1 25 newh1d h1420IntRun0 -0.1 0.1 25 newh1d h1420IntRun1 -0.1 0.1 25 newh1d h1420IntCycl0 -0.1 0.1 25 newh1d h1420IntCycl1 -0.1 0.1 25 graphicatt "" newwin 1 1 n/proj h1420IntRaw0 onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side) ! ! ! "blue cpts notit" n/proj h1420IntRaw1 onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side) ! ! ! "same red cpts notit" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt setaxelabels "(a.u)" "I 1420MHz Raw" $axedefatt newwin 1 1 n/proj h1420IntRun0 onoffevol.${nbins1420}*(onoffRun01420-onoffRun01420side) ! ! ! "blue cpts notit" n/proj h1420IntRun1 onoffevol.${nbins1420}*(onoffRun11420-onoffRun11420side) ! ! ! "same red cpts notit" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "(a.u)" "I 1420MHz Run" $axedefatt newwin 1 1 n/proj h1420IntCycl0 onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side) ! ! ! "blue cpts notit" n/proj h1420IntCycl1 onoffevol.${nbins1420}*(onoffCycle11420-onoffCycle11420side) ! ! ! "same red cpts notit" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "(a.u)" "I 1420MHz Cycle" $axedefatt endscript ################################################## defscript diffOnOff # #Display the ON-OFF over the whole freq. range in diffrent Calib. conditions # NO calibration # Calibration coeff. mean per Run # Calibration coeff. per cycles # graphicatt "xylimits=1250,1500,-0.01,0.01" del snocal0 snocal1 objaoper meanNoCalib row 0 snocal0 objaoper meanNoCalib row 1 snocal1 newwin 1 1 plot2d snocal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta" plot2d snocal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta" settitle "Raw ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt del sruncal0 sruncal1 objaoper meanPerRunCalib row 0 sruncal0 objaoper meanPerRunCalib row 1 sruncal1 newwin 1 1 plot2d sruncal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta" plot2d sruncal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta" settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt newwin 1 1 del scyclecal0 scyclecal1 objaoper meanPerCycleCalib row 0 scyclecal0 objaoper meanPerCycleCalib row 1 scyclecal1 plot2d scyclecal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta" plot2d scyclecal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta" settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt endscript #Main #use minuscule for source label openppf onoffsurvey_${source}-${ncycles}Cycles.ppf print onoffevol set defatt "font=helvetica,bold,20 fixedfonsize" set axedefatt "font=helvetica,bold,30 fixedfonsize grid" set defatt "" set axedefatt "grid" graphicatt "" setaxesatt "" #diffOnOff #evolAt1420Freq #evolAt1420SideFreq #IntAt1420