IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2006, 6:33:38 PM (20 years ago)
Author:
Paul Price
Message:

Fixed up freeing an FPA hierarchy at lower levels (and retaining the upper level); fixed the weights to provide variance in DN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_p0/psModules/src/astrom/pmChipMosaic.c

    r6080 r6113  
    132132
    133133// Mosaic a chip together into a single image
    134 static bool mosaicChip(pmChip *chip,// Chip to mosaic
    135                        int xBinChip, int yBinChip // Binning of mosaic image in x and y
    136                       )
     134int pmChipMosaic(pmChip *chip,// Chip to mosaic
     135                 int xBinChip, int yBinChip // Binning of mosaic image in x and y
     136                )
    137137{
    138138
     
    149149
    150150    // Set up the required inputs
     151    psTrace(__func__, 1, "Mosaicking %d cells...\n", cells->n);
    151152    for (int i = 0; i < cells->n; i++) {
    152153        pmCell *cell = cells->data[i];  // The cell of interest
    153154        x0->data.S32[i] = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0");
    154155        y0->data.S32[i] = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0");
    155         psTrace(__func__, 9, "Cell %d: x0=%d y0=%d\n", i, x0->data.S32[i], y0->data.S32[i]);
     156        psTrace(__func__, 5, "Cell %d: x0=%d y0=%d\n", i, x0->data.S32[i], y0->data.S32[i]);
    156157        xBin->data.S32[i] = psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN");
    157158        yBin->data.S32[i] = psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN");
     
    204205    psFree(weights);
    205206    psFree(masks);
     207    int nCells = cells->n;
     208    psFree(cells);
    206209
    207210    // Chop off all the component cells, and put in a new one
     
    228231    //psFree(readout);
    229232
    230     return true;
    231 }
    232 
    233 
    234 int pmFPAMosaicChips(pmFPA *fpa,        // FPA
     233    return nCells;
     234}
     235
     236
     237int pmFPAMosaicCells(pmFPA *fpa,        // FPA
    235238                     int xBinChip, int yBinChip // Binning of mosaic image in x and y
    236239                    )
     
    247250
    248251        numChips++;
    249         mosaicChip(chip, xBinChip, yBinChip); // Mosaic of cells within the chip
     252        pmChipMosaic(chip, xBinChip, yBinChip); // Mosaic of cells within the chip
    250253
    251254    }
Note: See TracChangeset for help on using the changeset viewer.