Changeset 29937 for trunk/ppSub/src/ppSubCamera.c
- Timestamp:
- Dec 5, 2010, 9:45:46 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubCamera.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubCamera.c
r27661 r29937 221 221 "Generate inverse subtractions?", true); 222 222 } 223 224 data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE"); 225 data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY"); 223 if (psMetadataLookupBool(NULL, config->arguments, "-forced-phot")) { 224 psMetadataAddBool(recipe, PS_LIST_TAIL, "FORCED.PHOTOMETRY.BOTH", PS_META_REPLACE, "Perform forced photometry?", true); 225 } 226 if (psMetadataLookupBool(NULL, config->arguments, "-forced-input1")) { 227 psMetadataAddBool(recipe, PS_LIST_TAIL, "FORCED.PHOTOMETRY.INPUT1", PS_META_REPLACE, "Perform forced photometry?", true); 228 } 229 if (psMetadataLookupBool(NULL, config->arguments, "-forced-input2")) { 230 psMetadataAddBool(recipe, PS_LIST_TAIL, "FORCED.PHOTOMETRY.INPUT2", PS_META_REPLACE, "Perform forced photometry?", true); 231 } 232 233 data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE"); 234 data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY"); 235 data->forcedPhot1 = psMetadataLookupBool(NULL, recipe, "FORCED.PHOTOMETRY.BOTH") || psMetadataLookupBool(NULL, recipe, "FORCED.PHOTOMETRY.INPUT1"); 236 data->forcedPhot2 = psMetadataLookupBool(NULL, recipe, "FORCED.PHOTOMETRY.BOTH") || psMetadataLookupBool(NULL, recipe, "FORCED.PHOTOMETRY.INPUT2"); 226 237 227 238 // Convolved input image … … 363 374 return false; 364 375 } 365 // specify the number of psphot input images366 psMetadataAddS32 (config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "number of inputs", 1);367 376 pmFPAfileActivate(config->files, false, "PSPHOT.INPUT"); 368 377 … … 405 414 invSources->save = true; 406 415 } 416 417 // files need to do the forced photometry on the positions of sources in the positive images 418 if (data->forcedPhot1) { 419 // this pmFPAfile is used to carry sources detected in the positive image #1 420 pmFPAfile *posSources1 = defineOutputFile(config, output, true, "PPSUB.POS1.SOURCES", PM_FPA_FILE_CMF); 421 if (!posSources1) { 422 psError(psErrorCodeLast(), false, "Unable to set up forced source file."); 423 return false; 424 } 425 posSources1->save = true; 426 427 // this pmFPAfile is used to carry sources detected in the diff image @ the positions from positive image #1 428 pmFPAfile *frcSources1 = defineOutputFile(config, output, true, "PPSUB.FORCED1.SOURCES", PM_FPA_FILE_CMF); 429 if (!frcSources1) { 430 psError(psErrorCodeLast(), false, "Unable to set up forced source file."); 431 return false; 432 } 433 frcSources1->save = true; 434 } 435 436 if (data->forcedPhot2) { 437 // this pmFPAfile is used to carry sources detected in the positive image #2 438 pmFPAfile *posSources2 = defineOutputFile(config, inverse, true, "PPSUB.POS2.SOURCES", PM_FPA_FILE_CMF); 439 if (!posSources2) { 440 psError(psErrorCodeLast(), false, "Unable to set up forced source file."); 441 return false; 442 } 443 posSources2->save = true; 444 445 // this pmFPAfile is used to carry sources detected in the diff image @ the positions from positive image #2 446 pmFPAfile *frcSources2 = defineOutputFile(config, inverse, true, "PPSUB.FORCED2.SOURCES", PM_FPA_FILE_CMF); 447 if (!frcSources2) { 448 psError(psErrorCodeLast(), false, "Unable to set up forced source file."); 449 return false; 450 } 451 frcSources2->save = true; 452 } 407 453 } 408 454
Note:
See TracChangeset
for help on using the changeset viewer.
