Changeset 9954
- Timestamp:
- Nov 13, 2006, 12:33:20 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeCombine.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCombine.c
r9907 r9954 78 78 #endif 79 79 80 #if 0 80 81 // Write fringe extensions 81 82 static void writeFringes(psMetadata *fringes, // Table of extensions with fringe statistics to write … … 103 104 return; 104 105 } 105 106 #endif 106 107 107 108 // Combine the inputs … … 128 129 // Iterate over the FPA 129 130 pmFPA *fpa = data->out; // Output FPA 130 psMetadata *fringeExtns = psMetadataAlloc(); // List of fringe extensions to write131 131 pmFPAview *view = pmFPAviewAlloc(0);// View of FPA, for iteration 132 132 int cellNum = -1; // Cell number in the whole FPA … … 319 319 fringes->data[0] = fringe; 320 320 321 const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME"); // Name of chip 322 const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME"); // Name of cell 323 psString extname = NULL; 324 psStringAppend(&extname, "FRINGE_%s_%s", chipName, cellName); 325 326 psMetadataAdd(fringeExtns, PS_LIST_TAIL, extname, PS_DATA_UNKNOWN, 327 "Fringe data to write", fringes); 328 psFree(fringes); 329 psFree(extname); 321 pmFringesFormat(cell, NULL, fringes); 322 psFree(fringes); // Drop reference 330 323 } 331 324 … … 351 344 352 345 // Write the pixels 353 if (cell->hdu ) {346 if (cell->hdu && !cell->hdu->blankPHU) { 354 347 psTrace("ppMerge", 5, "Writing out cell HDU.\n"); 355 348 pmCellWrite(cell, data->outFile, config->database, false); 349 if (options->fringe) { 350 pmCellWriteTable(data->outFile, cell, "FRINGE"); 351 } 352 356 353 pmCellFreeData(cell); 357 358 if (options->fringe) {359 writeFringes(fringeExtns, data->outFile);360 }361 354 } 362 355 } … … 370 363 371 364 // Write the pixels 372 if (chip->hdu ) {365 if (chip->hdu && !chip->hdu->blankPHU) { 373 366 psTrace("ppMerge", 5, "Writing out chip HDU.\n"); 374 367 pmChipWrite(chip, data->outFile, config->database, false, false); 368 if (options->fringe) { 369 pmChipWriteTable(data->outFile, chip, "FRINGE"); 370 } 371 375 372 pmChipFreeData(chip); 376 377 if (options->fringe) { 378 writeFringes(fringeExtns, data->outFile); 379 } 380 } 381 } 382 383 if (data->out->hdu) { 384 // Write the pixels 385 psTrace("ppMerge", 5, "Writing out FPA HDU.\n"); 386 pmFPAWrite(data->out, data->outFile, config->database, false, false); 373 } 387 374 } 388 375 … … 391 378 pmFPA *fpaIn = data->in->data[i]; // Input FPA 392 379 pmFPAFreeData(fpaIn); 393 380 } 381 382 if (data->out->hdu && !data->out->hdu->blankPHU) { 383 // Write the pixels 384 psTrace("ppMerge", 5, "Writing out FPA HDU.\n"); 385 pmFPAWrite(data->out, data->outFile, config->database, false, false); 394 386 if (options->fringe) { 395 writeFringes(fringeExtns, data->outFile); 396 } 397 } 387 pmFPAWriteTable(data->outFile, fpa, "FRINGE"); 388 } 389 } 390 398 391 pmFPAFreeData(data->out); 399 392
Note:
See TracChangeset
for help on using the changeset viewer.
