Changeset 31587 for branches/eam_branches/ipp-20110505/ippTools
- Timestamp:
- May 29, 2011, 11:26:31 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/ippTools
- Files:
-
- 9 edited
-
share/laptool_definerun.sql (modified) (2 diffs)
-
share/laptool_exposures.sql (modified) (1 diff)
-
src/disttool.c (modified) (1 diff)
-
src/laptool.c (modified) (2 diffs)
-
src/laptoolConfig.c (modified) (2 diffs)
-
src/pstamptool.c (modified) (2 diffs)
-
src/pubtoolConfig.c (modified) (1 diff)
-
src/stacktool.c (modified) (2 diffs)
-
src/stacktoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/ippTools/share/laptool_definerun.sql
r31435 r31587 1 SELECT want.exp_id, have.chip_id, false as private, true as active, false as pairwise1 SELECT DISTINCT want.exp_id, have.chip_id, false as private, true as active, false as pairwise 2 2 FROM 3 3 (SELECT exp_id FROM rawExp … … 8 8 ) AS want 9 9 LEFT JOIN 10 (SELECT *10 (SELECT exp_id,MAX(chip_id) AS chip_id 11 11 FROM lapExp 12 12 where private IS FALSE -
branches/eam_branches/ipp-20110505/ippTools/share/laptool_exposures.sql
r31435 r31587 1 SELECT DISTINCT 2 D.*,diffRun.state, 3 coalesce(CONVERT(sum(others.private),SIGNED),0) AS needs_remade 4 -- 0 AS needs_remade 5 FROM ( 6 SELECT DISTINCT 7 W.*,CONVERT(IFNULL(diff1.diff_id,diff2.diff_id),SIGNED) AS diff_id FROM ( 8 SELECT DISTINCT 9 lap_id,lapRun.tess_id,projection_cell,filter,lapRun.state as lapRun_state, lapRun.registered, lapRun.fault, lapRun.label, lapRun.dist_group, 10 lapExp.exp_id,lapExp.chip_id,lapExp.pair_id,private,pairwise,active,lapExp.data_state, 11 chipRun.state as chipRun_state, 12 coalesce(CONVERT(sum(chipProcessedImfile.fault),SIGNED),0) as chip_faults, 13 coalesce(CONVERT(sum(chipProcessedImfile.quality),SIGNED),0) as chip_quality, 14 camRun.cam_id, camRun.state as camRun_state, 15 coalesce(CONVERT(sum(camProcessedExp.fault),SIGNED),0) AS cam_faults, 16 coalesce(CONVERT(sum(camProcessedExp.quality),SIGNED),0) AS cam_quality, 17 fakeRun.fake_id, fakeRun.state as fakeRun_state, 18 coalesce(CONVERT(sum(fakeProcessedImfile.fault),SIGNED),0) as fake_faults, 19 warpRun.warp_id, warpRun.state as warpRun_state, 20 coalesce(CONVERT(sum(warpSkyfile.fault),SIGNED),0) as warp_faults, 21 coalesce(CONVERT(sum(warpSkyfile.quality),SIGNED),0) as warp_quality, 22 warpRun.magicked 23 FROM lapRun JOIN lapExp USING(lap_id) 24 LEFT JOIN chipRun USING(chip_id) 25 LEFT JOIN chipProcessedImfile USING(chip_id) 26 LEFT JOIN camRun USING(chip_id) LEFT JOIN camProcessedExp USING(cam_id) 27 LEFT JOIN fakeRun USING(cam_id) LEFT JOIN fakeProcessedImfile USING(fake_id) 28 LEFT JOIN warpRun USING(fake_id) LEFT JOIN warpSkyfile USING(warp_id) 29 WHERE @WHERE@ 30 AND (warpSkyfile.quality IS NULL OR 31 (warpSkyfile.quality != 8007 -- known cases where quality != 0, but everything's fine. 32 AND warpSkyfile.quality != 3006 -- known cases where quality != 0, but everything's fine. 33 )) 34 GROUP BY lap_id,exp_id 35 ) AS W 36 -- This was unreasonably slow in testing, so that's why I'm using a subquery here. 37 LEFT JOIN diffInputSkyfile AS diff1 ON (W.warp_id = diff1.warp1) 38 LEFT JOIN diffInputSkyfile AS diff2 ON (W.warp_id = diff2.warp2) 39 ) AS D 1 select DISTINCT V3.*, 2 diffRun.diff_id,diffRun.state as diffRun_state, 3 coalesce(CONVERT(sum(diffSkyfile.quality != 0),SIGNED),0) AS diff_bad_quality, 4 coalesce(CONVERT(count(diffSkyfile.diff_id),SIGNED),0) AS diff_component_count 5 FROM 6 ( select V2.*, 7 warpRun.warp_id,warpRun.state as warpRun_state, 8 coalesce(CONVERT(sum(warpSkyfile.quality != 0),SIGNED),0) AS warp_bad_quality, 9 coalesce(CONVERT(count(warpSkyfile.warp_id),SIGNED),0) AS warp_component_count, 10 warpRun.magicked 11 FROM 12 ( select V1.*, 13 camRun.cam_id,camRun.state as camRun_state, 14 coalesce(CONVERT(sum(camProcessedExp.quality != 0),SIGNED),0) AS cam_bad_quality, 15 coalesce(CONVERT(count(camProcessedExp.cam_id),SIGNED),0) AS cam_component_count, 16 fakeRun.fake_id,fakeRun.state as fakeRun_state FROM 17 ( SELECT DISTINCT 18 lap_id,lapRun.tess_id,projection_cell,filter,lapRun.state as lapRun_state, lapRun.registered, lapRun.fault, lapRun.label, lapRun.dist_group, 19 lapExp.exp_id,lapExp.chip_id,lapExp.pair_id,private,pairwise,active,lapExp.data_state, 20 chipRun.state as chipRun_state, 21 coalesce(CONVERT(sum(chipProcessedImfile.quality != 0),SIGNED),0) AS chip_bad_quality, 22 coalesce(CONVERT(count(chipProcessedImfile.chip_id),SIGNED),0) AS chip_component_count 23 FROM lapRun JOIN lapExp USING(lap_id) 24 LEFT JOIN chipRun USING(chip_id) LEFT JOIN chipProcessedImfile USING(chip_id) 25 WHERE @WHERE@ 26 GROUP BY lap_id,exp_id 27 ) AS V1 28 LEFT JOIN camRun USING(chip_id) LEFT JOIN camProcessedExp USING(cam_id) 29 LEFT JOIN fakeRun USING(cam_id) 30 GROUP BY lap_id,exp_id 31 ) AS V2 32 LEFT JOIN warpRun USING(fake_id) LEFT JOIN warpSkyfile USING(warp_id) 33 GROUP BY lap_id,exp_id 34 ) AS V3 35 LEFT JOIN 36 (SELECT DISTINCT diff_id,warp1,warp2 FROM diffInputSkyfile) AS DI ON 37 (DI.warp1 = warp_id OR DI.warp2 = warp_id) 40 38 LEFT JOIN diffRun USING(diff_id) 41 LEFT JOIN lapExp AS others ON (D.chip_id = others.chip_id AND D.lap_id != others.lap_id)39 LEFT JOIN diffSkyfile USING(diff_id) 42 40 GROUP BY lap_id,exp_id 43 41 -
branches/eam_branches/ipp-20110505/ippTools/src/disttool.c
r30906 r31587 447 447 448 448 if (pretend) { 449 if (!ippdbPrintMetadatas(stdout, output, "newdistRuns", true)) {449 if (!ippdbPrintMetadatas(stdout, output, "newdistRuns", !simple)) { 450 450 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 451 451 psFree(output); -
branches/eam_branches/ipp-20110505/ippTools/src/laptool.c
r31435 r31587 384 384 PXOPT_COPY_STR(config->args, where, "-projection_cell", "projection_cell", "=="); 385 385 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 386 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");386 // PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 387 387 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 388 388 PXOPT_COPY_STR(config->args, where, "-fault", "fault", "=="); 389 389 390 pxAddLabelSearchArgs(config, where, "-label", "lapRun.label", "=="); 391 390 392 psString query = pxDataGet("laptool_pendingrun.sql"); 391 393 if (!query) { … … 560 562 psMetadata *where = psMetadataAlloc(); 561 563 PXOPT_COPY_S64(config->args, where, "-lap_id", "lap_id", "=="); 562 PXOPT_COPY_S64(config->args, where, "-exp_id", " exp_id", "==");564 PXOPT_COPY_S64(config->args, where, "-exp_id", "lapExp.exp_id", "=="); 563 565 564 566 psString query = pxDataGet("laptool_exposures.sql"); -
branches/eam_branches/ipp-20110505/ippTools/src/laptoolConfig.c
r31435 r31587 69 69 ADD_OPT(Str, pendingrunArgs, "-projection_cell", "search by projection cell", NULL); 70 70 ADD_OPT(Str, pendingrunArgs, "-filter", "search by filter", NULL); 71 ADD_OPT(Str, pendingrunArgs, "-label", "search by LAP run label", NULL); 71 // ADD_OPT(Str, pendingrunArgs, "-label", "search by LAP run label", NULL); 72 psMetadataAddStr(pendingrunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by LAP run label", NULL); 72 73 ADD_OPT(Str, pendingrunArgs, "-state", "search by LAP run state", NULL); 73 74 ADD_OPT(Str, pendingrunArgs, "-fault", "search by LAP run fault", NULL); 74 75 ADD_OPT(Bool,pendingrunArgs, "-simple", "use the simple output format", false); 76 77 // -listrun 78 psMetadata *listrunArgs = psMetadataAlloc(); 79 ADD_OPT(S64, listrunArgs, "-seq_id", "search by LAP sequence ID", 0); 80 ADD_OPT(S64, listrunArgs, "-lap_id", "search by LAP run ID", 0); 81 ADD_OPT(Str, listrunArgs, "-projection_cell", "search by projection cell", NULL); 82 ADD_OPT(Str, listrunArgs, "-filter", "search by filter", NULL); 83 // ADD_OPT(Str, listrunArgs, "-label", "search by LAP run label", NULL); 84 psMetadataAddStr(listrunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by LAP run label", NULL); 85 ADD_OPT(Str, listrunArgs, "-state", "search by LAP run state", NULL); 86 ADD_OPT(Str, listrunArgs, "-fault", "search by LAP run fault", NULL); 87 ADD_OPT(Bool,listrunArgs, "-simple", "use the simple output format", false); 75 88 76 89 // -updaterun … … 128 141 psMetadata *argSets = psMetadataAlloc(); 129 142 psMetadata *modes = psMetadataAlloc(); 130 143 131 144 PXOPT_ADD_MODE("-definesequence", "", LAPTOOL_MODE_DEFINESEQUENCE, definesequenceArgs); 132 145 PXOPT_ADD_MODE("-listsequence", "", LAPTOOL_MODE_LISTSEQUENCE, listsequenceArgs); 133 146 PXOPT_ADD_MODE("-definerun", "", LAPTOOL_MODE_DEFINERUN, definerunArgs); 134 147 PXOPT_ADD_MODE("-pendingrun", "", LAPTOOL_MODE_PENDINGRUN, pendingrunArgs); 148 PXOPT_ADD_MODE("-listrun", "", LAPTOOL_MODE_PENDINGRUN, listrunArgs); 135 149 PXOPT_ADD_MODE("-updaterun", "", LAPTOOL_MODE_UPDATERUN, updaterunArgs); 136 150 PXOPT_ADD_MODE("-pendingexp", "", LAPTOOL_MODE_PENDINGEXP, pendingexpArgs); -
branches/eam_branches/ipp-20110505/ippTools/src/pstamptool.c
r30543 r31587 843 843 psFree(where); 844 844 845 psStringAppend(&query, " ORDER BY priority DESC, req_id ");845 psStringAppend(&query, " ORDER BY priority DESC, req_id, job_id"); 846 846 847 847 // treat limit == 0 as "no limit" … … 1323 1323 psFree(where); 1324 1324 1325 psStringAppend(&query, " ORDER BY priority DESC, req_id ");1325 psStringAppend(&query, " ORDER BY priority DESC, req_id, dep_id"); 1326 1326 1327 1327 // treat limit == 0 as "no limit" -
branches/eam_branches/ipp-20110505/ippTools/src/pubtoolConfig.c
r30769 r31587 48 48 psMetadataAddStr(defineclientArgs, PS_LIST_TAIL, "-product", 0, "define product (required)", NULL); 49 49 psMetadataAddStr(defineclientArgs, PS_LIST_TAIL, "-workdir", 0, "define workdir (required)", NULL); 50 psMetadataAddS16(defineclientArgs, PS_LIST_TAIL, "-output_format", 0, "define output format", 2); 50 51 psMetadataAddStr(defineclientArgs, PS_LIST_TAIL, "-comment", 0, "define comment", NULL); 52 psMetadataAddStr(defineclientArgs, PS_LIST_TAIL, "-name", 0, "define name", NULL); 51 53 psMetadataAddBool(defineclientArgs, PS_LIST_TAIL, "-unmagicked", 0, "allow unmagicked data?", false); 52 54 -
branches/eam_branches/ipp-20110505/ippTools/src/stacktool.c
r31445 r31587 246 246 PXOPT_COPY_STR(config->args, where, "-select_data_group", "warpRun.data_group", "=="); 247 247 pxAddLabelSearchArgs (config, where, "-select_label", "warpRun.label", "LIKE"); // define using warp label 248 248 pxAddLabelSearchArgs (config, where, "-warp_id", "warpRun.warp_id", "=="); 249 249 250 // these are used to build the HAVING restriction 250 251 PXOPT_COPY_S32(config->args, having, "-min_num", "num_warp", ">="); … … 508 509 association->sass_id = sass_id; 509 510 } 511 else { 512 sass_id = association->sass_id; 513 } 510 514 // Insert the map entry for this row. 511 515 stackAssociationMapRow *maprow = stackAssociationMapRowAlloc(sass_id,stack_id); -
branches/eam_branches/ipp-20110505/ippTools/src/stacktoolConfig.c
r30945 r31587 91 91 psMetadataAddF64(definebyqueryArgs, PS_LIST_TAIL, "-select_zpt_obs_max", 0, "define max zero point", NAN); 92 92 psMetadataAddF64(definebyqueryArgs, PS_LIST_TAIL, "-select_astrom", 0, "define max astrometry rms", NAN); 93 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-warp_id", PS_META_DUPLICATE_OK, "include this warp ID (multiple OK)", 0); 93 94 psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-random", 0, "use this number of random elements", 0); 94 95 psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-min_num", 0, "minimum number of inputs", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
