IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2021, 8:16:13 AM (5 years ago)
Author:
eugene
Message:

include expmaps in ppStack by percent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/ppStack/src/ppStackReadout.c

    r41908 r41910  
    6969
    7070    pmReadout *outRO = options->outRO;  // Output readout
     71    pmReadout *expRO = options->expRO;  // Expmap readout
    7172    psVector *mask = options->inputMask; // Mask for inputs
    7273    psVector *weightings = options->weightings; // Weightings (1/noise^2) for each image
     
    7677    // fprintf (stderr, "start thread %d : scan range %d - %d\n", thread->entry, thread->firstScan, thread->lastScan);
    7778
    78     bool status = ppStackReadoutPercent(config, outRO, thread->readouts, mask, weightings, exposures, addVariance);
     79    bool status = ppStackReadoutPercent(config, outRO, expRO, thread->readouts, mask, weightings, exposures, addVariance);
    7980
    8081    thread->busy = false;
     
    361362}
    362363
    363 bool ppStackReadoutPercent(const pmConfig *config, pmReadout *outRO, const psArray *readouts,
     364bool ppStackReadoutPercent(const pmConfig *config, pmReadout *outRO, pmReadout *expRO, const psArray *readouts,
    364365                               const psVector *mask, const psVector *weightings, const psVector *exposures,
    365366                               const psVector *addVariance)
     
    367368    assert(config);
    368369    assert(outRO);
     370    assert(expRO);
    369371    assert(readouts);
    370372    assert(mask && mask->n == readouts->n && mask->type.type == PS_TYPE_VECTOR_MASK);
     
    420422    // XXX rename minRange to rejectFraction
    421423    // XXX add expmaps
    422     if (!pmStackCombineByPercentile(outRO, NULL, stackData, minRange, maskBad, maskSuspect, maskBlank)) {
     424    if (!pmStackCombineByPercentile(outRO, expRO, stackData, minRange, maskBad, maskSuspect, maskBlank)) {
    423425        psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection.");
    424426        psFree(stackData);
     
    426428    }
    427429
    428     outRO->data_exists = true; // output readout
    429     outRO->parent->data_exists = true; // output cell
     430    outRO->data_exists = true;                // output readout
     431    outRO->parent->data_exists = true;        // output cell
    430432    outRO->parent->parent->data_exists = true; // output chip
    431433
    432 # if 0
    433       pmCell *expCell = expRO->parent;    // Exposure cell
    434       pmChip *expChip = expCell->parent;  // Exposure chip
    435       expRO->data_exists = true;
    436       expCell->data_exists = true;
    437       expChip->data_exists = true;
    438 # endif
     434    expRO->data_exists = true;                 // expmap readout
     435    expRO->parent->data_exists = true;         // expmap cell   
     436    expRO->parent->parent->data_exists = true; // expmap chip   
    439437
    440438    psFree(stackData);
Note: See TracChangeset for help on using the changeset viewer.