IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14540


Ignore:
Timestamp:
Aug 16, 2007, 3:50:50 PM (19 years ago)
Author:
Paul Price
Message:

Moving photometric scaling into the kernel for RINGS, and fixing up normalisation for odd functions.

Location:
trunk/psModules/src/imcombine
Files:
2 edited

Legend:

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

    r14528 r14540  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-08-16 03:58:29 $
     6 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-08-17 01:50:50 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    202202                  kernel->kernel[v][u] += kernelWeighting(poly->data.F32[j], varianceWeighting) * value;
    203203              }
    204               kernel->kernel[0][0] += kernelWeighting(num, varianceWeighting) * subValue;
     204              // Photometric scaling is built into the kernel --- no subtraction!
    205205              break;
    206206          }
     
    301301              sum += image->kernel[y + v][x + u] * poly->data.F32[j];
    302302          }
    303           // The (0,0) kernel is subtracted from other kernels to preserve photometric scaling
    304           return sum - num * image->kernel[y][x];
     303          // Photometric scaling is built into the kernel --- no subtraction!
     304          return sum;
    305305      }
    306306      default:
  • trunk/psModules/src/imcombine/pmSubtractionKernels.c

    r14539 r14540  
    526526    for (int i = 0, index = 0; i < numRings + 1; i++) {
    527527
    528         float lower2;           // Lower limit of radius^2
    529         float upper2;           // Upper limit of radius^2
     528        float lower2;                   // Lower limit of radius^2
     529        float upper2;                   // Upper limit of radius^2
    530530        if (i == 0) {
    531531            lower2 = 0;
     
    599599                    if (uOrder % 2 == 0 && vOrder % 2 == 0) {
    600600                        psBinaryOp(poly, poly, "*", psScalarAlloc(1.0 / norm, PS_TYPE_F32));
     601                        uCoords->data.S32[j] = 0;
     602                        vCoords->data.S32[j] = 0;
     603                        poly->data.F32[j] = -1.0;
     604                        psVectorExtend(uCoords, RINGS_BUFFER, 1);
     605                        psVectorExtend(vCoords, RINGS_BUFFER, 1);
     606                        psVectorExtend(poly, RINGS_BUFFER, 1);
     607                    } else {
     608                        psBinaryOp(poly, poly, "*", psScalarAlloc(1.0 / (float)j, PS_TYPE_F32));
    601609                    }
    602610                }
Note: See TracChangeset for help on using the changeset viewer.