Changeset 5113 for trunk/psLib/src/math/psMinimize.c
- Timestamp:
- Sep 23, 2005, 1:01:30 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMinimize.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimize.c
r5090 r5113 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1.1 39$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-09-2 2 02:47:16$12 * @version $Revision: 1.140 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-09-23 23:01:30 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 204 204 # ifndef PS_NO_TRACE 205 205 // dump some useful info if trace is defined 206 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) { 207 p_psImagePrint (psTraceGetDestination(), alpha, "alpha guess"); 208 p_psVectorPrint (psTraceGetDestination(), beta, "beta guess"); 209 p_psVectorPrint (psTraceGetDestination(), params, "params guess"); 210 } 211 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") == 4) { 212 // XXX: Where is this? 213 // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess"); 214 } 206 /* XXX: This code is seg faulting. 207 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) { 208 p_psImagePrint (psTraceGetDestination(), alpha, "alpha guess"); 209 p_psVectorPrint (psTraceGetDestination(), beta, "beta guess"); 210 p_psVectorPrint (psTraceGetDestination(), params, "params guess"); 211 } 212 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 4) { 213 // XXX: Where is this? 214 // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess"); 215 } 216 */ 215 217 # endif /* PS_NO_TRACE */ 216 218 … … 226 228 # ifndef PS_NO_TRACE 227 229 // dump some useful info if trace is defined 228 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) { 229 p_psImagePrint (psTraceGetDestination(), Alpha, "alpha guess"); 230 p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess"); 231 p_psVectorPrint (psTraceGetDestination(), Params, "params guess"); 232 } 233 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") == 4) { 234 // XXX: Where is this? 235 // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess"); 236 } 230 /* XXX: This code is seg faulting. 231 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) { 232 p_psImagePrint (psTraceGetDestination(), Alpha, "alpha guess"); 233 p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess"); 234 p_psVectorPrint (psTraceGetDestination(), Params, "params guess"); 235 } 236 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 4) { 237 // XXX: Where is this? 238 // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess"); 239 } 240 */ 237 241 # endif /* PS_NO_TRACE */ 238 242 … … 249 253 # ifndef PS_NO_TRACE 250 254 // dump some useful info if trace is defined 251 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) { 252 p_psImagePrint (psTraceGetDestination(), Alpha, "alpha guess"); 253 p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess"); 254 p_psVectorPrint (psTraceGetDestination(), Params, "params guess"); 255 } 255 /* XXX: This code is seg faulting. 256 if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) { 257 p_psImagePrint (psTraceGetDestination(), Alpha, "alpha guess"); 258 p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess"); 259 p_psVectorPrint (psTraceGetDestination(), Params, "params guess"); 260 } 261 */ 256 262 # endif /* PS_NO_TRACE */ 257 263 … … 271 277 // printf("CONDITIONS: (%f > %f) && (%d < %d)\n", min->lastDelta, min->tol, min->iter, min->maxIter); 272 278 } 273 psTrace (".psLib.dataManip.psMinimizeLMChi2", 3, "chisq: %f, last delta: %f, Niter: %d\n", min->value, min->lastDelta, min->iter);279 psTrace (".psLib.dataManip.psMinimizeLMChi2", 4, "chisq: %f, last delta: %f, Niter: %d\n", min->value, min->lastDelta, min->iter); 274 280 275 281 // construct & return the covariance matrix (if requested) … … 1579 1585 1580 1586 if (psTraceGetLevel (".psLib.dataManip.VectorFitPolynomial1DOrd") >= 5) { 1581 FILE *fp = fdopen((psTraceGetDestination ()), "a+"); 1582 fprintf(fp, "VectorFitPolynomial1D()\n"); 1587 psTrace(__func__, 6, "VectorFitPolynomial1D()\n"); 1583 1588 for (int i = 0; i < f->n; i++) { 1584 fprintf(fp, "(x, f, fErr) is (");1589 psTrace(__func__, 6, "(x, f, fErr) is ("); 1585 1590 if (x != NULL) { 1586 fprintf(fp, "%f, %f, ", x->data.F64[i], f->data.F64[i]);1591 psTrace(__func__, 6, "%f, %f, ", x->data.F64[i], f->data.F64[i]); 1587 1592 } else { 1588 fprintf(fp, "%f, %f, ", (psF64) i, f->data.F64[i]);1593 psTrace(__func__, 6, "%f, %f, ", (psF64) i, f->data.F64[i]); 1589 1594 } 1590 1595 if (fErr != NULL) { 1591 fprintf(fp, "%f)\n", fErr->data.F64[i]);1596 psTrace(__func__, 6, "%f)\n", fErr->data.F64[i]); 1592 1597 } else { 1593 fprintf(fp, "NULL)\n"); 1594 } 1595 } 1596 fclose(fp); 1598 psTrace(__func__, 6, "NULL)\n"); 1599 } 1600 } 1597 1601 } 1598 1602
Note:
See TracChangeset
for help on using the changeset viewer.
