IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2009, 10:51:43 AM (17 years ago)
Author:
bills
Message:

handle bothways (warp-warp) diffs separate from not bothways

File:
1 edited

Legend:

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

    r24735 r25013  
    88    camera,
    99    magicMask.uri as streaks_uri,
     10    NULL AS inv_streaks_uri,
    1011    stage,
    1112    stage_id,
     
    4041    camera,
    4142    magicMask.uri as streaks_uri,
     43    NULL AS inv_streaks_uri,
    4244    stage,
    4345    stage_id,
     
    7779    camera,
    7880    magicMask.uri as streaks_uri,
     81    NULL AS inv_streaks_uri,
    7982    stage,
    8083    stage_id,
     
    115118    camera,
    116119    magicMask.uri as streaks_uri,
     120    NULL AS inv_streaks_uri,
    117121    stage,
    118122    stage_id,
     
    143147    AND magicDSFile.component IS NULL
    144148UNION
    145 -- diffSkyfiles
     149-- regular diffSkyfiles
    146150SELECT DISTINCT
    147151    magicDSRun.magic_ds_id,
     
    151155    rawExp.camera,
    152156    magicMask.uri as streaks_uri,
     157    NULL AS inv_streaks_uri,
    153158    stage,
    154159    magicRun.diff_id as stage_id,
     
    167172JOIN magicDSRun USING(magic_id)
    168173JOIN magicInputSkyfile USING(magic_id)
     174JOIN diffRun USING(diff_id)
    169175JOIN diffSkyfile
    170176    ON  magicRun.diff_id = diffSkyfile.diff_id
     
    176182    magicDSRun.state = 'new'
    177183    AND magicDSRun.stage = 'diff'
     184    AND diffRun.bothways = 0
    178185    AND diffSkyfile.fault = 0
    179186    AND diffSkyfile.quality = 0
    180187    AND magicDSFile.component IS NULL
     188-- bothways diffSkyfiles
     189UNION
     190SELECT DISTINCT
     191    magicDSRun.magic_ds_id,
     192    magicRun.magic_id,
     193    magicRun.exp_id,
     194    magicDSRun.label,
     195    rawExp.camera,
     196    magicMask.uri as streaks_uri,
     197    (SELECT uri from magicMask where magic_id = inv_magic_id) AS inv_streaks_uri,
     198    stage,
     199    magicRun.diff_id as stage_id,
     200    diffSkyfile.skycell_id as component,
     201    NULL AS uri,
     202    diffSkyfile.path_base,
     203    magicRun.inverse,
     204    NULL as cam_path_base,
     205    outroot,
     206    recoveryroot,
     207    re_place,
     208    remove
     209FROM rawExp
     210JOIN magicRun USING (exp_id)
     211JOIN magicMask USING (magic_id)
     212JOIN magicDSRun USING(magic_id)
     213JOIN magicInputSkyfile USING(magic_id)
     214JOIN diffRun USING(diff_id)
     215JOIN diffSkyfile
     216    ON  magicRun.diff_id = diffSkyfile.diff_id
     217    AND magicInputSkyfile.node = diffSkyfile.skycell_id
     218LEFT JOIN magicDSFile
     219    ON magicDSRun.magic_ds_id = magicDSFile.magic_ds_id
     220    AND magicDSFile.component = diffSkyfile.skycell_id
     221WHERE
     222    magicDSRun.state = 'new'
     223    AND magicDSRun.stage = 'diff'
     224    AND diffRun.bothways
     225    AND diffSkyfile.fault = 0
     226    AND diffSkyfile.quality = 0
     227    AND magicDSFile.component IS NULL
    181228) as Foo
Note: See TracChangeset for help on using the changeset viewer.