Changeset 29317 for trunk/ippToPsps/src/ippToPsps.c
- Timestamp:
- Oct 4, 2010, 4:29:04 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/ippToPsps.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPsps.c
r29294 r29317 30 30 if (!isfinite(*flux) || *flux < 0.000001) return false; 31 31 if (fluxErr) *fluxErr = fabsf((magnitudeErr * *flux)/1.085736); 32 if (fluxErr) printf("Mag = %03.03f, Flux = %03.03f, Mag err = %03.03f, Flux Err = %03.03f\n", magnitude, *flux, magnitudeErr, *fluxErr);32 // if (fluxErr) printf("Mag = %03.03f, Flux = %03.03f, Mag err = %03.03f, Flux Err = %03.03f\n", magnitude, *flux, magnitudeErr, *fluxErr); 33 33 34 34 return true; … … 162 162 163 163 psMetadata *arguments = psMetadataAlloc(); 164 psMetadataAddStr(arguments, PS_LIST_TAIL, "- expid", 0, "ExposureID", NULL);164 psMetadataAddStr(arguments, PS_LIST_TAIL, "-id", 0, "ID", NULL); 165 165 psMetadataAddStr(arguments, PS_LIST_TAIL, "-expname", 0, "Exposure name", NULL); 166 166 psMetadataAddStr(arguments, PS_LIST_TAIL, "-survey", 0, "Survey type", NULL); … … 179 179 else { 180 180 181 char *tmp = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "- expid"));182 if (tmp) this-> expId = atoi(tmp);181 char *tmp = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-id")); 182 if (tmp) this->id = atoi(tmp); 183 183 //free(tmp); tmp = NULL; 184 184 this->expName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-expname")); … … 203 203 (this->batchType != BATCH_INIT && !this->fitsInPath) || 204 204 (this->batchType != BATCH_INIT && !this->resultsPath) || 205 (this->batchType != BATCH_INIT && this-> expId == -1) ||205 (this->batchType != BATCH_INIT && this->id == -1) || 206 206 !this->fitsOutPath || 207 207 !this->configsDir || … … 284 284 285 285 // remaining args 286 this-> expId = -1;286 this->id = -1; 287 287 this->expName = NULL; 288 288 this->surveyType = NULL; 289 this->surveyID = -1; 289 290 this->fitsInPath = NULL; 290 291 this->resultsPath = NULL; … … 300 301 this->run = ippToPsps_run; 301 302 303 // sort out current time 304 time_t now = time(NULL);; 305 struct tm *ts = gmtime(&now); // TODO should be UTC 306 strftime(this->todaysDate, sizeof(this->todaysDate), "%Y-%m-%d", ts); 307 302 308 if (!this->pmconfig) { 303 309 … … 333 339 // create filename 334 340 char outputName[100]; 335 sprintf(outputName, "%08d.FITS", this-> expId);341 sprintf(outputName, "%08d.FITS", this->id); 336 342 psStringAppend(&this->fitsOutPath, "/%s", outputName); 337 343 … … 353 359 } 354 360 361 // get survey ID using config object 362 if (this->batchType != BATCH_INIT && 363 !ippToPspsConfig_getSurveyId(this->config, this->surveyType, &this->surveyID)) { 364 365 this->exitCode = PS_EXIT_CONFIG_ERROR; 366 return this; 367 } 368 355 369 // create XML document for results 356 370 if (this->resultsPath) {
Note:
See TracChangeset
for help on using the changeset viewer.
