Changeset 30013
- Timestamp:
- Dec 9, 2010, 3:12:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ppStack/src/ppStackCombineFinal.c
r29552 r30013 9 9 #include "ppStack.h" 10 10 #include "ppStackLoop.h" 11 12 #define WCS_TOLERANCE 0.001 // Tolerance for WCS13 11 14 12 //#define TESTING // Enable test output … … 107 105 } 108 106 109 // Propagate WCS110 bool wcsDone = false; // Have we done the WCS?111 for (int i = 0; i < options->num && !wcsDone; i++) {112 if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) {113 continue;114 }115 116 ppStackThread *thread = stack->threads->data[0]; // Representative stack117 pmReadout *inRO = thread->readouts->data[i]; // Template readout118 if (inRO && !wcsDone) {119 // Copy astrometry over120 wcsDone = true;121 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU122 pmHDU *outHDU = pmHDUFromCell(outRO->parent); // Output HDU123 pmChip *outChip = outRO->parent->parent; // Output chip124 pmFPA *outFPA = outChip->parent; // Output FPA125 if (!outHDU || !inHDU) {126 psWarning("Unable to find HDU at FPA level to copy astrometry.");127 } else {128 if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) {129 psErrorClear();130 psWarning("Unable to read WCS astrometry from input FPA.");131 wcsDone = false;132 } else {133 if (!outHDU->header) {134 outHDU->header = psMetadataAlloc();135 }136 if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {137 psErrorClear();138 psWarning("Unable to write WCS astrometry to output FPA.");139 wcsDone = false;140 }141 }142 }143 }144 }145 146 // Put version information into the header147 pmHDU *hdu = pmHDUFromCell(outRO->parent);148 if (!hdu) {149 psError(PPSTACK_ERR_PROG, false, "Unable to find HDU for output.");150 return false;151 }152 if (!hdu->header) {153 hdu->header = psMetadataAlloc();154 }155 ppStackVersionHeader(hdu->header);156 157 158 107 #ifdef TESTING 159 108 static int pass = 0; // Pass through
Note:
See TracChangeset
for help on using the changeset viewer.
