Changeset 18435 for trunk/ppStack/src/ppStackLoop.c
- Timestamp:
- Jul 8, 2008, 9:51:39 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackLoop.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackLoop.c
r18393 r18435 13 13 14 14 //#define TESTING 15 16 #define WCS_TOLERANCE 0.001 // Tolerance for WCS 15 17 16 18 // Here follows lists of files for activation/deactivation at various stages. Each must be NULL-terminated. … … 702 704 703 705 // Close up 706 bool wcsDone = false; // Have we done the WCS? 704 707 for (int i = 0; i < num; i++) { 705 708 if (!readouts->data[i]) { 706 709 continue; 707 710 } 711 if (!wcsDone) { 712 // Copy astrometry over 713 wcsDone = true; 714 pmReadout *inRO = readouts->data[i]; // Template readout 715 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU 716 pmHDU *outHDU = pmHDUFromCell(outRO->parent); // Output HDU 717 pmChip *outChip = outRO->parent->parent; // Output chip 718 pmFPA *outFPA = outChip->parent; // Output FPA 719 if (!outHDU || !inHDU) { 720 psWarning("Unable to find HDU at FPA level to copy astrometry."); 721 } else { 722 if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) { 723 psErrorClear(); 724 psWarning("Unable to read WCS astrometry from input FPA."); 725 wcsDone = false; 726 } else { 727 if (!outHDU->header) { 728 outHDU->header = psMetadataAlloc(); 729 } 730 if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) { 731 psErrorClear(); 732 psWarning("Unable to write WCS astrometry to output FPA."); 733 wcsDone = false; 734 } 735 } 736 } 737 } 738 708 739 psFitsClose(imageFits->data[i]); 709 740 psFitsClose(maskFits->data[i]);
Note:
See TracChangeset
for help on using the changeset viewer.
