Changeset 18435
- Timestamp:
- Jul 8, 2008, 9:51:39 AM (18 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
ppStackLoop.c (modified) (2 diffs)
-
ppStackReadout.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]); -
trunk/ppStack/src/ppStackReadout.c
r17633 r18435 9 9 10 10 #include "ppStack.h" 11 12 #define WCS_TOLERANCE 0.001 // Tolerance for WCS13 11 14 12 //#define REJECTION_FILES // Write rejection mask? … … 185 183 } 186 184 totExposure += exposure; // Total exposure time 187 188 #if 0189 if (i == 0) {190 // Copy astrometry over191 pmHDU *hdu = fpa->hdu; // Template HDU192 pmHDU *outHDU = outFPA->hdu; // Output HDU193 if (!outHDU || !hdu) {194 psWarning("Unable to find HDU at FPA level to copy astrometry.");195 } else {196 if (!pmAstromReadWCS(outFPA, outChip, hdu->header, 1.0)) {197 psErrorClear();198 psWarning("Unable to read WCS astrometry from input FPA.");199 } else {200 if (!outHDU->header) {201 outHDU->header = psMetadataAlloc();202 }203 if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {204 psErrorClear();205 psWarning("Unable to write WCS astrometry to output FPA.");206 }207 }208 }209 }210 #endif211 185 212 186 // Ensure there is a mask, or pmStackCombine will complain
Note:
See TracChangeset
for help on using the changeset viewer.
