Changeset 5974 for branches/eam_rel9_p0/psModules/src/astrom/pmChipMosaic.c
- Timestamp:
- Jan 13, 2006, 5:10:19 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/astrom/pmChipMosaic.c
r5796 r5974 106 106 } 107 107 108 psImage *pmChipMosaic(pmChip *chip, // Chip to mosaic 109 int xBinChip, int yBinChip // Binning of mosaic image in x and y 110 ) 108 // Mosaic a chip together into a single image 109 static psImage *mosaicChip(pmChip *chip,// Chip to mosaic 110 int xBinChip, int yBinChip // Binning of mosaic image in x and y 111 ) 111 112 { 113 112 114 psArray *cells = chip->cells; // The array of cells 113 115 psArray *images = psArrayAlloc(cells->n); // Array of images that will be mosaicked … … 174 176 return mosaic; 175 177 } 178 179 180 int pmFPAMosaicChips(pmFPA *fpa, // FPA 181 int xBinChip, int yBinChip // Binning of mosaic image in x and y 182 ) 183 { 184 assert(fpa); 185 186 int numChips = 0; 187 psArray *chips = fpa->chips; // Component chips 188 for (int i = 0; i < chips->n; i++) { 189 pmChip *chip = chips->data[i]; // The chip of interest 190 if (! chip || ! chip->exists || ! chip->process) { 191 continue; 192 } 193 194 numChips++; 195 psImage *mosaic = mosaicChip(chip, xBinChip, yBinChip); // Mosaic of cells within the chip 196 197 // Chop off all the component cells, and put in a new one 198 psArrayElementsFree(chip->cells); 199 chip->cells = psArrayRealloc(chip->cells, 1); 200 pmCell *cell = pmCellAlloc(chip, NULL, __func__); // New cell 201 pmReadout *readout = pmReadoutAlloc(cell); // New readout 202 readout->image = mosaic; 203 psFree(readout); 204 } 205 206 return numChips; 207 208 }
Note:
See TracChangeset
for help on using the changeset viewer.
