IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18574 for trunk/ippTools/share


Ignore:
Timestamp:
Jul 15, 2008, 7:55:19 PM (18 years ago)
Author:
Paul Price
Message:

Completely reworking stacktool -definebyquery in order to support automation of stacks. The processing (choosing the inputs) is all done in the database now. One call is made to get a list of skycells that should have new stacks made, and then additional calls are made to populate those. Selection of random subsets is now implemented (looks like it was commented out before), again with the processing in the database. Added new options that allow new stack runs to be triggered based on the number of new inputs (warps that haven't gone into a stack for that skycell). This allows it to be called over and over, only producing a new stack when it makes sense to do so (i.e., suitable for automation). Have made some informal tests, and seems to work.

Location:
trunk/ippTools/share
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/Makefile.am

    r18561 r18574  
    108108        regtool_revertprocessedexp.sql \
    109109        regtool_revertprocessedimfile.sql \
    110         stacktool_find_complete_warps.sql \
     110        stacktool_definebyquery_select.sql \
     111        stacktool_definebyquery_groupby.sql \
     112        stacktool_definebyquery_insert.sql \
     113        stacktool_definebyquery_insert_random.sql \
    111114        stacktool_inputskyfile.sql \
    112115        stacktool_revertsumskyfile.sql \
  • trunk/ippTools/share/stacktool_find_complete_warps.sql

    r18029 r18574  
    1     SELECT
    2         warp_id,
    3         warpSkyfile.skycell_id,
    4         warpSkyfile.tess_id
    5     FROM warpRun
    6     JOIN warpSkyfile
    7         USING(warp_id)
    8     JOIN fakeRun
    9         USING(fake_id)
    10     JOIN camRun
    11         USING(cam_id)
    12     JOIN chipRun
    13         USING(chip_id)
    14     JOIN rawExp
    15         USING(exp_id)
    16     WHERE
    17         warpRun.state = 'stop'
    18         AND warpSkyfile.ignored = 0
     1SELECT
     2    warpSkyfile.skycell_id,
     3    warpSkyfile.tess_id,
     4    stackRun.stack_id,
     5    COUNT(warpSkyfile.skycell_id) AS num_avail,
     6    COUNT(stackRun.stack_id) AS num_extant
     7FROM warpRun
     8JOIN warpSkyfile
     9    USING(warp_id, tess_id)
     10JOIN fakeRun
     11    USING(fake_id, tess_id)
     12JOIN camRun
     13    USING(cam_id, tess_id)
     14JOIN chipRun
     15    USING(chip_id, tess_id)
     16JOIN rawExp
     17    USING(exp_id, tess_id)
     18LEFT JOIN stackInputSkyfile
     19    ON warpSkyfile.warp_id = stackInputSkyfile.warp_id
     20LEFT JOIN stackRun
     21    ON stackRun.tess_id = warpSkyfile.tess_id
     22    AND stackRun.skycell_id = warpSkyfile.skycell_id
     23    AND stackRun.stack_id = stackInputSkyfile.stack_id
     24WHERE
     25    warpRun.state = 'stop'
     26    AND warpSkyfile.ignored = 0
     27GROUP BY
     28    warpSkyfile.skycell_id, warpSkyfile.tess_id, stackRun.stack_id
     29HAVING
     30    num_avail > num_extant
     31
    1932-- It seems like we should be grouping the results here but in fact we don't
    2033-- want to do that as each warp_id may contain multiple skycells.  So a warp_id
     
    2336--        warp_id
    2437
     38
     39INSERT INTO
     40        stackInputSkyfile(stack_id, warp_id)
     41SELECT
     42        13,
     43        warp_id
     44FROM warpSkyfile
     45WHERE
     46    skycell_id = 'new';
Note: See TracChangeset for help on using the changeset viewer.