Changeset 9832 for trunk/ppMerge/src/ppMergeCombine.c
- Timestamp:
- Nov 2, 2006, 12:30:06 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeCombine.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCombine.c
r9824 r9832 214 214 } 215 215 numRead++; 216 } else { 217 psTrace("ppMerge", 3, "Unable to read from file %d for chip %d, " 218 "cell %d, scan %d\n", i, view->chip, view->cell, numScan); 216 219 } 217 220 } 218 221 222 psTrace("ppMerge", 5, "Chip %d, cell %d, scan %d\n", view->chip, view->cell, numScan); 219 223 if (numRead > 0) { 220 224 pmReadoutCombine(readout, stack, cellZeros, cellScales, options->combine); 221 psTrace("ppMerge", 5, "Chip %d, cell %d, scan %d\n", view->chip, view->cell, numScan);222 225 } 223 226 numScan++; … … 259 262 } 260 263 261 psFree(readout); // Drop reference262 264 psFree(stack); 263 265 … … 270 272 } 271 273 274 // Measure the fringes for this cell 275 // 276 // XXX Need to deal with multiple components: we will do this by building up the components 277 // Read the existing fringe measurements 278 // Use existing regions to measure fringe statistics 279 // Add the new fringe measurements to the existing fringe measurements. 280 // Write the appended fringe measurements. 281 // Read in the "output" file to get the existing components. 282 // Put the new readout into the cell after the existing readouts. 283 if (options->fringe && readout->image) { 284 pmFringeRegions *regions = pmFringeRegionsAlloc(options->fringeNum, options->fringeSize, 285 options->fringeSize, options->fringeSmoothX, 286 options->fringeSmoothY); // Fringe regions 287 pmFringeStats *fringe = pmFringeStatsMeasure(regions, readout, options->combine->maskVal); 288 psFree(regions); 289 290 psArray *fringes = psArrayAlloc(1); // Array of fringes 291 fringes->data[0] = fringe; 292 293 const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME"); // Name of chip 294 const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME"); // Name of cell 295 psString extname = NULL; 296 psStringAppend(&extname, "FRINGE_%s_%s", chipName, cellName); 297 298 if (!pmFringesWriteFits(data->outFile, NULL, fringes, extname)) { 299 psWarning("Unable to write fringe data to extension %s\n", extname); 300 } 301 302 psFree(fringes); 303 psFree(extname); 304 } 305 306 psFree(readout); // Drop reference 272 307 273 308 // Statistics on the merged cell
Note:
See TracChangeset
for help on using the changeset viewer.
