IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 4 and Version 5 of SAS9DataIntegrity


Ignore:
Timestamp:
Oct 4, 2012, 2:57:03 PM (14 years ago)
Author:
heather
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SAS9DataIntegrity

    v4 v5  
    115115
    116116
     117== PSPS Integrity Checks II ==
     118
     119These checks are similar to stsci but involve a small area of small area survey (this prevents edge problems).
     120
     121first make 3 tables containing just the ra/dec range:
     122
     123{{{
     124select 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
     125select 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
     126select 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
     129do various queries to find counts:
     130
     131{{{
     132select sum(ndetections), sum(ng), sum(nr), sum(ni), sum(nz), sum(ny) from sas9objects2
     133select count(*)  from sas9stacks2
     134select count(*), filterID  from sas9stacks2 group by filterID
     135select count(*) from sas9detects2
     136select count(*), filterID  from sas9detects2 group by filterID
     137}}}
     138
     139results:
     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
     149This 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.
    117150
    118151
    119