IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14018 for trunk/ippTools/share


Ignore:
Timestamp:
Jul 5, 2007, 10:15:41 AM (19 years ago)
Author:
jhoblitt
Message:

merge backtrack branch

Location:
trunk/ippTools/share
Files:
1 added
1 deleted
9 edited

Legend:

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

    r12259 r14018  
    33-- "cleaner" to use the same query for both cases
    44SELECT
    5     camPendingExp.*,
     5    camRun.*,
    66    rawExp.exp_tag,
    77    rawExp.exp_id,
     
    99    rawExp.telescope,
    1010    rawExp.filelevel
    11 FROM camPendingExp
    12 JOIN chipProcessedExp
     11FROM camRun
     12JOIN chipRun
     13    USING(chip_id)
     14JOIN chipProcessedImfile
    1315    USING(chip_id)
    1416JOIN rawExp
    15     ON chipProcessedExp.exp_tag = rawExp.exp_tag
     17    ON chipProcessedImfile.exp_tag = rawExp.exp_tag
    1618LEFT JOIN camProcessedExp
    17     ON camPendingExp.cam_id = camProcessedExp.cam_id
     19    ON camRun.cam_id = camProcessedExp.cam_id
    1820LEFT JOIN camMask
    19     ON camPendingExp.label = camMask.label
     21    ON camRun.label = camMask.label
    2022WHERE
    21     camProcessedExp.cam_id IS NULL
     23    chipRun.state = 'stop'
     24    AND camRun.state = 'run'
    2225    AND camMask.label IS NULL
     26    AND camProcessedExp.cam_id IS NULL
  • trunk/ippTools/share/camtool_queue_chip_id.sql

    r12237 r14018  
    11-- camtool only operates on exposures so we can safely queue more then one at a
    22-- time without worrying about losing the track of the generated cam_id
    3 INSERT INTO camPendingExp
     3INSERT INTO camRun
    44    SElECT
    55        0,              -- cam_id
    66        chip_id,        -- chip_id
     7        '%s',           -- state
    78        '%s',           -- workdir
     9        '%s',           -- workdir_state
    810        '%s',           -- label
    9         '%s',           -- recipe
     11        '%s',           -- reduction
    1012        '%s',           -- expgroup
    1113        '%s'            -- dvodb
    12     FROM chipProcessedExp
     14    FROM chipRun
    1315    WHERE
    14         chipProcessedExp.chip_id = %lld
     16        chipRun.state = 'stop'
     17        AND chipRun.chip_id = %lld
  • trunk/ippTools/share/chiptool_completely_processed_exp.sql

    r13403 r14018  
    1 -- select * from chipPendingExp
    2 -- where exp_tag is not in chipProcessedExp
    3 -- where exp_tag is not in chipPendingImfile
    4 -- where the number of entries in chipProccessedImfile matches the .imfiles
    5 -- entry in rawExp
     1-- the output of this query must match the format of chipRun row
    62SELECT DISTINCT
    7     chipPendingExp.*,
    8     rawExp.imfiles,
    9     chipProcessedImfile.class_id
    10 FROM chipPendingExp
    11 JOIN rawExp
    12     ON chipPendingExp.exp_tag = rawExp.exp_tag
    13 LEFT JOIN chipProcessedExp
    14     ON chipPendingExp.chip_id = chipProcessedExp.chip_id
    15 LEFT JOIN chipPendingImfile
    16     ON chipPendingExp.chip_id = chipPendingImfile.chip_id
    17 LEFT JOIN chipProcessedImfile
    18     ON chipPendingExp.chip_id = chipProcessedImfile.chip_id
    19 WHERE
    20     chipProcessedExp.chip_id IS NULL
    21     AND chipPendingImfile.chip_id IS NULL
    22     AND chipProcessedImfile.chip_id IS NOT NULL
    23     AND chipProcessedImfile.fault = 0
    24 GROUP BY
    25     chipPendingExp.chip_id
    26 HAVING rawExp.imfiles = COUNT(chipProcessedImfile.class_id)
     3    chip_id,
     4    state,
     5    workdir,
     6    workdir_state,
     7    label,
     8    reduction,
     9    expgroup,
     10    dvodb
     11FROM
     12    (SELECT
     13        chipRun.*,
     14        rawExp.imfiles,
     15        chipProcessedImfile.class_id
     16    FROM chipRun
     17    JOIN chipInputImfile
     18        USING(chip_id)
     19    JOIN rawExp
     20        ON chipInputImfile.exp_tag = rawExp.exp_tag
     21    JOIN chipProcessedImfile
     22        ON chipInputImfile.chip_id = chipProcessedImfile.chip_id
     23        AND chipInputImfile.exp_tag = chipProcessedImfile.exp_tag
     24        AND chipInputImfile.class_id = chipProcessedImfile.class_id
     25    WHERE
     26        chipRun.state = 'run'
     27        AND chipProcessedImfile.fault = 0
     28    GROUP BY
     29        chipInputImfile.chip_id,
     30        chipInputImfile.exp_tag
     31    HAVING rawExp.imfiles = COUNT(chipProcessedImfile.class_id)) as Foo
  • trunk/ippTools/share/chiptool_find_unprocessed_imfile.pl

    r12174 r14018  
    11SELECT DISTINCT
    2    chipPendingImfile.*
    3 FROM chipPendingImfile
     2   chipInputImfile.*
     3FROM chipInputImfile
    44LEFT JOIN chipProcessedImfile
    55    USING(chip_id, class_id)
  • trunk/ippTools/share/chiptool_pendingimfile.sql

    r12259 r14018  
    11SELECT
    2     chipPendingExp.*,
    3     chipPendingImfile.class_id,
    4     chipPendingImfile.uri,
     2    chipRun.*,
     3    chipInputImfile.exp_tag,
     4    chipInputImfile.class_id,
     5    rawImfile.uri,
    56    rawExp.exp_id,
    67    rawExp.camera,
    78    rawExp.telescope,
    89    rawExp.filelevel
    9 FROM chipPendingImfile
    10 JOIN chipPendingExp
     10FROM chipRun
     11JOIN chipInputImfile
    1112    USING(chip_id)
     13LEFT JOIN chipProcessedImfile
     14    ON chipInputImfile.chip_id = chipProcessedImfile.chip_id
     15    AND chipInputImfile.exp_tag = chipProcessedImfile.exp_tag
     16    AND chipInputImfile.class_id = chipProcessedImfile.class_id
     17JOIN rawImfile
     18    ON chipInputImfile.exp_tag = rawImfile.exp_tag
     19    AND chipInputImfile.class_id = rawImfile.class_id
    1220JOIN rawExp
    13     ON chipPendingExp.exp_tag = rawExp.exp_tag
     21    ON rawImfile.exp_tag = rawExp.exp_tag
    1422LEFT JOIN chipMask
    15     ON chipPendingExp.label = chipMask.label
     23    ON chipRun.label = chipMask.label
    1624WHERE
    17     chipMask.label IS NULL
     25    chipRun.state = 'run'
     26    AND chipProcessedImfile.chip_id IS NULL
     27    AND chipProcessedImfile.exp_tag IS NULL
     28    AND chipProcessedImfile.class_id IS NULL
     29    AND chipMask.label IS NULL
  • trunk/ippTools/share/chiptool_queuerawimfile.sql

    r12174 r14018  
    1 INSERT INTO chipPendingImfile
     1INSERT INTO chipInputImfile
    22    SELECT
    3         chipPendingExp.chip_id,
    4         rawImfile.class_id,
    5         rawImfile.uri
    6     FROM chipPendingExp
    7     JOIN rawImfile
     3        LAST_INSERT_ID(),
     4        rawImfile.exp_tag,
     5        rawImfile.class_id
     6    FROM rawImfile
     7    JOIN newExp
    88        USING(exp_tag)
    99    WHERE
    1010        rawImfile.fault = 0
    11         AND chipPendingExp.chip_id = LAST_INSERT_ID()
     11        AND newExp.state = 'stop'
     12        AND rawImfile.exp_tag = '%s'
     13
  • trunk/ippTools/share/regtool_find_unprocessed_exp.sql

    r12086 r14018  
    1 SELECT
    2    newExp.*
    3 FROM newExp
    4 LEFT JOIN newImfile
    5    USING(exp_tag)
    6 LEFT JOIN rawExp
    7    USING(exp_tag)
     1SELECT DISTINCT * FROM
     2    (SELECT
     3       newExp.*
     4    FROM newExp
     5    JOIN newImfile
     6       USING(exp_tag)
     7    LEFT JOIN rawExp
     8       USING(exp_tag)
     9    WHERE
     10        newExp.state = 'run'
     11        AND rawExp.exp_tag IS NULL
     12        AND newExp.imfiles =
     13        (SELECT COUNT(exp_tag) FROM rawImfile
     14            WHERE rawImfile.exp_tag = newExp.exp_tag)) as Foo
    815WHERE
    9     newExp.exp_tag IS NOT NULL
    10     AND newImfile.exp_tag IS NULL
    11     AND rawExp.exp_tag IS NULL
    12     AND newExp.imfiles =
    13     (SELECT COUNT(exp_tag) FROM rawImfile
    14         WHERE rawImfile.exp_tag = newExp.exp_tag)
    15     AND newExp.exp_tag = '%s'
     16    exp_tag = '%s'
  • trunk/ippTools/share/regtool_find_unprocessed_imfile.sql

    r12086 r14018  
    1 SELECT
    2     *
    3 FROM
    4     (SELECT newImfile.* FROM newImfile
    5         LEFT JOIN newExp USING(exp_tag)
    6         LEFT JOIN rawExp USING(exp_tag)
    7         WHERE newExp.exp_tag IS NOT NULL
     1SELECT DISTINCT * FROM
     2    (SELECT
     3        newImfile.*
     4    FROM newImfile
     5    JOIN newExp
     6        USING(exp_tag)
     7    LEFT JOIN rawExp
     8        USING(exp_tag)
     9    WHERE
     10        newExp.state = 'run'
    811        AND rawExp.exp_tag IS NULL) as Foo
  • trunk/ippTools/share/regtool_pendingexp.sql

    r12086 r14018  
    22    newExp.*
    33FROM newExp
    4 LEFT JOIN newImfile
     4JOIN newImfile
    55    USING(exp_tag)
    66LEFT JOIN rawExp
    77    USING(exp_tag)
    88WHERE
    9     newImfile.exp_tag IS NULL
     9    newExp.state = 'run'
    1010    AND rawExp.exp_tag IS NULL
    1111    AND newExp.imfiles =
Note: See TracChangeset for help on using the changeset viewer.