IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 28, 2011, 6:41:17 PM (15 years ago)
Author:
watersc1
Message:

Majority of ippTools/SQL work should be complete now. Need to start queueing exposures, and testing the script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20110406/ippTools/share/laptool_inactiveexp.sql

    r31396 r31407  
    44      W.*,IFNULL(diff1.diff_id,diff2.diff_id) AS diff_id FROM (
    55    SELECT DISTINCT
    6         lap_id,tess_id,projection_cell,filter,lapRun.state as lapRun_state, lapRun.registered, lapRun.fault, labRun.label,
     6        lapRun.lap_id, lapRun.seq_id, lapRun.tess_id, lapRun.projection_cell, lapRun.filter, lapRun.state, lapRun.label,
     7        lapRun.dist_group, lapRun.registered, lapRun.fault, lapRun.quick_sass_id, lapRun.final_sass_id,
    78        lapExp.exp_id,lapExp.chip_id,lapExp.pair_id,private,pairwise,active,lapExp.data_state,
    89        chipRun.state as chipRun_state, sum(chipProcessedImfile.fault) as chip_faults, sum(chipProcessedImfile.quality) as chip_quality,
    9         camRun.state as camRun_state,   sum(camProcessedExp.fault) AS cam_faults, sum(camProcessedExp.quality) AS cam_quality,
    10         fakeRun.state as fakeRun_state, sum(fakeProcessedImfile.fault) as fake_faults,
    11         warpRun.state as warpRun_state, sum(warpSkyfile.fault) as warp_faults, sum(warpSkyfile.quality) as warp_quality,
     10        cam_id, camRun.state as camRun_state,   sum(camProcessedExp.fault) AS cam_faults, sum(camProcessedExp.quality) AS cam_quality,
     11        fake_id, fakeRun.state as fakeRun_state, sum(fakeProcessedImfile.fault) as fake_faults,
     12        warp_id, warpRun.state as warpRun_state, sum(warpSkyfile.fault) as warp_faults, sum(warpSkyfile.quality) as warp_quality,
    1213        warpRun.magicked
    1314    FROM lapRun JOIN lapExp USING(lap_id)
    14     JOIN chipRun USING(chip_id,exp_id)
    15     FROM chipRun JOIN chipProcessedImfile USING(chip_id)
     15    LEFT JOIN chipRun USING(chip_id)
     16    LEFT JOIN chipProcessedImfile USING(chip_id)
    1617    LEFT JOIN camRun USING(chip_id) LEFT JOIN camProcessedExp USING(cam_id)
    1718    LEFT JOIN fakeRun USING(cam_id) LEFT JOIN fakeProcessedImfile USING(fake_id)
     
    1920    WHERE lapExp.active = FALSE
    2021    AND @WHERE@
     22    GROUP BY lap_id,exp_id
    2123    ) AS W
    2224-- This was unreasonably slow in testing, so that's why I'm using a subquery here.
     
    2527) AS D
    2628LEFT JOIN diffRun USING(diff_id)
    27 JOIN lapExp AS others ON (D.chip_id = lapExp.chip_id AND D.lap_id != lapExp.lap_id)
    28 GROUP BY chip_id
     29JOIN lapExp AS others ON (D.chip_id = others.chip_id AND D.lap_id != others.lap_id)
     30GROUP BY lap_id,exp_id
Note: See TracChangeset for help on using the changeset viewer.