IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 7, 2011, 3:42:30 PM (15 years ago)
Author:
bills
Message:

various changes to support distributing rawImages with exp_type != 'OBJECT'
(This should have been checked in with r30906

File:
1 edited

Legend:

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

    r30653 r31236  
     1SELECT * FROM (
     2-- rawExp magicked with re_place
    13SELECT
    24    distRun.dist_id,
     
    68    rawExp.exp_id AS stage_id,
    79    rawImfile.class_id AS component,
     10    rawExp.exp_type,
    811    clean,
    912    rawExp.camera,
     
    3841    AND distRun.stage = 'raw'
    3942    AND distComponent.dist_id IS NULL
    40     AND (rawExp.magicked OR distRun.no_magic)
     43    -- AND (rawExp.magicked OR distRun.no_magic)
     44    AND rawExp.magicked
    4145    -- need to have magicked the chip image which makes the camera mask
    4246    AND chipProcessedImfile.magicked != 0
    4347    AND camRun.magicked > 0
     48    AND (Label.active OR Label.active IS NULL)
     49UNION
     50SELECT
     51    -- raw images no_magic required
     52    distRun.dist_id,
     53    distRun.label,
     54    distTarget.dist_group,
     55    'raw' AS stage,
     56    rawExp.exp_id AS stage_id,
     57    rawImfile.class_id AS component,
     58    rawExp.exp_type,
     59    clean,
     60    rawExp.camera,
     61    CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
     62    -- XXX: replace this with rawImfile.path_base once it exists
     63    TRIM(TRAILING '.fits' FROM rawImfile.uri) AS path_base,
     64    CAST(NULL AS CHAR(255)) AS alt_path_base,
     65    -- pass camera stage path base since we want the camera mask file. The script knows what to do
     66    CAST(NULL AS CHAR(255)) AS chip_path_base,
     67    CAST(NULL AS CHAR(255)) AS state,
     68    CAST(NULL AS CHAR(255)) AS data_state,
     69    0 as quality,
     70    distRun.no_magic,
     71    rawImfile.magicked,
     72    IFNULL(Label.priority, 10000) AS priority
     73FROM distRun
     74JOIN distTarget USING(target_id, stage, clean)
     75JOIN rawExp ON rawExp.exp_id = stage_id
     76            AND distTarget.stage = 'raw' AND distRun.alternate = 0
     77JOIN rawImfile USING(exp_id)
     78LEFT JOIN distComponent
     79    ON distRun.dist_id = distComponent.dist_id
     80    AND rawImfile.class_id = distComponent.component
     81LEFT JOIN Label ON distRun.label = Label.label
     82WHERE
     83    distRun.state = 'new'
     84    AND distRun.clean = 0
     85    AND distRun.stage = 'raw'
     86    AND distComponent.dist_id IS NULL
     87    AND (distRun.no_magic)
    4488    AND (Label.active OR Label.active IS NULL)
    4589UNION
     
    5296    rawExp.exp_id AS stage_id,
    5397    rawImfile.class_id AS component,
     98    rawExp.exp_type,
    5499    clean,
    55100    rawExp.camera,
     
    96141    rawExp.exp_id AS stage_id,
    97142    'exposure' AS component,
     143    rawExp.exp_type,
    98144    clean,
    99145    rawExp.camera,
     
    120166    AND distComponent.dist_id IS NULL
    121167    AND (Label.active OR Label.active IS NULL)
     168) AS distRun
     169WHERE 1
Note: See TracChangeset for help on using the changeset viewer.