Changeset 16854
- Timestamp:
- Mar 6, 2008, 1:04:22 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackLoop.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackLoop.c
r16850 r16854 227 227 228 228 // Preparation iteration: Load the sources, and get a target PSF model 229 psTrace("ppStack", 1, "Determining target PSF....\n"); 229 230 pmReadout *sources = NULL; // Readout with sources to use for PSF matching 230 231 pmPSF *targetPSF = NULL; // Target PSF … … 314 315 315 316 // Generate convolutions and write them to disk 317 psTrace("ppStack", 1, "Convolving inputs to target PSF....\n"); 316 318 psArray *cells = psArrayAlloc(num); // Cells for convolved images --- a handle for reading again 317 319 psArray *subKernels = psArrayAlloc(num); // Subtraction kernels --- required in the stacking 318 320 psArray *subRegions = psArrayAlloc(num); // Subtraction regions --- required in the stacking 319 321 for (int i = 0; i < num; i++) { 322 psTrace("ppStack", 2, "Convolving input %d of %d to target PSF....\n", i, num); 320 323 pmFPAfileActivate(config->files, false, NULL); 321 324 psArray *files = fileActivationSingle(config, convolveFiles, true, i); … … 362 365 363 366 // Stack the convolved files 367 psTrace("ppStack", 1, "Initial stack of convolved images....\n", i, num); 364 368 { 365 369 pmFPAfileActivate(config->files, false, NULL); … … 412 416 bool more = true; // More to read? 413 417 for (int numChunk = 0; more; numChunk++) { 418 psTrace("ppStack", 2, "Initial stack of chunk %d....\n", numChunk); 414 419 for (int i = 0; i < num; i++) { 415 420 pmReadout *readout = readouts->data[i]; … … 429 434 } 430 435 431 #if def TESTING436 #ifndef PS_NO_TRACE 432 437 { 433 438 pmReadout *ro = readouts->data[0]; 434 psTrace("ppStack", 1, "Stack: [%d:%d,%d:%d]\n", ro->col0, ro->col0 + ro->image->numCols,439 psTrace("ppStack", 4, "Stack: [%d:%d,%d:%d]\n", ro->col0, ro->col0 + ro->image->numCols, 435 440 ro->row0, ro->row0 + ro->image->numRows); 436 441 } … … 482 487 483 488 // Read convolutions by chunks 489 psTrace("ppStack", 2, "Final stack of convolved images....\n"); 484 490 more = true; 485 491 for (int numChunk = 0; more; numChunk++) { 492 psTrace("ppStack", 2, "Final stack of chunk %d....\n", numChunk); 486 493 for (int i = 0; i < num; i++) { 487 494 pmReadout *readout = readouts->data[i]; … … 500 507 } 501 508 502 #if def TESTING509 #ifndef PS_NO_TRACE 503 510 { 504 511 pmReadout *ro = readouts->data[0]; 505 psTrace("ppStack", 1, "Stack: [%d:%d,%d:%d]\n", ro->col0, ro->col0 + ro->image->numCols,512 psTrace("ppStack", 4, "Stack: [%d:%d,%d:%d]\n", ro->col0, ro->col0 + ro->image->numCols, 506 513 ro->row0, ro->row0 + ro->image->numRows); 507 514 } … … 549 556 psFree(weightFits); 550 557 551 if (psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY") && 552 !ppStackPhotometry(config, outRO, view)) { 553 psError(PS_ERR_UNKNOWN, false, "Unable to perform photometry on output."); 554 psFree(outRO); 555 psFree(view); 556 return false; 558 if (psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY")) { 559 psTrace("ppStack", 1, "Photometering stacked image....\n"); 560 if (!ppStackPhotometry(config, outRO, view)) { 561 psError(PS_ERR_UNKNOWN, false, "Unable to perform photometry on output."); 562 psFree(outRO); 563 psFree(view); 564 return false; 565 } 557 566 } 558 567 559 568 // Statistics on output 560 569 if (stats) { 570 psTrace("ppStack", 1, "Gathering statistics on stacked image....\n"); 561 571 ppStatsFPA(stats, outCell->parent->parent, view, maskBlank, config); 562 572 }
Note:
See TracChangeset
for help on using the changeset viewer.
