IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2009, 4:07:48 PM (17 years ago)
Author:
Paul Price
Message:

Reworking magic (and some diff) to be ready for performing magic on warp-warp diffs. Several database changes to diff and magic tables because we can no longer assume that a diff is associated with a single exposure. Ready for testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_magic/ippTools/share/magictool_toprocess_inputs.sql

    r23971 r24149  
    1 SELECT * FROM
    2 (SELECT
     1SELECT
    32    magicTree.*,
     3    magicRun.workdir,
    44    rawExp.exp_id,
    55    rawExp.camera,
    6 --    diffSkyfile.path_base,
    7     magicRun.workdir,
    86    -- convert magic_id into a boolean value (1 or 0)
    97    -- note that the type stays a 64 bit int
    10     magicNodeResult.magic_id IS TRUE as done,
    11     magicNodeResult.fault IS TRUE as bad,
    12     warpSkyfile.uri as template_uri
     8    magicNodeResult.magic_id IS TRUE AS done,
     9    magicNodeResult.fault IS TRUE AS bad
    1310FROM magicTree
    1411JOIN magicRun USING(magic_id)
    15 JOIN magicInputSkyfile USING(magic_id, node)
    16 JOIN diffSkyfile
    17     ON magicInputSkyfile.diff_id = diffSkyfile.diff_id
    18     AND magicInputSkyfile.node = diffSkyfile.skycell_id
    19 JOIN diffInputSkyfile
    20     ON diffSkyfile.diff_id = diffInputSkyfile.diff_id
    21     AND diffSkyfile.skycell_id = diffInputSkyfile.skycell_id
    22 JOIN warpSkyfile
    23     ON diffInputSkyfile.warp2 = warpSkyfile.warp_id
    24     AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id
    2512JOIN rawExp USING(exp_id)
    2613LEFT JOIN magicNodeResult
     
    3118    AND magicNodeResult.magic_id IS NULL
    3219    AND magicNodeResult.node IS NULL
    33     -- where hook 1 %s
    34 UNION
    35 SELECT
    36     magicTree.*,
    37     rawExp.exp_id,
    38     rawExp.camera,
    39 --    diffSkyfile.path_base,
    40     magicRun.workdir,
    41     -- convert magic_id into a boolean value (1 or 0)
    42     -- note that the type stays a 64 bit int
    43     magicNodeResult.magic_id IS TRUE as done,
    44     magicNodeResult.fault IS TRUE as bad,
    45     stackSumSkyfile.uri as template_uri
    46 FROM magicTree
    47 JOIN magicRun USING(magic_id)
    48 JOIN magicInputSkyfile USING(magic_id, node)
    49 JOIN diffSkyfile
    50     ON magicInputSkyfile.diff_id = diffSkyfile.diff_id
    51     AND magicInputSkyfile.node = diffSkyfile.skycell_id
    52 JOIN diffInputSkyfile
    53     ON diffSkyfile.diff_id = diffInputSkyfile.diff_id
    54     AND diffSkyfile.skycell_id = diffInputSkyfile.skycell_id
    55 JOIN stackSumSkyfile
    56     ON diffInputSkyfile.stack2 = stackSumSkyfile.stack_id
    57 JOIN rawExp USING(exp_id)
    58 LEFT JOIN magicNodeResult
    59     ON magicTree.magic_id = magicNodeResult.magic_id
    60     AND magicTree.node = magicNodeResult.node
    61 WHERE
    62     magicRun.state = 'new'
    63     AND magicNodeResult.magic_id IS NULL
    64     AND magicNodeResult.node IS NULL
    65     -- where hook 2 %s
    66 ) as foo
     20-- WHERE hook %s
Note: See TracChangeset for help on using the changeset viewer.