IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 18, 2012, 5:56:48 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121130/pswarp/src/pswarpTransformReadout.c

    r34089 r34838  
    2929    psImageInterpolateMode interpolationMode = psMetadataLookupS32(NULL, config->arguments,
    3030                                                                   "INTERPOLATION.MODE"); ///< Mode for interp
     31
    3132    int numKernels = psMetadataLookupS32(NULL, config->arguments, "INTERPOLATION.NUM"); ///< Number of kernels
    3233
     
    6061    // output coordinates to input coordinates
    6162    pswarpMapGrid *grid = pswarpMapGridFromImage(input, output, nGridX, nGridY);
    62 
     63    //    if (psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) {
     64   
    6365    // XXX optionally modify the grid based on this result and force the maxError < XXX
    6466    double maxError = pswarpMapGridMaxError(grid); // Maximum (positional) error from using grid
     
    130132            args->goodPixels = 0;
    131133
     134            if (psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) {
     135              args->background_warping = true;
     136              args->offset_x = psMetadataLookupF32(NULL,config->arguments,"BKG_WARP_XOFFSET");
     137              args->offset_y = psMetadataLookupF32(NULL,config->arguments,"BKG_WARP_YOFFSET");
     138            }
     139
     140           
    132141            // allocate a job
    133142            psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE");
     
    171180        } else {
    172181            pswarpTransformTileArgs *args = job->args->data[0];
    173             // fprintf (stderr, "finished job %d,%d, Nargs: %ld\n", args->gridX, args->gridY, job->args->n);
    174182            goodPixels += args->goodPixels;
    175183            xMin = PS_MIN(args->xMin, xMin);
     
    183191                jacobian += args->jacobian * args->goodPixels;
    184192            }
     193
     194           
    185195        }
    186196        psFree(job);
     
    201211
    202212    if (goodPixels > 0 && psMetadataLookupBool(&mdok, recipe, "SOURCES")) {
     213      if (!psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) {
    203214        if (!pswarpTransformSources(output, input, config)) {
    204             psError(psErrorCodeLast(), false, "Unable to interpolate image.");
    205             return false;
     215          psError(psErrorCodeLast(), false, "Unable to interpolate image.");
     216          return false;
    206217        }
     218      }
    207219    }
    208220
Note: See TracChangeset for help on using the changeset viewer.