IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14581


Ignore:
Timestamp:
Aug 21, 2007, 8:16:54 AM (19 years ago)
Author:
Paul Price
Message:

Fixing normalisation of SPAM,FRIES kernels --- the start/stop values
are inclusive, so have to add 1 to get the proper range.

File:
1 edited

Legend:

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

    r14540 r14581  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-08-17 01:50:50 $
     6 *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-08-21 18:16:54 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    136136
    137137              // Normalising sum of kernel component to unity
    138               float norm = kernelWeighting(1.0 / (float)((uStop - uStart) * (vStop - vStart)),
     138              float norm = kernelWeighting(1.0 / (float)((uStop - uStart + 1) * (vStop - vStart + 1)),
    139139                                           varianceWeighting);
    140140
     
    245245              }
    246246          }
    247           sum /= (uStop - uStart) * (vStop - vStart); // Normalising sum of kernel component to unity
     247          sum /= (uStop - uStart + 1) * (vStop - vStart + 1); // Normalising sum of kernel component to unity
    248248          if (kernels->spatialOrder > 0 && index != kernels->subIndex) {
    249249              // The (0,0) element is subtracted from most kernels to preserve photometric scaling
Note: See TracChangeset for help on using the changeset viewer.