Changeset 31236 for trunk/ippTools/share/disttool_pending_raw.sql
- Timestamp:
- Apr 7, 2011, 3:42:30 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/share/disttool_pending_raw.sql (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/disttool_pending_raw.sql
r30653 r31236 1 SELECT * FROM ( 2 -- rawExp magicked with re_place 1 3 SELECT 2 4 distRun.dist_id, … … 6 8 rawExp.exp_id AS stage_id, 7 9 rawImfile.class_id AS component, 10 rawExp.exp_type, 8 11 clean, 9 12 rawExp.camera, … … 38 41 AND distRun.stage = 'raw' 39 42 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 41 45 -- need to have magicked the chip image which makes the camera mask 42 46 AND chipProcessedImfile.magicked != 0 43 47 AND camRun.magicked > 0 48 AND (Label.active OR Label.active IS NULL) 49 UNION 50 SELECT 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 73 FROM distRun 74 JOIN distTarget USING(target_id, stage, clean) 75 JOIN rawExp ON rawExp.exp_id = stage_id 76 AND distTarget.stage = 'raw' AND distRun.alternate = 0 77 JOIN rawImfile USING(exp_id) 78 LEFT JOIN distComponent 79 ON distRun.dist_id = distComponent.dist_id 80 AND rawImfile.class_id = distComponent.component 81 LEFT JOIN Label ON distRun.label = Label.label 82 WHERE 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) 44 88 AND (Label.active OR Label.active IS NULL) 45 89 UNION … … 52 96 rawExp.exp_id AS stage_id, 53 97 rawImfile.class_id AS component, 98 rawExp.exp_type, 54 99 clean, 55 100 rawExp.camera, … … 96 141 rawExp.exp_id AS stage_id, 97 142 'exposure' AS component, 143 rawExp.exp_type, 98 144 clean, 99 145 rawExp.camera, … … 120 166 AND distComponent.dist_id IS NULL 121 167 AND (Label.active OR Label.active IS NULL) 168 ) AS distRun 169 WHERE 1
Note:
See TracChangeset
for help on using the changeset viewer.
