IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2010, 3:55:49 PM (16 years ago)
Author:
eugene
Message:

update merges from trunk

Location:
branches/eam_branches/20100225
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20100225

  • branches/eam_branches/20100225/ippTools/share/disttool_pending_raw.sql

    r25838 r27517  
    33    distRun.label,
    44    distTarget.dist_group,
    5     stage,
    6     stage_id,
     5    'raw' AS stage,
     6    rawExp.exp_id AS stage_id,
    77    rawImfile.class_id AS component,
    88    clean,
    99    rawExp.camera,
    10     CONCAT_WS('.', outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
    11     rawImfile.uri as path_base,         -- change this once rawImfile has path_base
     10    CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
     11    -- XXX: replace this with rawImfile.path_base once it exists
     12    TRIM(TRAILING '.fits' FROM rawImfile.uri) AS path_base,
     13    CAST(NULL AS CHAR(255)) AS alt_path_base,
    1214    chipProcessedImfile.path_base as chip_path_base,
    1315    CAST(NULL AS CHAR(255)) AS state,
     
    1820FROM distRun
    1921JOIN distTarget USING(target_id, stage, clean)
    20 JOIN rawExp ON rawExp.exp_id = stage_id
     22JOIN rawExp ON rawExp.exp_id = stage_id AND distTarget.stage = 'raw' AND distRun.alternate = 0
    2123JOIN rawImfile USING(exp_id)
    22 JOIN chipRun ON chipRun.exp_id = rawExp.exp_id and chipRun.magicked
     24JOIN chipRun ON chipRun.exp_id = rawExp.exp_id AND chipRun.magicked
    2325JOIN chipProcessedImfile
    2426    USING(chip_id, class_id)
     
    3335    AND (rawExp.magicked OR distRun.no_magic)
    3436UNION
     37    -- raw stage alternate inputs
     38SELECT
     39    distRun.dist_id,
     40    distRun.label,
     41    distTarget.dist_group,
     42    'raw' AS stage,
     43    rawExp.exp_id AS stage_id,
     44    rawImfile.class_id AS component,
     45    clean,
     46    rawExp.camera,
     47    CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
     48    -- XXX: replace this with rawImfile.path_base once it exists
     49    TRIM(TRAILING '.fits' FROM rawImfile.uri) AS path_base,
     50    magicDSFile.backup_path_base AS alt_path_base,
     51    chipProcessedImfile.path_base AS chip_path_base,
     52    CAST('full' AS CHAR(255)) AS state,
     53    CAST('full' AS CHAR(255)) AS data_state,
     54    0 as quality,
     55    distRun.no_magic,
     56    rawImfile.magicked
     57FROM distRun
     58JOIN distTarget USING(target_id, stage, clean)
     59JOIN rawExp ON rawExp.exp_id = stage_id AND distTarget.stage = 'raw' AND distRun.alternate = 1
     60JOIN rawImfile USING(exp_id)
     61JOIN magicDSRun ON magicDSRun.stage = 'raw' AND magicDSRun.stage_id = rawExp.exp_id
     62JOIN magicDSFile ON magicDSRun.magic_ds_id = magicDSFile.magic_ds_id
     63                AND rawImfile.class_id = magicDSFile.component
     64JOIN camRun USING(cam_id)
     65JOIN camProcessedExp USING(cam_id)
     66JOIN chipProcessedImfile USING(chip_id, class_id)
     67LEFT JOIN distComponent
     68    ON distRun.dist_id = distComponent.dist_id
     69    AND rawImfile.class_id = distComponent.component
     70WHERE
     71    distRun.state = 'new'
     72    AND distRun.clean = 0
     73    AND distComponent.dist_id IS NULL
     74    AND chipProcessedImfile.data_state = 'full'
     75    AND chipProcessedImfile.magicked > 0
     76UNION
    3577    -- raw stage clean (dbinfo only)
    3678SELECT
     
    3880    distRun.label,
    3981    distTarget.dist_group,
    40     stage,
    41     stage_id,
     82    'raw' AS stage,
     83    rawExp.exp_id AS stage_id,
    4284    'exposure' AS component,
    4385    clean,
    4486    rawExp.camera,
    45     CONCAT_WS('.', outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
     87    CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
    4688    CAST(NULL AS CHAR(255)) AS path_base,
     89    CAST(NULL AS CHAR(255)) AS alt_path_base,
    4790    CAST(NULL AS CHAR(255)) AS chip_path_base,
    4891    CAST(NULL AS CHAR(255)) AS state,
     
    5396FROM distRun
    5497JOIN distTarget USING(target_id, stage, clean)
    55 JOIN rawExp ON exp_id = stage_id
     98JOIN rawExp ON rawExp.exp_id = stage_id
    5699LEFT JOIN distComponent
    57100    ON distRun.dist_id = distComponent.dist_id
Note: See TracChangeset for help on using the changeset viewer.