IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 18, 2007, 11:53:21 AM (19 years ago)
Author:
Paul Price
Message:

Need to do final solution if stamps were rejected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubReadout.c

    r14248 r14295  
    4343    int numCols = input->numCols, numRows = input->numRows; // Image dimensions
    4444    if (!inRO->mask) {
    45         inRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
    46         psImageInit(inRO->mask, 0);
     45        if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) {
     46            pmReadoutSetMask(inRO, pmConfigMask("SAT", config), pmConfigMask("BAD", config));
     47        } else {
     48            inRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
     49            psImageInit(inRO->mask, 0);
     50        }
    4751    }
    4852    if (!refRO->mask) {
    49         refRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
    50         psImageInit(refRO->mask, 0);
     53        if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) {
     54            pmReadoutSetMask(refRO, pmConfigMask("SAT", config), pmConfigMask("BAD", config));
     55        } else {
     56            refRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
     57            psImageInit(refRO->mask, 0);
     58        }
    5159    }
    5260
     
    104112    }
    105113
     114    if (numRejected > 0) {
     115        solution = pmSubtractionSolveEquation(solution, stamps);
     116        if (!solution) {
     117            psError(PS_ERR_UNKNOWN, false, "Unable to calculate least-squares equation.");
     118            goto ERROR;
     119        }
     120    }
     121
    106122    psImage *convImage = NULL, *convWeight = NULL, *convMask = NULL; // Convolved images
    107123    if (!pmSubtractionConvolve(&convImage, &convWeight, &convMask, refRO->image, refRO->weight, subMask,
     
    130146    outCell->data_exists = true;
    131147    outCell->parent->data_exists = true;
     148
     149    for (int y = 0; y < outRO->image->numRows; y++) {
     150        for (int x = 0; x < outRO->image->numCols; x++) {
     151            if (isnan(outRO->image->data.F32[y][x]) && !(outRO->mask->data.U8[y][x] & maskBlank)) {
     152                printf("%d %d --> %d\n", x, y, outRO->mask->data.U8[y][x]);
     153            }
     154        }
     155    }
    132156
    133157    if (!pmFPACopyConcepts(outCell->parent->parent, inRO->parent->parent->parent)) {
Note: See TracChangeset for help on using the changeset viewer.