Changeset 20573 for trunk/magic/remove/src/streaksastrom.c
- Timestamp:
- Nov 6, 2008, 6:42:41 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksastrom.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksastrom.c
r20520 r20573 1 #include "streaks .h"1 #include "streaksremove.h" 2 2 3 3 // Initialize the astrometry object for current cell 4 4 strkAstrom * 5 streakSetAstrometry(strkAstrom *astrom, pmFPA *fpa, pmChip *chip, bool fromCell, psMetadata *md, int numCols, int numRows)5 streakSetAstrometry(strkAstrom *astrom, ippStage stage, pmFPA *fpa, pmChip *chip, bool fromCell, psMetadata *md, int numCols, int numRows) 6 6 { 7 7 if (!astrom) { … … 39 39 return false; 40 40 } 41 } else if (md ) {41 } else if (md && (stage == IPP_STAGE_RAW)) { 42 42 // The metadata is the raw header 43 43 // Assumes GPC1 44 // 45 // Shouldn't these lookups be F32 ? 44 46 cell_x0 = psMetadataLookupS32(&mdok, md, "IMNPIX1"); 45 47 if (!mdok) { 46 48 psError(PS_ERR_UNKNOWN, true, "IMNPIX1 for cell is not set.\n"); 47 return NULL;49 // return NULL; 48 50 } 49 51 cell_y0 = psMetadataLookupS32(&mdok, md, "IMNPIX2"); … … 63 65 return false; 64 66 } 67 65 68 } else { 66 69 // no metadata regular cell … … 108 111 outPt->y = (pt->chip->y - astrom->cell_y0) * astrom->yParity; 109 112 113 // printf("cell: %f %f chip: %f %f\n", outPt->x, outPt->y, pt->chip->x, pt->chip->y); 114 110 115 return true; 111 116 } … … 136 141 return true; 137 142 } 143 144 void 145 cellToChip(PixelPos *chip, strkAstrom *astrom, PixelPos *cell) 146 { 147 // TODO: do I need to worry about going from int to float and back again here? 148 chip->x = (cell->x * astrom->xParity) + astrom->cell_x0; 149 chip->y = (cell->y * astrom->yParity) + astrom->cell_y0; 150 } 138 151
Note:
See TracChangeset
for help on using the changeset viewer.
