Changeset 6901 for trunk/psLib/src/math/psMinimizeLMM.c
- Timestamp:
- Apr 19, 2006, 8:31:17 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMinimizeLMM.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimizeLMM.c
r6526 r6901 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 3-06 20:40:50$12 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-04-19 18:31:17 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 23 23 #include <math.h> 24 24 25 #include "psAbort.h" 25 26 #include "psMinimizeLMM.h" 26 27 #include "psImage.h" … … 177 178 psF64 rcF64 = p_psMinLM_SetABX(alpha, beta, params, paramMask, x, y, dy, func); 178 179 if (isnan(rcF64)) { 179 psError(PS_ERR_UNKNOWN, false, "p_psMinLM_SetABX() ret runed a NAN.\n");180 psError(PS_ERR_UNKNOWN, false, "p_psMinLM_SetABX() returned a NAN.\n"); 180 181 rc = false; 181 182 } … … 184 185 psBool rcBool = p_psMinLM_GuessABP(Alpha, delta, Params, alpha, beta, params, paramMask, NULL, NULL, NULL, 0.0); 185 186 if (rcBool == false) { 186 psError(PS_ERR_UNKNOWN, false, "p_psMinLM_GuessABP() ret runed FALSE.\n");187 psError(PS_ERR_UNKNOWN, false, "p_psMinLM_GuessABP() returned FALSE.\n"); 187 188 rc = false; 188 189 } … … 259 260 delta = ymodel - y->data.F32[i]; 260 261 chisq += PS_SQR(delta) * dy->data.F32[i]; 262 if (isnan(dy->data.F32[i])) 263 psAbort ("psMinLMM", "nan in weights"); 264 if (isnan(delta)) 265 psAbort ("psMinLMM", "nan in delta"); 266 if (isnan(chisq)) 267 psAbort ("psMinLMM", "nan in chisq"); 261 268 262 269 for (psS32 j = 0; j < params->n; j++) { … … 440 447 // calculate Chisq for new guess, update Alpha & Beta 441 448 Chisq = p_psMinLM_SetABX(Alpha, Beta, Params, paramMask, x, y, dy, func); 449 if (isnan(Chisq)) { 450 min->iter ++; 451 lambda *= 10.0; 452 continue; 453 } 442 454 443 455 // XXX EAM alternate convergence criterion:
Note:
See TracChangeset
for help on using the changeset viewer.
