IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of addstarPV3checks


Ignore:
Timestamp:
Nov 24, 2015, 12:09:25 PM (11 years ago)
Author:
heather
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • addstarPV3checks

    v1 v1  
     1This is take from Gene's email (see the bottom), and expanded.  We want to be able to verify that we have all the necessary inputs in the dvo. These are subdivided by stages:
     2
     3
     4== cam ==
     5
     6I started with cam stage, and expanded upon Gene's queries, which were correct, assuming no bad quality. 
     7
     8=== How many do we actually expect? ===
     9
     10First way involves finding the cam_ids with good quality and correct label (this is how addstar does this)
     11{{{
     12select  count(*) , camRun.state, camProcessedExp.fault, camProcessedExp.quality from camRun join
     13camProcessedExp using (cam_id) join chipRun using (chip_id) join chipImfile using (chip_id)  where
     14camRun.label = 'LAP.PV3.20140730.final' group by state, fault, quality;
     15}}}
     16
     17{{{
     18+----------+-------+-------+---------+
     19| count(*) | state | fault | quality |
     20+----------+-------+-------+---------+
     21| 22471179 | full  |     0 |       0 |
     22|    63120 | full  |     0 |    4007 |
     23+----------+-------+-------+---------+
     242 rows in set (25.17 sec)
     25}}}
     26
     27good to know. So the most number of chips expected is 22471179.  Similar query to get the number of exposures:
     28
     29{{{
     30mysql> select  count(*) , camRun.state, camProcessedExp.fault, camProcessedExp.quality from camRun
     31join camProcessedExp using (cam_id)  where camRun.label = 'LAP.PV3.20140730.final' group by state, fault, quality;
     32+----------+-------+-------+---------+
     33| count(*) | state | fault | quality |
     34+----------+-------+-------+---------+
     35|   374521 | full  |     0 |       0 |
     36|     1052 | full  |     0 |    4007 |
     37+----------+-------+-------+---------+
     382 rows in set (1.74 sec)
     39
     40}}}
     41
     42second way: What happens if we add in the chip quality as well (I don't think we check this when doing addstar, I think we could addstar in chips with bad attributes, but not sure):
     43{{{
     44select  count(*) , camRun.state, camProcessedExp.fault, camProcessedExp.quality,chipRun.state,
     45chipProcessedImfile.fault, chipProcessedImfile.quality from camRun join camProcessedExp using
     46(cam_id) join chipRun using (chip_id) join chipImfile using (chip_id) join chipProcessedImfile using
     47(chip_id, class_id) where camRun.label = 'LAP.PV3.20140730.final' group by camRun.state,
     48camProcessedExp.fault, camProcessedExp.quality, chipRun.state, chipProcessedImfile.fault,
     49chipProcessedImfile.quality;
     50}}}
     51ok, forgot that chipRun.state =!= full and there could be faults associated with cleanup.  That is less useful. I did a modified query here:
     52{{{
     53mysql> select  count(*) , camRun.state, camProcessedExp.fault, camProcessedExp.quality,chipRun.state,
     54chipProcessedImfile.fault, chipProcessedImfile.quality from camRun join camProcessedExp using (cam_id)
     55join chipRun using (chip_id) join chipImfile using (chip_id) join chipProcessedImfile using (chip_id, class_id)
     56where camRun.label = 'LAP.PV3.20140730.final' group by camRun.state, camProcessedExp.fault,
     57camProcessedExp.quality, chipProcessedImfile.quality;
     58+----------+-------+-------+---------+---------+-------+---------+
     59| count(*) | state | fault | quality | state   | fault | quality |
     60+----------+-------+-------+---------+---------+-------+---------+
     61| 22464764 | full  |     0 |       0 | cleaned |     0 |       0 |
     62|       14 | full  |     0 |       0 | cleaned |     0 |      42 |
     63|      424 | full  |     0 |       0 | cleaned |     0 |     257 |
     64|     5513 | full  |     0 |       0 | cleaned |     0 |    3012 |
     65|        6 | full  |     0 |       0 | cleaned |     0 |    3013 |
     66|    61418 | full  |     0 |    4007 | cleaned |     0 |       0 |
     67|        1 | full  |     0 |    4007 | cleaned |     0 |      42 |
     68|      813 | full  |     0 |    4007 | cleaned |     0 |     257 |
     69|      885 | full  |     0 |    4007 | cleaned |     0 |    3012 |
     70+----------+-------+-------+---------+---------+-------+---------+
     719 rows in set (1 min 30.91 sec)
     72}}}
     73
     74-- so roughly 6000 chips (with bad chip quality but good cam quality) were probably ingested.  I don't know the right answer for this.
     75
     76
     77=== what is currently in the dvo db ===
     78
     79{{{
     80mysql> select camRun.label,addRun.state, count(*) from camRun join chipRun using (chip_id) join chipImfile
     81using (chip_id) join addRun on (stage_id = cam_id and stage = 'cam') where addRun.dvodb = 'LAP.PV3.20140730'
     82group by camRun.label,addRun.state;
     83+------------------------+-------+----------+
     84| label                  | state | count(*) |
     85+------------------------+-------+----------+
     86| LAP.PV3.20140730.final | full  | 22466679 |
     87| LAP.PV3.20140730.final | new   |     4500 |
     88+------------------------+-------+----------+
     892 rows in set (29.52 sec)
     90}}}
     91ok, this gets everything that is currently in stage = 'cam' with dvodb = 'LAP.PV3.20140730' - this is label independent, so if things get shifted, it's not a problem... There are
     92
     9322466679 full + good, 4500 new + bad (most in a label flagged as 'investigate')
     9422471179 is what we expect from the camRun+chipImfile, and it is exactly what we get if we sum up the new and the old. This is good. :)
     95
     96=== The tldr answer ===
     97
     98There are '''22471179''' chips total that we expect from the camRun, of which '''22466679''' claim to be ingested in the database.  '''4500''' failed addstar stage.
     99
     100I can provide a list of the chip_imfiles --- I can also provide a list of chip_imfile, minidvodb_name to help figure out what's going on ...?
     101
     102
     103== skycal ==
     104
     105== fullforce ==
     106
     107== forcedgal ==
     108
     109== diff ==
     110
     111
     112
     113{{{
     114I have completed the dvomerge of the slices (not yet the parallel master) for the skycal stage (stacks). 
     115
     116i have put together code to check the contents of the image table in a dvo db compared with a list of externID
     117(eg, stackID, warpID, camID).  I have compared cam, sky, and ff.  I find the following:
     118
     1191) camera stage:
     120
     121I used the following sql to generate a list of chip_imfile_id which were processed by camRun under the PV3 final
     122label and then ingested via addstar into a sensible dvo:
     123
     124select chip_imfile_id from camRun join chipRun using (chip_id) join chipImfile using (chip_id) join addRun on
     125(stage_id = cam_id and stage = 'cam') where camRun.label = 'LAP.PV3.20140730.final' and addRun.label like 'LAP.PV3.%.cam'
     126
     127When I compare that to the externID values in the cam dvo database, I find 101656 chips are not in the dvo database. 
     128This is probably consistent with the chips for which the astrometry was deemed to be too poor to be ingested into
     129dvo, but some spot checks would be good. 
     130
     131When I do the selection for all chip_imfile_ids regardless of whether addRun was applied I find 67200 more entries. 
     132These are probably the one which have fault states at the camera stage, but again a double check is needed.
     133
     134I also find that there are still 118 duplicate chips -- there are ~2 duplicate exposures in the database which I forgot to remove.
     135
     1362) stack stage. 
     137
     138I used the following to generate a list of stackID which are in the PV3 final label and for which skycall was run:
     139
     140select stack_id from skycalRun join stackRun using (stack_id) where skycalRun.label = 'LAP.PV3.20140730.final'
     141
     142When I compare this list against the pv3.sky database, I find that all but 562 stack / skycall entries were ingested. 
     143There are no duplicates
     144
     1453) fullforce.
     146
     147I used the following sql to generate a list of all warp_skyfile_ids used by fullForce runs with the PV3 final label:
     148
     149select warp_skyfile_id from warpRun join warpImfile using (warp_id) join fullForceResult using (warp_id) join
     150fullForceRun using (ff_id) join skycalRun using (skycal_id) join stackRun using (stack_id, skycell_id) where
     151fullForceRun.label = 'LAP.PV3.20140730.ff01'
     152
     153Comparing this to the image table in the ff dvo, I find 450038 warp_skyfile_id which are missing.  When heather
     154has finished the addstar runs, I can check the merge of those image tables as well.
     155
     156}}}