Changeset 13189 for trunk/psModules/src/camera/pmFPAMosaic.c
- Timestamp:
- May 2, 2007, 8:07:43 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMosaic.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMosaic.c
r13064 r13189 1072 1072 item->data.S32 = yBin; 1073 1073 } 1074 1075 1074 psFree(sourceCells); 1076 1075 psFree(chipRegion); … … 1117 1116 return false; 1118 1117 } 1118 1119 // this code extracts the WCS information from the header of one of the cells and applies it to 1120 // the mosaicked chip. XXX EAM : I am leaving it at this point for PAP to get the binning, etc 1121 // from the concepts 1122 # if (0) 1123 // if the cells contain the headers, we need to apply the WCS terms from (one of?) the cells 1124 for (int i = 0; i < source->cells->n; i++) { 1125 pmCell *cell = source->cells->data[i]; 1126 if (cell == NULL) continue; 1127 if (cell->hdu == NULL) continue; 1128 1129 // extract the WCS terms from this cell 1130 pmAstromWCS *wcs = pmAstromWCSfromHeader (cell->hdu->header); 1131 1132 // modify the wcs terms for the cell offset, binning, and parity 1133 xBinRatio = xBinCell / xBinChip; 1134 if (xFlip) { 1135 wcs->crpix1 = xCell - wcs->crpix1*xBinRatio; 1136 wcs->cdelt1 *= -1; 1137 } else { 1138 wcs->crpix1 = xCell + wcs->crpix1*xBinRatio; 1139 } 1140 wcs->cdelt1 *= xBinRatio; 1141 1142 yBinRatio = yBinCell / yBinChip; 1143 if (yFlip) { 1144 wcs->crpix2 = yCell - wcs->crpix2*yBinRatio; 1145 wcs->cdelt2 *= -1; 1146 } else { 1147 wcs->crpix2 = xCell + wcs->crpix2*yBinRatio; 1148 } 1149 wcs->cdelt2 *= yBinRatio; 1150 1151 pmAstromWCStoHeader (targetHDU->header); 1152 break; 1153 // XXX rather than quitting at this point, we could save this wcs structure and compare 1154 // its values to the equivalent version from one of the other cells. 1155 } 1156 # endif 1119 1157 1120 1158 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
