Changeset 17161 for trunk/ippTools/src/chiptool.c
- Timestamp:
- Mar 27, 2008, 4:24:35 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/chiptool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptool.c
r17148 r17161 254 254 PS_ASSERT_PTR_NON_NULL(config, NULL); 255 255 256 PXOPT_LOOKUP_STR(chip_id, config->args, "-chip_id", true, false); 256 psMetadata *where = psMetadataAlloc(); 257 PXOPT_LOOKUP_STR(chip_id, config->args, "-chip_id", false, false); 258 // convert chip_id into a psS64 259 if (chip_id) { 260 if (!psMetadataAddS64(where, PS_LIST_TAIL, "chip_id", 0, "==", (psS64)atoll(chip_id))) { 261 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 262 psFree(where); 263 return false; 264 } 265 } 266 267 PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", false, false); 268 // convert exp_id into a psS64 269 if (exp_id) { 270 if (!psMetadataAddS64(where, PS_LIST_TAIL, "exp_id", 0, "==", (psS64)atoll(exp_id))) { 271 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 272 psFree(where); 273 return false; 274 } 275 } 276 277 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 278 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); 279 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 280 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs", ">="); 281 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<="); 282 PXOPT_COPY_STR(config->args, where, "-exp_tag", "exp_tag", "=="); 283 PXOPT_COPY_STR(config->args, where, "-filelevel", "filelevel", "=="); 284 PXOPT_COPY_STR(config->args, where, "-reduction", "reduction", "=="); 285 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 286 PXOPT_COPY_F64(config->args, where, "-airmass_min", "airmass", ">="); 287 PXOPT_COPY_F64(config->args, where, "-airmass_max", "airmass", "<"); 288 PXOPT_COPY_F64(config->args, where, "-ra_min", "ra", ">="); 289 PXOPT_COPY_F64(config->args, where, "-ra_max", "ra", "<"); 290 PXOPT_COPY_F64(config->args, where, "-decl_min", "decl", ">="); 291 PXOPT_COPY_F64(config->args, where, "-decl_max", "decl", "<"); 292 PXOPT_COPY_F32(config->args, where, "-exp_time_min", "exp_time", ">="); 293 PXOPT_COPY_F32(config->args, where, "-exp_time_max", "exp_time", "<"); 294 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "sat_pixel_frac", ">="); 295 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "sat_pixel_frac", "<"); 296 PXOPT_COPY_F64(config->args, where, "-bg_min", "bt", ">="); 297 PXOPT_COPY_F64(config->args, where, "-bg_max", "bt", "<"); 298 PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "bg_stdev", ">="); 299 PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "bg_stdev", "<"); 300 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "bg_mean_stdev", ">="); 301 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "bg_mean_stdev", "<"); 302 PXOPT_COPY_F64(config->args, where, "-alt_min", "alt", ">="); 303 PXOPT_COPY_F64(config->args, where, "-alt_max", "alt", "<"); 304 PXOPT_COPY_F64(config->args, where, "-az_min", "az", ">="); 305 PXOPT_COPY_F64(config->args, where, "-az_max", "az", "<"); 306 PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "ccd_temp", ">="); 307 PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "ccd_temp", "<"); 308 PXOPT_COPY_F64(config->args, where, "-posang_min", "posang", ">="); 309 PXOPT_COPY_F64(config->args, where, "-posang_max", "posang", "<"); 310 PXOPT_COPY_STR(config->args, where, "-object", "object", "=="); 311 PXOPT_COPY_F32(config->args, where, "-solang_min", "solang", ">="); 312 PXOPT_COPY_F32(config->args, where, "-solang_max", "solang", "<"); 313 314 if (!psListLength(where->list)) { 315 psFree(where); 316 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 317 return false; 318 } 319 257 320 PXOPT_LOOKUP_STR(state, config->args, "-state", false, false); 258 321 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); … … 265 328 if (state) { 266 329 // set chipRun.state to state 267 if (!pxchipRunSetState (config, (psS64)atoll(chip_id), state)) {330 if (!pxchipRunSetStateByQuery(config, where, state)) { 268 331 return false; 269 332 } … … 272 335 if (label) { 273 336 // set chipRun.label to label 274 if (!pxchipRunSetLabel (config, (psS64)atoll(chip_id), label)) {337 if (!pxchipRunSetLabelByQuery(config, where, label)) { 275 338 return false; 276 339 }
Note:
See TracChangeset
for help on using the changeset viewer.
