[550] | 1 | #$1: source |
---|
| 2 | #$2: nber of cycles |
---|
| 3 | #$3: number of freq. combined for reducing mean/sigma |
---|
| 4 | |
---|
| 5 | set source $1 |
---|
| 6 | set ncycles $2 |
---|
| 7 | set nFreqBin $3 |
---|
[552] | 8 | set action $4 |
---|
| 9 | |
---|
| 10 | set defatt "font=helvetica,bold,20" |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | if ( ${action} == "mean" ) then |
---|
| 15 | |
---|
[550] | 16 | openppf meanDiffOnOffRaw_${source}-${ncycles}Cycles.ppf |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | ##General Mean |
---|
| 20 | del s0 s1 |
---|
| 21 | objaoper mean row 0 s0 |
---|
| 22 | objaoper mean row 1 s1 |
---|
[552] | 23 | graphicatt "${defatt} xylimits=1250,1500,-0.01,0.01" |
---|
[550] | 24 | newwin 1 1 |
---|
| 25 | plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit" |
---|
| 26 | plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit" |
---|
[552] | 27 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 28 | setaxelabels "Freq. (MHz)" "<(ON-OFF)[r,c]/Gain[r]>_{r,c}" $defatt |
---|
[550] | 29 | |
---|
| 30 | |
---|
[552] | 31 | |
---|
[550] | 32 | ##Reduced Mean |
---|
| 33 | newwin 1 1 |
---|
| 34 | del rs0 rs1 |
---|
| 35 | objaoper meanred row 0 rs0 |
---|
| 36 | objaoper meanred row 1 rs1 |
---|
| 37 | plot2d rs0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit" |
---|
| 38 | plot2d rs1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit" |
---|
[552] | 39 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 40 | setaxelabels "Freq. (MHz)" "<(ON-OFF)[r,c]/Gain[r]>_{r,c} Rebin(${nFreqBin})" $defatt |
---|
[550] | 41 | |
---|
[552] | 42 | |
---|
[550] | 43 | ##Reduced Mean |
---|
| 44 | newwin 1 1 |
---|
| 45 | del rss0 rss1 |
---|
| 46 | objaoper sigmared row 0 rss0 |
---|
| 47 | objaoper sigmared row 1 rss1 |
---|
| 48 | plot2d rss0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit" |
---|
| 49 | plot2d rss1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit" |
---|
[552] | 50 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 51 | setaxelabels "Freq. (MHz)" "Sigma[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt |
---|
[550] | 52 | |
---|
[552] | 53 | else |
---|
[550] | 54 | |
---|
[552] | 55 | openppf medianDiffOnOffRaw_${source}-${ncycles}Cycles.ppf |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | ##General Median |
---|
| 59 | del s0 s1 |
---|
| 60 | objaoper median row 0 s0 |
---|
| 61 | objaoper median row 1 s1 |
---|
| 62 | graphicatt "xylimits=1250,1500,-0.01,0.01" |
---|
| 63 | newwin 1 1 |
---|
| 64 | plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit" |
---|
| 65 | plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit" |
---|
| 66 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 67 | setaxelabels "Freq. (MHz)" "Median[(ON-OFF)[r,c]/Gain[r]]" $defatt |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | ##Reduced Mean of the median |
---|
| 71 | newwin 1 1 |
---|
| 72 | del rs0 rs1 |
---|
| 73 | objaoper meanmedred row 0 rs0 |
---|
| 74 | objaoper meanmedred row 1 rs1 |
---|
| 75 | graphicatt "xylimits=1250,1500,-0.01,0.01" |
---|
| 76 | plot2d rs0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit" |
---|
| 77 | plot2d rs1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit" |
---|
| 78 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 79 | setaxelabels "Freq. (MHz)" "Mean Median[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | ##Reduced Sigma of the median |
---|
| 83 | newwin 1 1 |
---|
| 84 | del rss0 rss1 |
---|
| 85 | objaoper sigmamedred row 0 rss0 |
---|
| 86 | objaoper sigmamedred row 1 rss1 |
---|
| 87 | graphicatt "xylimits=1250,1500,0,0.01" |
---|
| 88 | plot2d rss0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit" |
---|
| 89 | plot2d rss1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit" |
---|
| 90 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 91 | setaxelabels "Freq. (MHz)" "Sigma Median[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt |
---|
[553] | 92 | |
---|
| 93 | |
---|
| 94 | ##Normalized General Median |
---|
| 95 | del s0 s1 |
---|
| 96 | objaoper medianNorm row 0 s0 |
---|
| 97 | objaoper medianNorm row 1 s1 |
---|
| 98 | graphicatt "xylimits=1250,1500,-2,2" |
---|
| 99 | newwin 1 1 |
---|
| 100 | plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit" |
---|
| 101 | plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit" |
---|
| 102 | settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt |
---|
| 103 | setaxelabels "Freq. (MHz)" "Norm Median[(ON-OFF)[r,c]/Gain[r]]" $defatt |
---|
| 104 | |
---|
[552] | 105 | |
---|
| 106 | |
---|
| 107 | endif |
---|
| 108 | |
---|