| | 117 | == PSPS Integrity Checks II == |
| | 118 | |
| | 119 | These checks are similar to stsci but involve a small area of small area survey (this prevents edge problems). |
| | 120 | |
| | 121 | first make 3 tables containing just the ra/dec range: |
| | 122 | |
| | 123 | {{{ |
| | 124 | select ippobjid, ra, dec, ndetections, ng, nr, ni,nz, ny INTO mydb.sas9objects2 from Object where (ra >= 333 and ra <= 335 and dec >= -1 and dec <=1) and ndetections > -999 |
| | 125 | select ippobjid, filterID, ra, dec, calMag, calMagerr into mydb.sas9detects2 from DetectionFull where (ra >= 333 and ra <= 335 and dec >= -1 and dec <=1) and ndetections > -999 |
| | 126 | select ippobjid, filterID, ra, dec, calMag, calMagerr into mydb.sas9stacks2 from stackDetectionFull where (ra >= 333 and ra <= 335 and dec >= -1 and dec <=1) |
| | 127 | }}} |
| | 128 | |
| | 129 | do various queries to find counts: |
| | 130 | |
| | 131 | {{{ |
| | 132 | select sum(ndetections), sum(ng), sum(nr), sum(ni), sum(nz), sum(ny) from sas9objects2 |
| | 133 | select count(*) from sas9stacks2 |
| | 134 | select count(*), filterID from sas9stacks2 group by filterID |
| | 135 | select count(*) from sas9detects2 |
| | 136 | select count(*), filterID from sas9detects2 group by filterID |
| | 137 | }}} |
| | 138 | |
| | 139 | results: |
| | 140 | |
| | 141 | || filter || sum(nfilter) on objects || count(stacks) || count(p2) || count(stacks) + count(p2) || comments || |
| | 142 | || all || 4933667 sum(ndetection) || 887726 || 3193652 || 4081378 || we expect : sum(ng) + sum(nr) + sum(ni) + sum(nz) + sum(ny) = sum(ndetections) = count(stacks) + count(p2) => '''4897069 != 4933667 != 4081378 '''|| |
| | 143 | || g || 686619 || 176180 || 454940 || 630670 || we expect : sum(ng) = count(g stacks) + count(g p2) => '''686619 != 630670 '''|| |
| | 144 | || r || 1229420 || 179934 || 701316 || 881250 ||'''1229420 != 881250''' || |
| | 145 | || i || 1214388 || 199140 || 898436 || 1097576 ||'''1214388!= 1097576''' || |
| | 146 | || z || 1097161 || 174063 || 685355 || 859418 ||'''1097161!=859418''' || |
| | 147 | || y || 669481 || 158409 || 453605 || 612014 ||'''669481!= 612014 '''|| |
| | 148 | |
| | 149 | This integrity fails on all levels. ng/nr/ni/nz/ny are all less than what we get from the sums of stacks and detections for those filters, and ndetection != ng + nr + ni + nz + ny. These are set in the dvo. Heather suspects this is a dvo problem. |