IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 7, 2007, 3:28:00 PM (20 years ago)
Author:
eugene
Message:

added local linear map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpTransformReadout.c

    r10954 r10957  
    3535        for (int x = 0; x < outNx; x++) {
    3636            // 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;
    3938
    40                 // XXX double check this 1/2 pixel offset
    41                 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;
    4342
    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);
    4746               
    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);
    5150
    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?
    7355        }
    74     } // Iterating over output pixels
    75 
     56    }
    7657    return true;
    7758}
    7859
    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.