IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2009, 12:45:24 PM (17 years ago)
Author:
eugene
Message:

update from mainline

Location:
branches/eam_branches/20090715
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715

  • branches/eam_branches/20090715/ppMerge/src/ppMergeLoop.c

    r24797 r25022  
    6565    int fringeSmoothX = psMetadataLookupS32(NULL, arguments, "FRINGE.XSMOOTH"); // Smoothing regions in x
    6666    int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); // Smoothing regions in y
     67    bool fringeSmooth = psMetadataLookupBool(NULL, arguments, "FRINGE.SMOOTH"); // Smooth the output image?
     68    float fringeSmoothSigma = psMetadataLookupF32(NULL, arguments, "FRINGE.SMOOTH.SIGMA"); // Smooth the output image?
    6769
    6870    // set the mask and mark bit values based on the named masks
     
    150152    pmChip *outChip;                    ///< Chip of interest
    151153    while ((outChip = pmFPAviewNextChip(view, outFPA, 1))) {
     154        if (!outChip->process || !outChip->file_exists) {
     155            continue;
     156        }
    152157        if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    153158            goto ERROR;
     
    159164
    160165        while ((outCell = pmFPAviewNextCell(view, outFPA, 1))) {
     166            if (!outCell->process || !outCell->file_exists) {
     167                continue;
     168            }
    161169            if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    162170                goto ERROR;
     
    416424            // Put the new readout into the cell after the existing readouts.
    417425            if (type == PPMERGE_TYPE_FRINGE && outRO) {
    418                 pmFringeRegions *regions = pmFringeRegionsAlloc(fringeNum, fringeSize, fringeSize,
    419                                                                 fringeSmoothX, fringeSmoothY);
     426                if (fringeSmooth) {
     427                    if (outRO->mask) {
     428                        psImage *smoothed = psImageSmoothMask (NULL, outRO->image, outRO->mask, maskVal, fringeSmoothSigma, 3, 0.2);
     429                        psFree (outRO->image);
     430                        outRO->image = smoothed;
     431                    } else {
     432                        psImageSmooth (outRO->image, fringeSmoothSigma, 3);
     433                    }
     434                }
     435
     436                pmFringeRegions *regions = pmFringeRegionsAlloc(fringeNum, fringeSize, fringeSize, fringeSmoothX, fringeSmoothY);
    420437                pmFringeStats *fringe = pmFringeStatsMeasure(regions, outRO, maskVal);
    421438                psFree(regions);
     
    429446                fringes->data[0] = fringe;
    430447
    431                 pmFringesFormat(outCell, NULL, fringes);
     448                // XXX replaced this : pmFringesFormat(outCell, NULL, fringes);
     449                if (!psMetadataAdd(outCell->analysis, PS_LIST_TAIL, "FRINGE.MEASUREMENTS", PS_DATA_ARRAY, "Fringes", fringes)) {
     450                    psError(PS_ERR_UNKNOWN, false, "Unable to add fringe to analysis metadata\n");
     451                    goto ERROR;
     452                }
    432453                psFree(fringes);        // Drop reference
    433454            }
Note: See TracChangeset for help on using the changeset viewer.