Changeset 23688 for trunk/ippTools/src
- Timestamp:
- Apr 2, 2009, 2:51:37 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
-
. (modified) (1 prop)
-
ippTools/src/camtool.c (modified) (11 diffs)
-
ippTools/src/camtoolConfig.c (modified) (3 diffs)
-
ippTools/src/chiptool.c (modified) (9 diffs)
-
ippTools/src/chiptoolConfig.c (modified) (3 diffs)
-
ippTools/src/dettoolConfig.c (modified) (19 diffs)
-
ippTools/src/dettool_detrunsummary.c (modified) (9 diffs)
-
ippTools/src/dettool_normalizedexp.c (modified) (4 diffs)
-
ippTools/src/dettool_normalizedimfile.c (modified) (4 diffs)
-
ippTools/src/dettool_normalizedstat.c (modified) (3 diffs)
-
ippTools/src/dettool_processedexp.c (modified) (4 diffs)
-
ippTools/src/dettool_processedimfile.c (modified) (6 diffs)
-
ippTools/src/dettool_residexp.c (modified) (7 diffs)
-
ippTools/src/dettool_residimfile.c (modified) (8 diffs)
-
ippTools/src/dettool_stack.c (modified) (4 diffs)
-
ippTools/src/difftool.c (modified) (6 diffs)
-
ippTools/src/difftoolConfig.c (modified) (5 diffs)
-
ippTools/src/disttool.c (modified) (6 diffs)
-
ippTools/src/disttoolConfig.c (modified) (5 diffs)
-
ippTools/src/faketool.c (modified) (6 diffs)
-
ippTools/src/faketoolConfig.c (modified) (3 diffs)
-
ippTools/src/flatcorr.c (modified) (25 diffs)
-
ippTools/src/flatcorrConfig.c (modified) (1 diff)
-
ippTools/src/magicdstool.c (modified) (3 diffs)
-
ippTools/src/magicdstoolConfig.c (modified) (3 diffs)
-
ippTools/src/magictool.c (modified) (8 diffs)
-
ippTools/src/magictoolConfig.c (modified) (4 diffs)
-
ippTools/src/pztool.c (modified) (8 diffs)
-
ippTools/src/pztoolConfig.c (modified) (9 diffs)
-
ippTools/src/regtool.c (modified) (12 diffs)
-
ippTools/src/regtoolConfig.c (modified) (6 diffs)
-
ippTools/src/stacktool.c (modified) (9 diffs)
-
ippTools/src/stacktoolConfig.c (modified) (3 diffs)
-
ippTools/src/warptool.c (modified) (7 diffs)
-
ippTools/src/warptoolConfig.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 23511,23520-23521,23532,23578-23581,23596-23599,23603-23604,23606-23608,23619-23621,23638-23639,23641,23646-23648,23651-23653,23656,23672-23674,23677-23684
- Property svn:mergeinfo changed
-
trunk/ippTools/src/camtool.c
r23616 r23688 468 468 469 469 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); 470 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 470 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 471 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 471 472 472 473 // generate restrictions … … 533 534 zpt_lq, 534 535 zpt_uq, 535 fwhm_major,536 fwhm_major_lq,537 fwhm_major_uq,538 fwhm_minor,539 fwhm_minor_lq,540 fwhm_minor_uq,541 542 iq_fwhm_major,543 iq_fwhm_major_err,544 iq_fwhm_minor,545 iq_fwhm_minor_err,536 fwhm_major, 537 fwhm_major_lq, 538 fwhm_major_uq, 539 fwhm_minor, 540 fwhm_minor_lq, 541 fwhm_minor_uq, 542 543 iq_fwhm_major, 544 iq_fwhm_major_err, 545 iq_fwhm_minor, 546 iq_fwhm_minor_err, 546 547 547 548 iq_m2, … … 576 577 n_astrom, 577 578 path_base, 578 code 579 fault, 580 quality 579 581 ); 580 582 … … 599 601 600 602 // NULL for end_stage means go as far as possible 601 // EAM : skip here if code!= 0603 // EAM : skip here if fault != 0 602 604 // Also, we can run fake even if tess_id is not defined 603 if ( code|| (pendingRow->end_stage && psStrcasestr(pendingRow->end_stage, "cam"))) {605 if (fault || (pendingRow->end_stage && psStrcasestr(pendingRow->end_stage, "cam"))) { 604 606 psFree(row); 605 607 psFree(pendingRow); … … 745 747 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 746 748 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 747 PXOPT_COPY_S16(config->args, where, "- code","camProcessedExp.fault", "==");749 PXOPT_COPY_S16(config->args, where, "-fault", "camProcessedExp.fault", "=="); 748 750 749 751 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { … … 833 835 PS_ASSERT_PTR_NON_NULL(config, false); 834 836 835 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);837 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 836 838 837 839 psMetadata *where = psMetadataAlloc(); … … 841 843 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 842 844 843 if (!pxSetFaultCode(config->dbh, "camProcessedExp", where, code)) {845 if (!pxSetFaultCode(config->dbh, "camProcessedExp", where, fault)) { 844 846 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 845 847 psFree (where); … … 1114 1116 char sqlFilename[80]; 1115 1117 } ExportTable; 1116 1118 1117 1119 int numExportTables = 2; 1118 1120 … … 1194 1196 1195 1197 PS_ASSERT_PTR_NON_NULL(config, NULL); 1196 1198 1197 1199 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1198 1200 … … 1205 1207 psAssert (item, "entry not in input?"); 1206 1208 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1207 1209 1208 1210 psMetadataItem *entry = psListGet (item->data.list, 0); 1209 1211 assert (entry); … … 1214 1216 // fprintf (stdout, "---- cam run ----\n"); 1215 1217 // psMetadataPrint (stderr, entry->data.md, 1); 1216 1218 1217 1219 item = psMetadataLookup (input, "camProcessedImfile"); 1218 1220 psAssert (item, "entry not in input?"); -
trunk/ippTools/src/camtoolConfig.c
r23616 r23688 164 164 165 165 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); 166 psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-code", 0, "set fault code", 0); 166 psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 167 psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-quality", 0, "set quality", 0); 167 168 psMetadataAddBool(addprocessedexpArgs, PS_LIST_TAIL, "-faulted", 0, "only return imfiles with a fault status set", false); 168 169 … … 191 192 192 193 psMetadataAddBool(revertprocessedexpArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 194 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 193 195 194 196 // -updateprocessedexp … … 199 201 psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-class", 0, "search by class", NULL); 200 202 psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 201 psMetadataAddS16(updateprocessedexpArgs, PS_LIST_TAIL, "- code", 0, "set fault code (required)", INT16_MAX);203 psMetadataAddS16(updateprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code (required)", INT16_MAX); 202 204 203 205 // -block -
trunk/ippTools/src/chiptool.c
r23657 r23688 409 409 PXOPT_LOOKUP_F32(dtime_script, config->args, "-dtime_script", false, false); 410 410 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 411 PXOPT_LOOKUP_F32(n_stars, config->args, "-n_stars", false, false);412 PXOPT_LOOKUP_F32(n_psfstars, config->args, "-n_psfstars", false, false);413 PXOPT_LOOKUP_F32(n_iqstars, config->args, "-n_iqstars", false, false);414 PXOPT_LOOKUP_F32(n_extended, config->args, "-n_extended", false, false);415 PXOPT_LOOKUP_F32(n_cr, config->args, "-n_cr", false, false);416 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false);417 PXOPT_LOOKUP_BOOL(magicked, config->args, "-magicked", false);411 PXOPT_LOOKUP_F32(n_stars, config->args, "-n_stars", false, false); 412 PXOPT_LOOKUP_F32(n_psfstars, config->args, "-n_psfstars", false, false); 413 PXOPT_LOOKUP_F32(n_iqstars, config->args, "-n_iqstars", false, false); 414 PXOPT_LOOKUP_F32(n_extended, config->args, "-n_extended", false, false); 415 PXOPT_LOOKUP_F32(n_cr, config->args, "-n_cr", false, false); 416 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); 417 PXOPT_LOOKUP_BOOL(magicked, config->args, "-magicked", false); 418 418 419 419 // default values 420 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 420 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 421 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 421 422 422 423 if (!psDBTransaction(config->dbh)) { … … 449 450 fwhm_minor_uq, 450 451 451 iq_fwhm_major,452 iq_fwhm_major_err,453 iq_fwhm_minor,454 iq_fwhm_minor_err,455 456 iq_m2,457 iq_m2_err,458 iq_m2_lq,459 iq_m2_uq,460 461 iq_m2c,462 iq_m2c_err,463 iq_m2c_lq,464 iq_m2c_uq,465 466 iq_m2s,467 iq_m2s_err,468 iq_m2s_lq,469 iq_m2s_uq,470 471 iq_m3,472 iq_m3_err,473 iq_m3_lq,474 iq_m3_uq,475 476 iq_m4,477 iq_m4_err,478 iq_m4_lq,479 iq_m4_uq,452 iq_fwhm_major, 453 iq_fwhm_major_err, 454 iq_fwhm_minor, 455 iq_fwhm_minor_err, 456 457 iq_m2, 458 iq_m2_err, 459 iq_m2_lq, 460 iq_m2_uq, 461 462 iq_m2c, 463 iq_m2c_err, 464 iq_m2c_lq, 465 iq_m2c_uq, 466 467 iq_m2s, 468 iq_m2s_err, 469 iq_m2s_lq, 470 iq_m2s_uq, 471 472 iq_m3, 473 iq_m3_err, 474 iq_m3_lq, 475 iq_m3_uq, 476 477 iq_m4, 478 iq_m4_err, 479 iq_m4_lq, 480 iq_m4_uq, 480 481 481 482 dtime_detrend, … … 490 491 n_cr, 491 492 path_base, 492 code, 493 fault, 494 quality, 493 495 magicked 494 496 )) { … … 618 620 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "LIKE"); 619 621 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 620 PXOPT_COPY_S16(config->args, where, "- code", "chipProcessedImfile.fault", "==");622 PXOPT_COPY_S16(config->args, where, "-fault", "chipProcessedImfile.fault", "=="); 621 623 622 624 if (!psListLength(where->list) … … 659 661 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 660 662 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 661 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);662 663 if (!pxSetFaultCode(config->dbh, "chipProcessedImfile", where, code)) {663 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 664 665 if (!pxSetFaultCode(config->dbh, "chipProcessedImfile", where, fault)) { 664 666 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 665 667 return false; … … 1280 1282 char sqlFilename[80]; 1281 1283 } ExportTable; 1282 1284 1283 1285 int numExportTables = 3; 1284 1286 … … 1360 1362 { 1361 1363 unsigned int nFail; 1362 1364 1363 1365 int numImportTables = 2; 1364 1366 1365 1367 char tables[2] [80] = {"chipImfile", "chipProcessedImfile"}; 1366 1368 1367 1369 PS_ASSERT_PTR_NON_NULL(config, NULL); 1368 1370 1369 1371 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1370 1372 … … 1386 1388 // fprintf (stdout, "---- chip run ----\n"); 1387 1389 // psMetadataPrint (stderr, entry->data.md, 1); 1388 1390 1389 1391 for (int i = 0; i < numImportTables; i++) { 1390 1392 psMetadataItem *item = psMetadataLookup (input, tables[i]); 1391 1393 psAssert (item, "entry not in input?"); 1392 1394 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1393 1395 1394 1396 switch (i) { 1395 1397 case 0: … … 1405 1407 } 1406 1408 break; 1407 1409 1408 1410 case 1: 1409 1411 for (int i = 0; i < item->data.list->n; i++) { -
trunk/ippTools/src/chiptoolConfig.c
r23615 r23688 146 146 147 147 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); 148 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "-code", 0, "set fault code", 0); 148 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 149 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "-quality", 0, "set quality", 0); 149 150 psMetadataAddBool(addprocessedimfileArgs, PS_LIST_TAIL, "-magicked", 0, "define magicked status", false); 150 151 … … 171 172 pxchipSetSearchArgs(revertprocessedimfileArgs); 172 173 psMetadataAddBool(revertprocessedimfileArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 173 psMetadataAddS16(revertprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);174 psMetadataAddS16(revertprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 174 175 175 176 // -updateprocessedimfile … … 177 178 psMetadataAddS64(updateprocessedimfileArgs, PS_LIST_TAIL, "-chip_id", 0, "search by chip ID", 0); 178 179 psMetadataAddStr(updateprocessedimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 179 psMetadataAddS16(updateprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code (required)", 0);180 psMetadataAddS16(updateprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code (required)", 0); 180 181 181 182 // -advanceexp -
trunk/ippTools/src/dettoolConfig.c
r23332 r23688 254 254 psMetadataAddS64(addprocessedimfileArgs, PS_LIST_TAIL, "-exp_id", 0, "define exp ID (required)", 0); 255 255 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-class_id", 0, "define class ID (required)", NULL); 256 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);256 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 257 257 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-uri", 0, "define URI", NULL); 258 258 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-recip", 0, "define recipe", NULL); … … 287 287 psMetadataAddS64(revertprocessedimfileArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 288 288 psMetadataAddStr(revertprocessedimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 289 psMetadataAddS16(revertprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);289 psMetadataAddS16(revertprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 290 290 291 291 // -updateprocessedimfile … … 334 334 psMetadataAddF64(addprocessedexpArgs, PS_LIST_TAIL, "-user_5", 0, "define user statistic (5)", NAN); 335 335 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); 336 psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);336 psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 337 337 338 338 // -proccessedexp … … 348 348 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-det_id", 0, "search by detrend ID (required)", 0); 349 349 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 350 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);350 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 351 351 352 352 // -updateprocessedexp … … 380 380 psMetadataAddS32(addstackedArgs, PS_LIST_TAIL, "-iteration", 0, "define iteration number (required)", 0); 381 381 psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-class_id", 0, "define class ID (required)", NULL); 382 psMetadataAddS16(addstackedArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);382 psMetadataAddS16(addstackedArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 383 383 psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-uri", 0, "define URI", NULL); 384 384 psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-recip", 0, "define recipe", NULL); … … 407 407 psMetadataAddS32(revertstackedArgs, PS_LIST_TAIL, "-iteration", 0, "search by iteration number", 0); 408 408 psMetadataAddStr(revertstackedArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 409 psMetadataAddS16(revertstackedArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);409 psMetadataAddS16(revertstackedArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 410 410 411 411 // -updatestacked … … 443 443 psMetadataAddStr(addnormstatArgs, PS_LIST_TAIL, "-class_id", 0, "define class ID (required)", NULL); 444 444 psMetadataAddF32(addnormstatArgs, PS_LIST_TAIL, "-norm", 0, "define normal value (required)", NAN); 445 psMetadataAddS16(addnormstatArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);445 psMetadataAddS16(addnormstatArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 446 446 447 447 // -normalizedstat … … 459 459 psMetadataAddS32(revertnormalizedstatArgs, PS_LIST_TAIL, "-iteration", 0, "search by iteration number", 0); 460 460 psMetadataAddStr(revertnormalizedstatArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 461 psMetadataAddS16(revertnormalizedstatArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);461 psMetadataAddS16(revertnormalizedstatArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 462 462 463 463 // -updatenormalizedstat … … 494 494 psMetadataAddS32(addnormalizedimfileArgs, PS_LIST_TAIL, "-iteration", 0, "define iteration number", 0); 495 495 psMetadataAddStr(addnormalizedimfileArgs, PS_LIST_TAIL, "-class_id", 0, "define class ID (required)", NULL); 496 psMetadataAddS16(addnormalizedimfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);496 psMetadataAddS16(addnormalizedimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 497 497 psMetadataAddStr(addnormalizedimfileArgs, PS_LIST_TAIL, "-uri", 0, "define URI", NULL); 498 498 psMetadataAddF64(addnormalizedimfileArgs, PS_LIST_TAIL, "-bg", 0, "define exposure background", NAN); … … 521 521 psMetadataAddS32(revertnormalizedimfileArgs, PS_LIST_TAIL, "-iteration", 0, "search by iteration number", 0); 522 522 psMetadataAddStr(revertnormalizedimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 523 psMetadataAddS16(revertnormalizedimfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);523 psMetadataAddS16(revertnormalizedimfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 524 524 525 525 // -updatenormalizedimfile … … 555 555 psMetadataAddS64(addnormalizedexpArgs, PS_LIST_TAIL, "-det_id", 0, "define detrend ID (required)", 0); 556 556 psMetadataAddS32(addnormalizedexpArgs, PS_LIST_TAIL, "-iteration", 0, "define iteration number", 0); 557 psMetadataAddS16(addnormalizedexpArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);557 psMetadataAddS16(addnormalizedexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 558 558 psMetadataAddStr(addnormalizedexpArgs, PS_LIST_TAIL, "-recip", 0, "search for recipe", NULL); 559 559 psMetadataAddF64(addnormalizedexpArgs, PS_LIST_TAIL, "-bg", 0, "define exposure background", NAN); … … 580 580 psMetadataAddS64(revertnormalizedexpArgs, PS_LIST_TAIL, "-det_id", 0, "search by detrend ID (required)", 0); 581 581 psMetadataAddS32(revertnormalizedexpArgs, PS_LIST_TAIL, "-iteration", 0, "search by iteration number", 0); 582 psMetadataAddS16(revertnormalizedexpArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);582 psMetadataAddS16(revertnormalizedexpArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 583 583 584 584 // -updatenormalizedexp … … 616 616 psMetadataAddS64(addresidimfileArgs, PS_LIST_TAIL, "-exp_id", 0, "define detrend ID (required)", 0); 617 617 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-class_id", 0, "define class ID (required)", NULL); 618 psMetadataAddS16(addresidimfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);618 psMetadataAddS16(addresidimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 619 619 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-uri", 0, "define resid file URI", NULL); 620 620 psMetadataAddStr(addresidimfileArgs, PS_LIST_TAIL, "-recip", 0, "define recipe", NULL); … … 658 658 psMetadataAddS64(revertresidimfileArgs, PS_LIST_TAIL, "-exp_id", 0, "search by detrend ID", 0); 659 659 psMetadataAddStr(revertresidimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search for class ID", NULL); 660 psMetadataAddS16(revertresidimfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);660 psMetadataAddS16(revertresidimfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 661 661 662 662 // -updateresidimfile … … 696 696 psMetadataAddS32(addresidexpArgs, PS_LIST_TAIL, "-iteration", 0, "define iteration number", 0); 697 697 psMetadataAddS64(addresidexpArgs, PS_LIST_TAIL, "-exp_id", 0, "define detrend ID (required)", 0); 698 psMetadataAddS16(addresidexpArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);698 psMetadataAddS16(addresidexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 699 699 psMetadataAddStr(addresidexpArgs, PS_LIST_TAIL, "-recip", 0, "define recipe", NULL); 700 700 psMetadataAddF64(addresidexpArgs, PS_LIST_TAIL, "-bg", 0, "define exposure background", NAN); … … 734 734 psMetadataAddS32(revertresidexpArgs, PS_LIST_TAIL, "-iteration", 0, "search by iteration number", 0); 735 735 psMetadataAddS64(revertresidexpArgs, PS_LIST_TAIL, "-exp_id", 0, "search by detrend ID", 0); 736 psMetadataAddS16(revertresidexpArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);736 psMetadataAddS16(revertresidexpArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 737 737 738 738 // -updateresidexp … … 777 777 psMetadataAddF64(adddetrunsummaryArgs, PS_LIST_TAIL, "-bg_stdev", 0, "define exposure background stdev", NAN); 778 778 psMetadataAddF64(adddetrunsummaryArgs, PS_LIST_TAIL, "-bg_mean_stdev", 0, "define exposure background mean stdev", NAN); 779 psMetadataAddS16(adddetrunsummaryArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);779 psMetadataAddS16(adddetrunsummaryArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 780 780 psMetadataAddBool(adddetrunsummaryArgs, PS_LIST_TAIL, "-accept", 0, "declare that this detrun iteration is accepted as a master", false); 781 781 psMetadataAddBool(adddetrunsummaryArgs, PS_LIST_TAIL, "-again", 0, "start a new iteration of this detrend run", false); … … 794 794 psMetadataAddS64(revertdetrunsummaryArgs, PS_LIST_TAIL, "-det_id", 0, "search by detrend ID (required)", 0); 795 795 psMetadataAddS32(revertdetrunsummaryArgs, PS_LIST_TAIL, "-iteration", 0, "search by iteration number", 0); 796 psMetadataAddS16(revertdetrunsummaryArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);796 psMetadataAddS16(revertdetrunsummaryArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 797 797 798 798 // -updatedetrunsummary … … 886 886 PXOPT_ADD_MODE("-input", "", DETTOOL_MODE_INPUT, inputArgs); 887 887 888 PXOPT_ADD_MODE("-toprocessedimfile", "", DETTOOL_MODE_TOPROCESSEDIMFILE, toprocessedimfileArgs);889 PXOPT_ADD_MODE("-addprocessedimfile", "", DETTOOL_MODE_ADDPROCESSEDIMFILE, addprocessedimfileArgs);890 PXOPT_ADD_MODE("-processedimfile", "", DETTOOL_MODE_PROCESSEDIMFILE, processedimfileArgs);891 PXOPT_ADD_MODE("-revertprocessedimfile", "", DETTOOL_MODE_REVERTPROCESSEDIMFILE, revertprocessedimfileArgs);892 PXOPT_ADD_MODE("-updateprocessedimfile", "", DETTOOL_MODE_UPDATEPROCESSEDIMFILE, updateprocessedimfileArgs);888 PXOPT_ADD_MODE("-toprocessedimfile", "", DETTOOL_MODE_TOPROCESSEDIMFILE, toprocessedimfileArgs); 889 PXOPT_ADD_MODE("-addprocessedimfile", "", DETTOOL_MODE_ADDPROCESSEDIMFILE, addprocessedimfileArgs); 890 PXOPT_ADD_MODE("-processedimfile", "", DETTOOL_MODE_PROCESSEDIMFILE, processedimfileArgs); 891 PXOPT_ADD_MODE("-revertprocessedimfile", "", DETTOOL_MODE_REVERTPROCESSEDIMFILE, revertprocessedimfileArgs); 892 PXOPT_ADD_MODE("-updateprocessedimfile", "", DETTOOL_MODE_UPDATEPROCESSEDIMFILE, updateprocessedimfileArgs); 893 893 PXOPT_ADD_MODE("-pendingcleanup_processedimfile", "", DETTOOL_MODE_PENDINGCLEANUP_PROCESSEDIMFILE, pendingcleanup_processedimfileArgs); 894 894 PXOPT_ADD_MODE("-donecleanup_processedimfile", "", DETTOOL_MODE_DONECLEANUP_PROCESSEDIMFILE, donecleanup_processedimfileArgs); -
trunk/ippTools/src/dettool_detrunsummary.c
r21402 r23688 101 101 102 102 // default values 103 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);103 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 104 104 PXOPT_LOOKUP_BOOL(accept, config->args, "-accept", false); 105 105 … … 107 107 det_id, 108 108 iteration, 109 "full",109 "full", 110 110 bg, 111 111 bg_stdev, 112 112 bg_mean_stdev, 113 113 accept, 114 code114 fault 115 115 ); 116 116 } … … 120 120 { 121 121 PS_ASSERT_PTR_NON_NULL(config, false); 122 122 123 123 // build a query to search by det_id, iteration, exp_id 124 124 psMetadata *where = psMetadataAlloc(); … … 129 129 PXOPT_LOOKUP_BOOL(again, config->args, "-again", false); 130 130 131 // The values supplied as arguments on the command (eg, -bg) are parsed 132 // by mdToDetRunSummary below. 131 // The values supplied as arguments on the command (eg, -bg) are parsed 132 // by mdToDetRunSummary below. 133 133 // XXX why is there ever more than one? 134 134 … … 141 141 if (psListLength(where->list)) { 142 142 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 143 psStringAppend(&query, " WHERE %s", whereClause);144 psFree(whereClause);143 psStringAppend(&query, " WHERE %s", whereClause); 144 psFree(whereClause); 145 145 } 146 146 psFree(where); … … 199 199 psFree(output); 200 200 201 // XXX this logic does not deal with the case of - codebeing set202 // XXX it should be an error for -again and - codeto both be set201 // XXX this logic does not deal with the case of -fault being set 202 // XXX it should be an error for -again and -fault to both be set 203 203 if (again) { 204 204 if (!startNewIteration(config, det_id)) { … … 306 306 PXOPT_COPY_S64(config->args, where, "-det_id", "det_id", "=="); 307 307 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 308 PXOPT_COPY_STR(config->args, where, "- code", "fault", "==");308 PXOPT_COPY_STR(config->args, where, "-fault", "fault", "=="); 309 309 310 310 psString query = pxDataGet("dettool_revertdetrunsummary.sql"); … … 340 340 { 341 341 PS_ASSERT_PTR_NON_NULL(config, false); 342 342 343 343 PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false); // required 344 344 PXOPT_LOOKUP_BOOL(accept, config->args, "-accept", false); … … 355 355 } 356 356 357 char *query = "UPDATE detRunSummary SET accept = %d WHERE det_id = %"PRId64; 357 char *query = "UPDATE detRunSummary SET accept = %d WHERE det_id = %"PRId64; 358 358 if (!p_psDBRunQueryF(config->dbh, query, accept, det_id)) { 359 359 psError(PS_ERR_UNKNOWN, false, "database error"); -
trunk/ippTools/src/dettool_normalizedexp.c
r19092 r23688 72 72 { 73 73 PS_ASSERT_PTR_NON_NULL(config, false); 74 74 75 75 PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false); // required 76 76 PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false); 77 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);78 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", ( code == 0), false); // Required if code== 077 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 78 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); // Required if fault == 0 79 79 PXOPT_LOOKUP_F64(bg, config->args, "-bg", false, false); 80 80 PXOPT_LOOKUP_F64(bg_stdev, config->args, "-bg_stdev", false, false); … … 117 117 // insert the new row into the detProcessedImfile table 118 118 if (!detNormalizedExpInsert( 119 config->dbh,120 det_id,121 iteration,122 recipe,123 bg,124 bg_stdev,125 bg_mean_stdev,126 user_1,127 user_2,128 user_3,129 user_4,130 user_5,131 path_base,132 "full",133 code 134 )) {119 config->dbh, 120 det_id, 121 iteration, 122 recipe, 123 bg, 124 bg_stdev, 125 bg_mean_stdev, 126 user_1, 127 user_2, 128 user_3, 129 user_4, 130 user_5, 131 path_base, 132 "full", 133 fault 134 )) { 135 135 psError(PS_ERR_UNKNOWN, false, "database error"); 136 136 return false; … … 221 221 PXOPT_COPY_S64(config->args, where, "-det_id", "det_id", "=="); 222 222 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 223 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");223 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 224 224 225 225 psString query = pxDataGet("dettool_revertnormalizedexp.sql"); … … 260 260 261 261 if (!setNormExpDataState(config, det_id, iteration, data_state)) { 262 return false;262 return false; 263 263 } 264 264 return true; -
trunk/ippTools/src/dettool_normalizedimfile.c
r19092 r23688 80 80 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 81 81 82 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);83 84 // Required if code== 085 PXOPT_LOOKUP_STR(uri, config->args, "-uri", ( code== 0), false);82 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 83 84 // Required if fault == 0 85 PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false); 86 86 87 87 // optional … … 97 97 98 98 if (!detNormalizedImfileInsert( 99 config->dbh,100 det_id,101 iteration,102 class_id,103 uri,104 bg,105 bg_stdev,106 bg_mean_stdev,107 user_1,108 user_2,109 user_3,110 user_4,111 user_5,112 path_base,113 "full",114 code 115 )) {99 config->dbh, 100 det_id, 101 iteration, 102 class_id, 103 uri, 104 bg, 105 bg_stdev, 106 bg_mean_stdev, 107 user_1, 108 user_2, 109 user_3, 110 user_4, 111 user_5, 112 path_base, 113 "full", 114 fault 115 )) { 116 116 psError(PS_ERR_UNKNOWN, false, "database error"); 117 117 return false; … … 201 201 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 202 202 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 203 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");203 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 204 204 205 205 psString query = pxDataGet("dettool_revertnormalizedimfile.sql"); … … 241 241 242 242 if (!setNormImfileDataState(config, det_id, iteration, class_id, data_state)) { 243 return false;243 return false; 244 244 } 245 245 return true; -
trunk/ippTools/src/dettool_normalizedstat.c
r19092 r23688 83 83 // default 84 84 PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false); 85 PXOPT_LOOKUP_S16(code, config->args, "- code", false, false);85 PXOPT_LOOKUP_S16(code, config->args, "-fault", false, false); 86 86 87 87 detNormalizedStatImfileRow *row = detNormalizedStatImfileRowAlloc 88 (det_id,89 iteration,90 class_id,91 norm,92 "full",93 code);94 88 (det_id, 89 iteration, 90 class_id, 91 norm, 92 "full", 93 code); 94 95 95 if (!detNormalizedStatImfileInsertObject(config->dbh, row)) { 96 psError(PS_ERR_UNKNOWN, false, "database error");97 return false;96 psError(PS_ERR_UNKNOWN, false, "database error"); 97 return false; 98 98 } 99 99 … … 181 181 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 182 182 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 183 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");183 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 184 184 185 185 psString query = pxDataGet("dettool_revertnormalizedstat.sql"); … … 221 221 222 222 if (!setNormStatImfileDataState(config, det_id, iteration, class_id, data_state)) { 223 return false;223 return false; 224 224 } 225 225 return true; -
trunk/ippTools/src/dettool_processedexp.c
r21402 r23688 80 80 81 81 // default values 82 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);83 84 // Required if code== 085 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", ( code== 0), false);82 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 83 84 // Required if fault == 0 85 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); 86 86 87 87 // optional … … 141 141 user_5, 142 142 path_base, 143 "full",144 code143 "full", 144 fault 145 145 ); 146 146 … … 231 231 PXOPT_COPY_S64(config->args, where, "-det_id", "det_id", "=="); 232 232 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 233 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");233 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 234 234 235 235 psString query = pxDataGet("dettool_revertprocessedexp.sql"); … … 269 269 PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", true, false); 270 270 if (!setProcessedExpDataState(config, det_id, exp_id, data_state)) { 271 return false;271 return false; 272 272 } 273 273 return true; -
trunk/ippTools/src/dettool_processedimfile.c
r23229 r23688 92 92 93 93 // default values 94 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);95 96 // Required if code== 097 PXOPT_LOOKUP_STR(uri, config->args, "-uri", ( code== 0), false);98 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", ( code== 0), false);94 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 95 96 // Required if fault == 0 97 PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false); 98 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); 99 99 100 100 // optional … … 144 144 user_5, 145 145 path_base, 146 "full",147 code146 "full", 147 fault 148 148 ); 149 149 psFree(rawImfiles); … … 190 190 psStringAppend(&query, " %s", whereClause); 191 191 psFree(whereClause); 192 hasWhere = true;192 hasWhere = true; 193 193 } 194 194 psFree (where); … … 196 196 // restrict search to included imfiles 197 197 if (included) { 198 if (hasWhere) {199 psStringAppend(&query, " AND detInputExp.include = 1");200 } else {201 psStringAppend(&query, " WHERE detInputExp.include = 1");202 }203 hasWhere = true;198 if (hasWhere) { 199 psStringAppend(&query, " AND detInputExp.include = 1"); 200 } else { 201 psStringAppend(&query, " WHERE detInputExp.include = 1"); 202 } 203 hasWhere = true; 204 204 } 205 205 206 206 if (hasWhere) { 207 psStringAppend(&query, " AND");207 psStringAppend(&query, " AND"); 208 208 } else { 209 psStringAppend(&query, " WHERE");209 psStringAppend(&query, " WHERE"); 210 210 } 211 211 212 212 if (faulted) { 213 213 // list only faulted rows 214 psStringAppend(&query, " %s", " detProcessedImfile.fault != 0");214 psStringAppend(&query, " %s", " detProcessedImfile.fault != 0"); 215 215 } else { 216 216 // don't list faulted rows … … 263 263 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 264 264 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 265 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");265 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 266 266 267 267 psString query = pxDataGet("dettool_revertprocessedimfile.sql"); … … 303 303 304 304 if (!setProcessedImfileDataState(config, det_id, exp_id, class_id, data_state)) { 305 return false;305 return false; 306 306 } 307 307 return true; -
trunk/ippTools/src/dettool_residexp.c
r19092 r23688 95 95 PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false); 96 96 PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false); // required 97 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);98 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", ( code == 0), false); // Required if code== 097 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 98 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); // Required if fault == 0 99 99 PXOPT_LOOKUP_F64(bg, config->args, "-bg", false, false); 100 100 PXOPT_LOOKUP_F64(bg_stdev, config->args, "-bg_stdev", false, false); … … 124 124 125 125 if (psListLength(where->list)) { 126 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);127 psStringAppend(&query, " WHERE %s", whereClause);128 psFree(whereClause);126 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 127 psStringAppend(&query, " WHERE %s", whereClause); 128 psFree(whereClause); 129 129 } 130 130 psFree(where); … … 151 151 152 152 if (!detResidExpInsert( 153 config->dbh,153 config->dbh, 154 154 det_id, 155 155 iteration, … … 174 174 user_5, 175 175 path_base, 176 "full",176 "full", 177 177 !reject, 178 code178 fault 179 179 )) { 180 180 psError(PS_ERR_UNKNOWN, false, "database error"); … … 225 225 if (reject) { 226 226 psStringAppend(&query, " %s", "AND detResidExp.accept != 0"); 227 } 227 } 228 228 229 229 // treat limit == 0 as "no limit" … … 273 273 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 274 274 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 275 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");275 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 276 276 277 277 psString query = pxDataGet("dettool_revertresidexp.sql"); … … 330 330 PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", false, false); 331 331 if (data_state) { 332 if (!isValidDataState (data_state)) return false;332 if (!isValidDataState (data_state)) return false; 333 333 } 334 334 -
trunk/ippTools/src/dettool_residimfile.c
r23229 r23688 75 75 PS_ASSERT_PTR_NON_NULL(config, false); 76 76 77 77 78 78 PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false); // required 79 79 PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false); … … 84 84 PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false); // required 85 85 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); // required 86 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);87 PXOPT_LOOKUP_STR(uri, config->args, "-uri", ( code == 0), false); // Required if code== 088 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", ( code == 0), false); // Required if code== 086 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 87 PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false); // Required if fault == 0 88 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); // Required if fault == 0 89 89 PXOPT_LOOKUP_F64(bg, config->args, "-bg", false, false); 90 90 PXOPT_LOOKUP_F64(bg_stdev, config->args, "-bg_stdev", false, false); … … 107 107 108 108 if (!detResidImfileInsert( 109 config->dbh,109 config->dbh, 110 110 det_id, 111 111 iteration, … … 134 134 user_5, 135 135 path_base, 136 "full",137 code136 "full", 137 fault 138 138 )) { 139 139 psError(PS_ERR_UNKNOWN, false, "database error"); … … 174 174 psStringAppend(&query, " %s", whereClause); 175 175 psFree(whereClause); 176 hasWhere = true;176 hasWhere = true; 177 177 } 178 178 psFree(where); … … 180 180 // restrict search to included imfiles 181 181 if (included) { 182 if (hasWhere) {183 psStringAppend(&query, " AND detInputExp.include = 1");184 } else {185 psStringAppend(&query, " WHERE detInputExp.include = 1");186 }187 hasWhere = true;182 if (hasWhere) { 183 psStringAppend(&query, " AND detInputExp.include = 1"); 184 } else { 185 psStringAppend(&query, " WHERE detInputExp.include = 1"); 186 } 187 hasWhere = true; 188 188 } 189 189 190 190 if (hasWhere) { 191 psStringAppend(&query, " AND");191 psStringAppend(&query, " AND"); 192 192 } else { 193 psStringAppend(&query, " WHERE");193 psStringAppend(&query, " WHERE"); 194 194 } 195 195 … … 249 249 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 250 250 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 251 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");251 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 252 252 253 253 psString query = pxDataGet("dettool_revertresidimfile.sql"); … … 289 289 PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", true, false); 290 290 if (!setResidImfileDataState(config, det_id, iteration, exp_id, class_id, data_state)) { 291 return false;291 return false; 292 292 } 293 293 return true; -
trunk/ippTools/src/dettool_stack.c
r19092 r23688 127 127 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 128 128 129 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);130 131 // Required if code== 0132 PXOPT_LOOKUP_STR(uri, config->args, "-uri", ( code== 0), false);133 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", ( code== 0), false);129 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 130 131 // Required if fault == 0 132 PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false); 133 PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); 134 134 135 135 // optional … … 188 188 user_4, 189 189 user_5, 190 "full",191 code190 "full", 191 fault 192 192 ); 193 193 … … 286 286 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 287 287 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 288 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");288 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 289 289 290 290 psString query = pxDataGet("dettool_revertstacked.sql"); … … 326 326 327 327 if (!setStackedImfileDataState(config, det_id, iteration, class_id, data_state)) { 328 return false;328 return false; 329 329 } 330 330 return true; -
trunk/ippTools/src/difftool.c
r23634 r23688 485 485 PXOPT_LOOKUP_S64(diff_id, config->args, "-diff_id", true, false); // required 486 486 PXOPT_LOOKUP_STR(skycell_id, config->args, "-skycell_id", true, false); 487 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 488 PXOPT_LOOKUP_STR(uri, config->args, "-uri", (code == 0), false); 489 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", (code == 0), false); 487 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 488 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 489 PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false); 490 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", (fault == 0), false); 490 491 491 492 // optional … … 540 541 hostname, 541 542 good_frac, 542 code, 543 fault, 544 quality, 543 545 magicked 544 546 )) { … … 578 580 PXOPT_COPY_S64(config->args, where, "-diff_skyfile_id", "diffInputSkyfile.diff_skyfile_id", "=="); 579 581 PXOPT_COPY_STR(config->args, where, "-tess_id", "diffSkyfile.tess_id", "=="); 580 PXOPT_COPY_S16(config->args, where, "- code", "diffSkyfile.fault", "==");582 PXOPT_COPY_S16(config->args, where, "-fault", "diffSkyfile.fault", "=="); 581 583 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); 582 584 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); … … 655 657 PXOPT_COPY_S64(config->args, where, "-diff_id", "diffSkyfile.diff_id", "=="); 656 658 PXOPT_COPY_STR(config->args, where, "-label", "diffRun.label", "=="); 657 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");659 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 658 660 659 661 if (!psDBTransaction(config->dbh)) { … … 1269 1271 PXOPT_COPY_S64(config->args, selectWhere, "-exp_id", "inputRawExp.exp_id", "=="); 1270 1272 PXOPT_COPY_STR(config->args, selectWhere, "-filter", "inputRawExp.filter", "=="); 1273 PXOPT_COPY_STR(config->args, selectWhere, "-obs_mode", "inputRawExp.obs_mode", "=="); 1274 PXOPT_COPY_STR(config->args, selectWhere, "-obs_mode", "templateRawExp.obs_mode", "=="); 1271 1275 PXOPT_COPY_STR(config->args, selectWhere, "-input_label", "inputWarpRun.label", "=="); 1272 1276 PXOPT_COPY_STR(config->args, selectWhere, "-template_label", "templateWarpRun.label", "=="); … … 1662 1666 PS_ASSERT_PTR_NON_NULL(config, false); 1663 1667 1664 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);1668 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 1665 1669 1666 1670 psMetadata *where = psMetadataAlloc(); 1667 1671 PXOPT_COPY_S64(config->args, where, "-diff_id", "diff_id", "=="); 1668 1672 1669 if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, code)) {1673 if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, fault)) { 1670 1674 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 1671 1675 psFree (where); -
trunk/ippTools/src/difftoolConfig.c
r23634 r23688 88 88 psMetadataAddS64(adddiffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0, "define warp ID (required)", 0); 89 89 psMetadataAddStr(adddiffskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0, "define skycell of file (required)", 0); 90 psMetadataAddS16(adddiffskyfileArgs, PS_LIST_TAIL, "-code", 0, "set fault code", 0); 90 psMetadataAddS16(adddiffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 91 psMetadataAddS16(adddiffskyfileArgs, PS_LIST_TAIL, "-quality", 0, "set quality", 0); 91 92 psMetadataAddStr(adddiffskyfileArgs, PS_LIST_TAIL, "-uri", 0, "define URI of file", 0); 92 93 psMetadataAddStr(adddiffskyfileArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", 0); … … 123 124 psMetadataAddU64(diffskyfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 124 125 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 125 psMetadataAddS16(diffskyfileArgs, PS_LIST_TAIL, "- code", 0, "deifine fault code", 0);126 psMetadataAddS16(diffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 126 127 127 128 // -revertdiffskyfile … … 129 130 psMetadataAddS64(revertdiffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0, "search by diff ID", 0); 130 131 psMetadataAddStr(revertdiffskyfileArgs, PS_LIST_TAIL, "-label", 0, "search by label", NULL); 131 psMetadataAddS16(revertdiffskyfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);132 psMetadataAddS16(revertdiffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 132 133 133 134 // -definepoprun … … 171 172 psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-filter", 0, "search by filter", NULL); 172 173 psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-distance", 0, "limit distance between input and template (deg)", NAN); 174 psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-obs_mode", 0, "search by observation mode", NULL); 173 175 psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-timediff", 0, "limit time difference between input and template", NAN); 174 176 psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-rotdiff", 0, "limit rotator difference between input and template", NAN); … … 205 207 psMetadata *updatediffskyfileArgs = psMetadataAlloc(); 206 208 psMetadataAddS64(updatediffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0, "define diff ID (required)", 0); 207 psMetadataAddS16(updatediffskyfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code (required)", 0);209 psMetadataAddS16(updatediffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code (required)", 0); 208 210 209 211 // -exportrun -
trunk/ippTools/src/disttool.c
r23661 r23688 106 106 107 107 // TODO: should we check that stage_id actually exists for stage 108 // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up 108 // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up 109 109 // when the run is queued 110 110 … … 151 151 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); 152 152 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 153 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);154 155 if ((!state) && (!label) && (! code)) {156 psError(PXTOOLS_ERR_DATA, false, "parameters (- codeor -set_state or -set_label) are required");153 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 154 155 if ((!state) && (!label) && (!fault)) { 156 psError(PXTOOLS_ERR_DATA, false, "parameters (-fault or -set_state or -set_label) are required"); 157 157 psFree(where); 158 158 return false; … … 169 169 } 170 170 171 if ( code) {172 psStringAppend(&query, " , fault = %d", code);171 if (fault) { 172 psStringAppend(&query, " , fault = %d", fault); 173 173 } 174 174 … … 195 195 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 196 196 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 197 PXOPT_COPY_S16(config->args, where, "- code", "distComponent.fault", "==");197 PXOPT_COPY_S16(config->args, where, "-fault", "distComponent.fault", "=="); 198 198 199 199 // It might be useful to be able to query by the parameters of the underlying runs … … 402 402 // unless fault code is set require filename, bytes, and md5sum 403 403 bool require_fileinfo = false; 404 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);405 if (! code) {404 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 405 if (!fault) { 406 406 require_fileinfo = true; 407 407 } … … 410 410 PXOPT_LOOKUP_STR(name, config->args, "-name", require_fileinfo, false); 411 411 412 if (!distComponentInsert(config->dbh, dist_id, component, bytes, md5sum, "full", name, code)) {412 if (!distComponentInsert(config->dbh, dist_id, component, bytes, md5sum, "full", name, fault)) { 413 413 psError(PS_ERR_UNKNOWN, false, "database error"); 414 414 return false; -
trunk/ippTools/src/disttoolConfig.c
r23661 r23688 46 46 psMetadata *definerunArgs = psMetadataAlloc(); 47 47 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-stage", 0, "define stage for bundle (required)", NULL); 48 psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-stage_id", 0, "define stage_id (required)", 0); 48 psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-stage_id", 0, "define stage_id (required)", 0); 49 49 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-outroot", 0, "define output destination (required)", NULL); 50 50 psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-target_id", 0, "define stage_id", 0); … … 52 52 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-no_magic", 0, "magic is not needed", false); 53 53 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-set_label", 0, "define label for run", NULL); 54 54 55 55 // -updaterun 56 56 psMetadata *updaterunArgs = psMetadataAlloc(); 57 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 57 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 58 58 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "new value for state", NULL); 59 59 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_label", 0, "new value for label", NULL); … … 61 61 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "value for state", NULL); 62 62 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "limit updates to label", NULL); 63 psMetadataAddS16(updaterunArgs, PS_LIST_TAIL, "- code", 0, "define fault code", 0);64 63 psMetadataAddS16(updaterunArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 64 65 65 // -revertrun 66 66 psMetadata *revertrunArgs = psMetadataAlloc(); 67 psMetadataAddS64(revertrunArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 67 psMetadataAddS64(revertrunArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 68 68 psMetadataAddStr(revertrunArgs, PS_LIST_TAIL, "-stage", 0, "define stage", NULL); 69 psMetadataAddS64(revertrunArgs, PS_LIST_TAIL, "-stage_id", 0, "define stage_id", 0); 69 psMetadataAddS64(revertrunArgs, PS_LIST_TAIL, "-stage_id", 0, "define stage_id", 0); 70 70 psMetadataAddStr(revertrunArgs, PS_LIST_TAIL, "-state", 0, "define state", NULL); 71 71 psMetadataAddStr(revertrunArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL); 72 psMetadataAddS16(revertrunArgs, PS_LIST_TAIL, "- code", 0, "define fault code", 0);72 psMetadataAddS16(revertrunArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 73 73 psMetadataAddBool(revertrunArgs, PS_LIST_TAIL, "-all", 0, "revert all faulted runs", NULL); 74 74 75 75 // -pendingcomponent 76 76 psMetadata *pendingcomponentArgs = psMetadataAlloc(); 77 psMetadataAddS64(pendingcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 77 psMetadataAddS64(pendingcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 78 78 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-stage", 0, "limit results to runs for stage", NULL); 79 79 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-label", 0, "limit results to label", NULL); … … 84 84 // -addprocessedcomponent 85 85 psMetadata *addprocessedcomponentArgs = psMetadataAlloc(); 86 psMetadataAddS64(addprocessedcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 86 psMetadataAddS64(addprocessedcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 87 87 psMetadataAddStr(addprocessedcomponentArgs, PS_LIST_TAIL, "-component", 0, "define component (required)", NULL); 88 88 psMetadataAddStr(addprocessedcomponentArgs, PS_LIST_TAIL, "-name", 0, "define file name", NULL); 89 psMetadataAddS32(addprocessedcomponentArgs, PS_LIST_TAIL, "-bytes", 0, "define file size", 0); 89 psMetadataAddS32(addprocessedcomponentArgs, PS_LIST_TAIL, "-bytes", 0, "define file size", 0); 90 90 psMetadataAddStr(addprocessedcomponentArgs, PS_LIST_TAIL, "-md5sum", 0, "define stage for bundle", NULL); 91 psMetadataAddS32(addprocessedcomponentArgs, PS_LIST_TAIL, "- code", 0, "define fault code", 0);91 psMetadataAddS32(addprocessedcomponentArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 92 92 93 93 // -processedcomponent 94 94 psMetadata *processedcomponentArgs = psMetadataAlloc(); 95 psMetadataAddS64(processedcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 95 psMetadataAddS64(processedcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 96 96 psMetadataAddU64(processedcomponentArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 97 97 psMetadataAddBool(processedcomponentArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); … … 99 99 // -toadvance 100 100 psMetadata *toadvanceArgs = psMetadataAlloc(); 101 psMetadataAddS64(toadvanceArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 101 psMetadataAddS64(toadvanceArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 102 102 psMetadataAddU64(toadvanceArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 103 103 psMetadataAddBool(toadvanceArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); -
trunk/ippTools/src/faketool.c
r23339 r23688 496 496 497 497 // default values 498 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);498 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 499 499 500 500 if (!psDBTransaction(config->dbh)) { … … 513 513 path_base, 514 514 "full", 515 code,515 fault, 516 516 NULL // epoch 517 517 )) { … … 687 687 PS_ASSERT_PTR_NON_NULL(config, false); 688 688 689 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);689 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 690 690 691 691 psMetadata *where = psMetadataAlloc(); … … 693 693 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 694 694 695 if (!pxSetFaultCode(config->dbh, "fakeProcessedImfile", where, code)) {695 if (!pxSetFaultCode(config->dbh, "fakeProcessedImfile", where, fault)) { 696 696 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 697 697 psFree(where); … … 1238 1238 1239 1239 int numExportTables = 2; 1240 1240 1241 1241 PS_ASSERT_PTR_NON_NULL(config, NULL); 1242 1242 … … 1316 1316 1317 1317 PS_ASSERT_PTR_NON_NULL(config, NULL); 1318 1318 1319 1319 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1320 1320 -
trunk/ippTools/src/faketoolConfig.c
r23339 r23688 175 175 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-hostname", 0, "define hostname", NULL); 176 176 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); 177 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);177 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 178 178 179 179 // -processedimfile … … 193 193 psMetadataAddS64(updateprocessedimfileArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 194 194 psMetadataAddStr(updateprocessedimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 195 psMetadataAddS16(updateprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code (required)", 0);195 psMetadataAddS16(updateprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code (required)", 0); 196 196 197 197 // -revertprocessedimfile … … 239 239 240 240 psMetadataAddBool(revertprocessedimfileArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 241 psMetadataAddS16(revertprocessedimfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);241 psMetadataAddS16(revertprocessedimfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 242 242 243 243 -
trunk/ippTools/src/flatcorr.c
r23310 r23688 117 117 } 118 118 119 // require the camera to be defined: this analysis does not make sense 119 // require the camera to be defined: this analysis does not make sense 120 120 // across multiple cameras 121 121 PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false); … … 169 169 170 170 if (pretend) { 171 for (long i = 0; i < psArrayLength(output); i++) {172 // negative simple so the default is true173 if (!ippdbPrintMetadataRaw(stdout, output->data[i], !simple)) {174 psError(PS_ERR_UNKNOWN, false, "failed to print array");175 psFree(output);176 return false;177 }178 }171 for (long i = 0; i < psArrayLength(output); i++) { 172 // negative simple so the default is true 173 if (!ippdbPrintMetadataRaw(stdout, output->data[i], !simple)) { 174 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 175 psFree(output); 176 return false; 177 } 178 } 179 179 psFree(output); 180 180 return true; … … 191 191 // create a new flatcorrRun 192 192 if (!flatcorrRunInsert( 193 config->dbh,193 config->dbh, 194 194 0, // corr_id 195 det_type,195 det_type, 196 196 dvodb, 197 camera,198 telescope,199 NULL,197 camera, 198 telescope, 199 NULL, 200 200 filter, 201 201 "reg", // state … … 203 203 label, 204 204 reduction, 205 region,206 NULL,207 0205 region, 206 NULL, 207 0 208 208 )) { 209 209 if (!psDBRollback(config->dbh)) { … … 304 304 // create a new flatcorrRun 305 305 flatcorrRunRow *row = flatcorrRunRowAlloc( 306 0, // corr_id307 det_type,308 dvodb,309 camera,310 telescope,311 NULL,312 filter,313 "reg", // state314 workdir,315 label,316 reduction,317 region,318 NULL, // hostname319 0 // fault306 0, // corr_id 307 det_type, 308 dvodb, 309 camera, 310 telescope, 311 NULL, 312 filter, 313 "reg", // state 314 workdir, 315 label, 316 reduction, 317 region, 318 NULL, // hostname 319 0 // fault 320 320 ); 321 321 … … 328 328 return false; 329 329 } 330 330 331 331 // figure out the ID of the flatcorrRun we just created 332 332 psS64 corr_id = psDBLastInsertID(config->dbh); … … 365 365 psString query = pxDataGet("flatcorr_dropchip.sql"); 366 366 if (!query) { 367 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");368 return false;367 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 368 return false; 369 369 } 370 370 … … 390 390 psString query = pxDataGet("flatcorr_chiprundone.sql"); 391 391 if (!query) { 392 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");393 return false;392 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 393 return false; 394 394 } 395 395 396 396 // treat limit == 0 as "no limit" 397 397 if (limit) { 398 psString limitString = psDBGenerateLimitSQL(limit);399 psStringAppend(&query, " %s", limitString);400 psFree(limitString);398 psString limitString = psDBGenerateLimitSQL(limit); 399 psStringAppend(&query, " %s", limitString); 400 psFree(limitString); 401 401 } 402 402 … … 459 459 // queue the exp 460 460 if (!pxcamQueueByChipID( 461 config,462 row->chip_id,463 row->workdir,464 row->label,465 row->reduction,466 row->expgroup,467 row->dvodb,468 row->tess_id,469 "camera")) {461 config, 462 row->chip_id, 463 row->workdir, 464 row->label, 465 row->reduction, 466 row->expgroup, 467 row->dvodb, 468 row->tess_id, 469 "camera")) { 470 470 if (!psDBRollback(config->dbh)) { 471 471 psError(PS_ERR_UNKNOWN, false, "database error"); … … 478 478 } 479 479 480 // figure out the ID of the flatcorrRun we just created481 psS64 cam_id = psDBLastInsertID(config->dbh);482 483 // add the camRun entry to the flatcorrCamLink table (include is TRUE)480 // figure out the ID of the flatcorrRun we just created 481 psS64 cam_id = psDBLastInsertID(config->dbh); 482 483 // add the camRun entry to the flatcorrCamLink table (include is TRUE) 484 484 if (!flatcorrCamLinkInsert(config->dbh, corr_id, row->chip_id, cam_id, 1)) { 485 485 if (!psDBRollback(config->dbh)) { … … 489 489 return false; 490 490 } 491 491 492 492 psFree(row); 493 493 } … … 513 513 psString query = pxDataGet("flatcorr_dropcamera.sql"); 514 514 if (!query) { 515 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");516 return false;515 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 516 return false; 517 517 } 518 518 … … 537 537 psString query = pxDataGet("flatcorr_pendingprocess.sql"); 538 538 if (!query) { 539 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");540 return false;539 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 540 return false; 541 541 } 542 542 543 543 // treat limit == 0 as "no limit" 544 544 if (limit) { 545 psString limitString = psDBGenerateLimitSQL(limit);546 psStringAppend(&query, " %s", limitString);547 psFree(limitString);545 psString limitString = psDBGenerateLimitSQL(limit); 546 psStringAppend(&query, " %s", limitString); 547 psFree(limitString); 548 548 } 549 549 … … 566 566 567 567 if (!ippdbPrintMetadatas(stdout, output, "flatcorrPending", !simple)) { 568 psError(PS_ERR_UNKNOWN, false, "failed to print array");569 psFree(output);570 return false;568 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 569 psFree(output); 570 return false; 571 571 } 572 572 … … 588 588 // treat limit == 0 as "no limit" 589 589 if (limit) { 590 psString limitString = psDBGenerateLimitSQL(limit);591 psStringAppend(&query, " %s", limitString);592 psFree(limitString);590 psString limitString = psDBGenerateLimitSQL(limit); 591 psStringAppend(&query, " %s", limitString); 592 psFree(limitString); 593 593 } 594 594 … … 611 611 612 612 if (!ippdbPrintMetadatas(stdout, output, "flatcorrPending", !simple)) { 613 psError(PS_ERR_UNKNOWN, false, "failed to print array");614 psFree(output);615 return false;613 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 614 psFree(output); 615 return false; 616 616 } 617 617 … … 628 628 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 629 629 PXOPT_LOOKUP_BOOL(limit, config->args, "-limit", false); 630 630 631 631 psMetadata *where = psMetadataAlloc(); 632 632 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipProcessedImfile.chip_id", "=="); … … 647 647 // treat limit == 0 as "no limit" 648 648 if (limit) { 649 psString limitString = psDBGenerateLimitSQL(limit);650 psStringAppend(&query, " %s", limitString);651 psFree(limitString);649 psString limitString = psDBGenerateLimitSQL(limit); 650 psStringAppend(&query, " %s", limitString); 651 psFree(limitString); 652 652 } 653 653 … … 670 670 671 671 if (!ippdbPrintMetadatas(stdout, output, "flatcorrPending", !simple)) { 672 psError(PS_ERR_UNKNOWN, false, "failed to print array");673 psFree(output);674 return false;672 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 673 psFree(output); 674 return false; 675 675 } 676 676 … … 685 685 PXOPT_LOOKUP_S64(corr_id, config->args, "-corr_id", true, false); 686 686 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 687 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);687 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 688 688 689 689 char *query = "UPDATE flatcorrRun SET state = 'full', hostname = '%s', fault = '%hd' WHERE corr_id = %" PRId64; 690 690 691 if (!p_psDBRunQueryF(config->dbh, query, hostname, code, corr_id)) {691 if (!p_psDBRunQueryF(config->dbh, query, hostname, fault, corr_id)) { 692 692 psError(PS_ERR_UNKNOWN, false, "failed to change state for corr_id %" PRId64, corr_id); 693 693 return false; … … 721 721 722 722 // check that state is a valid string value 723 if (!strcmp(state, "reg") && 724 !strcmp(state, "new") && 725 !strcmp(state, "full"))723 if (!strcmp(state, "reg") && 724 !strcmp(state, "new") && 725 !strcmp(state, "full")) 726 726 { 727 727 psError(PS_ERR_UNKNOWN, false, "invalid state: %s", state); … … 745 745 char sqlFilename[80]; 746 746 } ExportTable; 747 747 748 748 int numExportTables = 3; 749 749 … … 825 825 unsigned int nFail; 826 826 psMetadataItem *item, *entry; 827 827 828 828 int numImportTables = 3; 829 829 830 830 char tables[3] [80] = {"flatcorrRun", "flatcorrCamLink", "flatcorrChipLink"}; 831 831 832 832 PS_ASSERT_PTR_NON_NULL(config, NULL); 833 833 834 834 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 835 835 … … 843 843 psAssert (item, "entry not in input?"); 844 844 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 845 845 846 846 entry = psListGet (item->data.list, 0); 847 847 assert (entry); 848 848 assert (entry->type == PS_DATA_METADATA); 849 849 850 850 switch (i) { 851 851 case 0: … … 857 857 // psMetadataPrint (stderr, entry->data.md, 1); 858 858 break; 859 } 859 } 860 860 case 1: 861 861 { -
trunk/ippTools/src/flatcorrConfig.c
r23310 r23688 106 106 psMetadataAddS64 (addprocessArgs, PS_LIST_TAIL, "-corr_id", 0, "add complete run for specified corr_id (required)", 0); 107 107 psMetadataAddStr (addprocessArgs, PS_LIST_TAIL, "-hostname", 0, "set hostname", NULL); 108 psMetadataAddS16 (addprocessArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);108 psMetadataAddS16 (addprocessArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 109 109 110 110 // -updaterun -
trunk/ippTools/src/magicdstool.c
r23438 r23688 599 599 600 600 // default values 601 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);601 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 602 602 PXOPT_LOOKUP_STR(backup_path_base, config->args, "-backup_path_base", false, false); 603 603 PXOPT_LOOKUP_STR(recovery_path_base, config->args, "-recovery_path_base", false, false); 604 604 PXOPT_LOOKUP_BOOL(setmagicked, config->args, "-setmagicked", false); 605 605 606 if (setmagicked && ( code!= 0)) {606 if (setmagicked && (fault != 0)) { 607 607 psError(PS_ERR_UNKNOWN, true, " cannot setmagicked for faulted file"); 608 608 return false; … … 625 625 } 626 626 627 if (!magicDSFileInsert(config->dbh, magic_ds_id, component, backup_path_base, recovery_path_base, code)) {627 if (!magicDSFileInsert(config->dbh, magic_ds_id, component, backup_path_base, recovery_path_base, fault)) { 628 628 // rollback 629 629 if (!psDBRollback(config->dbh)) { … … 781 781 PXOPT_COPY_S64(config->args, where, "-magic_ds_id", "magic_ds_id", "=="); 782 782 PXOPT_COPY_STR(config->args, where, "-component", "component", "=="); 783 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");783 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 784 784 785 785 psString query = psStringCopy("DELETE FROM magicDSFile WHERE fault != 0"); -
trunk/ippTools/src/magicdstoolConfig.c
r23389 r23688 99 99 psMetadataAddStr(adddestreakedfileArgs, PS_LIST_TAIL, "-recovery_path_base", 0, "define recovery pixels URI", NULL); 100 100 psMetadataAddBool(adddestreakedfileArgs, PS_LIST_TAIL, "-setmagicked", 0, "update the magicked state of the file", false); 101 psMetadataAddS16(adddestreakedfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);101 psMetadataAddS16(adddestreakedfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 102 102 103 103 // -revertdestreakedfile … … 105 105 psMetadataAddS64(revertdestreakedfileArgs, PS_LIST_TAIL, "-magic_ds_id", 0, "search by magictool de-streak ID", 0); 106 106 psMetadataAddStr(revertdestreakedfileArgs, PS_LIST_TAIL, "-component", 0, "search by component", NULL); 107 psMetadataAddS16(revertdestreakedfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);107 psMetadataAddS16(revertdestreakedfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 108 108 109 109 // -getskycells … … 125 125 PXOPT_ADD_MODE("-updaterun", "update state of magic de-streak run", 126 126 MAGICDSTOOL_MODE_UPDATERUN, updaterunArgs); 127 PXOPT_ADD_MODE("-todestreak", "show pending files", 127 PXOPT_ADD_MODE("-todestreak", "show pending files", 128 128 MAGICDSTOOL_MODE_TODESTREAK, todestreakArgs); 129 129 PXOPT_ADD_MODE("-adddestreakedfile", "add a de-streaked file", -
trunk/ippTools/src/magictool.c
r23660 r23688 535 535 536 536 // default values 537 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);538 539 if ( code> 0) {537 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 538 539 if (fault > 0) { 540 540 char *query = "UPDATE magicRun SET fault = %d, state = 'full' WHERE magic_id = %" PRId64; 541 if (!p_psDBRunQueryF(config->dbh, query, code, magic_id)) {541 if (!p_psDBRunQueryF(config->dbh, query, fault, magic_id)) { 542 542 psError(PS_ERR_UNKNOWN, false, 543 543 "failed to set fault for magic_id %" PRId64, magic_id); … … 561 561 psMetadata *where = psMetadataAlloc(); 562 562 PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "=="); 563 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");563 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 564 564 565 565 psString query = psStringCopy("UPDATE magicRun SET fault = 0, state = 'run' WHERE fault != 0"); … … 908 908 909 909 // default values 910 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);910 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 911 911 912 912 if (!magicNodeResultInsert(config->dbh, … … 914 914 node, 915 915 uri, 916 code916 fault 917 917 )) { 918 918 psError(PS_ERR_UNKNOWN, false, "database error"); … … 931 931 PXOPT_COPY_STR(config->args, where, "-node", "node", "=="); 932 932 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 933 PXOPT_COPY_S16(config->args, where, "- code", "magicNodeResult.fault", "==");933 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 934 934 935 935 psString query = pxDataGet("magictool_revertnode.sql"); … … 1037 1037 1038 1038 // default values 1039 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);1039 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1040 1040 1041 1041 if (!psDBTransaction(config->dbh)) { … … 1048 1048 uri, 1049 1049 streaks, 1050 code1050 fault 1051 1051 )) { 1052 1052 psError(PS_ERR_UNKNOWN, false, "database error"); … … 1094 1094 psMetadata *where = psMetadataAlloc(); 1095 1095 PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "=="); 1096 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");1096 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 1097 1097 1098 1098 if (!psDBTransaction(config->dbh)) { -
trunk/ippTools/src/magictoolConfig.c
r23660 r23688 100 100 psMetadataAddS64(inputtreeArgs, PS_LIST_TAIL, "-magic_id", 0, "define magictool ID (required)", 0); 101 101 psMetadataAddStr(inputtreeArgs, PS_LIST_TAIL, "-dep_file", 0, "order of operations dep. file", NULL); 102 psMetadataAddS16(inputtreeArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);102 psMetadataAddS16(inputtreeArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 103 103 104 104 // -reverttree 105 105 psMetadata *reverttreeArgs = psMetadataAlloc(); 106 106 psMetadataAddS64(reverttreeArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magictool ID", 0); 107 psMetadataAddS16(reverttreeArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);107 psMetadataAddS16(reverttreeArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 108 108 109 109 // -inputs … … 126 126 psMetadataAddStr(addresultArgs, PS_LIST_TAIL, "-node", 0, "define symbolic node name (required)", NULL); 127 127 psMetadataAddStr(addresultArgs, PS_LIST_TAIL, "-uri", 0, "define URI", NULL); 128 psMetadataAddS16(addresultArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);128 psMetadataAddS16(addresultArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 129 129 130 130 // -revertnode … … 133 133 psMetadataAddStr(revertnodeArgs, PS_LIST_TAIL, "-node", 0, "search by node name", NULL); 134 134 psMetadataAddStr(revertnodeArgs, PS_LIST_TAIL, "-label",0, "search by label", NULL); 135 psMetadataAddS16(revertnodeArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);135 psMetadataAddS16(revertnodeArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 136 136 137 137 // -tomask … … 145 145 psMetadataAddStr(addmaskArgs, PS_LIST_TAIL, "-uri", 0, "define URI", NULL); 146 146 psMetadataAddS32(addmaskArgs, PS_LIST_TAIL, "-streaks", 0, "define number of streaks", 0); 147 psMetadataAddS16(addmaskArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);147 psMetadataAddS16(addmaskArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 148 148 149 149 // -revertmask 150 150 psMetadata *revertmaskArgs = psMetadataAlloc(); 151 151 psMetadataAddS64(revertmaskArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magictool ID", 0); 152 psMetadataAddS16(revertmaskArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);152 psMetadataAddS16(revertmaskArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 153 153 154 154 // -mask -
trunk/ippTools/src/pztool.c
r23497 r23688 338 338 // a lot simplier than a complicated scheme (tried that) to attempt to 339 339 // request on the right number of rows for each camera 340 340 341 341 // treat limit == 0 as "no limit" 342 342 if (limit) { … … 403 403 404 404 // default values 405 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);405 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 406 406 407 407 // start a transaction early so it will contain any row level locks … … 410 410 return false; 411 411 } 412 412 413 413 // query to get an excluse lock on this exposure in 414 414 // pzDownloadExp … … 421 421 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); 422 422 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 423 423 424 424 if (psListLength(where->list)) { 425 425 psString whereClause = psDBGenerateWhereSQL(where, NULL); … … 455 455 class_id, 456 456 uri, 457 code,457 fault, 458 458 NULL, // epoch 459 459 hostname … … 605 605 psError(PS_ERR_UNKNOWN, false, "database error"); 606 606 return false; 607 } 607 } 608 608 609 609 // sanity check: we should have inserted at least one row … … 675 675 // init 676 676 long counter = 0, // the total number of elements zipped so far 677 i = 0, // which array in the set 677 i = 0, // which array in the set 678 678 index = 0; // the depth into each array 679 679 // test … … 782 782 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 783 783 784 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);785 786 if (!pxSetFaultCode(config->dbh, "pzDownloadImfile", where, code)) {784 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 785 786 if (!pxSetFaultCode(config->dbh, "pzDownloadImfile", where, fault)) { 787 787 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 788 psFree (where);789 return false;788 psFree (where); 789 return false; 790 790 } 791 791 psFree(where); -
trunk/ippTools/src/pztoolConfig.c
r23497 r23688 45 45 // -adddatastore 46 46 psMetadata *adddatastoreArgs = psMetadataAlloc(); 47 psMetadataAddStr(adddatastoreArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 48 psMetadataAddStr(adddatastoreArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 47 psMetadataAddStr(adddatastoreArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 48 psMetadataAddStr(adddatastoreArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 49 49 psMetadataAddStr(adddatastoreArgs, PS_LIST_TAIL, "-uri", 0, "define storage uri", NULL); 50 50 51 51 // -datastore 52 52 psMetadata *datastoreArgs = psMetadataAlloc(); … … 55 55 // -seen 56 56 psMetadata *seenArgs = psMetadataAlloc(); 57 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 58 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 59 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 60 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-exp_type", 0, "define exposure type", NULL); 57 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 58 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 59 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 60 psMetadataAddStr(seenArgs, PS_LIST_TAIL, "-exp_type", 0, "define exposure type", NULL); 61 61 psMetadataAddBool(seenArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 62 62 63 63 // -pendingexp 64 64 psMetadata *pendingexpArgs = psMetadataAlloc(); 65 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 66 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 67 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 68 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_type", 0, "define exposure type", NULL); 65 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 66 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 67 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 68 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_type", 0, "define exposure type", NULL); 69 69 psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-desc", 0, "sort ouput in descending format", false); 70 70 psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); … … 73 73 // -pendingimfile 74 74 psMetadata *pendingimfileArgs = psMetadataAlloc(); 75 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 76 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 77 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 78 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_type", 0, "define exposure type", NULL); 75 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 76 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 77 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 78 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_type", 0, "define exposure type", NULL); 79 79 psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-desc", 0, "sort ouput in descending format", false); 80 80 psMetadataAddU64(pendingimfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); … … 83 83 // -copydone 84 84 psMetadata *copydoneArgs = psMetadataAlloc(); 85 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 86 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 87 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 85 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 86 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 87 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 88 88 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-class", 0, "define class", NULL); 89 89 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-class_id", 0, "define class_id", NULL); … … 95 95 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-label", 0, "define the label for the chip stage", NULL); 96 96 psMetadataAddStr(copydoneArgs, PS_LIST_TAIL, "-hostname", 0, "define the host that copied the image", NULL); 97 psMetadataAddS16(copydoneArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);97 psMetadataAddS16(copydoneArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 98 98 psMetadataAddBool(copydoneArgs, PS_LIST_TAIL, "-row_lock", 0, "lock pzDownImfile rows while advancing an exposure", false); 99 99 // XXX: remove this once advance is fixed … … 102 102 // -copied 103 103 psMetadata *copiedArgs = psMetadataAlloc(); 104 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 105 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 106 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 104 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 105 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 106 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 107 107 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-class", 0, "define class", NULL); 108 108 psMetadataAddStr(copiedArgs, PS_LIST_TAIL, "-class_id", 0, "define class_id", NULL); … … 113 113 // -updatecopied 114 114 psMetadata *updatecopiedArgs = psMetadataAlloc(); 115 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 116 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 117 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 115 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 116 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 117 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 118 118 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-class", 0, "define class", NULL); 119 119 psMetadataAddStr(updatecopiedArgs, PS_LIST_TAIL, "-class_id", 0, "define class_id", NULL); 120 psMetadataAddS16(updatecopiedArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);120 psMetadataAddS16(updatecopiedArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 121 121 122 122 // -revertcopied 123 123 psMetadata *revertcopiedArgs = psMetadataAlloc(); 124 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 125 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 126 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 124 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 125 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 126 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 127 127 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-class", 0, "define class", NULL); 128 128 psMetadataAddStr(revertcopiedArgs, PS_LIST_TAIL, "-class_id", 0, "define class_id", NULL); 129 psMetadataAddS16(revertcopiedArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);129 psMetadataAddS16(revertcopiedArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 130 130 131 131 // -clearcommonfaults … … 134 134 // -toadvance 135 135 psMetadata *toadvanceArgs = psMetadataAlloc(); 136 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 137 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 138 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 136 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID", NULL); 137 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID", NULL); 138 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID", NULL); 139 139 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-label", 0, "define the label for the chip stage", NULL); 140 140 psMetadataAddBool(toadvanceArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); … … 143 143 // -advance 144 144 psMetadata *advanceArgs = psMetadataAlloc(); 145 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 146 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 147 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 145 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-exp_name", 0, "define exposure ID (required)", NULL); 146 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-inst", 0, "define camera ID (required)", NULL); 147 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-telescope", 0, "define telescope ID (required)", NULL); 148 148 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-workdir", 0, "define the \"default\" workdir for this exposure (required)", NULL); 149 149 psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-dvodb", 0, "define the dvodb for the next processing step", NULL); -
trunk/ippTools/src/regtool.c
r23544 r23688 238 238 PXOPT_LOOKUP_TIME(dateobs, config->args, "-dateobs", false, false); 239 239 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 240 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 240 241 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 242 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 241 243 242 244 if (!rawImfileInsert( … … 302 304 ignored, 303 305 hostname, 304 code, 306 fault, 307 quality, 305 308 NULL, 306 309 0 … … 408 411 PXOPT_COPY_STR(config->args, where, "-tmp_class_id", "tmp_class_id", "=="); 409 412 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 410 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");413 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 411 414 PXOPT_COPY_S64(config->args, where, "-exp_id_begin", "exp_id", ">="); 412 415 PXOPT_COPY_S64(config->args, where, "-exp_id_end", "exp_id", "<="); … … 452 455 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 453 456 454 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);457 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 455 458 PXOPT_LOOKUP_F64(user_1, config->args, "-user_1", false, false); 456 459 457 if (( code== INT16_MAX) && !isfinite(user_1)) {458 psError(PS_ERR_UNKNOWN, false, "one of - codeor -user_1 must be selected");459 return false; 460 } 461 if (( code!= INT16_MAX) && isfinite(user_1)) {462 psError(PS_ERR_UNKNOWN, false, "only one of - codeor -user_1 must be selected");460 if ((fault == INT16_MAX) && !isfinite(user_1)) { 461 psError(PS_ERR_UNKNOWN, false, "one of -fault or -user_1 must be selected"); 462 return false; 463 } 464 if ((fault != INT16_MAX) && isfinite(user_1)) { 465 psError(PS_ERR_UNKNOWN, false, "only one of -fault or -user_1 must be selected"); 463 466 return false; 464 467 } … … 468 471 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 469 472 470 if ( code!= INT16_MAX) {473 if (fault != INT16_MAX) { 471 474 // this is fairly dangerous : can set all if the where is not set... 472 if (!pxSetFaultCode(config->dbh, "rawImfile", where, code)) {475 if (!pxSetFaultCode(config->dbh, "rawImfile", where, fault)) { 473 476 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 474 477 psFree (where); … … 644 647 645 648 // default 646 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);649 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 647 650 648 651 psString query = pxDataGet("regtool_pendingexp.sql"); … … 801 804 moon_phase, 802 805 hostname, 803 code,806 fault, 804 807 NULL, 805 808 0 … … 995 998 psMetadata *where = psMetadataAlloc(); 996 999 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 997 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");1000 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 998 1001 PXOPT_COPY_S64(config->args, where, "-exp_id_begin", "exp_id", ">="); 999 1002 PXOPT_COPY_S64(config->args, where, "-exp_id_end", "exp_id", "<="); … … 1039 1042 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 1040 1043 1041 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);1042 1043 if (!pxSetFaultCode(config->dbh, "rawExp", where, code)) {1044 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 1045 1046 if (!pxSetFaultCode(config->dbh, "rawExp", where, fault)) { 1044 1047 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 1045 1048 psFree(where); … … 1161 1164 char sqlFilename[80]; 1162 1165 } ExportTable; 1163 1166 1164 1167 int numExportTables = 2; 1165 1168 … … 1241 1244 1242 1245 PS_ASSERT_PTR_NON_NULL(config, NULL); 1243 1246 1244 1247 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1245 1248 … … 1252 1255 psAssert (item, "entry not in input?"); 1253 1256 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1254 1257 1255 1258 psMetadataItem *entry = psListGet (item->data.list, 0); 1256 1259 assert (entry); -
trunk/ippTools/src/regtoolConfig.c
r23545 r23688 122 122 ADD_OPT(Time, addprocessedimfileArgs, "-dateobs", "define observation time", NULL); 123 123 ADD_OPT(Str, addprocessedimfileArgs, "-hostname", "define host name", NULL); 124 ADD_OPT(S16, addprocessedimfileArgs, "-code", "set fault code", 0); 124 ADD_OPT(S16, addprocessedimfileArgs, "-fault", "set fault code", 0); 125 ADD_OPT(S16, addprocessedimfileArgs, "-quality", "set quality flag", 0); 125 126 126 127 // -processedimfile … … 140 141 ADD_OPT(Str, revertprocessedimfileArgs, "-tmp_class_id", "searcy by temp. class ID", NULL); 141 142 ADD_OPT(Str, revertprocessedimfileArgs, "-class_id", "search by class ID", NULL); 142 ADD_OPT(S16, revertprocessedimfileArgs, "- code", "search by fault code", 0);143 ADD_OPT(S16, revertprocessedimfileArgs, "-fault", "search by fault code", 0); 143 144 ADD_OPT(S64, revertprocessedimfileArgs, "-exp_id_begin", "search by exposure ID", 0); 144 145 ADD_OPT(S64, revertprocessedimfileArgs, "-exp_id_end", "search by exposure ID", 0); … … 149 150 ADD_OPT(Str, updateprocessedimfileArgs, "-class_id", "search by class ID", NULL); 150 151 ADD_OPT(F64, updateprocessedimfileArgs, "-user_1", "set user stat (1)", NAN); 151 ADD_OPT(S16, updateprocessedimfileArgs, "- code", "set fault code", INT16_MAX);152 ADD_OPT(S16, updateprocessedimfileArgs, "-fault", "set fault code (required)", INT16_MAX); 152 153 153 154 // -pendingexp … … 226 227 ADD_OPT(Str, addprocessedexpArgs, "-label", "define label for chip stage (non-detrend data only)", NULL); 227 228 ADD_OPT(Str, addprocessedexpArgs, "-hostname", "define host name", NULL); 228 ADD_OPT(S16, addprocessedexpArgs, "- code", "set fault code", 0);229 ADD_OPT(S16, addprocessedexpArgs, "-fault", "set fault code", 0); 229 230 230 231 // -processedexp … … 276 277 psMetadata *revertprocessedexpArgs = psMetadataAlloc(); 277 278 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 278 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);279 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 279 280 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-exp_id_begin", 0, "search by exposure ID", 0); 280 281 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-exp_id_end", 0, "search by exposure ID", 0); … … 283 284 psMetadata *updatedprocessedexpArgs = psMetadataAlloc(); 284 285 psMetadataAddS64(updatedprocessedexpArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 285 psMetadataAddS16(updatedprocessedexpArgs, PS_LIST_TAIL, "- code", 0, "set fault code (required)", INT16_MAX);286 psMetadataAddS16(updatedprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code (required)", INT16_MAX); 286 287 287 288 // -exportrun -
trunk/ippTools/src/stacktool.c
r23310 r23688 718 718 719 719 // default values 720 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 720 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 721 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 721 722 722 723 if (!psDBTransaction(config->dbh)) { … … 754 755 hostname, 755 756 good_frac, 756 code 757 fault, 758 quality 757 759 )) { 758 760 if (!psDBRollback(config->dbh)) { … … 862 864 PXOPT_COPY_S64(config->args, where, "-stack_id", "stackSumSkyfile.stack_id", "=="); 863 865 PXOPT_COPY_STR(config->args, where, "-label", "stackRun.label", "=="); 864 PXOPT_COPY_S16(config->args, where, "- code", "stackSumSkyfile.fault", "==");866 PXOPT_COPY_S16(config->args, where, "-fault", "stackSumSkyfile.fault", "=="); 865 867 866 868 if (!psDBTransaction(config->dbh)) { … … 1169 1171 PS_ASSERT_PTR_NON_NULL(config, false); 1170 1172 1171 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);1173 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 1172 1174 1173 1175 psMetadata *where = psMetadataAlloc(); 1174 1176 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 1175 1177 1176 if (!pxSetFaultCode(config->dbh, "stackSumSkyfile", where, code)) {1178 if (!pxSetFaultCode(config->dbh, "stackSumSkyfile", where, fault)) { 1177 1179 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 1178 1180 psFree (where); … … 1192 1194 1193 1195 int numExportTables = 3; 1194 1196 1195 1197 PS_ASSERT_PTR_NON_NULL(config, NULL); 1196 1198 … … 1262 1264 { 1263 1265 unsigned int nFail; 1264 1266 1265 1267 int numImportTables = 2; 1266 1268 1267 1269 char tables[2] [80] = {"stackInputSkyfile", "stackSumSkyfile"}; 1268 1270 1269 1271 PS_ASSERT_PTR_NON_NULL(config, NULL); 1270 1272 1271 1273 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1272 1274 … … 1293 1295 psAssert (item, "entry not in input?"); 1294 1296 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1295 1297 1296 1298 switch (i) { 1297 1299 case 0: … … 1307 1309 } 1308 1310 break; 1309 1311 1310 1312 case 1: 1311 1313 for (int i = 0; i < item->data.list->n; i++) { … … 1322 1324 } 1323 1325 } 1324 1326 1325 1327 return true; 1326 1328 } -
trunk/ippTools/src/stacktoolConfig.c
r23310 r23688 147 147 psMetadataAddStr(addsumskyfileArgs, PS_LIST_TAIL, "-hostname", 0, "define hostname", 0); 148 148 psMetadataAddF32(addsumskyfileArgs, PS_LIST_TAIL, "-good_frac", 0, "define %% of good pixels", NAN); 149 psMetadataAddS16(addsumskyfileArgs, PS_LIST_TAIL, "-code", 0, "set fault code", 0); 149 psMetadataAddS16(addsumskyfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 150 psMetadataAddS16(addsumskyfileArgs, PS_LIST_TAIL, "-quality", 0, "set quality", 0); 150 151 151 152 // -sumskyfile … … 162 163 psMetadataAddS64(revertsumskyfileArgs, PS_LIST_TAIL, "-stack_id", 0, "search by stack ID", 0); 163 164 psMetadataAddStr(revertsumskyfileArgs, PS_LIST_TAIL, "-label", 0, "search by label", 0); 164 psMetadataAddS16(revertsumskyfileArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);165 psMetadataAddS16(revertsumskyfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 165 166 166 167 // -pendingcleanuprun … … 185 186 psMetadata *updatesumskyfileArgs = psMetadataAlloc(); 186 187 psMetadataAddS64(updatesumskyfileArgs, PS_LIST_TAIL, "-stack_id", 0, "define stack ID (required)", 0); 187 psMetadataAddS16(updatesumskyfileArgs, PS_LIST_TAIL, "- code", 0, "set fault code (required)", 0);188 psMetadataAddS16(updatesumskyfileArgs, PS_LIST_TAIL, "-fault", 0, "set fault code (required)", 0); 188 189 189 190 // -exportrun -
trunk/ippTools/src/warptool.c
r23613 r23688 609 609 PXOPT_LOOKUP_STR(mapfile, config->args, "-mapfile", false, false); 610 610 PXOPT_LOOKUP_S64(warp_id, config->args, "-warp_id", false, false); 611 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);611 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 612 612 613 613 if (!psDBTransaction(config->dbh)) { … … 616 616 } 617 617 618 if ( code== 0) {618 if (fault == 0) { 619 619 if (!parseAndInsertSkyCellMap(config, mapfile)) { 620 620 psError(PS_ERR_UNKNOWN, false, "failed to inject mapfile: %s into the database", mapfile); … … 631 631 NULL, // tess_id 632 632 NULL, // class_id 633 code// fault633 fault // fault 634 634 ); 635 635 } … … 896 896 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 897 897 PXOPT_LOOKUP_F32(good_frac, config->args, "-good_frac", false, false); 898 PXOPT_LOOKUP_BOOL(accept, config->args, "-accept", false);899 898 PXOPT_LOOKUP_BOOL(magicked, config->args, "-magicked", false); 900 899 901 900 // default values 902 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 901 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 902 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 903 903 904 904 // we don't want to insert the last skyfile in a run but then not mark the … … 927 927 ymin, 928 928 ymax, 929 !accept,930 code,929 fault, 930 quality, 931 931 magicked 932 932 )) { … … 1112 1112 PXOPT_COPY_STR(config->args, where, "-reduction", "rawExp.reduction", "=="); 1113 1113 PXOPT_COPY_STR(config->args, where, "-label", "warpRun.label", "=="); 1114 PXOPT_COPY_S16(config->args, where, "- code", "warpSkyfile.fault", "==");1114 PXOPT_COPY_S16(config->args, where, "-fault", "warpSkyfile.fault", "=="); 1115 1115 1116 1116 if (!psListLength(where->list) … … 1560 1560 PS_ASSERT_PTR_NON_NULL(config, false); 1561 1561 1562 // warp_id, skycell_id, codeare required1562 // warp_id, skycell_id, fault are required 1563 1563 PXOPT_LOOKUP_S64(warp_id, config->args, "-warp_id", true, false); 1564 1564 PXOPT_LOOKUP_STR(skycell_id, config->args, "-skycell_id", true, false); 1565 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);1565 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1566 1566 1567 1567 psString query = pxDataGet("warptool_updateskyfile.sql"); 1568 1568 1569 if (!p_psDBRunQueryF(config->dbh, query, code, warp_id, skycell_id)) {1569 if (!p_psDBRunQueryF(config->dbh, query, fault, warp_id, skycell_id)) { 1570 1570 psError(PS_ERR_UNKNOWN, false, "database error"); 1571 1571 return false; -
trunk/ippTools/src/warptoolConfig.c
r23613 r23688 155 155 psMetadataAddStr(addoverlapArgs, PS_LIST_TAIL, "-mapfile", 0, "path to skycell <-> imfile mapping file", NULL); 156 156 psMetadataAddS64(addoverlapArgs, PS_LIST_TAIL, "-warp_id", 0, "set warp ID", 0); 157 psMetadataAddS16(addoverlapArgs, PS_LIST_TAIL, "- code", 0, "set fault code", 0);157 psMetadataAddS16(addoverlapArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 158 158 159 159 // -scmap … … 190 190 psMetadataAddStr(addwarpedArgs, PS_LIST_TAIL, "-hostname", 0, "define hostname", 0); 191 191 psMetadataAddF32(addwarpedArgs, PS_LIST_TAIL, "-good_frac", 0, "define %% of good pixels", NAN); 192 psMetadataAddBool(addwarpedArgs, PS_LIST_TAIL, "-accept", 0, "define if this skycell should be accepted", false);193 192 psMetadataAddBool(addwarpedArgs, PS_LIST_TAIL, "-magicked", 0, "define if this skycell has been magicked", false); 194 psMetadataAddS16(addwarpedArgs, PS_LIST_TAIL, "-code", 0, "set fault code", 0); 193 psMetadataAddS16(addwarpedArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 194 psMetadataAddS16(addwarpedArgs, PS_LIST_TAIL, "-quality", 0, "set quality", 0); 195 195 196 196 // -warped … … 216 216 psMetadataAddStr(revertwarpedArgs, PS_LIST_TAIL, "-reduction", 0, "search by warpRun reduction class", NULL); 217 217 psMetadataAddStr(revertwarpedArgs, PS_LIST_TAIL, "-label", 0, "search by warpRun label", NULL); 218 psMetadataAddS16(revertwarpedArgs, PS_LIST_TAIL, "- code", 0, "search by fault code", 0);218 psMetadataAddS16(revertwarpedArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 219 219 psMetadataAddBool(revertwarpedArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 220 220 … … 269 269 psMetadataAddS64(updateskyfileArgs, PS_LIST_TAIL, "-warp_id", 0, "warptool ID to update", 0); 270 270 psMetadataAddStr(updateskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0, "skycell ID to update", NULL); 271 psMetadataAddS16(updateskyfileArgs, PS_LIST_TAIL, "- code", 0, "new fault code", 0);271 psMetadataAddS16(updateskyfileArgs, PS_LIST_TAIL, "-fault", 0, "new fault code", 0); 272 272 273 273 // -exportrun
Note:
See TracChangeset
for help on using the changeset viewer.
