set cols ( blue red black green purple orange cyan violet yellow ) set toppath "/sps/baoradio/AmasNancay/JEC" set source "Abell${1}" set srclower "abell${1}" set date "${2}" # implicitement firstcycle =1 set lastcycle $3 lastP1cycle = ${lastcycle}+1 echo Analyse ${source}/${data} from cycles 1-${lastcycle} (${lastP1cycle}) pssetfilename rawonoff-${source}-${date}.ps #set showFigs ( 0 0 0 0 0 0 0 ) ##################################### #Plots RAW ON-OFF (RAW = WO calibrations) ##################################### openppf ${toppath}/${source}/${date}${srclower}/diffOnOffRaw_${date}_${srclower}.ppf #specONOFFRaw Matrix 2 x 8192 : i=0... #specONOFFRawMean Matrix 2 x 8192 #specONOFFRaw2ChanMean Vector 8192 x 1 ##################################### #Plots RAW ON-OFF with mean computed among the cycles AND(or NOT) the Channels ##################################### #if ( $showFigs[0] == 1 ) then echo "Figure 1.........." del sallcyclev0 objaoper specONOFFRawMean row 0 sallcyclev0 del sallcyclev1 objaoper specONOFFRawMean row 1 sallcyclev1 newwin 1 1 graphicatt "xylimits=1250,1500,-0.01,0.01" plot2d specONOFFRaw2ChanMean (n/8192)*250+1250 val n>0 "black cpts nsta notit" plot2d sallcyclev0 (n/8192)*250+1250 val n>0 "same blue cpts nsta notit" plot2d sallcyclev1 (n/8192)*250+1250 val n>0 "same red cpts nsta notit" settitle "ON-OFF ${source}/${date} Ch 0 (blue) Ch 1 (red) Mean (black) All cycles" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps #endif ##################################### #Plots RAW ON-OFF chan 0 & 1 separaed and cycle per cycle ##################################### #if ( $showFigs[1] == 1 ) then echo "Figure 2.........." newwin 1 1 graphicatt "xylimits=1250,1500,-0.01,0.01" del sc1v0 objaoper specONOFFRaw1 row 0 sc1v0 plot2d sc1v0 (n/8192)*250+1250 val n>0 "$cols[0] cpts nsta notit" for ic 2:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sc${ic}v0 objaoper specONOFFRaw${ic} row 0 sc${ic}v0 plot2d sc${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit" end settitle "ON-OFF ${source}/${date} Ch 0 cycle per cycle" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps newwin 1 1 graphicatt "xylimits=1250,1500,-0.01,0.01" del sc1v1 objaoper specONOFFRaw1 row 1 sc1v1 plot2d sc1v1 (n/8192)*250+1250 val n>0 "$cols[0] cpts nsta notit" for ic 2:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sc${ic}v1 objaoper specONOFFRaw${ic} row 1 sc${ic}v1 plot2d sc${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit" end settitle "ON-OFF ${source}/${date} Ch 1 cycle per cycle" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps #endif ##################################### # Plots RAW no calibration at all and no Diff ON-OFF ##################################### openppf ${toppath}/${source}/${date}${srclower}/dataRaw_${date}_${srclower}.ppf #if ( $showFigs[2] == 1 ) then echo "Figure 3........." newwin 2 2 graphicatt "xylimits=1250,1500,0.95,1.05" ### # ### On Ch 0 # On Ch 1 ###################### ### Off Ch 0# Off Ch 1 ### # set mode On set first 1 for ic 1:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sm${mode}c${ic}v0 objaoper specRaw${mode}${ic} row 0 sm${mode}c${ic}v0 if ( ${first} == 1 ) then plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit" else plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit" endif set first 0 end settitle "${source}/${date} Raw: On Ch 0" set first 1 for ic 1:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sm${mode}c${ic}v1 objaoper specRaw${mode}${ic} row 1 sm${mode}c${ic}v1 if ( ${first} == 1 ) then plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit" else plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit" endif set first 0 end settitle "${source}/${date} Raw: On Ch 1" set mode Off set first 1 for ic 1:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sm${mode}c${ic}v0 objaoper specRaw${mode}${ic} row 0 sm${mode}c${ic}v0 if ( ${first} == 1 ) then plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit" else plot2d sm${mode}c${ic}v0 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit" endif set first 0 end settitle "${source}/${date} Raw: Off Ch 0" set first 1 for ic 1:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sm${mode}c${ic}v1 objaoper specRaw${mode}${ic} row 1 sm${mode}c${ic}v1 if ( ${first} == 1 ) then plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "$cols[k] cpts nsta notit" else plot2d sm${mode}c${ic}v1 (n/8192)*250+1250 val n>0 "same $cols[k] cpts nsta notit" endif set first 0 end settitle "${source}/${date} Raw: Off Ch 1" w2ps #endif ##################################### #Plots RAW ON-OFF MEAN REDUCED chan 0 & 1 separaed and cycle per cycle ##################################### #if ( $showFigs[3] == 1 ) then echo "Figure 4.........." newwin 1 1 graphicatt "xylimits=1250,1500,-0.01,0.01" del sc1v0 objaoper redMeanONOFFRaw1 row 0 sc1v0 plot2d sc1v0 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit" for ic 2:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sc${ic}v0 objaoper redMeanONOFFRaw${ic} row 0 sc${ic}v0 plot2d sc${ic}v0 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit" end settitle "ON-OFF Mean 32bins ${source}/${date} Ch 0 cycle per cycle" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps newwin 1 1 graphicatt "xylimits=1250,1500,-0.01,0.01" del sc1v1 objaoper redMeanONOFFRaw1 row 1 sc1v1 plot2d sc1v1 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit" for ic 2:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sc${ic}v1 objaoper redMeanONOFFRaw${ic} row 1 sc${ic}v1 plot2d sc${ic}v1 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit" end settitle "ON-OFF Mean 32bins ${source}/${date} Ch 1 cycle per cycle" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps #endif ##################################### #Plots RAW ON-OFF SIGMA REDUCED chan 0 & 1 separaed and cycle per cycle ##################################### #if ( $showFigs[4] == 1 ) then echo "Figure 5.........." newwin 1 1 graphicatt "xylimits=1250,1500,0,0.01" del sc1v0 objaoper redSigmaONOFFRaw1 row 0 sc1v0 plot2d sc1v0 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit" for ic 2:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sc${ic}v0 objaoper redSigmaONOFFRaw${ic} row 0 sc${ic}v0 plot2d sc${ic}v0 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit" end settitle "ON-OFF Sigma over 32bins ${source}/${date} Ch 0 cycle per cycle" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps newwin 1 1 graphicatt "xylimits=1250,1500,0,0.01" del sc1v1 objaoper redSigmaONOFFRaw1 row 1 sc1v1 plot2d sc1v1 (n/32)*250+1250 val n>0 "$cols[0] marker=fcircle,7 nsta notit" for ic 2:${lastP1cycle} k = ${ic}-floor(${ic}/${#cols})*${#cols} del sc${ic}v1 objaoper redSigmaONOFFRaw${ic} row 1 sc${ic}v1 plot2d sc${ic}v1 (n/32)*250+1250 val n>0 "same $cols[k] marker=fcircle,7 nsta notit" end settitle "ON-OFF Sigma over 32bins ${source}/${date} Ch 1 cycle per cycle" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps #endif ##################################### #Plots RAW ON-OFF MEAN REDUCED chan 0 & 1 separaed ALL cycles ##################################### #if ( $showFigs[5] == 1 ) then echo "Figure 6.........." newwin 1 1 graphicatt "xylimits=1250,1500,-0.01,0.01" del scallv0 del scallv1 objaoper redMeanONOFFRawAll row 0 scallv0 objaoper redMeanONOFFRawAll row 1 scallv1 plot2d scallv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit" plot2d scallv1 (n/32)*250+1250 val n>0 "red same marker=fcircle,7 nsta notit" settitle "ON-OFF Mean 32bins ${source}/${date} Ch 0 (blue) Ch 1 (red) All cycles" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps #endif ##################################### #Plots RAW ON-OFF SIGMA REDUCED chan 0 & 1 separaed and cycle per cycle ##################################### #if ( $showFigs[5] == 1 ) then echo "Figure 6.........." newwin 1 1 graphicatt "xylimits=1250,1500,0,0.001" del scallv0 del scallv1 objaoper redSigmaONOFFRawAll row 0 scallv0 objaoper redSigmaONOFFRawAll row 1 scallv1 plot2d scallv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit" plot2d scallv1 (n/32)*250+1250 val n>0 "red same marker=fcircle,7 nsta notit" settitle "ON-OFF Sigma over 32bins ${source}/${date} Ch 0 (blue) Ch 1 (red) All cycles" setaxelabels "Freq. (MHz)" "I (a.u)" w2ps #endif ###################### psclosefile