IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35672 for trunk/ippTools/share


Ignore:
Timestamp:
Jun 18, 2013, 1:46:43 PM (13 years ago)
Author:
bills
Message:

fix errors in defining and running warp_bg and chip_bg runs

Location:
trunk/ippTools/share
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/bgtool_advancechip.sql

    r28486 r35672  
    33    chipBackgroundImfile.magicked
    44FROM chipBackgroundRun
    5 JOIN chipProcessedImfile USING(chip_id)
    6 LEFT JOIN chipBackgroundImfile USING(chip_bg_id, class_id)
     5JOIN camRun using(cam_id)
     6JOIN chipProcessedImfile ON chipBackgroundRun.chip_id = chipProcessedImfile.chip_id
     7JOIN chipRun AS bgsub_chipRun on camRun.chip_id = bgsub_chipRun.chip_id
     8JOIN chipProcessedImfile AS bgsub_chipProcessedImfile
     9    ON (bgsub_chipRun.chip_id = bgsub_chipProcessedImfile.chip_id
     10        AND bgsub_chipProcessedImfile.class_id = chipProcessedImfile.class_id)
     11LEFT JOIN chipBackgroundImfile
     12    ON (chipBackgroundRun.chip_bg_id = chipBackgroundImfile.chip_bg_id
     13        AND chipBackgroundImfile.class_id = chipProcessedImfile.class_id)
    714WHERE chipBackgroundRun.state = 'new'
    815    AND chipProcessedImfile.quality = 0
    916    AND chipProcessedImfile.fault = 0
     17    AND bgsub_chipProcessedImfile.quality = 0
    1018-- WHERE hook %s
    11 GROUP BY chip_bg_id
     19GROUP BY chipBackgroundRun.chip_bg_id
    1220HAVING
    1321    COUNT(chipBackgroundImfile.class_id) = COUNT(chipProcessedImfile.class_id)
  • trunk/ippTools/share/bgtool_definewarp.sql

    r35154 r35672  
    1515JOIN chipBackgroundRun ON chipRun.chip_id = chipBackgroundRun.chip_id
    1616    AND (chipBackgroundRun.cam_id = camRun.cam_id OR chipBackgroundRun.cam_id = 0)
    17 LEFT JOIN warpBackgroundRun ON chipBackgroundRun.chip_bg_id = warpBackgroundRun.warp_bg_id -- label hook %s
     17LEFT JOIN warpBackgroundRun ON chipBackgroundRun.chip_bg_id = warpBackgroundRun.chip_bg_id -- label hook %s
    1818WHERE chipBackgroundRun.state = 'full'
    1919    AND warpRun.state IN ('full', 'cleaned', 'goto_cleaned') -- need warp to have completed so warpSkyCellMap is populated
  • trunk/ippTools/share/bgtool_tochip.sql

    r35154 r35672  
    11SELECT
    22    chipBackgroundRun.*,
    3     class_id,
     3    chipProcessedImfile.class_id,
    44    rawExp.exp_tag,
    55    rawExp.camera
     
    88JOIN rawExp USING(exp_id)
    99JOIN chipProcessedImfile USING(chip_id)
    10 LEFT JOIN chipBackgroundImfile USING(chip_bg_id, class_id)
     10JOIN camRun using(cam_id)
     11JOIN chipRun AS bgsub_chipRun on camRun.chip_id = bgsub_chipRun.chip_id
     12JOIN chipProcessedImfile AS bgsub_chipProcessedImfile
     13    ON (bgsub_chipRun.chip_id = bgsub_chipProcessedImfile.chip_id
     14        AND bgsub_chipProcessedImfile.class_id = chipProcessedImfile.class_id)
     15LEFT JOIN chipBackgroundImfile 
     16    ON (chipBackgroundRun.chip_bg_id = chipBackgroundImfile.chip_bg_id
     17        AND chipBackgroundImfile.class_id = chipProcessedImfile.class_id)
    1118LEFT JOIN Label ON chipBackgroundRun.label = Label.label
    1219WHERE chipBackgroundImfile.chip_bg_id IS NULL
     
    1421    AND chipProcessedImfile.fault = 0
    1522    AND chipProcessedImfile.quality = 0
     23    AND bgsub_chipProcessedImfile.quality = 0
    1624    AND (Label.active OR Label.active IS NULL)
    1725-- WHERE hook %s
Note: See TracChangeset for help on using the changeset viewer.