Changeset 39500 for trunk/ppMerge/src
- Timestamp:
- Mar 31, 2016, 6:31:12 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeMask.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeMask.c
r24114 r39500 110 110 pmHDU *hdu = pmHDUGetHighest(outCell->parent->parent, outCell->parent, outCell); // File HDU 111 111 if (hdu && hdu != *lastHDU) { 112 if (!hdu->header) { 113 hdu->header = psMetadataAlloc(); 114 } 112 115 ppMergeVersionHeader(hdu->header); 113 116 *lastHDU = hdu; … … 285 288 if (!outCell->process) continue; 286 289 287 pmHDU *hdu = pmHDUFromCell(outCell); ///< HDU for cell 290 // pmHDU *hdu = pmHDUFromCell(outCell); ///< HDU for cell 291 pmHDU *hdu = pmHDUGetLowest(outFPA, outChip, outCell); ///< HDU for cell 288 292 if (!hdu || hdu->blankPHU) continue; 289 293 … … 307 311 308 312 // Supplementary outputs 313 pmCell *countsCell = NULL; 314 pmCell *sigmaCell = NULL; 309 315 { 310 316 // The counts image is fairly useless, but it preserves the model 311 pmCell *countsCell = pmFPAfileThisCell(config->files, outView, "PPMERGE.OUTPUT.COUNT");317 countsCell = pmFPAfileThisCell(config->files, outView, "PPMERGE.OUTPUT.COUNT"); 312 318 pmReadout *countsRO = pmReadoutAlloc(countsCell); ///< Readout with count of inputs per pixel 313 319 countsRO->image = psImageAlloc(outRO->mask->numCols, outRO->mask->numRows, PS_TYPE_F32); … … 316 322 psFree(countsRO); 317 323 318 pmCell *sigmaCell = pmFPAfileThisCell(config->files, outView, "PPMERGE.OUTPUT.SIGMA");324 sigmaCell = pmFPAfileThisCell(config->files, outView, "PPMERGE.OUTPUT.SIGMA"); 319 325 pmReadout *sigmaRO = pmReadoutAlloc(sigmaCell); ///< Readout with suspect image 320 326 psImage *suspect = psMetadataLookupPtr(NULL, outRO->analysis, PM_MASK_ANALYSIS_SUSPECT); … … 323 329 sigmaRO->data_exists = sigmaCell->data_exists = sigmaCell->parent->data_exists = true; 324 330 psFree(sigmaRO); 331 325 332 } 326 333 … … 354 361 } 355 362 psFree(cells); 363 364 // XXX EAM 2016.03.29 : sigmaCell and countsCell need to have their concepts copied from outCell. 365 // This was causing segfaults for VYSOS5; Why did this ever work for SIMTEST? 366 if (!pmConceptsCopyCell(countsCell, outCell)) { 367 psError(PS_ERR_UNKNOWN, false, "Unable to copy cell concepts."); 368 goto MERGE_MASK_ERROR; 369 } 370 371 if (!pmConceptsCopyCell(sigmaCell, outCell)) { 372 psError(PS_ERR_UNKNOWN, false, "Unable to copy cell concepts."); 373 goto MERGE_MASK_ERROR; 374 } 356 375 357 376 // Statistics on the merged cell using a fake image
Note:
See TracChangeset
for help on using the changeset viewer.
