IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2007, 1:45:31 PM (19 years ago)
Author:
Paul Price
Message:

Distinguishing between mosaicking (different cells within the same chip) and stacking (same cells within different chips) for concept averaging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAMosaic.c

    r12629 r12654  
    510510        int yTargetBase = (y0->data.S32[i] - yMin) / yBinTarget; // The base y position in the target frame
    511511
    512         // in the first case, we are just copy a section pixel-by-pixel
    513         if ((xBinSource->data.S32[i] == xBinTarget) && 
    514             (yBinSource->data.S32[i] == yBinTarget) &&
    515             (xFlip->data.U8[i] == 0) &&
    516             (yFlip->data.U8[i] == 0)) {
     512        // in the first case, we are just copy a section pixel-by-pixel
     513        if ((xBinSource->data.S32[i] == xBinTarget) &&
     514            (yBinSource->data.S32[i] == yBinTarget) &&
     515            (xFlip->data.U8[i] == 0) &&
     516            (yFlip->data.U8[i] == 0)) {
    517517            // Let someone else do the hard work
    518518            psImageOverlaySection(mosaic, image, xTargetBase, yTargetBase, "+");
    519             continue;
    520         } 
    521        
    522         // in the second case, there's a difference with the parities, but we don't have to
    523         // worry about binning
    524         if (xBinSource->data.S32[i] == xBinTarget && yBinSource->data.S32[i] == yBinTarget) {
     519            continue;
     520        }
     521
     522        // in the second case, there's a difference with the parities, but we don't have to
     523        // worry about binning
     524        if (xBinSource->data.S32[i] == xBinTarget && yBinSource->data.S32[i] == yBinTarget) {
    525525            switch (type) {
    526526                COPY_WITH_PARITY_DIFFERENCE(F32);
    527527                COPY_WITH_PARITY_DIFFERENCE(U8);
    528               default:
     528              default:
    529529                psAbort("Should never get here.\n");
    530530            }
    531             continue;
    532         } 
    533        
    534         // In the third case, the images are flipped and have different binnnig.
    535         // We have to do all of the hard work ourselves
    536         switch (type) {
    537             FILL_IN(F32);
    538             FILL_IN(U8);
    539           default:
    540             psAbort("Should never get here.\n");
    541         }
     531            continue;
     532        }
     533
     534        // In the third case, the images are flipped and have different binnnig.
     535        // We have to do all of the hard work ourselves
     536        switch (type) {
     537            FILL_IN(F32);
     538            FILL_IN(U8);
     539          default:
     540            psAbort("Should never get here.\n");
     541        }
    542542    } // Iterating over images
    543543
     
    10481048        }
    10491049        chipRegion = psRegionAlloc(0, 0, 0, 0); // We've cut and paste, so there's no valid trimsec
    1050         *chipRegion = psRegionForImage (mosaicImage, *chipRegion);
     1050        *chipRegion = psRegionForImage (mosaicImage, *chipRegion);
    10511051    }
    10521052    psTrace("psModules.camera", 1, "xBin,yBin: %d,%d\n", xBin, yBin);
     
    10541054    // Set the concepts for the target cell
    10551055    psList *sourceCells = psArrayToList(source->cells); // List of cells
    1056     pmConceptsAverageCells(targetCell, sourceCells, chipRegion, NULL);
     1056    pmConceptsAverageCells(targetCell, sourceCells, chipRegion, NULL, false);
    10571057    {
    10581058        psMetadataItem *item = psMetadataLookup(targetCell->concepts, "CELL.X0");
     
    11821182        }
    11831183    }
    1184     pmConceptsAverageCells(targetCell, sourceCells, fpaRegion, NULL);
     1184    pmConceptsAverageCells(targetCell, sourceCells, fpaRegion, NULL, false);
    11851185    {
    11861186        psMetadataItem *item = psMetadataLookup(targetCell->concepts, "CELL.X0");
Note: See TracChangeset for help on using the changeset viewer.