Changeset 24174 for trunk/ippTools/share
- Timestamp:
- May 13, 2009, 12:37:33 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 17 edited
- 7 copied
-
. (modified) (1 prop)
-
ippTools/share/Makefile.am (modified) (1 diff)
-
ippTools/share/chiptool_export_imfile.sql (modified) (1 prop)
-
ippTools/share/chiptool_export_processed_imfile.sql (modified) (1 prop)
-
ippTools/share/difftool_definebyquery.sql (deleted)
-
ippTools/share/difftool_definebyquery_part1.sql (deleted)
-
ippTools/share/difftool_definebyquery_part2.sql (deleted)
-
ippTools/share/difftool_definebyquery_temp_create.sql (deleted)
-
ippTools/share/difftool_definewarpstack.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpstack.sql )
-
ippTools/share/difftool_definewarpstack_part1.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpstack_part1.sql )
-
ippTools/share/difftool_definewarpstack_part2.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpstack_part2.sql )
-
ippTools/share/difftool_definewarpstack_temp_create.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpstack_temp_create.sql )
-
ippTools/share/difftool_definewarpwarp_select.sql (modified) (2 diffs)
-
ippTools/share/difftool_definewarpwarp_temp_create.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpwarp_temp_create.sql )
-
ippTools/share/difftool_definewarpwarp_temp_insert.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpwarp_temp_insert.sql )
-
ippTools/share/difftool_definewarpwarp_test.sql (copied) (copied from branches/pap_magic/ippTools/share/difftool_definewarpwarp_test.sql )
-
ippTools/share/difftool_skyfile.sql (modified) (1 diff)
-
ippTools/share/difftool_todiffskyfile.sql (modified) (1 diff)
-
ippTools/share/magicdstool_todestreak.sql (modified) (6 diffs)
-
ippTools/share/magictool_definebyquery_insert.sql (modified) (1 diff)
-
ippTools/share/magictool_definebyquery_select.sql (modified) (1 diff)
-
ippTools/share/magictool_inputs.sql (modified) (1 diff)
-
ippTools/share/magictool_inputskyfile.sql (modified) (1 diff)
-
ippTools/share/magictool_toprocess_inputs.sql (modified) (1 diff)
-
ippTools/share/magictool_toprocess_tree.sql (modified) (1 diff)
-
ippTools/share/magictool_totree.sql (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (6 diffs)
-
ippTools/share/pxadmin_drop_tables.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap_magic (added) merged: 24120,24132-24136,24145,24147-24154,24156-24164,24168-24173
- Property svn:mergeinfo changed
-
trunk/ippTools/share/Makefile.am
r24111 r24174 81 81 dettool_tostacked.sql \ 82 82 difftool_completed_runs.sql \ 83 difftool_definebyquery_part1.sql \ 84 difftool_definebyquery_part2.sql \ 85 difftool_definebyquery_temp_create.sql \ 83 difftool_definewarpstack_part1.sql \ 84 difftool_definewarpstack_part2.sql \ 85 difftool_definewarpstack_temp_create.sql \ 86 difftool_definewarpwarp_temp_create.sql \ 87 difftool_definewarpwarp_temp_insert.sql \ 86 88 difftool_definewarpwarp_select.sql \ 87 89 difftool_definewarpwarp_insert.sql \ -
trunk/ippTools/share/chiptool_export_imfile.sql
- Property svn:mergeinfo changed
/trunk/ippTools/share/chiptool_export_imfile.sql merged: 23690-23696
- Property svn:mergeinfo changed
-
trunk/ippTools/share/chiptool_export_processed_imfile.sql
- Property svn:mergeinfo changed
/trunk/ippTools/share/chiptool_export_processed_imfile.sql merged: 23690-23696
- Property svn:mergeinfo changed
-
trunk/ippTools/share/difftool_definewarpwarp_select.sql
r23503 r24174 1 1 SELECT 2 2 inputWarpRun.warp_id AS input_warp_id, 3 inputWarpRun.tess_id AS tess_id, 3 4 inputRawExp.exp_id AS input_exp_id, 4 inputWarpRun.tess_id AS tess_id,5 -- The following trick pulls out the warp_id that has the smallest distance 5 6 SUBSTRING_INDEX(GROUP_CONCAT(templateWarpRun.warp_id ORDER BY ABS(ASIN(SQRT(POW(SIN(0.5*(inputRawExp.decl - templateRawExp.decl)),2) + COS(inputRawExp.decl) * COS(templateRawExp.decl) * POW(SIN(0.5*(inputRawExp.ra - templateRawExp.ra)),2))))), ',', 1) AS template_warp_id 6 7 FROM warpRun AS inputWarpRun … … 9 10 JOIN chipRun AS inputChipRun USING(chip_id) 10 11 JOIN rawExp AS inputRawExp USING(exp_id) 11 -- To find exposures that haven't been diffed :%s LEFT JOIN diffRun ON diffRun.exp_id = inputRawExp.exp_id12 -- To find exposures that haven't been diffed, insert newline here:%s LEFT JOIN diffs USING(exp_id) 12 13 JOIN warpRun AS templateWarpRun 13 14 ON templateWarpRun.warp_id != inputWarpRun.warp_id -- Don't use self as template! -
trunk/ippTools/share/difftool_skyfile.sql
r24112 r24174 8 8 stack1, 9 9 warp2, 10 stack2, 11 exp_id 10 stack2 12 11 FROM diffRun 13 JOIN diffSkyfile 14 USING(diff_id) 15 JOIN diffInputSkyfile 16 USING (diff_id, skycell_id) 12 JOIN diffSkyfile USING(diff_id) 13 JOIN diffInputSkyfile USING(diff_id, skycell_id) 17 14 JOIN warpRun 18 15 ON warpRun.warp_id = diffInputSkyfile.warp1 19 JOIN rawExp 20 USING(exp_id) 16 JOIN fakeRun USING(fake_id) 17 JOIN camRun USING(cam_id) 18 JOIN chipRun USING(chip_id) 19 JOIN rawExp USING(exp_id) -
trunk/ippTools/share/difftool_todiffskyfile.sql
r23688 r24174 9 9 diffRun.tess_id, 10 10 diffRun.label, 11 diffRun.state 11 diffRun.state, 12 diffRun.bothways 12 13 FROM diffRun 13 14 JOIN diffInputSkyfile USING(diff_id) -
trunk/ippTools/share/magicdstool_todestreak.sql
r23974 r24174 13 13 rawImfile.uri as uri, 14 14 NULL as path_base, 15 magicRun.inverse, 15 16 camProcessedExp.path_base as cam_path_base, 16 17 outroot, … … 44 45 chipProcessedImfile.uri, 45 46 chipProcessedImfile.path_base, 47 magicRun.inverse, 46 48 camProcessedExp.path_base as cam_path_base, 47 49 outroot, … … 51 53 FROM magicDSRun 52 54 JOIN magicMask USING (magic_id) 55 JOIN magicRun USING(magic_id) 53 56 JOIN camProcessedExp USING(cam_id) 54 57 JOIN chipRun ON chip_id = stage_id … … 79 82 warpSkyfile.uri, 80 83 warpSkyfile.path_base, 84 magicRun.inverse, 81 85 NULL as cam_path_base, 82 86 outroot, … … 113 117 magicRun.diff_id as stage_id, 114 118 diffSkyfile.skycell_id as component, 115 diffSkyfile.uri,119 NULL AS uri, 116 120 diffSkyfile.path_base, 121 magicRun.inverse, 117 122 NULL as cam_path_base, 118 123 outroot, … … 126 131 JOIN magicInputSkyfile USING(magic_id) 127 132 JOIN diffSkyfile 128 ON magic InputSkyfile.diff_id = diffSkyfile.diff_id133 ON magicRun.diff_id = diffSkyfile.diff_id 129 134 AND magicInputSkyfile.node = diffSkyfile.skycell_id 130 135 LEFT JOIN magicDSFile -
trunk/ippTools/share/magictool_definebyquery_insert.sql
r23688 r24174 3 3 SELECT 4 4 @MAGIC_ID@, -- Update this with the appropriate magic_id 5 diff_id,6 5 skycell_id 7 6 FROM diffSkyfile -
trunk/ippTools/share/magictool_definebyquery_select.sql
r20973 r24174 1 1 -- Get a list of exposures on which magic may be performed 2 SELECT 2 SELECT 3 3 exp_id, 4 MAX(diffRun.diff_id) AS diff_id 5 FROM diffRun 6 JOIN rawExp USING(exp_id) 4 MAX(diffWarps.diff_id) AS diff_id, 5 -- The following trick pulls out the 'inverse' value for the maximum diff_id 6 CONVERT(SUBSTRING_INDEX(GROUP_CONCAT(diffWarps.inverse ORDER BY diffWarps.diff_id), ',', 1), UNSIGNED) AS inverse 7 FROM ( 8 -- Forward diffs 9 SELECT 10 diffRun.diff_id, 11 warp1 AS warp_id, 12 0 AS inverse 13 FROM diffRun 14 JOIN diffInputSkyfile USING(diff_id) 15 WHERE diffInputSkyfile.warp1 IS NOT NULL 16 AND diffRun.exposure = 1 17 -- WHERE hook %s 18 UNION 19 -- Backward diffs 20 SELECT 21 diffRun.diff_id, 22 warp2 AS warp_id, 23 1 AS inverse 24 FROM diffRun 25 JOIN diffInputSkyfile USING(diff_id) 26 WHERE diffInputSkyfile.warp2 IS NOT NULL 27 AND diffRun.exposure = 1 28 AND diffRun.bothways = 1 29 -- WHERE hook %s 30 ) AS diffWarps 31 JOIN warpRun USING(warp_id) 32 JOIN fakeRun USING(fake_id) 33 JOIN camRun USING(cam_id) 34 JOIN chipRun USING(chip_id) 7 35 LEFT JOIN magicRun USING(exp_id) 8 36 -- WHERE hook %s -
trunk/ippTools/share/magictool_inputs.sql
r23886 r24174 1 SELECT * 2 FROM ( 3 -- Single skycells 1 -- Get input details for a magic node 4 2 SELECT 5 3 magicRun.magic_id, 6 magicRun.state, 7 magicInputSkyfile.node, 8 diffSkyfile.diff_id, 9 diffSkyfile.uri, 10 diffSkyfile.path_base, 11 diffSkyfile.fault, 12 diffSkyfile.quality 4 magicRun.inverse, -- Using the inverse subtraction? 5 magicRun.diff_id, 6 magicInputs.node, 7 -- Only one of diff_path_base and magic_path_base should be non-NULL 8 -- If diff_path_base is non-NULL, then only one of warp_path_base and stack_path_base should be non-NULL 9 magicInputs.diff_path_base, -- path_base for the diff (if any) 10 magicInputs.warp_path_base, -- path_base for the template warp (if any) 11 magicInputs.stack_path_base, -- path_base for the template stack (if any) 12 magicInputs.magic_path_base -- path_base for child nodes (if any) 13 13 FROM magicRun 14 JOIN magicInputSkyfile 15 USING(magic_id) 16 JOIN diffSkyfile 17 ON magicInputSkyfile.diff_id = diffSkyfile.diff_id 18 AND magicInputSkyfile.node = diffSkyfile.skycell_id 19 UNION 20 -- Merged skycells 21 SELECT 22 magicRun.magic_id, 23 magicRun.state, 24 magicTree.node, 25 0, -- no diff_id 26 magicNodeResult.uri, 27 NULL, -- magicNodeResult doesn't have a path_base 28 magicNodeResult.fault, 29 0 as quality 30 FROM magicTree 31 JOIN magicRun 32 USING(magic_id) 33 JOIN magicNodeResult 34 ON magicTree.magic_id = magicNodeResult.magic_id 35 AND magicTree.dep = magicNodeResult.node 36 ) as Foo 37 WHERE 38 fault = 0 39 AND quality = 0 14 JOIN ( 15 -- Single skycells: have uri=NULL 16 SELECT 17 magic_id, 18 magicRun.diff_id, 19 skycell_id AS node, 20 diffSkyfile.path_base AS diff_path_base, 21 warpSkyfile.path_base AS warp_path_base, 22 stackSumSkyfile.path_base AS stack_path_base, 23 NULL AS magic_path_base 24 FROM magicRun 25 JOIN magicTree USING(magic_id) 26 JOIN magicInputSkyfile USING(magic_id, node) 27 JOIN diffRun USING(diff_id) 28 JOIN diffSkyfile 29 ON diffSkyfile.diff_id = magicRun.diff_id 30 AND diffSkyfile.skycell_id = magicInputSkyfile.node 31 JOIN ( 32 -- Template for non-inverse 33 SELECT 34 magic_id, 35 skycell_id, 36 warp1 AS warp_id, 37 stack1 AS stack_id 38 FROM magicRun 39 JOIN diffInputSkyfile USING(diff_id) 40 WHERE magicRun.inverse = 0 41 -- WHERE hook (magicRun.magic_id, diffInputSkyfile.skycell_id) %s 42 UNION 43 -- Template for inverse 44 SELECT 45 magic_id, 46 skycell_id, 47 warp2 AS warp_id, 48 stack2 AS stack_id 49 FROM magicRun 50 JOIN diffInputSkyfile USING(diff_id) 51 WHERE magicRun.inverse = 1 52 -- WHERE hook (magicRun.magic_id, diffInputSkyfile.skycell_id) %s 53 ) AS diffTemplates USING(magic_id, skycell_id) 54 LEFT JOIN warpSkyfile USING(warp_id, skycell_id) 55 LEFT JOIN stackSumSkyfile USING(stack_id) 56 -- WHERE hook (magicRun.magic_id, magicTree.node) %s 57 UNION 58 -- Merged skycells: have diff_id=0, various_path_base=NULL 59 SELECT 60 magicTree.magic_id, 61 0 AS diff_id, 62 magicTree.dep, 63 NULL AS diff_path_base, 64 NULL AS warp_path_base, 65 NULL AS stack_path_base, 66 magicNodeResult.path_base AS magic_path_base 67 FROM magicTree 68 JOIN magicRun USING(magic_id) 69 JOIN magicNodeResult 70 ON magicTree.magic_id = magicNodeResult.magic_id 71 AND magicTree.dep = magicNodeResult.node 72 -- WHERE hook (magicRun.magic_id, magicTree.node) %s 73 ) AS magicInputs USING(magic_id) -
trunk/ippTools/share/magictool_inputskyfile.sql
r23389 r24174 1 1 SELECT 2 2 magicInputSkyfile.*, 3 diffSkyfile.uri 3 magicRun.inverse, 4 diffSkyfile.path_base 4 5 FROM magicRun 5 JOIN magicInputSkyfile 6 USING(magic_id) 6 JOIN magicInputSkyfile USING(magic_id) 7 7 JOIN diffSkyfile 8 ON magicInputSkyfile.diff_id = diffSkyfile.diff_id9 AND magicInputSkyfile.node = diffSkyfile.skycell_id8 ON diffSkyfile.diff_id = magicRun.diff_id 9 AND diffSkyfile.skycell_id = magicInputSkyfile.node 10 10 WHERE 11 11 magicRun.state = 'new' -
trunk/ippTools/share/magictool_toprocess_inputs.sql
r23971 r24174 1 SELECT * FROM 2 (SELECT 1 SELECT 3 2 magicTree.*, 3 magicRun.workdir, 4 4 rawExp.exp_id, 5 5 rawExp.camera, 6 -- diffSkyfile.path_base,7 magicRun.workdir,8 6 -- convert magic_id into a boolean value (1 or 0) 9 7 -- note that the type stays a 64 bit int 10 magicNodeResult.magic_id IS TRUE as done, 11 magicNodeResult.fault IS TRUE as bad, 12 warpSkyfile.uri as template_uri 13 FROM magicTree 14 JOIN magicRun USING(magic_id) 8 magicNodeResult.magic_id IS TRUE AS done, 9 magicNodeResult.fault IS TRUE AS bad 10 FROM magicRun 11 JOIN magicTree USING(magic_id) 15 12 JOIN magicInputSkyfile USING(magic_id, node) 16 JOIN diffSkyfile17 ON magicInputSkyfile.diff_id = diffSkyfile.diff_id18 AND magicInputSkyfile.node = diffSkyfile.skycell_id19 JOIN diffInputSkyfile20 ON diffSkyfile.diff_id = diffInputSkyfile.diff_id21 AND diffSkyfile.skycell_id = diffInputSkyfile.skycell_id22 JOIN warpSkyfile23 ON diffInputSkyfile.warp2 = warpSkyfile.warp_id24 AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id25 13 JOIN rawExp USING(exp_id) 26 LEFT JOIN magicNodeResult 27 ON magicTree.magic_id = magicNodeResult.magic_id 28 AND magicTree.node = magicNodeResult.node 14 JOIN diffSkyfile -- only get nodes that match a skycell 15 ON diffSkyfile.diff_id = magicRun.diff_id 16 AND diffSkyfile.skycell_id = magicInputSkyfile.node 17 LEFT JOIN magicNodeResult USING(magic_id, node) 29 18 WHERE 30 19 magicRun.state = 'new' 31 20 AND magicNodeResult.magic_id IS NULL 32 21 AND magicNodeResult.node IS NULL 33 -- where hook 1 %s 34 UNION 35 SELECT 36 magicTree.*, 37 rawExp.exp_id, 38 rawExp.camera, 39 -- diffSkyfile.path_base, 40 magicRun.workdir, 41 -- convert magic_id into a boolean value (1 or 0) 42 -- note that the type stays a 64 bit int 43 magicNodeResult.magic_id IS TRUE as done, 44 magicNodeResult.fault IS TRUE as bad, 45 stackSumSkyfile.uri as template_uri 46 FROM magicTree 47 JOIN magicRun USING(magic_id) 48 JOIN magicInputSkyfile USING(magic_id, node) 49 JOIN diffSkyfile 50 ON magicInputSkyfile.diff_id = diffSkyfile.diff_id 51 AND magicInputSkyfile.node = diffSkyfile.skycell_id 52 JOIN diffInputSkyfile 53 ON diffSkyfile.diff_id = diffInputSkyfile.diff_id 54 AND diffSkyfile.skycell_id = diffInputSkyfile.skycell_id 55 JOIN stackSumSkyfile 56 ON diffInputSkyfile.stack2 = stackSumSkyfile.stack_id 57 JOIN rawExp USING(exp_id) 58 LEFT JOIN magicNodeResult 59 ON magicTree.magic_id = magicNodeResult.magic_id 60 AND magicTree.node = magicNodeResult.node 61 WHERE 62 magicRun.state = 'new' 63 AND magicNodeResult.magic_id IS NULL 64 AND magicNodeResult.node IS NULL 65 -- where hook 2 %s 66 ) as foo 22 -- WHERE hook %s -
trunk/ippTools/share/magictool_toprocess_tree.sql
r23971 r24174 1 1 SELECT 2 2 magicTree.*, 3 exp_id,4 camera,5 3 magicRun.workdir, 4 rawExp.exp_id, 5 rawExp.camera, 6 6 -- convert magic_id into a boolean value (1 or 0) 7 7 -- note that the type stays a 64 bit int 8 magicNodeResult.magic_id IS TRUE as done, 9 magicNodeResult.fault IS TRUE as bad, 10 'notused' as template_uri 8 magicNodeResult.magic_id IS TRUE AS done, 9 magicNodeResult.fault IS TRUE AS bad 11 10 FROM magicTree 12 11 JOIN magicRun USING(magic_id) 13 12 JOIN rawExp USING(exp_id) 14 LEFT JOIN magicNodeResult 15 ON magicTree.magic_id = magicNodeResult.magic_id 16 AND magicTree.node = magicNodeResult.node 13 LEFT JOIN magicNodeResult USING(magic_id, node) 17 14 WHERE 18 15 magicRun.state = 'new' 19 -- wherehook %s16 -- WHERE hook %s 20 17 ORDER BY 21 18 magicRun.magic_id -
trunk/ippTools/share/magictool_totree.sql
r23389 r24174 6 6 ra, 7 7 decl, 8 tess_id8 diffRun.tess_id 9 9 FROM magicRun 10 JOIN diffRun USING(diff_id) 10 11 JOIN rawExp USING(exp_id) 11 12 LEFT JOIN magicTree -
trunk/ippTools/share/pxadmin_create_tables.sql
r24125 r24174 877 877 KEY(state), 878 878 KEY(skycell_id), 879 KEY(tess_id) 879 KEY(tess_id), 880 KEY(label) 880 881 ) ENGINE=innodb DEFAULT CHARSET=latin1; 881 882 … … 933 934 registered DATETIME, 934 935 tess_id VARCHAR(64), 935 exp_id BIGINT, 936 bothways TINYINT DEFAULT 0, 937 exposure TINYINT DEFAULT 0, 936 938 magicked TINYINT, 937 939 PRIMARY KEY(diff_id), … … 939 941 KEY(state), 940 942 KEY(tess_id), 943 KEY(label), 941 944 FOREIGN KEY(exp_id) REFERENCES rawExp(exp_id) 942 945 ) ENGINE=innodb DEFAULT CHARSET=latin1; … … 969 972 diff_id BIGINT, 970 973 skycell_id VARCHAR(64), 971 uri VARCHAR(255),972 974 path_base VARCHAR(255), 973 975 data_state VARCHAR(64), … … 1006 1008 exp_id BIGINT, 1007 1009 diff_id BIGINT, 1010 inverse TINYINT NOT NULL DEFAULT 0, 1008 1011 state VARCHAR(64), 1009 1012 workdir VARCHAR(255), … … 1046 1049 magic_id BIGINT, 1047 1050 node VARCHAR(64), 1048 uriVARCHAR(255),1051 path_base VARCHAR(255), 1049 1052 fault SMALLINT, 1050 1053 PRIMARY KEY(magic_id, node), -
trunk/ippTools/share/pxadmin_drop_tables.sql
r23894 r24174 48 48 DROP TABLE IF EXISTS magicNodeResult; 49 49 DROP TABLE IF EXISTS magicMask; 50 DROP TABLE IF EXISTS magicSkyfileMask;51 50 DROP TABLE IF EXISTS magicDSRun; 52 51 DROP TABLE IF EXISTS magicDSFile;
Note:
See TracChangeset
for help on using the changeset viewer.
