Changeset 41722
- Timestamp:
- Jul 15, 2021, 3:54:04 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/tools/eam/teleff/camstats.sh (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/teleff/camstats.sh
r41721 r41722 83 83 84 84 # allow mag and pos histograms to have different bin sizes? 85 histogram dRs NdRs -0.5 0.5$HISTBIN -range dx86 histogram dDs NdDs -0.5 0.5$HISTBIN -range dx87 histogram dMs NdMs -0.5 0.5$HISTBIN -range dx85 histogram dRs NdRs {-50*$HISTBIN} {50*$HISTBIN} $HISTBIN -range dx 86 histogram dDs NdDs {-50*$HISTBIN} {50*$HISTBIN} $HISTBIN -range dx 87 histogram dMs NdMs {-50*$HISTBIN} {50*$HISTBIN} $HISTBIN -range dx 88 88 89 89 NdRs[0] = 0; NdRs[-1] = 0 … … 93 93 $C3 = 0.0 94 94 95 peak -q dx NdRs; $C0 = $peakpos; $C2 = $peaknum; $C1 = 3*$HISTBIN; vgauss dx NdRs con NdRf96 peak -q dx NdDs; $C0 = $peakpos; $C2 = $peaknum; $C1 = 3*$HISTBIN; vgauss dx NdDs con NdDf97 peak -q dx NdMs; $C0 = $peakpos; $C2 = $peaknum; $C1 = 3*$HISTBIN; vgauss dx NdMs con NdMf98 99 section aM; lim 13 23 -0.5 0.5; box $BST195 peak -q dx NdRs; $C0 = $peakpos; $C2 = $peaknum; $C1 = 2*$HISTBIN; vgauss dx NdRs con NdRf; $SigmaRA = abs($C1) 96 peak -q dx NdDs; $C0 = $peakpos; $C2 = $peaknum; $C1 = 2*$HISTBIN; vgauss dx NdDs con NdDf; $SigmaDec = abs($C1) 97 peak -q dx NdMs; $C0 = $peakpos; $C2 = $peaknum; $C1 = 2*$HISTBIN; vgauss dx NdMs con NdMf; $SigmaMag = abs($C1) 98 99 section aM; lim 13 23 {-50*$HISTBIN} {50*$HISTBIN}; box $BST1 100 100 plot CAL_PSF_MAG dM -pt box -sz 0.5 -op 0.2 where keepGood 101 101 label -x mag -y "&sd&h mag" 102 102 103 section aR; lim 13 23 -0.5 0.5; box $BST1103 section aR; lim 13 23 {-50*$HISTBIN} {50*$HISTBIN}; box $BST1 104 104 plot CAL_PSF_MAG dR -pt box -sz 0.5 -op 0.2 where keepGood 105 105 label -x mag -y "&sd&h R.A." 106 106 107 section aD; lim 13 23 -0.5 0.5; box $BST1107 section aD; lim 13 23 {-50*$HISTBIN} {50*$HISTBIN}; box $BST1 108 108 plot CAL_PSF_MAG dD -pt box -sz 0.5 -op 0.2 where keepGood 109 109 label -x mag -y "&sd&h Dec" … … 113 113 plot dx NdMf -x line -c red -lw 2 114 114 label -x "&sd&h mag" +y "N (15 < mag < 17)" 115 sprintf line "&ss&h (mag) = %.0f mmag" {1000*$SigmaMag}; textline -frac 0.02 0.95 -justify 5 "$line" 115 116 116 117 section bR; lim dx NdRs; box $BST2 … … 118 119 plot dx NdRf -x line -c red -lw 2 119 120 label -x "&sd&h R.A" +y "N (15 < mag < 17)" 121 sprintf line "&ss&h (mag) = %.0f mas" {1000*$SigmaRA}; textline -frac 0.02 0.95 -justify 5 "$line" 120 122 121 123 section bD; lim dx NdDs; box $BST2 … … 123 125 plot dx NdDf -x line -c red -lw 2 124 126 label -x "&sd&h Dec" +y "N (15 < mag < 17)" 127 sprintf line "&ss&h (Dec) = %.0f mas" {1000*$SigmaDec}; textline -frac 0.02 0.95 -justify 5 "$line" 125 128 end 126 129 … … 153 156 lim magBin -0.02 1.02; box $BSTY -ticks 1110; 154 157 158 plot -x hist magBin fracPoss -lw 3 -c blue70 155 159 plot -x hist magBin fracFound -lw 3 -c red70 156 plot -x hist magBin fracPoss -lw 3 -c blue70157 160 plot -x hist magBin fracGood -lw 3 -c red 158 161 159 subset tmp = fracGood where (magBin > 15) && (magBin < 20); vstat -q tmp; $FracBrightGood = $MEDIAN160 162 subset tmp = fracPoss where (magBin > 15) && (magBin < 20); vstat -q tmp; $FracBrightPoss = $MEDIAN 161 163 subset tmp = fracFound where (magBin > 15) && (magBin < 20); vstat -q tmp; $FracBrightFound = $MEDIAN 162 163 line -c red -lt dot -lw 2 100 $FracBrightGood to 0 $FracBrightGood 164 line -c blue -lt dot -lw 2 100 $FracBrightPoss to 0 $FracBrightPoss 164 subset tmp = fracGood where (magBin > 15) && (magBin < 20); vstat -q tmp; $FracBrightGood = $MEDIAN 165 166 line -c blue70 -lt dot -lw 2 100 $FracBrightPoss to 0 $FracBrightPoss 167 line -c red70 -lt dot -lw 2 100 $FracBrightFound to 0 $FracBrightFound 168 line -c red -lt dot -lw 2 100 $FracBrightGood to 0 $FracBrightGood 165 169 166 170 fprintf "%.1f-pct of all bright sources were detected unmasked" {100*$FracBrightGood} 167 171 fprintf "%.1f-pct of unmasked bright sources were found" {100*$FracBrightFound / $FracBrightPoss} 168 172 fprintf "%.1f-pct of unmasked bright sources were detected unmasked" {100*$FracBrightGood / $FracBrightPoss} 173 169 174 fprintf "mag limit %.1f" $MagLim 175 sprintf line "mag limit: %.1f" $MagLim 176 textline -frac 0.95 0.95 -justify 3 "$line" 170 177 171 178 label -x mag -y "detected fraction" … … 181 188 label +y "detected number" 182 189 190 vstat -q numTotal; $Ntotal = $TOTAL 183 191 vstat -q numFound; $Nfound = $TOTAL 184 192 vstat -q numGood; $Ngood = $TOTAL 185 193 186 fprintf "%d total sources detected, %d unmasked" $Nfound $Ngood 187 188 $Xlegend = 0.02; $dXlegend = 0.03 189 $Ylegend = 0.95; $dYlegend = 0.02 190 line -frac $Xlegend $Ylegend to {$Xlegend + $dXlegend} $Ylegend -c blue -lw 3; textline -frac -justify 5 {$Xlegend + $dXlegend + 0.01} $Ylegend "unmasked source positions (psfqf > 0.85)"; $Ylegend -= $dYlegend 191 line -frac $Xlegend $Ylegend to {$Xlegend + $dXlegend} $Ylegend -c red70 -lw 3; textline -frac -justify 5 {$Xlegend + $dXlegend + 0.01} $Ylegend "all sources detected" ; $Ylegend -= $dYlegend 192 line -frac $Xlegend $Ylegend to {$Xlegend + $dXlegend} $Ylegend -c red -lw 3; textline -frac -justify 5 {$Xlegend + $dXlegend + 0.01} $Ylegend "sources detected with psfqf > 0.85" 194 fprintf "%d of %d total sources detected, %d unmasked" $Nfound $Ntotal $Ngood 195 196 legend.init 0.02 0.95 0.03 0.02 197 sprintf line "unmasked source positions (psfqf > 0.85) [%.1f pct]" {100*$FracBrightPoss}; legend.line blue 3 solid "$line" 198 sprintf line "all sources detected [%.1f pct]" {100*$FracBrightFound}; legend.line red70 3 solid "$line" 199 sprintf line "sources detected with psfqf > 0.85 [%.1f pct]" {100*$FracBrightGood}; legend.line red 3 solid "$line" 200 end 201 202 macro legend.init 203 if ($0 != 5) 204 echo "USAGE: legend.init (X) (Y) (dX) (dY)" 205 break 206 end 207 208 $legend:X = $1; $legend:dX = $3 209 $legend:Y = $2; $legend:dY = $4 210 end 211 212 macro legend.line 213 if ($0 != 5) 214 echo "USAGE: legend.init (color) (lweight) (ltype) (label)" 215 break 216 end 217 218 local color myline mylt mylw 219 220 $color = $1 221 $mylt = $2 222 $mylw = $3 223 $myline = $4 224 225 line -frac $legend:X $legend:Y to {$legend:X + $legend:dX} $legend:Y -c $color -lw $mylw -lt $mylt 226 textline -frac -justify 5 {$legend:X + $legend:dX + 0.01} $legend:Y "$myline" 227 $legend:Y -= $legend:dY 193 228 end 194 229
Note:
See TracChangeset
for help on using the changeset viewer.
