Changeset 23590
- Timestamp:
- Mar 29, 2009, 1:50:46 PM (17 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r23310 r23590 109 109 psMetadata *where = psMetadataAlloc(); 110 110 pxcamGetSearchArgs (config, where); 111 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 111 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "=="); 112 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 112 113 113 114 if (!psListLength(where->list) … … 223 224 224 225 psMetadata *where = psMetadataAlloc(); 225 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "==");226 226 pxcamGetSearchArgs (config, where); 227 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 228 PXOPT_COPY_STR(config->args, where, "-state", "camRun.state", "=="); 227 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 228 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 229 PXOPT_COPY_STR(config->args, where, "-state", "camRun.state", "=="); 230 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 229 231 230 232 if (!psListLength(where->list) … … 271 273 272 274 psMetadata *where = psMetadataAlloc(); 273 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "==");274 275 pxcamGetSearchArgs (config, where); 275 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 276 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 277 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 278 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 276 279 277 280 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 334 337 335 338 psMetadata *where = psMetadataAlloc(); 336 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "==");337 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "==");338 PXOPT_COPY_STR(config->args, where, "-class", "class", "==");339 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "==");340 339 pxcamGetSearchArgs (config, where); 341 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 340 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 341 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 342 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 343 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 344 PXOPT_COPY_STR(config->args, where, "-class_id", "chipProcessedImfile.class_id", "=="); 345 346 // XXX is this used? PXOPT_COPY_STR(config->args, where, "-class", "class", "=="); 342 347 343 348 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); … … 649 654 // generate restrictions 650 655 psMetadata *where = psMetadataAlloc(); 651 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "==");652 656 pxcamGetSearchArgs (config, where); 653 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 657 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 658 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 659 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 654 660 655 661 psString query = pxDataGet("camtool_find_processedexp.sql"); … … 674 680 } 675 681 682 // order by cam_id so that the postage stamp parser can easliy find the 'latest' astrometry 683 psStringAppend(&query, " ORDER BY cam_id"); 684 676 685 // treat limit == 0 as "no limit" 677 686 if (limit) { … … 681 690 } 682 691 683 // order by cam_id so that the postage stamp parser can easliy find the 'latest' astrometry684 psStringAppend(&query, "\nORDER BY cam_id");685 686 692 if (!p_psDBRunQuery(config->dbh, query)) { 687 693 psError(PS_ERR_UNKNOWN, false, "database error"); … … 720 726 721 727 psMetadata *where = psMetadataAlloc(); 722 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "==");723 728 pxcamGetSearchArgs (config, where); 724 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 725 PXOPT_COPY_S16(config->args, where, "-code", "camProcessedExp.fault", "=="); 729 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 730 PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "=="); 731 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 732 PXOPT_COPY_S16(config->args, where, "-code", "camProcessedExp.fault", "=="); 726 733 727 734 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { -
trunk/ippTools/src/camtoolConfig.c
r23418 r23590 52 52 psMetadata *definebyqueryArgs = psMetadataAlloc(); 53 53 pxcamSetSearchArgs(definebyqueryArgs); 54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", 0, "search for label", NULL); 54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", 0, "search by chipRun label", NULL); 55 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-reduction", 0, "search by chipRun reduction class", NULL); 55 56 56 57 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_workdir", 0, "define workdir", NULL); … … 68 69 // XXX need to allow multiple exp_ids 69 70 psMetadata *updaterunArgs = psMetadataAlloc(); 71 pxcamSetSearchArgs(updaterunArgs); 70 72 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 71 p xcamSetSearchArgs(updaterunArgs);72 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "- label", 0, "search for label", NULL);73 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "- state", 0, "search for state", NULL);73 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "search by camRun label", NULL); 74 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "search by camRun state", NULL); 75 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-reduction", 0, "search by camRun reduction class", NULL); 74 76 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 75 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "set state", NULL);76 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_label", 0, "set label", NULL);77 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "set state", NULL); 78 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_label", 0, "set label", NULL); 77 79 78 80 // -pendingexp 79 81 psMetadata *pendingexpArgs = psMetadataAlloc(); 80 psMetadataAddS64(pendingexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by camtool ID", 0);81 82 pxcamSetSearchArgs(pendingexpArgs); 82 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-label", 0, "search for label", NULL); 83 psMetadataAddS64(pendingexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 84 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-label", 0, "search by camRun label", NULL); 85 psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-reduction", 0, "search by camRun reduction class", NULL); 83 86 psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 84 87 psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); … … 86 89 // -pendingimfile 87 90 psMetadata *pendingimfileArgs = psMetadataAlloc(); 88 psMetadataAddS64(pendingimfileArgs, PS_LIST_TAIL, "-cam_id", 0, "search by camtool ID", 0);89 91 pxcamSetSearchArgs(pendingimfileArgs); 90 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-label", 0, "search for label", NULL); 91 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class", 0, "search by class", NULL); 92 psMetadataAddS64(pendingimfileArgs, PS_LIST_TAIL, "-cam_id", 0, "search by camtool ID", 0); 93 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-label", 0, "search by camRun label", NULL); 94 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-reduction",0, "search by camRun reduction class", NULL); 92 95 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 93 psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 96 psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 97 98 // XXX is this used? psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class", 0, "search by class", NULL); 94 99 95 100 // -addprocessedexp … … 164 169 // -processedexp 165 170 psMetadata *processedexpArgs = psMetadataAlloc(); 166 psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by camtool ID", 0);167 171 pxcamSetSearchArgs(processedexpArgs); 168 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-label", 0, "search for label", NULL); 172 psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 173 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-label", 0, "search by camRun label", NULL); 174 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-reduction",0, "search by camRun reduction class", NULL); 169 175 170 176 psMetadataAddU64(processedexpArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); … … 177 183 // XXX need to allow multiple exp_ids 178 184 psMetadata *revertprocessedexpArgs = psMetadataAlloc(); 179 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0);180 185 pxcamSetSearchArgs(revertprocessedexpArgs); 181 psMetadataAddStr(revertprocessedexpArgs, PS_LIST_TAIL, "-label", 0, "search for label", NULL); 186 psMetadataAddS64(revertprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 187 psMetadataAddStr(revertprocessedexpArgs, PS_LIST_TAIL, "-label", 0, "search by camRun label", NULL); 188 psMetadataAddStr(revertprocessedexpArgs, PS_LIST_TAIL, "-reduction",0, "search by camRun reduction class", NULL); 189 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "-code", 0, "search by fault code", 0); 182 190 183 191 psMetadataAddBool(revertprocessedexpArgs, PS_LIST_TAIL, "-all", 0, "allow everything to be queued without search terms", false); 184 psMetadataAddS16(revertprocessedexpArgs, PS_LIST_TAIL, "-code", 0, "search by fault code", 0);185 192 186 193 // -updateprocessedexp -
trunk/ippTools/src/pxcam.c
r21402 r23590 42 42 psMetadataAddStr(md, PS_LIST_TAIL, "-comment", 0, "search by comment", NULL); 43 43 psMetadataAddStr(md, PS_LIST_TAIL, "-filelevel", 0, "search by filelevel", NULL); 44 psMetadataAddStr(md, PS_LIST_TAIL, "-reduction", 0, "search by reduction class", NULL);45 44 psMetadataAddStr(md, PS_LIST_TAIL, "-filter", 0, "search for filter", NULL); 46 45 psMetadataAddF64(md, PS_LIST_TAIL, "-airmass_min", 0, "define min airmass", NAN); … … 77 76 bool pxcamGetSearchArgs (pxConfig *config, psMetadata *where) { 78 77 79 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 80 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); 81 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 82 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); 83 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 84 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs", ">="); 85 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<="); 86 PXOPT_COPY_STR(config->args, where, "-exp_tag", "exp_tag", "=="); 87 PXOPT_COPY_STR(config->args, where, "-exp_type", "exp_type", "=="); 88 PXOPT_COPY_STR(config->args, where, "-comment", "rawExp.comment", "LIKE"); 89 PXOPT_COPY_STR(config->args, where, "-filelevel", "filelevel", "=="); 90 PXOPT_COPY_STR(config->args, where, "-reduction", "reduction", "=="); 91 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 92 PXOPT_COPY_F64(config->args, where, "-airmass_min", "airmass", ">="); 93 PXOPT_COPY_F64(config->args, where, "-airmass_max", "airmass", "<"); 94 PXOPT_COPY_F64(config->args, where, "-ra_min", "ra", ">="); 95 PXOPT_COPY_F64(config->args, where, "-ra_max", "ra", "<"); 96 PXOPT_COPY_F64(config->args, where, "-decl_min", "decl", ">="); 97 PXOPT_COPY_F64(config->args, where, "-decl_max", "decl", "<"); 98 PXOPT_COPY_F32(config->args, where, "-exp_time_min", "exp_time", ">="); 99 PXOPT_COPY_F32(config->args, where, "-exp_time_max", "exp_time", "<"); 100 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "sat_pixel_frac", ">="); 101 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "sat_pixel_frac", "<"); 102 PXOPT_COPY_F64(config->args, where, "-bg_min", "bt", ">="); 103 PXOPT_COPY_F64(config->args, where, "-bg_max", "bt", "<"); 104 PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "bg_stdev", ">="); 105 PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "bg_stdev", "<"); 106 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "bg_mean_stdev", ">="); 107 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "bg_mean_stdev", "<"); 108 PXOPT_COPY_F64(config->args, where, "-alt_min", "alt", ">="); 109 PXOPT_COPY_F64(config->args, where, "-alt_max", "alt", "<"); 110 PXOPT_COPY_F64(config->args, where, "-az_min", "az", ">="); 111 PXOPT_COPY_F64(config->args, where, "-az_max", "az", "<"); 112 PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "ccd_temp", ">="); 113 PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "ccd_temp", "<"); 114 PXOPT_COPY_F64(config->args, where, "-posang_min", "posang", ">="); 115 PXOPT_COPY_F64(config->args, where, "-posang_max", "posang", "<"); 116 PXOPT_COPY_STR(config->args, where, "-object", "object", "=="); 117 PXOPT_COPY_F32(config->args, where, "-solang_min", "solang", ">="); 118 PXOPT_COPY_F32(config->args, where, "-solang_max", "solang", "<"); 78 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 79 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); 80 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); 81 PXOPT_COPY_STR(config->args, where, "-inst", "rawExp.camera", "=="); 82 PXOPT_COPY_STR(config->args, where, "-telescope", "rawExp.telescope", "=="); 83 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">="); 84 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<="); 85 PXOPT_COPY_STR(config->args, where, "-exp_tag", "rawExp.exp_tag", "=="); 86 PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "=="); 87 PXOPT_COPY_STR(config->args, where, "-comment", "rawExp.comment", "LIKE"); 88 PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "=="); 89 PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "=="); 90 PXOPT_COPY_F64(config->args, where, "-airmass_min", "rawExp.airmass", ">="); 91 PXOPT_COPY_F64(config->args, where, "-airmass_max", "rawExp.airmass", "<"); 92 PXOPT_COPY_F64(config->args, where, "-ra_min", "rawExp.ra", ">="); 93 PXOPT_COPY_F64(config->args, where, "-ra_max", "rawExp.ra", "<"); 94 PXOPT_COPY_F64(config->args, where, "-decl_min", "rawExp.decl", ">="); 95 PXOPT_COPY_F64(config->args, where, "-decl_max", "rawExp.decl", "<"); 96 PXOPT_COPY_F32(config->args, where, "-exp_time_min", "rawExp.exp_time", ">="); 97 PXOPT_COPY_F32(config->args, where, "-exp_time_max", "rawExp.exp_time", "<"); 98 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "rawExp.sat_pixel_frac", ">="); 99 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "rawExp.sat_pixel_frac", "<"); 100 PXOPT_COPY_F64(config->args, where, "-bg_min", "rawExp.bg", ">="); 101 PXOPT_COPY_F64(config->args, where, "-bg_max", "rawExp.bg", "<"); 102 PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "rawExp.bg_stdev", ">="); 103 PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "rawExp.bg_stdev", "<"); 104 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "rawExp.bg_mean_stdev", ">="); 105 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "rawExp.bg_mean_stdev", "<"); 106 PXOPT_COPY_F64(config->args, where, "-alt_min", "rawExp.alt", ">="); 107 PXOPT_COPY_F64(config->args, where, "-alt_max", "rawExp.alt", "<"); 108 PXOPT_COPY_F64(config->args, where, "-az_min", "rawExp.az", ">="); 109 PXOPT_COPY_F64(config->args, where, "-az_max", "rawExp.az", "<"); 110 PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "rawExp.ccd_temp", ">="); 111 PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "rawExp.ccd_temp", "<"); 112 PXOPT_COPY_F64(config->args, where, "-posang_min", "rawExp.posang", ">="); 113 PXOPT_COPY_F64(config->args, where, "-posang_max", "rawExp.posang", "<"); 114 PXOPT_COPY_STR(config->args, where, "-object", "rawExp.object", "=="); 115 PXOPT_COPY_F32(config->args, where, "-solang_min", "rawExp.solang", ">="); 116 PXOPT_COPY_F32(config->args, where, "-solang_max", "rawExp.solang", "<"); 119 117 120 118 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
