Changeset 14204
- Timestamp:
- Jul 13, 2007, 5:18:45 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileFitsIO.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileFitsIO.c
r12832 r14204 26 26 PS_ASSERT_PTR_NON_NULL(view, NULL); 27 27 28 if (//file->camera == config->camera || // Need to mosaic, not copy 29 !file->format) { // Working with the same output format as input format 28 if (!file->format) { // Working with the same output format as input format 30 29 return psMemIncrRefCounter(file->fpa); 31 30 } … … 82 81 } 83 82 psFree(phuView); 84 85 // preserve this state variable86 copy->wrote_phu = file->fpa->wrote_phu;87 83 88 84 switch (level) { … … 467 463 468 464 #endif 465 466 bool pmFPAviewFitsWritePHU (const pmFPAview *view, pmFPAfile *file, const pmConfig *config) { 467 468 bool status = false; 469 470 if (file->mode != PM_FPA_MODE_WRITE) return true; 471 if (file->wrote_phu) return true; 472 473 // select or generate the desired fpa in the correct output format 474 pmFPA *fpa = pmFPAfileSuitableFPA(file, view, config); 475 476 switch (file->fileLevel) { 477 case PM_FPA_LEVEL_FPA: 478 status = pmFPAWrite(fpa, file->fits, NULL, true, false); 479 break; 480 case PM_FPA_LEVEL_CHIP: { 481 pmChip *chip = pmFPAviewThisChip(view, fpa); 482 status = pmChipWrite(chip, file->fits, NULL, true, false); 483 break; 484 } 485 case PM_FPA_LEVEL_CELL: { 486 pmCell *cell = pmFPAviewThisCell(view, fpa); 487 status = pmCellWrite(cell, file->fits, NULL, true); 488 break; 489 } 490 default: 491 psAbort("fileLevel not correctly set"); 492 break; 493 } 494 495 if (!status) { 496 psError(PS_ERR_UNKNOWN, false, "failed to write PHU for Image %s (%s)\n", file->filename, file->name); 497 return false; 498 } 499 500 psFree(fpa); 501 file->wrote_phu = true; 502 return true; 503 }
Note:
See TracChangeset
for help on using the changeset viewer.
