Changeset 6743 for branches/rel10_ifa/psModules/src/astrom/pmFPACopy.c
- Timestamp:
- Mar 30, 2006, 3:33:07 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmFPACopy.c
r6734 r6743 307 307 // Get the size of the HDU, either from existing trimsec and biassec, or generate these and try again 308 308 int xSize = 0, ySize = 0; // Size of HDU 309 #if 1310 311 309 if (!sizeHDU(&xSize, &ySize, targetCells) && !(generateTrimBias(targetCells, sourceCells) && 312 310 sizeHDU(&xSize, &ySize, targetCells))) { … … 314 312 return false; 315 313 } 316 #else 317 if (!sizeHDU(&xSize, &ySize, targetCells)) { 318 if (generateTrimBias(targetCells, sourceCells)) { 319 if (!sizeHDU(&xSize, &ySize, targetCells)) { 320 psError(PS_ERR_IO, true, "Unable to determine size of HDU!\n"); 321 return false; 322 } 323 } else { 324 psError(PS_ERR_IO, true, "Unable to determine size of HDU!\n"); 325 return false; 326 } 327 } 328 #endif 314 psFree(targetCells); 315 psFree(sourceCells); 329 316 330 317 hdu->images = psArrayAlloc(numReadouts); … … 509 496 } else { 510 497 copyPixels(hdu->images->data[i], sourceImage, *trimsec, xFlip, yFlip); 511 targetReadout->image = ps MemIncrRefCounter(psImageSubset(hdu->images->data[i], *trimsec));498 targetReadout->image = psImageSubset(hdu->images->data[i], *trimsec); 512 499 } 513 500 … … 532 519 } else { 533 520 copyPixels(hdu->images->data[i], bias, *biassec, xFlip, yFlip); 534 psImage *newBias = ps MemIncrRefCounter(psImageSubset(hdu->images->data[i], *biassec));521 psImage *newBias = psImageSubset(hdu->images->data[i], *biassec); 535 522 psListAdd(targetReadout->bias, PS_LIST_TAIL, newBias); 536 523 psFree(newBias); // Drop reference 537 524 } 538 525 } 526 psFree(targetReadout); // Drop reference 539 527 psFree(biassecsIter); 540 528 psFree(biasIter); … … 551 539 } 552 540 } 541 psFree(conceptsIter); 553 542 554 543 // Need to update CELL.X0 and CELL.Y0 if we flipped
Note:
See TracChangeset
for help on using the changeset viewer.
