IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 4:26:44 PM (20 years ago)
Author:
jhoblitt
Message:

normalize psTrace() facility names

File:
1 edited

Legend:

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

    r7766 r8245  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-06-30 02:20:06 $
     12 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-08-09 02:26:44 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    470470    const psVector *x)
    471471{
    472     psTrace(__func__, 4, "---- %s() begin ----\n", __func__);
     472    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    473473    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
    474474    PS_ASSERT_VECTOR_NON_NULL(f, NULL);
     
    488488
    489489    if (psTraceGetLevel(__func__) >= 6) {
    490         psTrace(__func__, 6, "VectorFitPolynomial1D()\n");
     490        psTrace("psLib.math", 6, "VectorFitPolynomial1D()\n");
    491491        for (psS32 i = 0; i < f->n; i++) {
    492             psTrace(__func__, 6, "(x, f, fErr) is (");
     492            psTrace("psLib.math", 6, "(x, f, fErr) is (");
    493493            if (x != NULL) {
    494                 psTrace(__func__, 6, "%f, %f, ", x->data.F64[i], f->data.F64[i]);
     494                psTrace("psLib.math", 6, "%f, %f, ", x->data.F64[i], f->data.F64[i]);
    495495            } else {
    496                 psTrace(__func__, 6, "%f, %f, ", (psF64) i, f->data.F64[i]);
     496                psTrace("psLib.math", 6, "%f, %f, ", (psF64) i, f->data.F64[i]);
    497497            }
    498498            if (fErr != NULL) {
    499                 psTrace(__func__, 6, "%f)\n", fErr->data.F64[i]);
     499                psTrace("psLib.math", 6, "%f)\n", fErr->data.F64[i]);
    500500            } else {
    501                 psTrace(__func__, 6, "NULL)\n");
     501                psTrace("psLib.math", 6, "NULL)\n");
    502502            }
    503503        }
     
    516516        psFree(A);
    517517        psFree(B);
    518         psTrace(__func__, 4, "---- %s() End ----\n", __func__);
     518        psTrace("psLib.math", 4, "---- %s() End ----\n", __func__);
    519519        return(NULL);
    520520    }
     
    645645    psFree(B);
    646646
    647     psTrace(__func__, 4, "---- %s() End ----\n", __func__);
     647    psTrace("psLib.math", 4, "---- %s() End ----\n", __func__);
    648648    return (myPoly);
    649649}
     
    754754    const psVector *xIn)
    755755{
    756     psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     756    psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__);
    757757    PS_ASSERT_POLY_NON_NULL(poly, NULL);
    758758    PS_ASSERT_PTR_NON_NULL(stats, NULL);
     
    811811    // for now, for the SAMPLE_MEDIAN and SAMPLE_STDEV to be used
    812812    stats->options |= (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
    813     psTrace(__func__, 4, "stats->clipIter is %d\n", stats->clipIter);
    814     psTrace(__func__, 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
     813    psTrace("psLib.math", 4, "stats->clipIter is %d\n", stats->clipIter);
     814    psTrace("psLib.math", 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
    815815
    816816    //
    817817    for (psS32 N = 0; N < stats->clipIter; N++) {
    818         psTrace(__func__, 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
     818        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
    819819        psS32 Nkeep = 0;
    820820        if (psTraceGetLevel(__func__) >= 6) {
    821821            if (mask != NULL) {
    822822                for (psS32 i = 0 ; i < mask->n ; i++) {
    823                     psTrace(__func__, 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
     823                    psTrace("psLib.math", 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
    824824                }
    825825            }
     
    851851                for (psS32 i = 0 ; i < mask->n ; i++) {
    852852                    if (!((mask != NULL) && (mask->data.U8[i] & maskValue))) {
    853                         psTrace(__func__, 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
     853                        psTrace("psLib.math", 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
    854854                                i, f->data.F32[i], fit->data.F32[i], resid->data.F64[i]);
    855855                    }
     
    859859
    860860        stats  = psVectorStats(stats, resid, NULL, mask, maskValue);
    861         psTrace(__func__, 6, "Median is %f\n", stats->sampleMedian);
    862         psTrace(__func__, 6, "Stdev is %f\n", stats->sampleStdev);
     861        psTrace("psLib.math", 6, "Median is %f\n", stats->sampleMedian);
     862        psTrace("psLib.math", 6, "Stdev is %f\n", stats->sampleStdev);
    863863        psF32 minClipValue = -minClipSigma*stats->sampleStdev;
    864864        psF32 maxClipValue = +maxClipSigma*stats->sampleStdev;
     
    875875                    (resid->data.F64[i] - stats->sampleMedian < minClipValue)) {
    876876                if (f->type.type == PS_TYPE_F64) {
    877                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     877                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    878878                            i, fit->data.F64[i], i, resid->data.F64[i]);
    879879                } else {
    880                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     880                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    881881                            i, fit->data.F32[i], i, resid->data.F64[i]);
    882882                }
     
    894894        // since the polynomial fit won't change.
    895895        //
    896         psTrace(__func__, 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
     896        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
    897897        psFree(fit);
    898898    }
     
    905905    psFree(resid);
    906906
    907     psTrace(__func__, 3, "---- %s() end ----\n", __func__);
     907    psTrace("psLib.math", 3, "---- %s() end ----\n", __func__);
    908908    return (poly);
    909909}
     
    931931    const psVector *y)
    932932{
    933     psTrace(__func__, 4, "---- %s() begin ----\n", __func__);
     933    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    934934    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
    935935    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
     
    967967        psFree(A);
    968968        psFree(B);
    969         psTrace(__func__, 4, "---- %s() End ----\n", __func__);
     969        psTrace("psLib.math", 4, "---- %s() End ----\n", __func__);
    970970        return(NULL);
    971971    }
     
    10451045    psFree(B);
    10461046
    1047     psTrace(__func__, 4, "---- %s() end ----\n", __func__);
     1047    psTrace("psLib.math", 4, "---- %s() end ----\n", __func__);
    10481048    return (myPoly);
    10491049}
     
    12011201    const psVector *y)
    12021202{
    1203     psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     1203    psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__);
    12041204    PS_ASSERT_POLY_NON_NULL(poly, NULL);
    12051205    PS_ASSERT_POLY_TYPE(poly, PS_POLYNOMIAL_ORD, NULL);
     
    12461246    // for now, for the SAMPLE_MEDIAN and SAMPLE_STDEV to be used
    12471247    stats->options |= (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
    1248     psTrace(__func__, 4, "stats->clipIter is %d\n", stats->clipIter);
    1249     psTrace(__func__, 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
     1248    psTrace("psLib.math", 4, "stats->clipIter is %d\n", stats->clipIter);
     1249    psTrace("psLib.math", 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
    12501250
    12511251    for (psS32 N = 0; N < stats->clipIter; N++) {
    1252         psTrace(__func__, 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
     1252        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
    12531253        psS32 Nkeep = 0;
    12541254        if (psTraceGetLevel(__func__) >= 6) {
    12551255            if (mask != NULL) {
    12561256                for (psS32 i = 0 ; i < mask->n ; i++) {
    1257                     psTrace(__func__, 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
     1257                    psTrace("psLib.math", 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
    12581258                }
    12591259            }
     
    12861286                for (psS32 i = 0 ; i < mask->n ; i++) {
    12871287                    if (!((mask != NULL) && (mask->data.U8[i] & maskValue))) {
    1288                         psTrace(__func__, 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
     1288                        psTrace("psLib.math", 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
    12891289                                i, f->data.F32[i], fit->data.F32[i], resid->data.F64[i]);
    12901290                    }
     
    13001300            return(NULL);
    13011301        }
    1302         psTrace(__func__, 6, "Median is %f\n", stats->sampleMedian);
    1303         psTrace(__func__, 6, "Stdev is %f\n", stats->sampleStdev);
     1302        psTrace("psLib.math", 6, "Median is %f\n", stats->sampleMedian);
     1303        psTrace("psLib.math", 6, "Stdev is %f\n", stats->sampleStdev);
    13041304        psF32 minClipValue = -minClipSigma*stats->sampleStdev;
    13051305        psF32 maxClipValue = +maxClipSigma*stats->sampleStdev;
     
    13161316                    (resid->data.F64[i] - stats->sampleMedian < minClipValue)) {
    13171317                if (fit->type.type == PS_TYPE_F64) {
    1318                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     1318                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    13191319                            i, fit->data.F64[i], i, resid->data.F64[i]);
    13201320                } else {
    1321                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     1321                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    13221322                            i, fit->data.F32[i], i, resid->data.F64[i]);
    13231323                }
     
    13311331        }
    13321332
    1333         psTrace(__func__, 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
     1333        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
    13341334        psFree(fit);
    13351335    }
     
    13421342    }
    13431343
    1344     psTrace(__func__, 3, "---- %s() end ----\n", __func__);
     1344    psTrace("psLib.math", 3, "---- %s() end ----\n", __func__);
    13451345    return(poly);
    13461346}
     
    13691369    const psVector *z)
    13701370{
    1371     psTrace(__func__, 4, "---- %s() begin ----\n", __func__);
     1371    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    13721372    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
    13731373    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
     
    14111411        psFree(A);
    14121412        psFree(B);
    1413         psTrace(__func__, 4, "---- %s() End ----\n", __func__);
     1413        psTrace("psLib.math", 4, "---- %s() End ----\n", __func__);
    14141414        return(NULL);
    14151415    }
     
    15431543    psFree(B);
    15441544
    1545     psTrace(__func__, 4, "---- %s() end ----\n", __func__);
     1545    psTrace("psLib.math", 4, "---- %s() end ----\n", __func__);
    15461546    return (myPoly);
    15471547}
     
    17161716    const psVector *z)
    17171717{
    1718     psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     1718    psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__);
    17191719    PS_ASSERT_POLY_NON_NULL(poly, NULL);
    17201720    PS_ASSERT_POLY_TYPE(poly, PS_POLYNOMIAL_ORD, NULL);
     
    17661766    // for now, for the SAMPLE_MEDIAN and SAMPLE_STDEV to be used
    17671767    stats->options |= (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
    1768     psTrace(__func__, 4, "stats->clipIter is %d\n", stats->clipIter);
    1769     psTrace(__func__, 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
     1768    psTrace("psLib.math", 4, "stats->clipIter is %d\n", stats->clipIter);
     1769    psTrace("psLib.math", 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
    17701770
    17711771    for (psS32 N = 0; N < stats->clipIter; N++) {
    1772         psTrace(__func__, 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
     1772        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
    17731773        psS32 Nkeep = 0;
    17741774        if (psTraceGetLevel(__func__) >= 6) {
    17751775            if (mask != NULL) {
    17761776                for (psS32 i = 0 ; i < mask->n ; i++) {
    1777                     psTrace(__func__, 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
     1777                    psTrace("psLib.math", 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
    17781778                }
    17791779            }
     
    18051805                for (psS32 i = 0 ; i < mask->n ; i++) {
    18061806                    if (!((mask != NULL) && (mask->data.U8[i] & maskValue))) {
    1807                         psTrace(__func__, 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
     1807                        psTrace("psLib.math", 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
    18081808                                i, f->data.F32[i], fit->data.F32[i], resid->data.F64[i]);
    18091809                    }
     
    18201820        }
    18211821
    1822         psTrace(__func__, 6, "Median is %f\n", stats->sampleMedian);
    1823         psTrace(__func__, 6, "Stdev is %f\n", stats->sampleStdev);
     1822        psTrace("psLib.math", 6, "Median is %f\n", stats->sampleMedian);
     1823        psTrace("psLib.math", 6, "Stdev is %f\n", stats->sampleStdev);
    18241824        psF32 minClipValue = -minClipSigma*stats->sampleStdev;
    18251825        psF32 maxClipValue = +maxClipSigma*stats->sampleStdev;
     
    18361836                    (resid->data.F64[i] - stats->sampleMedian < minClipValue))  {
    18371837                if (f->type.type == PS_TYPE_F64) {
    1838                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     1838                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    18391839                            i, fit->data.F64[i], i, resid->data.F64[i]);
    18401840                } else {
    1841                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     1841                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    18421842                            i, fit->data.F32[i], i, resid->data.F64[i]);
    18431843                }
     
    18511851        }
    18521852
    1853         psTrace(__func__, 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
     1853        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
    18541854        psFree(fit);
    18551855    }
     
    18621862    }
    18631863
    1864     psTrace(__func__, 3, "---- %s() end ----\n", __func__);
     1864    psTrace("psLib.math", 3, "---- %s() end ----\n", __func__);
    18651865    return(poly);
    18661866}
     
    18881888    const psVector *t)
    18891889{
    1890     psTrace(__func__, 4, "---- %s() begin ----\n", __func__);
     1890    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
    18911891    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
    18921892    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
     
    19341934        psFree(A);
    19351935        psFree(B);
    1936         psTrace(__func__, 4, "---- %s() End ----\n", __func__);
     1936        psTrace("psLib.math", 4, "---- %s() End ----\n", __func__);
    19371937        return(NULL);
    19381938    }
     
    20792079    psFree(B);
    20802080
    2081     psTrace(__func__, 4, "---- %s() end ----\n", __func__);
     2081    psTrace("psLib.math", 4, "---- %s() end ----\n", __func__);
    20822082    return (myPoly);
    20832083}
     
    22772277    const psVector *t)
    22782278{
    2279     psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     2279    psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__);
    22802280    PS_ASSERT_POLY_NON_NULL(poly, NULL);
    22812281    PS_ASSERT_POLY_TYPE(poly, PS_POLYNOMIAL_ORD, NULL);
     
    23312331    // for now, for the SAMPLE_MEDIAN and SAMPLE_STDEV to be used
    23322332    stats->options |= (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
    2333     psTrace(__func__, 4, "stats->clipIter is %d\n", stats->clipIter);
    2334     psTrace(__func__, 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
     2333    psTrace("psLib.math", 4, "stats->clipIter is %d\n", stats->clipIter);
     2334    psTrace("psLib.math", 4, "(minClipSigma, maxClipSigma) is (%.2f, %.2f)\n", minClipSigma, maxClipSigma);
    23352335
    23362336    for (psS32 N = 0; N < stats->clipIter; N++) {
    2337         psTrace(__func__, 6, "Loop iteration %d.  Calling psVectorFitPolynomial4D()\n");
     2337        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial4D()\n");
    23382338        psS32 Nkeep = 0;
    23392339        if (psTraceGetLevel(__func__) >= 6) {
    23402340            if (mask != NULL) {
    23412341                for (psS32 i = 0 ; i < mask->n ; i++) {
    2342                     psTrace(__func__, 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
     2342                    psTrace("psLib.math", 6,  "mask[%d] is %d\n", i, mask->data.U8[i]);
    23432343                }
    23442344            }
     
    23712371                for (psS32 i = 0 ; i < mask->n ; i++) {
    23722372                    if (!((mask != NULL) && (mask->data.U8[i] & maskValue))) {
    2373                         psTrace(__func__, 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
     2373                        psTrace("psLib.math", 6,  "(f, fit)[%d] is (%f, %f).  resid is (%f)\n",
    23742374                                i, f->data.F32[i], fit->data.F32[i], resid->data.F64[i]);
    23752375                    }
     
    23852385            return(NULL);
    23862386        }
    2387         psTrace(__func__, 6, "Median is %f\n", stats->sampleMedian);
    2388         psTrace(__func__, 6, "Stdev is %f\n", stats->sampleStdev);
     2387        psTrace("psLib.math", 6, "Median is %f\n", stats->sampleMedian);
     2388        psTrace("psLib.math", 6, "Stdev is %f\n", stats->sampleStdev);
    23892389        psF32 minClipValue = -minClipSigma*stats->sampleStdev;
    23902390        psF32 maxClipValue = +maxClipSigma*stats->sampleStdev;
     
    24012401                    (resid->data.F64[i] - stats->sampleMedian < minClipValue)) {
    24022402                if (f->type.type == PS_TYPE_F64) {
    2403                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     2403                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    24042404                            i, fit->data.F64[i], i, resid->data.F64[i]);
    24052405                } else {
    2406                     psTrace(__func__, 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
     2406                    psTrace("psLib.math", 6, "Masking element %d (%f).  resid->data.F64[%d] is %f\n",
    24072407                            i, fit->data.F32[i], i, resid->data.F64[i]);
    24082408                }
     
    24172417        }
    24182418
    2419         psTrace(__func__, 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
     2419        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
    24202420        psFree (fit);
    24212421    }
     
    24282428    }
    24292429
    2430     psTrace(__func__, 3, "---- %s() end ----\n", __func__);
     2430    psTrace("psLib.math", 3, "---- %s() end ----\n", __func__);
    24312431    return(poly);
    24322432}
Note: See TracChangeset for help on using the changeset viewer.