IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 15, 2007, 2:01:03 PM (19 years ago)
Author:
Paul Price
Message:

Fixing subtraction of nominated kernel. This is used to maintain photometric constancy across the image when using a spatially variable kernel (see Alard 2000). Works for POIS kernels, but not yet for ISIS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtractionKernels.c

    r13383 r13389  
    168168    }
    169169
     170    // Subtract a particular kernel in order to preserve photometric calibration across image
    170171    kernels->subIndex = 0;
    171172    assert(kernels->u->data.S32[kernels->subIndex] == 0 &&
     
    173174           kernels->xOrder->data.S32[kernels->subIndex] == 0 &&
    174175           kernels->yOrder->data.S32[kernels->subIndex] == 0);
     176
     177    psKernel *subKernel = kernels->preCalc->data[kernels->subIndex]; // Kernel to subtract
     178    for (int i = 0; i < kernels->subIndex; i++) {
     179        psKernel *kernel = kernels->preCalc->data[i]; // Kernel of interest
     180        (void)psBinaryOp(kernel->image, kernel->image, "-", subKernel->image);
     181    }
     182    for (int i = kernels->subIndex + 1; i < num; i++) {
     183        psKernel *kernel = kernels->preCalc->data[i]; // Kernel of interest
     184        (void)psBinaryOp(kernel->image, kernel->image, "-", subKernel->image);
     185    }
    175186
    176187
Note: See TracChangeset for help on using the changeset viewer.