IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2010, 12:01:15 PM (16 years ago)
Author:
Paul Price
Message:

Reworking ppStack to not grow the rejected pixels for the unconvolved stack. Also working with convolved and unconvolved stacks separately, so they don't have to be in memory at the same time. This should reduce the memory usage of ppStack.

File:
1 edited

Legend:

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

    r27004 r27319  
    1010#include "ppStackLoop.h"
    1111
    12 bool ppStackCombinePrepare(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config)
     12bool ppStackCombinePrepare(pmReadout **ro, const char *name, ppStackFileList files, ppStackThreadData *stack,
     13                           ppStackOptions *options, pmConfig *config)
    1314{
    1415    psAssert(stack, "Require stack");
     
    2526
    2627    pmFPAfileActivate(config->files, false, NULL);
    27     ppStackFileActivation(config, PPSTACK_FILES_COMBINE, true);
     28    ppStackFileActivation(config, files, true);
    2829    pmFPAview *view = ppStackFilesIterateDown(config); // View to readout
    2930    if (!view) {
     
    3132    }
    3233
    33     pmCell *outCell = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT"); // Output cell
    34     options->outRO = pmReadoutAlloc(outCell); // Output readout
    35 
    36     pmCell *unconvCell = pmFPAfileThisCell(config->files, view, "PPSTACK.UNCONV"); // Unconvolved cell
    37     options->unconvRO = pmReadoutAlloc(unconvCell); // Unconvolved readout
     34    pmCell *cell = pmFPAfileThisCell(config->files, view, name); // Output cell
     35    *ro = pmReadoutAlloc(cell); // Output readout
    3836
    3937    psFree(view);
     
    4442    psImageMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels
    4543
    46     if (!pmReadoutStackDefineOutput(options->outRO, col0, row0, numCols, numRows, true, true, maskBad)) {
     44    if (!pmReadoutStackDefineOutput(*ro, col0, row0, numCols, numRows, true, true, maskBad)) {
    4745        psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to prepare output.");
    4846        return false;
    4947    }
    5048
    51     options->unconvRO->image = psImageCopy(NULL, options->outRO->image, PS_TYPE_F32);
    52 //    options->unconvRO->mask = psImageCopy(NULL, options->outRO->mask, PS_TYPE_IMAGE_MASK);
    53     options->unconvRO->col0 = options->outRO->col0;
    54     options->unconvRO->row0 = options->outRO->row0;
    55 
    56 
    57 
    5849    return true;
    5950}
Note: See TracChangeset for help on using the changeset viewer.