IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 4, 2010, 6:38:31 PM (16 years ago)
Author:
eugene
Message:

updates from the main eam_branch/20091201

Location:
branches/eam_branches/psModules.stack.20100120
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psModules.stack.20100120

  • branches/eam_branches/psModules.stack.20100120/src/imcombine/pmStackReject.c

    r26747 r26771  
    3535{
    3636    int size = kernels->size;           // Half-size of convolution kernel
    37     psImage *polyValues = p_pmSubtractionPolynomialFromCoords(NULL, kernels, xMin + size + 1,
    38                                                               yMin + size + 1); // Polynomial
     37    int x = PS_MIN(xMin + size + 1, kernels->xMax); // x coordinate of interest
     38    int y = PS_MIN(yMin + size + 1, kernels->yMax); // y coordinate of interest
     39
     40    psImage *polyValues = p_pmSubtractionPolynomialFromCoords(NULL, kernels, x, y); // Polynomial
    3941    int box = p_pmSubtractionBadRadius(NULL, kernels, polyValues, false, poorFrac); // Radius of bad box
    4042    psTrace("psModules.imcombine", 10, "Growing by %d", box);
     
    154156        psRegion *region = subRegions->data[i]; // Region of interest
    155157        pmSubtractionKernels *kernels = subKernels->data[i]; // Kernel of interest
    156         if (!pmSubtractionConvolve(NULL, convRO, NULL, inRO, NULL, stride, 0, 0, 1.0, 0.0,
     158        if (!pmSubtractionConvolve(NULL, convRO, NULL, inRO, NULL, stride, 0, 0, 1.0, 0.0, 0.0,
    157159                                   region, kernels, false, true)) {
    158160            psError(PS_ERR_UNKNOWN, false, "Unable to convolve mask image in region %d.", i);
     
    166168
    167169        // Image of the kernel at the centre of the region
    168         float xNorm, yNorm;             // Normalised coordinates
    169         p_pmSubtractionPolynomialNormCoords(&xNorm, &yNorm, 0.5 * (region->x1 - region->x0),
    170                                             0.5 * (region->y1 - region->y0),
    171                                             kernels->xMin, kernels->xMax, kernels->yMin, kernels->yMax);
    172         psImage *kernel = pmSubtractionKernelImage(kernels, xNorm, yNorm, false);
     170        psImage *kernel = pmSubtractionKernelImage(kernels, 0.5, 0.5, false);
    173171        if (!kernel) {
    174172            psError(PS_ERR_UNKNOWN, false, "Unable to generate kernel image.");
Note: See TracChangeset for help on using the changeset viewer.