IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2009, 6:15:31 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ppStack

  • branches/cnb_branches/cnb_branch_20090301/ppStack/src/ppStackCombineInitial.c

    r23352 r23594  
    1616    psAssert(config, "Require configuration");
    1717
    18     psTimerStart("PPSTACK_FINAL");
     18    if (!options->convolve) {
     19        // No need to do initial combination when we haven't convolved
     20        return true;
     21    }
    1922
    20     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
    21     psAssert(recipe, "We've thrown an error on this before.");
     23    psTimerStart("PPSTACK_INITIAL");
    2224
    2325    psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
     
    2527                                          "KERNEL.SIZE"); // Overlap by kernel size between consecutive scans
    2628
    27     pmFPAview *view = NULL;             // View to readout
    28 
    29     int row0, col0;                 // Offset for readout
    30     int numCols, numRows;           // Size of readout
    31     ppStackThread *thread = stack->threads->data[0]; // Representative thread
    32     if (!pmReadoutStackSetOutputSize(&col0, &row0, &numCols, &numRows, thread->readouts)) {
    33         psError(PS_ERR_UNKNOWN, false, "problem setting output readout size.");
    34         return false;
    35     }
    36 
    37     pmFPAfileActivate(config->files, false, NULL);
    38     ppStackFileActivation(config, PPSTACK_FILES_COMBINE, true);
    39     view = ppStackFilesIterateDown(config);
    40     if (!view) {
    41         return false;
    42     }
    43 
    44     pmCell *outCell = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT"); // Output cell
    45     options->outRO = pmReadoutAlloc(outCell); // Output readout
    46     psFree(view);
    47 
    48     psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.BAD"); // Name of bits to mask for bad
    49     psImageMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels
    50     if (!pmReadoutStackDefineOutput(options->outRO, col0, row0, numCols, numRows, true, true, maskBad)) {
    51         psError(PS_ERR_UNKNOWN, false, "Unable to prepare output.");
    52         return false;
    53     }
    54 
    55     psFree(options->cells); options->cells = NULL;
    5629
    5730    bool status;                    // Status of read
     
    6942        }
    7043
    71         // call: ppStackReadoutInitial(config, outRO, readouts, subRegions, subKernels)
    7244        psThreadJob *job = psThreadJobAlloc("PPSTACK_INITIAL_COMBINE"); // Job to start
    7345        psArrayAdd(job->args, 1, thread);
     
    128100
    129101    if (options->stats) {
    130         psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_FINAL", 0,
    131                          "Time to make final stack", psTimerMark("PPSTACK_FINAL"));
     102        psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_INITIAL", 0,
     103                         "Time to make final stack", psTimerMark("PPSTACK_INITIAL"));
    132104    }
    133105
Note: See TracChangeset for help on using the changeset viewer.