Changeset 10957 for trunk/pswarp/src/pswarpTransformReadout.c
- Timestamp:
- Jan 7, 2007, 3:28:00 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformReadout.c
r10954 r10957 35 35 for (int x = 0; x < outNx; x++) { 36 36 // Only transform those pixels requested 37 if (!region || (region && region->data.U8[y][x])) { 38 // Transform! 37 if (region && region->data.U8[y][x]) continue; 39 38 40 // XXX double check this 1/2 pixel offset41 outPix->x = (double)x + 0.5;42 outPix->y = (double)y + 0.5;39 // XXX double check this 1/2 pixel offset 40 outPix->x = (double)x + 0.5; 41 outPix->y = (double)y + 0.5; 43 42 44 psPlaneTransformApply(FP, chipOutput->toFPA, outPix);45 psPlaneTransformApply (TP, fpaOutput->toTPA, FP);46 psDeproject (sky, TP, fpaOutput->toSky);43 psPlaneTransformApply(FP, chipOutput->toFPA, outPix); 44 psPlaneTransformApply (TP, fpaOutput->toTPA, FP); 45 psDeproject (sky, TP, fpaOutput->toSky); 47 46 48 psProject (TP, sky, fpaInput->toSky);49 psPlaneTransformApply (FP, fpaInput->fromTPA, TP);50 psPlaneTransformApply (inPix, chipInput->fromFPA, FP);47 psProject (TP, sky, fpaInput->toSky); 48 psPlaneTransformApply (FP, fpaInput->fromTPA, TP); 49 psPlaneTransformApply (inPix, chipInput->fromFPA, FP); 51 50 52 // XXX get interpolation method from the recipe 53 outData[y][x] = (psF32)psImagePixelInterpolate(inImage, inPix->x, inPix->y, NULL, 1, NAN, PS_INTERPOLATE_BILINEAR); 54 // modify zero and scale? 55 56 // outData[y][x] = (psF32)psImagePixelInterpolate(inImage, inPix->x, inPix->y, mask, 1, NAN, PS_INTERPOLATE_BILINEAR); 57 58 # if (0) 59 if (error) { 60 // Error is actually the variance 61 outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error, 62 detector->x, 63 detector->y, 64 mask, 1, NAN); 65 } 66 if (error) { 67 outError->data.F32[y][x] = outError->data.F32[y][x] / SQUARE(scale); 68 } 69 # endif 70 71 } // Pixels of interest 72 51 // XXX get interpolation method from the recipe 52 outData[y][x] = (psF32)psImagePixelInterpolate(inImage, inPix->x, inPix->y, NULL, 1, NAN, PS_INTERPOLATE_BILINEAR); 53 // outData[y][x] = (psF32)psImagePixelInterpolate(inImage, inPix->x, inPix->y, mask, 1, NAN, PS_INTERPOLATE_BILINEAR); 54 // modify zero and scale? 73 55 } 74 } // Iterating over output pixels 75 56 } 76 57 return true; 77 58 } 78 59 79 60 # if (0) 61 if (error) { 62 // Error is actually the variance 63 outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error, 64 detector->x, 65 detector->y, 66 mask, 1, NAN); 67 } 68 if (error) { 69 outError->data.F32[y][x] = outError->data.F32[y][x] / SQUARE(scale); 70 } 71 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
