IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2005, 1:01:30 PM (21 years ago)
Author:
gusciora
Message:

The purpose of this check-in is primarily to put the new robusts stats
code and tests into the CVS tree.

File:
1 edited

Legend:

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

    r5090 r5113  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.139 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-09-22 02:47:16 $
     12 *  @version $Revision: 1.140 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-09-23 23:01:30 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    204204    # ifndef PS_NO_TRACE
    205205    // 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    */
    215217    # endif /* PS_NO_TRACE */
    216218
     
    226228        # ifndef PS_NO_TRACE
    227229        // 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        */
    237241        # endif /* PS_NO_TRACE */
    238242
     
    249253        # ifndef PS_NO_TRACE
    250254        // 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        */
    256262        # endif /* PS_NO_TRACE */
    257263
     
    271277        //        printf("CONDITIONS: (%f > %f) && (%d < %d)\n", min->lastDelta, min->tol, min->iter, min->maxIter);
    272278    }
    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);
    274280
    275281    // construct & return the covariance matrix (if requested)
     
    15791585
    15801586    if (psTraceGetLevel (".psLib.dataManip.VectorFitPolynomial1DOrd") >= 5) {
    1581         FILE *fp = fdopen((psTraceGetDestination ()), "a+");
    1582         fprintf(fp, "VectorFitPolynomial1D()\n");
     1587        psTrace(__func__, 6, "VectorFitPolynomial1D()\n");
    15831588        for (int i = 0; i < f->n; i++) {
    1584             fprintf(fp, "(x, f, fErr) is (");
     1589            psTrace(__func__, 6, "(x, f, fErr) is (");
    15851590            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]);
    15871592            } else {
    1588                 fprintf(fp, "%f, %f, ", (psF64) i, f->data.F64[i]);
     1593                psTrace(__func__, 6, "%f, %f, ", (psF64) i, f->data.F64[i]);
    15891594            }
    15901595            if (fErr != NULL) {
    1591                 fprintf(fp, "%f)\n", fErr->data.F64[i]);
     1596                psTrace(__func__, 6, "%f)\n", fErr->data.F64[i]);
    15921597            } else {
    1593                 fprintf(fp, "NULL)\n");
    1594             }
    1595         }
    1596         fclose(fp);
     1598                psTrace(__func__, 6, "NULL)\n");
     1599            }
     1600        }
    15971601    }
    15981602
Note: See TracChangeset for help on using the changeset viewer.