IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13943


Ignore:
Timestamp:
Jun 21, 2007, 2:40:01 PM (19 years ago)
Author:
Paul Price
Message:

psVectorSmooth shouldn't be used to smooth in-place (it writes to the
input vector while it's using it).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryObjects.c

    r13134 r13943  
    88*  @author EAM, IfA
    99*
    10 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2007-05-03 00:10:29 $
     10*  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2007-06-22 00:40:01 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    735735    if (minStat->nSigma < minSigma) {
    736736        psError(PS_ERR_UNKNOWN, true, "Failed to find a valid match (%f sigma for best)", minStat->nSigma);
    737         psFree (minStat);
     737        psFree (minStat);
    738738        return NULL;
    739739    }
     
    796796
    797797    // smooth histgram vector with gaussian of 1sigma = radius
    798     psVectorSmooth(xHist, xHist, tweakSmooth, tweakNsigma);
    799     psVectorSmooth(yHist, yHist, tweakSmooth, tweakNsigma);
     798    psVector *xHistNew = psVectorSmooth(NULL, xHist, tweakSmooth, tweakNsigma);
     799    psVector *yHistNew = psVectorSmooth(NULL, yHist, tweakSmooth, tweakNsigma);
     800    psFree(xHist);
     801    psFree(yHist);
     802    xHist = xHistNew;
     803    yHist = yHistNew;
    800804
    801805    // select peak in x and in y
Note: See TracChangeset for help on using the changeset viewer.