IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9540 for trunk/psLib/src/math


Ignore:
Timestamp:
Oct 13, 2006, 12:04:58 PM (20 years ago)
Author:
Paul Price
Message:

Fixing psTraceGetLevel to use same convention as for psTrace

Location:
trunk/psLib/src/math
Files:
6 edited

Legend:

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

    r9538 r9540  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-10-13 21:13:48 $
     12 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-10-13 22:04:58 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    409409    }
    410410    // dump some useful info if trace is defined
    411     if (psTraceGetLevel(__func__) >= 6) {
     411    if (psTraceGetLevel("psLib.math") >= 6) {
    412412        p_psImagePrint(psTraceGetDestination(), alpha, "alpha guess (0)");
    413413        p_psVectorPrint(psTraceGetDestination(), beta, "beta guess (0)");
     
    438438
    439439        // dump some useful info if trace is defined
    440         if (psTraceGetLevel(__func__) >= 6) {
     440        if (psTraceGetLevel("psLib.math") >= 6) {
    441441            p_psImagePrint(psTraceGetDestination(), Alpha, "alpha guess (1)");
    442442            p_psVectorPrint(psTraceGetDestination(), Beta, "beta guess (1)");
    443443            p_psVectorPrint(psTraceGetDestination(), Params, "params guess (1)");
    444444        }
    445         if (psTraceGetLevel(__func__) >= 6) {
     445        if (psTraceGetLevel("psLib.math") >= 6) {
    446446            if (psTraceGetLevel (__func__) >= 6) {
    447447                psTrace("psLib.math", 6, "The current Param vector: \n");
     
    470470
    471471        // dump some useful info if trace is defined
    472         if (psTraceGetLevel(__func__) >= 6) {
     472        if (psTraceGetLevel("psLib.math") >= 6) {
    473473            p_psImagePrint(psTraceGetDestination(), Alpha, "alpha guess (2)");
    474474            p_psVectorPrint(psTraceGetDestination(), Beta, "beta guess (2)");
  • trunk/psLib/src/math/psMinimizePolyFit.c

    r8627 r9540  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-08-26 04:34:28 $
     12 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-10-13 22:04:58 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    397397    psFree(sums);
    398398
    399     if (psTraceGetLevel(__func__) >= 6) {
     399    if (psTraceGetLevel("psLib.math") >= 6) {
    400400        PS_IMAGE_PRINT_F64(A);
    401401        PS_VECTOR_PRINT_F64(B);
     
    487487    }
    488488
    489     if (psTraceGetLevel(__func__) >= 6) {
     489    if (psTraceGetLevel("psLib.math") >= 6) {
    490490        psTrace("psLib.math", 6, "VectorFitPolynomial1D()\n");
    491491        for (psS32 i = 0; i < f->n; i++) {
     
    579579    psFree(xSums);
    580580
    581     if (psTraceGetLevel(__func__) >= 4) {
     581    if (psTraceGetLevel("psLib.math") >= 4) {
    582582        printf("Least-squares vector:\n");
    583583        for (int i = 0; i < nTerm; i++) {
     
    818818        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n", N);
    819819        psS32 Nkeep = 0;
    820         if (psTraceGetLevel(__func__) >= 6) {
     820        if (psTraceGetLevel("psLib.math") >= 6) {
    821821            if (mask != NULL) {
    822822                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    847847            }
    848848        }
    849         if (psTraceGetLevel(__func__) >= 6) {
     849        if (psTraceGetLevel("psLib.math") >= 6) {
    850850            if (mask != NULL) {
    851851                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    12521252        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n", N);
    12531253        psS32 Nkeep = 0;
    1254         if (psTraceGetLevel(__func__) >= 6) {
     1254        if (psTraceGetLevel("psLib.math") >= 6) {
    12551255            if (mask != NULL) {
    12561256                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    12821282        }
    12831283
    1284         if (psTraceGetLevel(__func__) >= 6) {
     1284        if (psTraceGetLevel("psLib.math") >= 6) {
    12851285            if (mask != NULL) {
    12861286                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    17721772        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n", N);
    17731773        psS32 Nkeep = 0;
    1774         if (psTraceGetLevel(__func__) >= 6) {
     1774        if (psTraceGetLevel("psLib.math") >= 6) {
    17751775            if (mask != NULL) {
    17761776                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    18011801        }
    18021802
    1803         if (psTraceGetLevel(__func__) >= 6) {
     1803        if (psTraceGetLevel("psLib.math") >= 6) {
    18041804            if (mask != NULL) {
    18051805                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    23402340        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial4D()\n", N);
    23412341        psS32 Nkeep = 0;
    2342         if (psTraceGetLevel(__func__) >= 6) {
     2342        if (psTraceGetLevel("psLib.math") >= 6) {
    23432343            if (mask != NULL) {
    23442344                for (psS32 i = 0 ; i < mask->n ; i++) {
     
    23702370        }
    23712371
    2372         if (psTraceGetLevel(__func__) >= 6) {
     2372        if (psTraceGetLevel("psLib.math") >= 6) {
    23732373            if (mask != NULL) {
    23742374                for (psS32 i = 0 ; i < mask->n ; i++) {
  • trunk/psLib/src/math/psMinimizePowell.c

    r8245 r9540  
    1111 *  NOTE: XXX: The SDR is silent about data types.  F32 is implemented here.
    1212 *
    13  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2006-08-09 02:26:44 $
     13 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2006-10-13 22:04:58 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    380380    }
    381381
    382     if (6 <= psTraceGetLevel(__func__)) {
     382    if (6 <= psTraceGetLevel("psLib.math")) {
    383383        for (i=0;i<params->n;i++) {
    384384            psTrace("psLib.math", 6, "(params, paramMask, line)[%d] is (%f %d %f)\n", i,
  • trunk/psLib/src/math/psPolynomial.c

    r9538 r9540  
    77*  polynomials.  It also contains a Gaussian functions.
    88*
    9 *  @version $Revision: 1.150 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-10-13 21:13:48 $
     9*  @version $Revision: 1.151 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-10-13 22:04:58 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    189189    }
    190190
    191     if (psTraceGetLevel(__func__) >= 6) {
     191    if (psTraceGetLevel("psLib.math") >= 6) {
    192192        for (psS32 j = 0; j < numPolys; j++) {
    193193            PS_POLY_PRINT_1D(chebPolys[j]);
  • trunk/psLib/src/math/psSpline.c

    r9538 r9540  
    66*  This file contains the routines that allocate, free, and evaluate splines.
    77*
    8 *  @version $Revision: 1.154 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-10-13 21:13:48 $
     8*  @version $Revision: 1.155 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-10-13 22:04:58 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    120120{
    121121    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    122     if (psTraceGetLevel(__func__) >= 6) {
     122    if (psTraceGetLevel("psLib.math") >= 6) {
    123123        p_psVectorPrint(1, (psVector *) x, "x");
    124124        p_psVectorPrint(1, (psVector *) y, "y");
     
    406406    PS_ASSERT_VECTOR_NON_NULL(x, NULL);
    407407    PS_ASSERT_VECTOR_TYPE_F32_OR_F64(x, NULL);
    408     if (psTraceGetLevel(__func__) >= 6) {
     408    if (psTraceGetLevel("psLib.math") >= 6) {
    409409        PS_VECTOR_PRINT_F32(x);
    410410        PS_PRINT_SPLINE2((psSpline1D *) spline);
  • trunk/psLib/src/math/psStats.c

    r9538 r9540  
    1616 * use ->min and ->max (PS_STAT_USE_RANGE)
    1717 *
    18  *  @version $Revision: 1.186 $ $Name: not supported by cvs2svn $
    19  *  @date $Date: 2006-10-13 21:13:48 $
     18 *  @version $Revision: 1.187 $ $Name: not supported by cvs2svn $
     19 *  @date $Date: 2006-10-13 22:04:58 $
    2020 *
    2121 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    480480    PS_ASSERT_PTR_NON_NULL(histogram->bounds, NULL);
    481481    PS_ASSERT_PTR_NON_NULL(histogram->nums, NULL);
    482     if (psTraceGetLevel(__func__) >= 8) {
     482    if (psTraceGetLevel("psLib.math") >= 8) {
    483483        PS_VECTOR_PRINT_F32(histogram->nums);
    484484    }
     
    561561    }
    562562
    563     if (psTraceGetLevel(__func__) >= 8) {
     563    if (psTraceGetLevel("psLib.math") >= 8) {
    564564        PS_VECTOR_PRINT_F32(smooth);
    565565    }
     
    705705{
    706706    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    707     psTrace("psLib.math", 4, "Trace level is %d\n", psTraceGetLevel(__func__));
     707    psTrace("psLib.math", 4, "Trace level is %d\n", psTraceGetLevel("psLib.math"));
    708708
    709709    // Ensure that stats->clipIter is within the proper range.
     
    886886    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    887887    psTrace("psLib.math", 5, "binNum, yVal is (%d, %f)\n", binNum, yVal);
    888     if (psTraceGetLevel(__func__) >= 8) {
     888    if (psTraceGetLevel("psLib.math") >= 8) {
    889889        PS_VECTOR_PRINT_F32(xVec);
    890890        PS_VECTOR_PRINT_F32(yVec);
     
    10581058{
    10591059    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    1060     if (psTraceGetLevel(__func__) >= 8) {
     1060    if (psTraceGetLevel("psLib.math") >= 8) {
    10611061        PS_VECTOR_PRINT_F32(myVector);
    10621062    }
     
    11411141        histogram = psHistogramAlloc(min, max, numBins);
    11421142        histogram = psVectorHistogram(histogram, myVector, errors, mask, maskVal);
    1143         if (psTraceGetLevel(__func__) >= 8) {
     1143        if (psTraceGetLevel("psLib.math") >= 8) {
    11441144            PS_VECTOR_PRINT_F32(histogram->bounds);
    11451145            PS_VECTOR_PRINT_F32(histogram->nums);
     
    11521152            cumulative->nums->data.F32[i] = cumulative->nums->data.F32[i-1] + histogram->nums->data.F32[i];
    11531153        }
    1154         if (psTraceGetLevel(__func__) >= 8) {
     1154        if (psTraceGetLevel("psLib.math") >= 8) {
    11551155            PS_VECTOR_PRINT_F32(cumulative->bounds);
    11561156            PS_VECTOR_PRINT_F32(cumulative->nums);
     
    14171417        psHistogram *histogram = psHistogramAlloc(min, max, numBins); // A new histogram (without outliers)
    14181418        histogram = psVectorHistogram(histogram, myVector, errors, mask, maskVal);
    1419         if (psTraceGetLevel(__func__) >= 8) {
     1419        if (psTraceGetLevel("psLib.math") >= 8) {
    14201420            PS_VECTOR_PRINT_F32(histogram->nums);
    14211421        }
     
    14231423        // Smooth the resulting histogram with a Gaussian with sigma_s = 1 bin.
    14241424        psVector *smoothed = vectorSmoothHistGaussian(histogram, newBinSize); // Smoothed histogram
    1425         if (psTraceGetLevel(__func__) >= 8) {
     1425        if (psTraceGetLevel("psLib.math") >= 8) {
    14261426            PS_VECTOR_PRINT_F32(smoothed);
    14271427        }
     
    14961496            x->data[j] = ordinate;
    14971497        }
    1498         if (psTraceGetLevel(__func__) >= 8) {
     1498        if (psTraceGetLevel("psLib.math") >= 8) {
    14991499            // XXX: Print the x array somehow.
    15001500            PS_VECTOR_PRINT_F32(y);
     
    15251525        params->data.F32[0] = stats->robustMedian;
    15261526        params->data.F32[1] = sigma;
    1527         if (psTraceGetLevel(__func__) >= 8) {
     1527        if (psTraceGetLevel("psLib.math") >= 8) {
    15281528            PS_VECTOR_PRINT_F32(params);
    15291529            PS_VECTOR_PRINT_F32(y);
     
    15401540            return false;
    15411541        }
    1542         if (psTraceGetLevel(__func__) >= 8) {
     1542        if (psTraceGetLevel("psLib.math") >= 8) {
    15431543            PS_VECTOR_PRINT_F32(params);
    15441544        }
Note: See TracChangeset for help on using the changeset viewer.