IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 11, 2013, 8:00:59 AM (13 years ago)
Author:
watersc1
Message:

Fix to psMM that avoids memory corruption when Ncensored = 0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMinimizeLMM.c

    r35767 r35798  
    501501        psTrace("psLib.math", 5, "Iteration number %d.  (max iterations is %d).\n", min->iter, min->maxIter);
    502502        psTrace("psLib.math", 5, "Last delta is %f.  stop if < %f, accept if < %f\n", min->lastDelta, min->minTol, min->maxTol);
     503        psTrace("psLib.math.dLinear", 5, "Iteration number %d.  (max iterations is %d).\n", min->iter, min->maxIter);
     504        psTrace("psLib.math.dLinear", 5, "Last delta is %f.  stop if < %f, accept if < %f\n", min->lastDelta, min->minTol, min->maxTol);
    503505
    504506        // set a new guess for Alpha, Beta, Params
     
    519521            p_psVectorPrint(psTraceGetDestination(), Params, "params guess (1)");
    520522        }
     523        if (psTraceGetLevel("psLib.math.dLinear") >= 6) {
     524          p_psImagePrint(psTraceGetDestination(), Alpha, "alpha guess (1)");
     525          p_psVectorPrint(psTraceGetDestination(), Beta, "beta guess (1)");
     526          p_psVectorPrint(psTraceGetDestination(), Params, "params guess (1)");
     527          p_psVectorPrint(psTraceGetDestination(), params, "params guess (1)");
     528        }         
    521529
    522530        // calculate Chisq for new guess, update Alpha & Beta
     
    538546
    539547        psTrace("psLib.math.dLinear", 5, "last chisq: %f, new chisq %f, delta: %f, dLinear: %f, rho: %f, lambda: %g\n", min->value, Chisq, min->lastDelta, dLinear, rho, lambda);
    540 
     548        if (psTraceGetLevel("psLib.math.dLinear") >= 6) {
     549          p_psImagePrint(psTraceGetDestination(), Alpha, "alpha guess (2)");
     550          p_psVectorPrint(psTraceGetDestination(), Beta, "beta guess (2)");
     551          p_psVectorPrint(psTraceGetDestination(), Params, "params guess (2)");
     552        }         
    541553        // dump some useful info if trace is defined
    542554        if (psTraceGetLevel("psLib.math") >= 6) {
Note: See TracChangeset for help on using the changeset viewer.