Changeset 25789
- Timestamp:
- Oct 6, 2009, 3:48:25 PM (17 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 5 added
- 6 edited
-
share/Makefile.am (modified) (1 diff)
-
share/addtool_donecleanup.sql (added)
-
share/addtool_find_cam_id.sql (added)
-
share/addtool_find_pendingexp.sql (modified) (1 diff)
-
share/addtool_find_processedexp.sql (added)
-
share/addtool_pendingcleanupexp.sql (added)
-
share/addtool_pendingcleanuprun.sql (added)
-
src/addtool.c (modified) (15 diffs)
-
src/addtoolConfig.c (modified) (6 diffs)
-
src/pxadd.c (modified) (2 diffs)
-
src/pxadd.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/Makefile.am
r25711 r25789 4 4 5 5 dist_pkgdata_DATA = \ 6 addtool_donecleanup.sql \ 7 addtool_find_cam_id.sql \ 6 8 addtool_find_pendingexp.sql \ 9 addtool_find_processedexp.sql \ 10 addtool_pendingcleanupexp.sql \ 11 addtool_pendingcleanuprun.sql \ 7 12 addtool_queue_cam_id.sql \ 8 13 addtool_reset_faulted_runs.sql \ -
trunk/ippTools/share/addtool_find_pendingexp.sql
r25299 r25789 12 12 JOIN chipRun 13 13 USING(chip_id) 14 JOIN chipProcessedImfile15 USING(chip_id)16 14 JOIN rawExp 17 ON chipRun.exp_id = rawExp.exp_id15 USING(exp_id) 18 16 LEFT JOIN addProcessedExp 19 17 USING(add_id) -
trunk/ippTools/src/addtool.c
r25299 r25789 106 106 107 107 psMetadata *where = psMetadataAlloc(); 108 pxaddGetSearchArgs (config, where); 109 pxAddLabelSearchArgs (config, where, "-label", "addRun.label", "=="); 110 PXOPT_COPY_STR(config->args, where, "-reduction", "addRun.reduction", "=="); 108 pxcamGetSearchArgs (config, where); 109 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 110 pxAddLabelSearchArgs (config, where, "-label", "camRun.label", "=="); 111 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 111 112 112 113 if (!psListLength(where->list) && … … 121 122 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); 122 123 PXOPT_LOOKUP_STR(dvodb, config->args, "-set_dvodb", false, false); 124 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 125 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 123 126 124 127 // find the cam_id of all the exposures that we want to queue up. … … 130 133 } 131 134 132 // use psDBGenerateWhere SQL because the SQL yields an intermediate table135 // use psDBGenerateWhereConditionSQL because the SQL ends in a WHERE 133 136 if (where && psListLength(where->list)) { 134 137 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); … … 136 139 psFree(whereClause); 137 140 } 138 139 141 psFree(where); 140 142 … … 153 155 if (!psArrayLength(output)) { 154 156 psTrace("addtool", PS_LOG_INFO, "no rows found"); 157 psFree(output); 158 return true; 159 } 160 161 if (pretend) { 162 // negative simple so the default is true 163 if (!ippdbPrintMetadatas(stdout, output, "addRun", !simple)) { 164 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 165 psFree(output); 166 return false; 167 } 155 168 psFree(output); 156 169 return true; … … 175 188 psMetadata *md = output->data[i]; 176 189 177 addRunRow *row = addRunObjectFromMetadata(md);190 camRunRow *row = camRunObjectFromMetadata(md); 178 191 if (!row) { 179 192 psError(PS_ERR_UNKNOWN, false, "failed to convert metadata into addRun"); … … 218 231 219 232 psMetadata *where = psMetadataAlloc(); 220 pxaddGetSearchArgs (config, where);221 233 PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "=="); 234 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 235 pxcamGetSearchArgs (config, where); // most search arguments based on camera 236 222 237 PXOPT_COPY_STR(config->args, where, "-label", "addRun.label", "=="); 223 238 PXOPT_COPY_STR(config->args, where, "-state", "addRun.state", "=="); … … 267 282 268 283 psMetadata *where = psMetadataAlloc(); 269 pxaddGetSearchArgs (config, where);270 284 PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "=="); 285 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 286 pxcamGetSearchArgs (config, where); 271 287 pxAddLabelSearchArgs (config, where, "-label", "addRun.label", "=="); 272 288 PXOPT_COPY_STR(config->args, where, "-reduction", "addRun.reduction", "=="); … … 325 341 } 326 342 327 /* static bool pendingimfileMode(pxConfig *config) */328 /* { */329 /* PS_ASSERT_PTR_NON_NULL(config, false); */330 331 /* psMetadata *where = psMetadataAlloc(); */332 /* pxaddGetSearchArgs (config, where); */333 /* PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "=="); */334 /* pxAddLabelSearchArgs (config, where, "-label", "addRun.label", "=="); */335 /* PXOPT_COPY_STR(config->args, where, "-reduction", "addRun.reduction", "=="); */336 /* PXOPT_COPY_S64(config->args, where, "-chip_id", "addRun.chip_id", "=="); */337 /* PXOPT_COPY_STR(config->args, where, "-class_id", "addProcessedExp.class_id", "=="); */338 339 /* PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); */340 341 /* psString query = pxDataGet("addtool_find_pendingimfile.sql"); */342 /* if (!query) { */343 /* psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); */344 /* return false; */345 /* } */346 347 /* // use psDBGenerateWhereSQL because the SQL yields an intermediate table */348 /* if (psListLength(where->list)) { */349 /* psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); */350 /* psStringAppend(&query, " AND %s", whereClause); */351 /* psFree(whereClause); */352 /* } */353 /* psFree(where); */354 355 /* if (!p_psDBRunQuery(config->dbh, query)) { */356 /* psError(PS_ERR_UNKNOWN, false, "database error"); */357 /* psFree(query); */358 /* return false; */359 /* } */360 /* psFree(query); */361 362 /* psArray *output = p_psDBFetchResult(config->dbh); */363 /* if (!output) { */364 /* psError(PS_ERR_UNKNOWN, false, "database error"); */365 /* return false; */366 /* } */367 /* if (!psArrayLength(output)) { */368 /* psTrace("addtool", PS_LOG_INFO, "no rows found"); */369 /* psFree(output); */370 /* return true; */371 /* } */372 373 /* // negate simple so the default is true */374 /* if (!ippdbPrintMetadatas(stdout, output, "addProcessedExp", !simple)) { */375 /* psError(PS_ERR_UNKNOWN, false, "failed to print array"); */376 /* psFree(output); */377 /* return false; */378 /* } */379 380 /* psFree(output); */381 382 /* return true; */383 /* } */384 385 343 static bool addprocessedexpMode(pxConfig *config) 386 344 { … … 392 350 // optional 393 351 PXOPT_LOOKUP_F32(dtime_addstar, config->args, "-dtime_addstar", false, false); 394 395 352 PXOPT_LOOKUP_S32(n_stars, config->args, "-n_stars", false, false); 396 397 353 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); 398 399 354 PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false); 400 355 … … 469 424 return false; 470 425 } 471 472 // NULL for end_stage means go as far as possible473 // EAM : skip here if fault != 0474 // Also, we can run fake even if tess_id is not defined475 /* if (fault || (pendingRow->end_stage && psStrcasestr(pendingRow->end_stage, "add"))) { */476 /* psFree(row); */477 /* psFree(pendingRow); */478 /* if (!psDBCommit(config->dbh)) { */479 /* psError(PS_ERR_UNKNOWN, false, "database error"); */480 /* return false; */481 /* } */482 /* return true; */483 /* } */484 426 psFree(row); 485 // else continue on...486 487 /* if (!pxfakeQueueByAddID(config, */488 /* pendingRow->add_id, */489 /* pendingRow->workdir, */490 /* pendingRow->label, */491 /* pendingRow->reduction, */492 /* pendingRow->expgroup, */493 /* pendingRow->dvodb, */494 /* pendingRow->tess_id, */495 /* pendingRow->end_stage */496 /* )) { */497 /* // rollback */498 /* if (!psDBRollback(config->dbh)) { */499 /* psError(PS_ERR_UNKNOWN, false, "database error"); */500 /* } */501 /* psError(PS_ERR_UNKNOWN, false, "failed to queue new fakeRun"); */502 /* psFree(pendingRow); */503 /* return false; */504 /* } */505 427 psFree(pendingRow); 506 428 … … 524 446 // generate restrictions 525 447 psMetadata *where = psMetadataAlloc(); 526 pxaddGetSearchArgs (config, where);527 448 PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "=="); 449 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 450 pxcamGetSearchArgs (config, where); 528 451 pxAddLabelSearchArgs (config, where, "-label", "addRun.label", "=="); 529 452 PXOPT_COPY_STR(config->args, where, "-reduction", "addRun.reduction", "=="); … … 613 536 614 537 psMetadata *where = psMetadataAlloc(); 615 pxaddGetSearchArgs (config, where);616 538 PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "=="); 539 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 540 pxcamGetSearchArgs (config, where); 617 541 pxAddLabelSearchArgs (config, where, "-label", "addRun.label", "=="); 618 542 PXOPT_COPY_STR(config->args, where, "-reduction", "addRun.reduction", "=="); 619 /* PXOPT_COPY_S16(config->args, where, "-fault", "addProcessedExp.fault", "=="); */620 543 621 544 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { … … 710 633 PXOPT_COPY_S64(config->args, where, "-add_id", "add_id", "=="); 711 634 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "=="); 712 /* PXOPT_COPY_STR(config->args, where, "-class", "class", "=="); */713 /* PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); */714 635 715 636 if (!pxSetFaultCode(config->dbh, "addProcessedExp", where, fault)) { … … 776 697 return true; 777 698 } 778 779 699 780 700 static bool unblockMode(pxConfig *config) -
trunk/ippTools/src/addtoolConfig.c
r25299 r25789 48 48 49 49 // -definebyquery 50 // XXX need to allow multiple chip_ids51 // XXX need to allow multiple exp_ids52 50 psMetadata *definebyqueryArgs = psMetadataAlloc(); 51 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 53 52 pxcamSetSearchArgs(definebyqueryArgs); 54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by c hipRun label", NULL);55 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-reduction", 0, "search by c hipRun reduction class", NULL);53 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by camRun label", NULL); 54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-reduction", 0, "search by camRun reduction class", NULL); 56 55 57 56 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_workdir", 0, "define workdir", NULL); … … 59 58 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_reduction", 0, "define reduction class", NULL); 60 59 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_dvodb", 0, "define DVO db", NULL); 60 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend", 0, "do not actually modify the database", false); 61 61 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 62 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 62 63 63 64 // -updaterun 64 // XXX need to allow multiple add_ids65 // XXX need to allow multiple chip_ids66 // XXX need to allow multiple exp_ids67 65 psMetadata *updaterunArgs = psMetadataAlloc(); 66 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0); 67 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 68 68 pxcamSetSearchArgs(updaterunArgs); 69 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0); 70 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "search by camRun label", NULL); 71 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "search by camRun state", NULL); 72 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-reduction", 0, "search by camRun reduction class", NULL); 73 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 74 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "set state", NULL); 75 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_label", 0, "set label", NULL); 69 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "search by addRun label", NULL); 70 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "search by addRun state", NULL); 71 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-reduction", 0, "search by addRun reduction class", NULL); 72 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 73 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "set state", NULL); 74 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_label", 0, "set label", NULL); 76 75 77 76 // -pendingexp 78 77 psMetadata *pendingexpArgs = psMetadataAlloc(); 79 pxcamSetSearchArgs(pendingexpArgs);80 78 psMetadataAddS64(pendingexpArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0); 81 79 psMetadataAddS64(pendingexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 82 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by camRun label", NULL); 83 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-reduction", 0, "search by camRun reduction class", NULL); 80 pxcamSetSearchArgs(pendingexpArgs); 81 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by addRun label", NULL); 82 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-reduction", 0, "search by addRun reduction class", NULL); 84 83 psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 85 84 psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 86 87 // XXX is this used? psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class", 0, "search by class", NULL);88 85 89 86 // -addprocessedexp 90 87 psMetadata *addprocessedexpArgs = psMetadataAlloc(); 91 88 psMetadataAddS64(addprocessedexpArgs, PS_LIST_TAIL, "-add_id", 0, "define addtool ID (required)", 0); 92 93 89 psMetadataAddF32(addprocessedexpArgs, PS_LIST_TAIL, "-dtime_addstar", 0, "define elapsed time for DVO insertion (seconds)", NAN); 94 90 psMetadataAddS32(addprocessedexpArgs, PS_LIST_TAIL, "-n_stars", 0, "define number of stars", 0); 95 96 91 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); 97 92 psMetadataAddS64(addprocessedexpArgs, PS_LIST_TAIL, "-magicked", 0, "set magicked", 0); 93 98 94 // -processedexp 99 95 psMetadata *processedexpArgs = psMetadataAlloc(); 96 psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0); 97 psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 100 98 pxcamSetSearchArgs(processedexpArgs); 101 psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0);102 99 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by addRun label", NULL); 103 100 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-reduction",0, "search by addRun reduction class", NULL); … … 106 103 psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-all", 0, "list everything without restriction", false); 107 104 psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 108 /* psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-faulted", 0, "only return imfiles with a fault status set", false); */109 105 110 106 // -revertprocessedexp 111 // XXX need to allow multiple add_ids112 // XXX need to allow multiple chip_ids113 // XXX need to allow multiple exp_ids114 107 psMetadata *revertprocessedexpArgs = psMetadataAlloc(); 108 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0); 109 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 115 110 pxcamSetSearchArgs(revertprocessedexpArgs); 116 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0);117 111 psMetadataAddStr(revertprocessedexpArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by addRun label", NULL); 118 112 psMetadataAddStr(revertprocessedexpArgs, PS_LIST_TAIL, "-reduction",0, "search by addRun reduction class", NULL); … … 121 115 122 116 // -updateprocessedexp 123 // XXX allow full search options?124 117 psMetadata *updateprocessedexpArgs = psMetadataAlloc(); 125 118 psMetadataAddS64(updateprocessedexpArgs, PS_LIST_TAIL, "-add_id", 0, "search by addtool ID", 0); … … 139 132 140 133 // -pendingcleanuprun 141 // XXX allow full search options?142 134 psMetadata *pendingcleanuprunArgs = psMetadataAlloc(); 143 135 psMetadataAddStr(pendingcleanuprunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "list blocks for specified label", NULL); … … 146 138 147 139 // -pendingcleanupexp 148 // XXX allow full search options?149 140 psMetadata *pendingcleanupexpArgs = psMetadataAlloc(); 150 141 psMetadataAddStr(pendingcleanupexpArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "list blocks for specified label", NULL); -
trunk/ippTools/src/pxadd.c
r25299 r25789 28 28 #include "pxtools.h" 29 29 #include "pxadd.h" 30 31 bool pxaddSetSearchArgs (psMetadata *md) {32 33 psMetadataAddS64(md, PS_LIST_TAIL, "-add_id", 0, "search by add_id", 0);34 psMetadataAddS64(md, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0);35 36 /* psMetadataAddStr(md, PS_LIST_TAIL, "-exp_name", 0, "search by exp_name", NULL); */37 /* psMetadataAddStr(md, PS_LIST_TAIL, "-inst", 0, "search for camera", NULL); */38 /* psMetadataAddStr(md, PS_LIST_TAIL, "-telescope", 0, "search for telescope", NULL); */39 /* psMetadataAddTime(md, PS_LIST_TAIL, "-dateobs_begin", 0, "search for exposures by time (>=)", NULL); */40 /* psMetadataAddTime(md, PS_LIST_TAIL, "-dateobs_end", 0, "search for exposures by time (<)", NULL); */41 /* psMetadataAddStr(md, PS_LIST_TAIL, "-exp_tag", 0, "search by exp_tag", NULL); */42 /* psMetadataAddStr(md, PS_LIST_TAIL, "-exp_type", 0, "search by exp_type", NULL); */43 /* psMetadataAddStr(md, PS_LIST_TAIL, "-comment", 0, "search by comment", NULL); */44 /* psMetadataAddStr(md, PS_LIST_TAIL, "-filelevel", 0, "search by filelevel", NULL); */45 /* psMetadataAddStr(md, PS_LIST_TAIL, "-filter", 0, "search for filter", NULL); */46 /* psMetadataAddF64(md, PS_LIST_TAIL, "-airmass_min", 0, "define min airmass", NAN); */47 /* psMetadataAddF64(md, PS_LIST_TAIL, "-airmass_max", 0, "define max airmass", NAN); */48 /* psMetadataAddF64(md, PS_LIST_TAIL, "-ra_min", 0, "define min RA (degrees) ", NAN); */49 /* psMetadataAddF64(md, PS_LIST_TAIL, "-ra_max", 0, "define max RA (degrees) ", NAN); */50 /* psMetadataAddF64(md, PS_LIST_TAIL, "-decl_min", 0, "define min DEC (degrees)", NAN); */51 /* psMetadataAddF64(md, PS_LIST_TAIL, "-decl_max", 0, "define max DEC (degrees)", NAN); */52 /* psMetadataAddF32(md, PS_LIST_TAIL, "-exp_time_min", 0, "define min exposure time", NAN); */53 /* psMetadataAddF32(md, PS_LIST_TAIL, "-exp_time_max", 0, "define max exposure time", NAN); */54 /* psMetadataAddF32(md, PS_LIST_TAIL, "-sat_pixel_frac_min", 0, "define max fraction of saturated pixels", NAN); */55 /* psMetadataAddF32(md, PS_LIST_TAIL, "-sat_pixel_frac_max", 0, "define max fraction of saturated pixels", NAN); */56 /* psMetadataAddF64(md, PS_LIST_TAIL, "-bg_min", 0, "define min background", NAN); */57 /* psMetadataAddF64(md, PS_LIST_TAIL, "-bg_max", 0, "define max background", NAN); */58 /* psMetadataAddF64(md, PS_LIST_TAIL, "-bg_stdev_min", 0, "define min background standard deviation", NAN); */59 /* psMetadataAddF64(md, PS_LIST_TAIL, "-bg_stdev_max", 0, "define max background standard deviation", NAN); */60 /* psMetadataAddF64(md, PS_LIST_TAIL, "-bg_mean_stdev_min", 0, "define min background mean standard deviation (across imfiles)", NAN); */61 /* psMetadataAddF64(md, PS_LIST_TAIL, "-bg_mean_stdev_max", 0, "define max background mean standard deviation (across imfiles)", NAN); */62 /* psMetadataAddF64(md, PS_LIST_TAIL, "-alt_min", 0, "define min altitude", NAN); */63 /* psMetadataAddF64(md, PS_LIST_TAIL, "-alt_max", 0, "define max altitude", NAN); */64 /* psMetadataAddF64(md, PS_LIST_TAIL, "-az_min", 0, "define min azimuth ", NAN); */65 /* psMetadataAddF64(md, PS_LIST_TAIL, "-az_max", 0, "define max azimuth ", NAN); */66 /* psMetadataAddF32(md, PS_LIST_TAIL, "-ccd_temp_min", 0, "define min ccd tempature", NAN); */67 /* psMetadataAddF32(md, PS_LIST_TAIL, "-ccd_temp_max", 0, "define max ccd tempature", NAN); */68 /* psMetadataAddF64(md, PS_LIST_TAIL, "-posang_min", 0, "define min rotator position angle", NAN); */69 /* psMetadataAddF64(md, PS_LIST_TAIL, "-posang_max", 0, "define max rotator position angle", NAN); */70 /* psMetadataAddStr(md, PS_LIST_TAIL, "-object", 0, "search by exposure object", NULL); */71 /* psMetadataAddF32(md, PS_LIST_TAIL, "-sun_angle_min", 0, "define min solar angle", NAN); */72 /* psMetadataAddF32(md, PS_LIST_TAIL, "-sun_angle_max", 0, "define max solar angle", NAN); */73 74 return true;75 }76 77 bool pxaddGetSearchArgs (pxConfig *config, psMetadata *where) {78 79 PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "==");80 /* PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); */81 /* PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); */82 /* PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); */83 /* PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); */84 /* PXOPT_COPY_STR(config->args, where, "-inst", "rawExp.camera", "=="); */85 /* PXOPT_COPY_STR(config->args, where, "-telescope", "rawExp.telescope", "=="); */86 /* PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">="); */87 /* PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<="); */88 /* PXOPT_COPY_STR(config->args, where, "-exp_tag", "rawExp.exp_tag", "=="); */89 /* PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "=="); */90 /* PXOPT_COPY_STR(config->args, where, "-comment", "rawExp.comment", "LIKE"); */91 /* PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "=="); */92 /* PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "=="); */93 /* PXOPT_COPY_F64(config->args, where, "-airmass_min", "rawExp.airmass", ">="); */94 /* PXOPT_COPY_F64(config->args, where, "-airmass_max", "rawExp.airmass", "<"); */95 /* PXOPT_COPY_RADEC(config->args, where, "-ra_min", "rawExp.ra", ">="); */96 /* PXOPT_COPY_RADEC(config->args, where, "-ra_max", "rawExp.ra", "<"); */97 /* PXOPT_COPY_RADEC(config->args, where, "-decl_min", "rawExp.decl", ">="); */98 /* PXOPT_COPY_RADEC(config->args, where, "-decl_max", "rawExp.decl", "<"); */99 /* PXOPT_COPY_F32(config->args, where, "-exp_time_min", "rawExp.exp_time", ">="); */100 /* PXOPT_COPY_F32(config->args, where, "-exp_time_max", "rawExp.exp_time", "<"); */101 /* PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "rawExp.sat_pixel_frac", ">="); */102 /* PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "rawExp.sat_pixel_frac", "<"); */103 /* PXOPT_COPY_F64(config->args, where, "-bg_min", "rawExp.bg", ">="); */104 /* PXOPT_COPY_F64(config->args, where, "-bg_max", "rawExp.bg", "<"); */105 /* PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "rawExp.bg_stdev", ">="); */106 /* PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "rawExp.bg_stdev", "<"); */107 /* PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "rawExp.bg_mean_stdev", ">="); */108 /* PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "rawExp.bg_mean_stdev", "<"); */109 /* PXOPT_COPY_F64(config->args, where, "-alt_min", "rawExp.alt", ">="); */110 /* PXOPT_COPY_F64(config->args, where, "-alt_max", "rawExp.alt", "<"); */111 /* PXOPT_COPY_F64(config->args, where, "-az_min", "rawExp.az", ">="); */112 /* PXOPT_COPY_F64(config->args, where, "-az_max", "rawExp.az", "<"); */113 /* PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "rawExp.ccd_temp", ">="); */114 /* PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "rawExp.ccd_temp", "<"); */115 /* PXOPT_COPY_F64(config->args, where, "-posang_min", "rawExp.posang", ">="); */116 /* PXOPT_COPY_F64(config->args, where, "-posang_max", "rawExp.posang", "<"); */117 /* PXOPT_COPY_STR(config->args, where, "-object", "rawExp.object", "=="); */118 /* PXOPT_COPY_F32(config->args, where, "-sun_angle_min", "rawExp.sun_angle", ">="); */119 /* PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "rawExp.sun_angle", "<"); */120 121 return true;122 }123 30 124 31 bool pxaddRunSetState(pxConfig *config, psS64 add_id, const char *state, psS64 magicked) … … 236 143 } 237 144 } 238 // fprintf(stderr,"%s",query); 145 239 146 // queue the exp 240 // XXX chip_id is being cast here work around psS64 have a different type241 // differenton 32/64147 // Note: cam_id is being cast here work around psS64 have a different type different 148 // on 32/64 242 149 if (!p_psDBRunQueryF(config->dbh, query, 243 150 "new", // state -
trunk/ippTools/src/pxadd.h
r25299 r25789 30 30 bool pxaddRunSetLabelByQuery(pxConfig *config, psMetadata *where, const char *label); 31 31 32 bool pxaddSetSearchArgs (psMetadata *md);33 bool pxaddGetSearchArgs (pxConfig *config, psMetadata *where);34 35 32 // Likely BROKEN 36 33 bool pxaddQueueByCamID(pxConfig *config,
Note:
See TracChangeset
for help on using the changeset viewer.
