Changeset 17938 for branches/faketool/ippTools/src/faketool.c
- Timestamp:
- Jun 5, 2008, 10:31:08 AM (18 years ago)
- File:
-
- 1 edited
-
branches/faketool/ippTools/src/faketool.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/faketool/ippTools/src/faketool.c
r17357 r17938 32 32 33 33 #include "faketool.h" 34 #include "camtool.h"35 34 36 35 static bool queueMode(pxConfig *config); … … 171 170 172 171 // find the exp_id of all the exposures that we want to queue up. 173 psString query = pxDataGet("faketool_find_ rawexp.sql");172 psString query = pxDataGet("faketool_find_camrun.sql"); 174 173 if (!query) { 175 174 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); … … 179 178 180 179 if (where && psListLength(where->list)) { 181 psString whereClause = psDBGenerateWhereConditionSQL(where, " rawExp");180 psString whereClause = psDBGenerateWhereConditionSQL(where, "camRun"); 182 181 psStringAppend(&query, " AND %s", whereClause); 183 182 psFree(whereClause); … … 219 218 } 220 219 221 // loop over our list of exp_ids220 // loop over our list of cam_ids 222 221 for (long i = 0; i < psArrayLength(output); i++) { 223 222 psMetadata *md = output->data[i]; 224 223 225 224 bool status; 226 psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id");225 psS64 cam_id = psMetadataLookupS64(&status, md, "cam_id"); 227 226 if (!status) { 228 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for exp_id");227 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for cam_id"); 229 228 psFree(output); 230 229 return false; … … 232 231 233 232 // queue the exp 234 if (!pxfakeQueueBy ExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) {233 if (!pxfakeQueueByCamID(config, cam_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) { 235 234 if (!psDBRollback(config->dbh)) { 236 235 psError(PS_ERR_UNKNOWN, false, "database error"); 237 236 } 238 237 psError(PS_ERR_UNKNOWN, false, 239 "failed to trying to queue exp_id: %" PRId64, exp_id);238 "failed to trying to queue cam_id: %" PRId64, cam_id); 240 239 psFree(output); 241 240 return false; … … 448 447 449 448 // fake_id, ext_tag, class_id are required 450 PXOPT_LOOKUP_STR(fake_id, config->args, "-fake_id", true, false);451 PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", true, false);452 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false);449 PXOPT_LOOKUP_STR(fake_id, config->args, "-fake_id", true, false); 450 PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", true, false); 451 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 453 452 454 453 // optional 455 PXOPT_LOOKUP_STR(uri, config->args, "-uri", false, false); 456 PXOPT_LOOKUP_F32(bg, config->args, "-bg", false, false); 457 PXOPT_LOOKUP_F32(bg_stdev, config->args, "-bg_stdev", false, false); 458 PXOPT_LOOKUP_F32(bg_mean_stdev, config->args, "-bg_mean_stdev", false, false); 459 PXOPT_LOOKUP_F32(bias, config->args, "-bias", false, false); 460 PXOPT_LOOKUP_F32(bias_stdev, config->args, "-bias_stdev", false, false); 461 PXOPT_LOOKUP_F32(fringe_0, config->args, "-fringe_0", false, false); 462 PXOPT_LOOKUP_F32(fringe_1, config->args, "-fringe_1", false, false); 463 PXOPT_LOOKUP_F32(fringe_2, config->args, "-fringe_2", false, false); 464 PXOPT_LOOKUP_F32(sigma_ra, config->args, "-sigma_ra", false, false); 465 PXOPT_LOOKUP_F32(sigma_dec, config->args, "-sigma_dec", false, false); 466 PXOPT_LOOKUP_F32(ap_resid, config->args, "-ap_resid", false, false); 467 PXOPT_LOOKUP_F32(ap_resid_stdev, config->args, "-ap_resid_stdev", false, false); 468 PXOPT_LOOKUP_F32(zp_mean, config->args, "-zp_mean", false, false); 469 PXOPT_LOOKUP_F32(zp_stdev, config->args, "-zp_stdev", false, false); 470 PXOPT_LOOKUP_F32(fwhm_major, config->args, "-fwhm_major", false, false); 471 PXOPT_LOOKUP_F32(fwhm_minor, config->args, "-fwhm_minor", false, false); 472 PXOPT_LOOKUP_F32(dtime_detrend, config->args, "-dtime_detrend", false, false); 473 PXOPT_LOOKUP_F32(dtime_photom, config->args, "-dtime_photom", false, false); 474 PXOPT_LOOKUP_F32(dtime_astrom, config->args, "-dtime_astrom", false, false); 475 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 476 PXOPT_LOOKUP_F32(n_stars, config->args, "-n_stars", false, false); 477 PXOPT_LOOKUP_F32(n_extended, config->args, "-n_extended", false, false); 478 PXOPT_LOOKUP_F32(n_cr, config->args, "-n_cr", false, false); 479 PXOPT_LOOKUP_F32(n_astrom, config->args, "-n_astrom", false, false); 480 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); 454 PXOPT_LOOKUP_STR(uri, config->args, "-uri", false, false); 455 456 PXOPT_LOOKUP_F32(dtime_fake, config->args, "-dtime_fake", false, false); 457 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 458 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); 481 459 482 460 // default values 483 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);461 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 484 462 485 463 if (!psDBTransaction(config->dbh)) { … … 493 471 class_id, 494 472 uri, 495 bg, 496 bg_stdev, 497 bg_mean_stdev, 498 bias, 499 bias_stdev, 500 fringe_0, 501 fringe_1, 502 fringe_2, 503 sigma_ra, 504 sigma_dec, 505 ap_resid, 506 ap_resid_stdev, 507 zp_mean, 508 zp_stdev, 509 fwhm_major, 510 fwhm_minor, 511 dtime_detrend, 512 dtime_photom, 513 dtime_astrom, 473 dtime_fake, 514 474 hostname, 515 n_stars,516 n_extended,517 n_cr,518 n_astrom,519 475 path_base, 520 code 476 code, 477 NULL // epoch 521 478 )) { 522 479 // rollback … … 984 941 // camQueueFakeID() can only be run after fakeRun.state has been set to 985 942 // stop 986 if (!px camQueueByFakeID(config,943 if (!pxwarpQueueByFakeID(config, 987 944 fakeRun->fake_id, 988 945 fakeRun->workdir, 989 946 fakeRun->label, 990 fakeRun->reduction,991 fakeRun->expgroup,992 947 fakeRun->dvodb, 993 948 fakeRun->tess_id,
Note:
See TracChangeset
for help on using the changeset viewer.
