IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18668


Ignore:
Timestamp:
Jul 23, 2008, 10:24:23 AM (18 years ago)
Author:
Paul Price
Message:

Updating to match the various distributed parts.

File:
1 edited

Legend:

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

    r18663 r18668  
    1010--------------------------------------------------------------------
    1111
    12 
     12-- magictool_definebyquery_temp_create.sql
    1313CREATE TEMPORARY TABLE magicBestDiffs (
    1414exp_id BIGINT,
     
    2020
    2121
     22-- magictool_definebyquery_temp_insert.sql
    2223-- List of best differences for each exposure
    2324INSERT INTO magicBestDiffs
     
    4142JOIN diffSkyfile USING(diff_id)
    4243WHERE
    43     warpSkyfile.good_frac > 0.2 -- XXX Must update!
    44     AND diffSkyfile.good_frac > 0.2 -- XXX Must update!
    45     AND diffSkyfile.fault = 0
     44    diffSkyfile.fault = 0
     45-- magictool_definebyquery_temp_insert_groupby.sql
    4646GROUP BY
    4747    exp_id,
     
    5050
    5151
    52 -- Get list of exposures ready for magic
     52-- magictool_definebyquery_select_part1.sql
     53-- This is part 1 of 2 of a query to get a list of exposures on which magic may be performed
     54-- After this follows magictool_definebyquery_select_part2.sql
    5355SELECT
    5456    *
     
    6971        warpSkyfile.ignored = 0
    7072        AND warpRun.state = 'stop'
    71         AND warpSkyfile.good_frac > 0.2 -- XXX Must update!
     73    -- INSERT HERE any additional restrictions (e.g., exp_id, warpSkyfile.good_frac)
     74-- INSERT HERE magictool_definebyquery_select_part2.sql
     75-- magictool_definebyquery_select_part2.sql
     76-- This is part 2 of 2 of a query to get a list of exposures on which magic may be performed
     77-- This follows magictool_definebyquery_select_part1.sql
    7278    GROUP BY
    7379        exp_id
     
    8288        exp_id
    8389    ) AS magicDiffNums USING(exp_id)
     90LEFT JOIN magicRun USING(exp_id)
    8491WHERE
    8592    num_done = num_todo
    86 ;
     93    AND magicRun.magic_id IS NULL
    8794
    8895
     96-- magictool_definebyquery_insert.sql
    8997-- Insert the best list of diffs as magic inputs
    9098INSERT INTO magicInputSkyfile
    9199SELECT
    92     12345,
     100    @MAGIC_ID@, -- Update this with the appropriate magic_id
    93101    diff_id,
    94102    CONCAT(tess_id, '.', skycell_id) AS node
    95103FROM magicBestDiffs
    96 WHERE
    97     exp_id = 3;
Note: See TracChangeset for help on using the changeset viewer.