IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 11, 2011, 4:29:48 PM (15 years ago)
Author:
watersc1
Message:

Trying to merge back into trunk.

Location:
branches/czw_branch/20101203
Files:
22 edited
3 copied

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20101203

  • branches/czw_branch/20101203/ippTools/share/Makefile.am

    r29908 r30586  
    246246        magictool_exposure.sql \
    247247        magictool_setfull.sql \
     248        magictool_setgotocleaned.sql \
     249        magictool_tocleanup.sql \
    248250        magicdstool_clearstatefaults.sql \
    249251        magicdstool_change_file_data_state.sql \
     
    333335        regtool_updatebyqueryimfile.sql \
    334336        regtool_pendingburntoolimfile.sql \
     337        regtool_checkstatus.sql \
    335338        stacktool_associationdefine_select.sql \
    336339        stacktool_definebyquery_insert.sql \
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_SSdiff.sql

    r27027 r30586  
    1717    diffSkyfile.quality,
    1818    distRun.no_magic,
    19     0 AS magicked
     19    0 AS magicked,
     20    IFNULL(Label.priority, 10000) AS priority
    2021FROM distRun
    2122JOIN distTarget USING(target_id, stage, clean)
     
    4243    ON distRun.dist_id = distComponent.dist_id
    4344    AND diffSkyfile.skycell_id = distComponent.component
     45LEFT JOIN Label ON distRun.label = Label.label
    4446WHERE
    4547    distRun.state = 'new'
     
    4850    AND ((diffRun.magicked > 0) OR distRun.no_magic)
    4951    AND (diffRun.state = 'full' OR (distRun.clean AND diffRun.state = 'cleaned'))
     52    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_camera.sql

    r29509 r30586  
    1515    camProcessedExp.quality,
    1616    distRun.no_magic,
    17     chipRun.magicked
     17    chipRun.magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    2122JOIN camProcessedExp USING(cam_id)
    2223JOIN chipRun USING(chip_id)
    23 -- JOIN chipProcessedImfile USING(exp_id, chip_id)
    2424JOIN rawExp using(exp_id)
    2525LEFT JOIN distComponent
    2626    ON distRun.dist_id = distComponent.dist_id
    27 --    AND chipProcessedImfile.class_id = distComponent.component
     27LEFT JOIN Label
     28    ON distRun.label = Label.label
    2829WHERE
    2930    distRun.state = 'new'
    3031    AND distRun.stage = 'camera'
    3132    AND distComponent.dist_id IS NULL
    32     AND (((clean OR (chipRun.magicked > 0)) AND (camRun.magicked > 0)) OR distRun.no_magic)
     33    AND (((clean OR (chipRun.magicked != 0)) AND (camRun.magicked > 0)) OR distRun.no_magic)
    3334    AND (camRun.state = 'full' OR (distRun.clean AND camRun.state = 'cleaned'))
     35    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_chip.sql

    r26567 r30586  
    1515    chipProcessedImfile.quality,
    1616    distRun.no_magic,
    17     chipProcessedImfile.magicked
     17    chipProcessedImfile.magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    2425    ON distRun.dist_id = distComponent.dist_id
    2526    AND chipProcessedImfile.class_id = distComponent.component
     27LEFT JOIN Label
     28    ON distRun.label = Label.label
    2629WHERE
    2730    distRun.state = 'new'
     
    3033    AND ((chipRun.magicked > 0) OR distRun.no_magic)
    3134    AND (chipRun.state = 'full' OR (distRun.clean AND chipRun.state = 'cleaned'))
     35    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_chip_bg.sql

    r28730 r30586  
    1515    0 AS quality,
    1616    distRun.no_magic,
    17     chipBackgroundImfile.magicked
     17    chipBackgroundImfile.magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    2526    ON distRun.dist_id = distComponent.dist_id
    2627    AND chipBackgroundImfile.class_id = distComponent.component
     28LEFT JOIN Label ON distRun.label = Label.label
    2729WHERE
    2830    distRun.state = 'new'
     
    3133    AND ((chipBackgroundRun.magicked > 0) OR distRun.no_magic)
    3234    AND (chipBackgroundRun.state = 'full')
     35    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_diff.sql

    r26567 r30586  
    1717    diffSkyfile.quality,
    1818    distRun.no_magic,
    19     diffSkyfile.magicked
     19    diffSkyfile.magicked,
     20    IFNULL(Label.priority, 10000) AS priority
    2021FROM distRun
    2122JOIN distTarget USING(target_id, stage, clean)
     
    3233    ON distRun.dist_id = distComponent.dist_id
    3334    AND diffSkyfile.skycell_id = distComponent.component
     35LEFT JOIN Label ON distRun.label = Label.label
    3436WHERE
    3537    distRun.state = 'new'
     
    3840    AND ((diffRun.magicked > 0) OR distRun.no_magic)
    3941    AND (diffRun.state = 'full' OR (distRun.clean AND diffRun.state = 'cleaned'))
     42    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_fake.sql

    r27458 r30586  
    1515    0 as quality,
    1616    distRun.no_magic,
    17     0 as magicked
     17    0 as magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    2627    ON distRun.dist_id = distComponent.dist_id
    2728    AND fakeProcessedImfile.class_id = distComponent.component
     29LEFT JOIN Label ON distRun.label = Label.label
    2830WHERE
    2931    distRun.state = 'new'
    3032    AND distRun.stage = 'fake'
    3133    AND distComponent.dist_id IS NULL
     34    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_raw.sql

    r27457 r30586  
    1717    0 as quality,
    1818    distRun.no_magic,
    19     rawImfile.magicked
     19    rawImfile.magicked,
     20    IFNULL(Label.priority, 10000) AS priority
    2021FROM distRun
    2122JOIN distTarget USING(target_id, stage, clean)
     
    2829    ON distRun.dist_id = distComponent.dist_id
    2930    AND rawImfile.class_id = distComponent.component
     31LEFT JOIN Label ON distRun.label = Label.label
    3032WHERE
    3133    distRun.state = 'new'
     
    3436    AND distComponent.dist_id IS NULL
    3537    AND (rawExp.magicked OR distRun.no_magic)
     38    AND (Label.active OR Label.active IS NULL)
    3639UNION
    3740    -- raw stage alternate inputs
     
    5457    0 as quality,
    5558    distRun.no_magic,
    56     rawImfile.magicked
     59    rawImfile.magicked,
     60    IFNULL(Label.priority, 10000) AS priority
    5761FROM distRun
    5862JOIN distTarget USING(target_id, stage, clean)
     
    6872    ON distRun.dist_id = distComponent.dist_id
    6973    AND rawImfile.class_id = distComponent.component
     74LEFT JOIN Label ON distRun.label = Label.label
    7075WHERE
    7176    distRun.state = 'new'
     
    7479    AND chipProcessedImfile.data_state = 'full'
    7580    AND chipProcessedImfile.magicked > 0
     81    AND (Label.active OR Label.active IS NULL)
    7682UNION
    7783    -- raw stage clean (dbinfo only)
     
    9399    0 as quality,
    94100    distRun.no_magic,
    95     rawExp.magicked
     101    rawExp.magicked,
     102    IFNULL(Label.priority, 10000) AS priority
    96103FROM distRun
    97104JOIN distTarget USING(target_id, stage, clean)
     
    99106LEFT JOIN distComponent
    100107    ON distRun.dist_id = distComponent.dist_id
     108LEFT JOIN Label ON distRun.label = Label.label
    101109WHERE
    102110    distRun.state = 'new'
     
    104112    AND distRun.clean
    105113    AND distComponent.dist_id IS NULL
     114    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_sky.sql

    r28959 r30586  
    1515    staticskyResult.quality,
    1616    1 AS no_magic,
    17     0 AS magicked
     17    0 AS magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    4344    ON distRun.dist_id = distComponent.dist_id
    4445    AND stackRun.skycell_id = distComponent.component
     46LEFT JOIN Label ON distRun.label = Label.label
    4547WHERE
    4648    distRun.state = 'new'
     
    4951    AND (staticskyRun.state = 'full' OR (distRun.clean AND staticskyRun.state = 'cleaned'))
    5052    AND (staticskyResult.fault = 0 AND staticskyResult.quality = 0)
     53    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_stack.sql

    r25838 r30586  
    1717    stackSumSkyfile.quality,
    1818    1 AS no_magic,
    19     0 AS magicked
     19    0 AS magicked,
     20    IFNULL(Label.priority, 10000) AS priority
    2021FROM distRun
    2122JOIN distTarget USING(target_id, stage, clean)
     
    4344    ON distRun.dist_id = distComponent.dist_id
    4445    AND stackRun.skycell_id = distComponent.component
     46LEFT JOIN Label ON distRun.label = Label.label
    4547WHERE
    4648    distRun.state = 'new'
     
    4951    AND (stackRun.state = 'full' OR (distRun.clean AND stackRun.state = 'cleaned'))
    5052    AND (stackSumSkyfile.fault = 0 AND stackSumSkyfile.quality = 0)
     53    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_warp.sql

    r26567 r30586  
    1515    warpSkyfile.quality,
    1616    distRun.no_magic,
    17     warpSkyfile.magicked
     17    warpSkyfile.magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    2728    ON distRun.dist_id = distComponent.dist_id
    2829    AND warpSkyfile.skycell_id = distComponent.component
     30LEFT JOIN Label ON distRun.label = Label.label
    2931WHERE
    3032    distRun.state = 'new'
     
    3335    AND ((warpRun.magicked > 0) OR distRun.no_magic)
    3436    AND (warpRun.state = 'full' OR (distRun.clean AND warpRun.state = 'cleaned'))
     37    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_pending_warp_bg.sql

    r28742 r30586  
    1515    0 as quality,
    1616    distRun.no_magic,
    17     warpBackgroundSkyfile.magicked
     17    warpBackgroundSkyfile.magicked,
     18    IFNULL(Label.priority, 10000) AS priority
    1819FROM distRun
    1920JOIN distTarget USING(target_id, stage, clean)
     
    2829    ON distRun.dist_id = distComponent.dist_id
    2930    AND warpBackgroundSkyfile.skycell_id = distComponent.component
     31LEFT JOIN Label ON distRun.label = Label.label
    3032WHERE
    3133    distRun.state = 'new'
     
    3436    AND ((warpBackgroundRun.magicked > 0) OR distRun.no_magic)
    3537    AND (warpBackgroundRun.state = 'full')
     38    AND (Label.active OR Label.active IS NULL)
  • branches/czw_branch/20101203/ippTools/share/disttool_revertrun.sql

    r26266 r30586  
    11UPDATE distRun
    22SET distRun.fault = 0
    3 WHERE distRun.state = 'new'
     3WHERE (distRun.state = 'new' OR distRun.state = 'goto_cleaned')
    44    AND distRun.fault != 0
  • branches/czw_branch/20101203/ippTools/share/magicdstool_todestreak_camera.sql

    r29561 r30586  
    3838    AND magicDSRun.stage = 'camera'
    3939    AND camRun.state = 'full'
    40     AND chipRun.state = 'full'
    41     AND chipRun.magicked
     40    AND ((chipRun.state = 'full' AND chipRun.magicked > 0)
     41         OR (chipRun.state = 'cleaned' AND chipRun.magicked < 0))
    4242    AND camProcessedExp.fault = 0
    4343    AND camProcessedExp.quality = 0
  • branches/czw_branch/20101203/ippTools/share/magicdstool_torevert_diff.sql

    r27945 r30586  
    1010    outroot,
    1111    diffSkyfile.path_base,
     12    magicDSFile.backup_path_base,
     13    magicDSFile.recovery_path_base,
    1214    "NULL" AS cam_path_base,
    1315    CAST(diffRun.bothways AS SIGNED) AS bothways,
  • branches/czw_branch/20101203/ippTools/share/pstamptool_pendingreq.sql

    r27874 r30586  
    33    pstampRequest.*,
    44    pstampDataStore.outProduct AS ds_outProduct,
     5    IFNULL(pstampDataStore.need_magic, 1) AS need_magic,
    56    IFNULL(Label.priority, 10000) AS priority
    67FROM pstampRequest
  • branches/czw_branch/20101203/ippTools/share/pubtool_pending.sql

    r30118 r30586  
    1010        publishClient.workdir,
    1111        publishClient.output_format,
     12        publishClient.magicked AS need_magic,
    1213        diffRun.diff_id AS stage_id,
    1314        rawExp.camera,
     
    3738        publishClient.workdir,
    3839        publishClient.output_format,
     40        publishClient.magicked AS need_magic,
    3941        camRun.cam_id AS stage_id,
    4042        rawExp.camera,
     
    5961        publishClient.workdir,
    6062        publishClient.output_format,
     63        publishClient.magicked AS need_magic,
    6164        diffPhotRun.diff_phot_id AS stage_id,
    6265        rawExp.camera,
  • branches/czw_branch/20101203/ippTools/share/pxadmin_create_tables.sql

    r30118 r30586  
    13911391        uri VARCHAR(255),
    13921392        pollInterval INTEGER DEFAULT 60,
     1393        need_magic TINYINT,
    13931394        PRIMARY KEY(ds_id),
    13941395        KEY(ds_id)
  • branches/czw_branch/20101203/ippTools/share/regtool_checkburntoolimfile.sql

    r29908 r30586  
    11SELECT DISTINCT
    2        exp_name,
     2       summitExp.exp_name,
    33       rawImfile.uri,
    44       summitExp.dateobs AS registered,
     
    1111       newExp.exp_id,
    1212       summitExp.exp_type,
    13        rawExp.dateobs,
    14        rawExp.obs_mode AS obs_mode,
    15        rawExp.object AS object,
     13       rawImfile.dateobs,
     14       rawImfile.obs_mode AS obs_mode,
     15       rawImfile.object AS object,
    1616       rawImfile.burntool_state AS burntool_state,
    1717       rawImfile.class_id,
     18       summitImfile.class_id AS summit_class_id,
    1819       (pzDownloadExp.state = 'stop') AS is_downloaded,
    1920       (rawImfile.burntool_state IS NOT NULL) AS is_registered
    2021       FROM
    21             summitExp
    22             LEFT JOIN pzDownloadExp USING(exp_name)
    23             LEFT JOIN newExp ON exp_name = tmp_exp_name
    24             LEFT JOIN rawExp USING(exp_id, exp_name)
    25             LEFT JOIN rawImfile USING(exp_name)
     22       summitExp
     23       JOIN summitImfile USING(exp_name)
     24       LEFT JOIN pzDownloadExp USING(exp_name)
     25       LEFT JOIN newExp ON summitExp.exp_name = tmp_exp_name
     26       LEFT JOIN newImfile ON (summitImfile.class_id = newImfile.tmp_class_id AND newExp.exp_id = newImfile.exp_id)
     27       LEFT JOIN rawExp ON rawExp.exp_id = newExp.exp_id
     28       LEFT JOIN rawImfile ON (rawImfile.exp_id = newExp.exp_id AND rawImfile.tmp_class_id = newImfile.tmp_class_id)
    2629       WHERE
    27              summitExp.dateobs >= '@DATE@T00:00:00'
    28              AND summitExp.dateobs <= '@DATE@T23:59:59'
    29              AND (rawImfile.class_id = '@CLASS_ID@' OR rawImfile.class_id IS NULL)
    30              AND (exp_name <= '@EXP_NAME@')                                                                     
     30             summitExp.dateobs >= '@DATEOBS_BEGIN@'
     31             AND summitExp.dateobs <= '@DATEOBS_END@'
     32             AND summitImfile.class_id = '@CLASS_ID@'
     33             AND (summitExp.exp_name <= '@EXP_NAME@')                                                                     
    3134ORDER BY summitExp.dateobs
  • branches/czw_branch/20101203/ippTools/share/regtool_pendingburntoolimfile.sql

    r29982 r30586  
    1212       newImfile.tmp_class_id,
    1313       summitExp.exp_type,
    14        rawExp.dateobs,
    15        rawExp.obs_mode AS obs_mode,
    16        rawExp.object AS object,
     14       rawImfile.dateobs,
     15       rawImfile.obs_mode AS obs_mode,
     16       rawImfile.object AS object,
    1717       rawImfile.burntool_state AS burntool_state,
    1818       rawImfile.class_id,
     19       summitImfile.class_id AS summit_class_id,
    1920       (pzDownloadExp.state = 'stop') AS is_downloaded,
    2021       (rawImfile.burntool_state IS NOT NULL) AS is_registered
    2122       FROM
    22             summitExp
    23             LEFT JOIN pzDownloadExp USING(exp_name)
    24             LEFT JOIN newExp ON exp_name = tmp_exp_name
    25             LEFT JOIN newImfile USING(exp_id)
    26             LEFT JOIN rawExp USING(exp_id, exp_name)
    27             LEFT JOIN rawImfile ON (rawImfile.exp_name = newExp.tmp_exp_name AND rawImfile.tmp_class_id = newImfile.tmp_class_id)
     23       summitExp
     24       JOIN summitImfile USING(exp_name)
     25       LEFT JOIN pzDownloadExp USING(exp_name)
     26       LEFT JOIN newExp ON summitExp.exp_name = tmp_exp_name
     27       LEFT JOIN newImfile ON (summitImfile.class_id = newImfile.tmp_class_id AND newExp.exp_id = newImfile.exp_id)
     28       LEFT JOIN rawExp ON rawExp.exp_id = newExp.exp_id
     29       LEFT JOIN rawImfile ON (rawImfile.exp_id = newExp.exp_id AND rawImfile.tmp_class_id = newImfile.tmp_class_id)
    2830       WHERE
    29              summitExp.dateobs >= '@DATE@T00:00:00'
    30              AND summitExp.dateobs <= '@DATE@T23:59:59'
    31 ORDER BY newImfile.tmp_class_id,summitExp.dateobs
     31             summitExp.dateobs >= '@DATEOBS_BEGIN@'
     32             AND summitExp.dateobs <= '@DATEOBS_END@'
     33ORDER BY summitImfile.class_id,summitExp.dateobs
  • branches/czw_branch/20101203/ippTools/share/regtool_pendingexp.sql

    r30118 r30586  
    4848          GROUP BY newExp.exp_id
    4949          HAVING SUM(rawImfile.fault) = 0
     50          LIMIT 256
    5051         ) AS RAWEXPOSURES
    5152         USING (exp_id)
Note: See TracChangeset for help on using the changeset viewer.