IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16854


Ignore:
Timestamp:
Mar 6, 2008, 1:04:22 PM (18 years ago)
Author:
Paul Price
Message:

Adding additional trace messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r16850 r16854  
    227227
    228228    // Preparation iteration: Load the sources, and get a target PSF model
     229    psTrace("ppStack", 1, "Determining target PSF....\n");
    229230    pmReadout *sources = NULL;          // Readout with sources to use for PSF matching
    230231    pmPSF *targetPSF = NULL;            // Target PSF
     
    314315
    315316    // Generate convolutions and write them to disk
     317    psTrace("ppStack", 1, "Convolving inputs to target PSF....\n");
    316318    psArray *cells = psArrayAlloc(num); // Cells for convolved images --- a handle for reading again
    317319    psArray *subKernels = psArrayAlloc(num); // Subtraction kernels --- required in the stacking
    318320    psArray *subRegions = psArrayAlloc(num); // Subtraction regions --- required in the stacking
    319321    for (int i = 0; i < num; i++) {
     322        psTrace("ppStack", 2, "Convolving input %d of %d to target PSF....\n", i, num);
    320323        pmFPAfileActivate(config->files, false, NULL);
    321324        psArray *files = fileActivationSingle(config, convolveFiles, true, i);
     
    362365
    363366    // Stack the convolved files
     367    psTrace("ppStack", 1, "Initial stack of convolved images....\n", i, num);
    364368    {
    365369        pmFPAfileActivate(config->files, false, NULL);
     
    412416        bool more = true;               // More to read?
    413417        for (int numChunk = 0; more; numChunk++) {
     418            psTrace("ppStack", 2, "Initial stack of chunk %d....\n", numChunk);
    414419            for (int i = 0; i < num; i++) {
    415420                pmReadout *readout = readouts->data[i];
     
    429434            }
    430435
    431 #ifdef TESTING
     436#ifndef PS_NO_TRACE
    432437            {
    433438                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,
    435440                        ro->row0, ro->row0 + ro->image->numRows);
    436441            }
     
    482487
    483488        // Read convolutions by chunks
     489        psTrace("ppStack", 2, "Final stack of convolved images....\n");
    484490        more = true;
    485491        for (int numChunk = 0; more; numChunk++) {
     492            psTrace("ppStack", 2, "Final stack of chunk %d....\n", numChunk);
    486493            for (int i = 0; i < num; i++) {
    487494                pmReadout *readout = readouts->data[i];
     
    500507            }
    501508
    502 #ifdef TESTING
     509#ifndef PS_NO_TRACE
    503510            {
    504511                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,
    506513                        ro->row0, ro->row0 + ro->image->numRows);
    507514            }
     
    549556        psFree(weightFits);
    550557
    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            }
    557566        }
    558567
    559568        // Statistics on output
    560569        if (stats) {
     570            psTrace("ppStack", 1, "Gathering statistics on stacked image....\n");
    561571            ppStatsFPA(stats, outCell->parent->parent, view, maskBlank, config);
    562572        }
Note: See TracChangeset for help on using the changeset viewer.