IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 6, 2004, 2:32:53 PM (22 years ago)
Author:
gusciora
Message:

Lots of bug fixes and such.

Location:
trunk/psLib/src/dataManip
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psFunctions.c

    r845 r889  
    66 *  @author George Gusciora, MHPCC
    77 *
    8  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-06-04 01:03:11 $
     8 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-06-07 00:32:53 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7171 routines for generating both uniformly distributed numbers and the
    7272 Gaussian distribution as well.
     73 
     74 GUS: There is no way to seed the random generator.
    7375 *****************************************************************************/
    7476psVector *psGaussianDev(float mean,
     
    8284
    8385    gauss = psVectorAlloc(Npts, PS_TYPE_F32);
     86    gauss->n = Npts;
    8487    gsl_rng_env_setup();
    8588    T = gsl_rng_default;
     
    120123    newPoly->nY = nY;
    121124
    122     newPoly->coeff    = (float **) psAlloc(nX * sizeof(float));
    123     newPoly->coeffErr = (float **) psAlloc(nX * sizeof(float));
    124     newPoly->mask     = (char **)  psAlloc(nX * sizeof(char));
     125    newPoly->coeff    = (float **) psAlloc(nX * sizeof(float *));
     126    newPoly->coeffErr = (float **) psAlloc(nX * sizeof(float *));
     127    newPoly->mask     = (char **)  psAlloc(nX * sizeof(char *));
    125128    for (x=0;x<nX;x++) {
    126129        newPoly->coeff[x]    = (float *) psAlloc(nY * sizeof(float));
     
    129132    }
    130133
     134
    131135    return(newPoly);
    132136}
     
    143147    newPoly->nZ = nZ;
    144148
    145     newPoly->coeff    = (float ***) psAlloc(nX * sizeof(float));
    146     newPoly->coeffErr = (float ***) psAlloc(nX * sizeof(float));
    147     newPoly->mask     = (char ***)  psAlloc(nX * sizeof(char));
     149    newPoly->coeff    = (float ***) psAlloc(nX * sizeof(float **));
     150    newPoly->coeffErr = (float ***) psAlloc(nX * sizeof(float **));
     151    newPoly->mask     = (char ***)  psAlloc(nX * sizeof(char **));
    148152    for (x=0;x<nX;x++) {
    149         newPoly->coeff[x]    = (float **) psAlloc(nY * sizeof(float));
    150         newPoly->coeffErr[x] = (float **) psAlloc(nY * sizeof(float));
    151         newPoly->mask[x]     = (char **)  psAlloc(nY * sizeof(char));
     153        newPoly->coeff[x]    = (float **) psAlloc(nY * sizeof(float *));
     154        newPoly->coeffErr[x] = (float **) psAlloc(nY * sizeof(float *));
     155        newPoly->mask[x]     = (char **)  psAlloc(nY * sizeof(char *));
    152156        for (y=0;y<nY;y++) {
    153157            newPoly->coeff[x][y]    = (float *) psAlloc(nZ * sizeof(float));
     
    173177    newPoly->nZ = nZ;
    174178
    175     newPoly->coeff    = (float ****) psAlloc(nW * sizeof(float));
    176     newPoly->coeffErr = (float ****) psAlloc(nW * sizeof(float));
    177     newPoly->mask     = (char ****)  psAlloc(nW * sizeof(char));
     179    newPoly->coeff    = (float ****) psAlloc(nW * sizeof(float ***));
     180    newPoly->coeffErr = (float ****) psAlloc(nW * sizeof(float ***));
     181    newPoly->mask     = (char ****)  psAlloc(nW * sizeof(char ***));
    178182    for (w=0;w<nW;w++) {
    179         newPoly->coeff[w]    = (float ***) psAlloc(nX * sizeof(float));
    180         newPoly->coeffErr[w] = (float ***) psAlloc(nX * sizeof(float));
    181         newPoly->mask[w]     = (char ***)  psAlloc(nX * sizeof(char));
     183        newPoly->coeff[w]    = (float ***) psAlloc(nX * sizeof(float **));
     184        newPoly->coeffErr[w] = (float ***) psAlloc(nX * sizeof(float **));
     185        newPoly->mask[w]     = (char ***)  psAlloc(nX * sizeof(char **));
    182186        for (x=0;x<nX;x++) {
    183             newPoly->coeff[w][x]    = (float **) psAlloc(nY * sizeof(float));
    184             newPoly->coeffErr[w][x] = (float **) psAlloc(nY * sizeof(float));
    185             newPoly->mask[w][x]     = (char **) psAlloc(nY * sizeof(char));
     187            newPoly->coeff[w][x]    = (float **) psAlloc(nY * sizeof(float *));
     188            newPoly->coeffErr[w][x] = (float **) psAlloc(nY * sizeof(float *));
     189            newPoly->mask[w][x]     = (char **) psAlloc(nY * sizeof(char *));
    186190            for (y=0;y<nY;y++) {
    187191                newPoly->coeff[w][x][y]    = (float *) psAlloc(nZ * sizeof(float));
     
    410414    newPoly->nY = nY;
    411415
    412     newPoly->coeff    = (double **) psAlloc(nX * sizeof(double));
    413     newPoly->coeffErr = (double **) psAlloc(nX * sizeof(double));
    414     newPoly->mask     = (char **)  psAlloc(nX * sizeof(char));
     416    newPoly->coeff    = (double **) psAlloc(nX * sizeof(double *));
     417    newPoly->coeffErr = (double **) psAlloc(nX * sizeof(double *));
     418    newPoly->mask     = (char **)  psAlloc(nX * sizeof(char *));
    415419    for (x=0;x<nX;x++) {
    416420        newPoly->coeff[x]    = (double *) psAlloc(nY * sizeof(double));
     
    433437    newPoly->nZ = nZ;
    434438
    435     newPoly->coeff    = (double ***) psAlloc(nX * sizeof(double));
    436     newPoly->coeffErr = (double ***) psAlloc(nX * sizeof(double));
    437     newPoly->mask     = (char ***)  psAlloc(nX * sizeof(char));
     439    newPoly->coeff    = (double ***) psAlloc(nX * sizeof(double **));
     440    newPoly->coeffErr = (double ***) psAlloc(nX * sizeof(double **));
     441    newPoly->mask     = (char ***)  psAlloc(nX * sizeof(char **));
    438442    for (x=0;x<nX;x++) {
    439         newPoly->coeff[x]    = (double **) psAlloc(nY * sizeof(double));
    440         newPoly->coeffErr[x] = (double **) psAlloc(nY * sizeof(double));
    441         newPoly->mask[x]     = (char **)  psAlloc(nY * sizeof(char));
     443        newPoly->coeff[x]    = (double **) psAlloc(nY * sizeof(double *));
     444        newPoly->coeffErr[x] = (double **) psAlloc(nY * sizeof(double *));
     445        newPoly->mask[x]     = (char **)  psAlloc(nY * sizeof(char *));
    442446        for (y=0;y<nY;y++) {
    443447            newPoly->coeff[x][y]    = (double *) psAlloc(nZ * sizeof(double));
     
    463467    newPoly->nZ = nZ;
    464468
    465     newPoly->coeff    = (double ****) psAlloc(nW * sizeof(double));
    466     newPoly->coeffErr = (double ****) psAlloc(nW * sizeof(double));
    467     newPoly->mask     = (char ****)  psAlloc(nW * sizeof(char));
     469    newPoly->coeff    = (double ****) psAlloc(nW * sizeof(double ***));
     470    newPoly->coeffErr = (double ****) psAlloc(nW * sizeof(double ***));
     471    newPoly->mask     = (char ****)  psAlloc(nW * sizeof(char ***));
    468472    for (w=0;w<nW;w++) {
    469         newPoly->coeff[w]    = (double ***) psAlloc(nX * sizeof(double));
    470         newPoly->coeffErr[w] = (double ***) psAlloc(nX * sizeof(double));
    471         newPoly->mask[w]     = (char ***)  psAlloc(nX * sizeof(char));
     473        newPoly->coeff[w]    = (double ***) psAlloc(nX * sizeof(double **));
     474        newPoly->coeffErr[w] = (double ***) psAlloc(nX * sizeof(double **));
     475        newPoly->mask[w]     = (char ***)  psAlloc(nX * sizeof(char **));
    472476        for (x=0;x<nX;x++) {
    473             newPoly->coeff[w][x]    = (double **) psAlloc(nY * sizeof(double));
    474             newPoly->coeffErr[w][x] = (double **) psAlloc(nY * sizeof(double));
    475             newPoly->mask[w][x]     = (char **) psAlloc(nY * sizeof(char));
     477            newPoly->coeff[w][x]    = (double **) psAlloc(nY * sizeof(double *));
     478            newPoly->coeffErr[w][x] = (double **) psAlloc(nY * sizeof(double *));
     479            newPoly->mask[w][x]     = (char **) psAlloc(nY * sizeof(char *));
    476480            for (y=0;y<nY;y++) {
    477481                newPoly->coeff[w][x][y]    = (double *) psAlloc(nZ * sizeof(double));
  • trunk/psLib/src/dataManip/psFunctions.h

    r751 r889  
    1818          );
    1919
     20
     21psVector *psGaussianDev(float mean,
     22                        float sigma,
     23                        int Npts);
     24
    2025/*****************************************************************************/
    2126
     
    205210/** Evaluate 1D polynomial (double precision) */
    206211double
    207 psEvalDPolynomial1D(double x,  ///< Value at which to evaluate
     212psDEvalPolynomial1D(double x,  ///< Value at which to evaluate
    208213                    const psDPolynomial1D *myPoly ///< Coefficients for the polynomial
    209214                   );
     
    211216/** Evaluate 2D polynomial (double precision) */
    212217double
    213 psEvalDPolynomial2D(double x,  ///< Value x at which to evaluate
     218psDEvalPolynomial2D(double x,  ///< Value x at which to evaluate
    214219                    double y,  ///< Value y at which to evaluate
    215220                    const psDPolynomial2D *myPoly ///< Coefficients for the polynomial
     
    218223/** Evaluate 3D polynomial (double precision) */
    219224double
    220 psEvalDPolynomial3D(double x,  ///< Value x at which to evaluate
     225psDEvalPolynomial3D(double x,  ///< Value x at which to evaluate
    221226                    double y,  ///< Value y at which to evaluate
    222227                    double z,  ///< Value z at which to evaluate
     
    226231/** Evaluate 4D polynomial (double precision) */
    227232double
    228 psEvalDPolynomial4D(double w,  ///< Value w at which to evaluate
     233psDEvalPolynomial4D(double w,  ///< Value w at which to evaluate
    229234                    double x,  ///< Value x at which to evaluate
    230235                    double y,  ///< Value y at which to evaluate
  • trunk/psLib/src/dataManip/psStats.c

    r831 r889  
    8585    float binSize = 0.0;
    8686
     87    if (n == 0) {
     88        psAbort(__func__, "psHistogram requested with 0 bins");
     89    }
     90
    8791    newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
    8892    newHist->bounds = psVectorAlloc(n+1, PS_TYPE_F32);
     93    newHist->bounds->n = newHist->bounds->nalloc;
     94
    8995    binSize = (upper - lower) / (float) n;
    9096    for (i=0;i<n+1;i++) {
     
    9298    }
    9399    newHist->nums =  psVectorAlloc(n, PS_TYPE_S32);
     100    newHist->nums->n = newHist->nums->nalloc;
     101    for (i=0;i<newHist->nums->n;i++) {
     102        newHist->nums->data.S32[i] = 0;
     103    }
    94104    newHist->minNum = 0;
    95105    newHist->maxNum = 0;
     
    99109}
    100110
    101 
     111// When this is called, the number of data elements in bounds
     112// is n.  Therefore, the number of bins is n-1.
    102113psHistogram *psHistogramAllocGeneric(const psVector *restrict bounds)
    103114{
     
    107118    newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
    108119    newHist->bounds = psVectorAlloc(bounds->n, PS_TYPE_F32);
     120    newHist->bounds->n = newHist->bounds->nalloc;
    109121    for (i=0;i<bounds->n;i++) {
    110122        newHist->bounds->data.F32[i] = bounds->data.F32[i];
    111123    }
    112124    newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_S32);
     125    newHist->nums->n = newHist->nums->nalloc;
     126    for (i=0;i<newHist->nums->n;i++) {
     127        newHist->nums->data.S32[i] = 0;
     128    }
    113129
    114130    newHist->minNum = 0;
     
    119135}
    120136
    121 void psHistogramFree(psHistogram *restrict myHist)
    122 {
     137void psHistogramFree(psHistogram *myHist)
     138{
     139    psVectorFree(myHist->bounds);
     140    psVectorFree(myHist->nums);
    123141    psFree(myHist);
    124142}
     
    150168
    151169    numBins = out->nums->n;
    152     for (i=0;i<in->n;i++) {
    153         // Check if this pixel is masked, and if so, skip it.
    154         if (!(mask->data.S32[i] & maskVal)) {
    155             // Check if this pixel is below the minimum value, and if so
    156             // count it, then skip it.
     170
     171    if (mask != NULL) {
     172        for (i=0;i<in->n;i++) {
     173            // Check if this pixel is masked, and if so, skip it.
     174            if (!(mask->data.U8[i] & maskVal)) {
     175                // Check if this pixel is below the minimum value, and if so
     176                // count it, then skip it.
     177                if (in->data.F32[i] < out->bounds->data.F32[0]) {
     178                    out->minNum++;
     179
     180                    // Check if this pixel is above the maximum value, and if so
     181                    // count it, then skip it.
     182                } else if (in->data.F32[i] > out->bounds->data.F32[numBins]) {
     183                    out->maxNum++;
     184                } else {
     185                    // If this is a uniform histogram, determining the correct
     186                    // number is trivial.
     187                    if (out->uniform == true) {
     188                        binSize = out->bounds->data.F32[1] - out->bounds->data.F32[0];
     189
     190                        binNum = (int) ((in->data.F32[i] - out->bounds->data.F32[0]) /
     191                                        binSize);
     192                        (out->nums->data.S32[binNum])++;
     193                        // If this is a non-uniform histogram, determining the correct
     194                        // bin number requires a bit more work.
     195                    } else {
     196                        // GUS: This is slow.  Put a smarter algorithm here to
     197                        // find the correct bin number (bin search, probably)
     198                        for (j=0;j<(out->bounds->n)-1;j++) {
     199                            if ((out->bounds->data.S32[j] <= in->data.F32[i]) &&
     200                                    (in->data.F32[i] <= out->bounds->data.S32[j+1])) {
     201                                (out->nums->data.S32[j])++;
     202                            }
     203                        }
     204                    }
     205                }
     206            }
     207        }
     208    } else {
     209        for (i=0;i<in->n;i++) {
    157210            if (in->data.F32[i] < out->bounds->data.F32[0]) {
     211                // Check if this pixel is below the minimum value, and if so
     212                // count it, then skip it.
    158213                out->minNum++;
    159 
     214            } else if (in->data.F32[i] > out->bounds->data.F32[numBins]) {
    160215                // Check if this pixel is above the maximum value, and if so
    161216                // count it, then skip it.
    162             } else if (in->data.F32[i] > out->bounds->data.F32[numBins]) {
    163217                out->maxNum++;
    164218            } else {
     
    171225                                    binSize);
    172226                    (out->nums->data.S32[binNum])++;
     227
    173228                    // If this is a non-uniform histogram, determining the correct
    174229                    // bin number requires a bit more work.
     
    185240            }
    186241        }
     242
    187243    }
    188244    return(out);
     
    471527    unsortedVector = psVectorAlloc(nValues, PS_TYPE_F32);
    472528    unsortedVector->n = unsortedVector->nalloc;
     529
    473530    sortedVector   = psVectorAlloc(nValues, PS_TYPE_F32);
    474531    sortedVector->n = sortedVector->nalloc;
     
    494551                if ((rangeMin <= myVector->data.F32[i]) &&
    495552                        (myVector->data.F32[i] <= rangeMax)) {
    496                     unsortedVector->data.F32[count++] = maskVector->data.F32[i];
     553                    unsortedVector->data.F32[count++] = myVector->data.F32[i];
    497554                }
    498555            }
     
    504561            for (i=0;i<myVector->n;i++) {
    505562                if (!(maskVal & maskVector->data.U8[i])) {
    506                     unsortedVector->data.F32[count++] = maskVector->data.F32[i];
    507                 }
    508             }
    509         } else {
    510             for (i=0;i<myVector->n;i++) {
    511                 unsortedVector->data.F32[i] = maskVector->data.F32[i];
     563                    unsortedVector->data.F32[count++] = myVector->data.F32[i];
     564                }
     565            }
     566        } else {
     567            for (i=0;i<myVector->n;i++) {
     568                unsortedVector->data.F32[i] = myVector->data.F32[i];
    512569            }
    513570        }
     
    596653    float rangeMin = 0.0;
    597654    float rangeMax = 0.0;
    598     psStats *stats2 = NULL;
    599655
    600656    // Determine if the number of data points exceed a threshold which will
    601657    // cause to generate robust stats, as opposed to exact stats.
    602     if (myVector->n > stats->sampleLimit) {
    603         // Calculate the robust quartiles.
    604         stats2 = psStatsAlloc(PS_STAT_ROBUST_QUARTILE);
    605         p_psVectorRobustStats(myVector, maskVector, maskVal, stats2);
    606 
    607         // Store the robust quartiles into the sample quartile members.
    608         stats->sampleUQ = stats2->robustUQ;
    609         stats->sampleLQ = stats2->robustLQ;
    610 
    611         // Free temporary data buffers.
    612         psStatsFree(stats2);
    613 
    614         // Set the PS_STAT_ROBUST_FOR_SAMPLE bit in the stats structure.
    615         stats->options = stats->options | PS_STAT_ROBUST_FOR_SAMPLE;
    616 
    617         return;
    618     }
     658    /* GUS: When IfA provides the algorithm, insert is here.
     659        if (myVector->n > stats->sampleLimit) {
     660            psStats *stats2 = NULL;
     661            // Calculate the robust quartiles.
     662            stats2 = psStatsAlloc(PS_STAT_ROBUST_QUARTILE);
     663            p_psVectorRobustStats(myVector, maskVector, maskVal, stats2);
     664     
     665            // Store the robust quartiles into the sample quartile members.
     666            stats->sampleUQ = stats2->robustUQ;
     667            stats->sampleLQ = stats2->robustLQ;
     668     
     669            // Free temporary data buffers.
     670            psStatsFree(stats2);
     671     
     672            // Set the PS_STAT_ROBUST_FOR_SAMPLE bit in the stats structure.
     673            stats->options = stats->options | PS_STAT_ROBUST_FOR_SAMPLE;
     674     
     675            return;
     676        }
     677    */
    619678
    620679    // Determine how many data points fit inside this min/max range
     
    640699                        (rangeMin <= myVector->data.F32[i]) &&
    641700                        (myVector->data.F32[i] <= rangeMax)) {
    642                     unsortedVector->data.F32[count++] = maskVector->data.F32[i];
     701                    unsortedVector->data.F32[count++] = myVector->data.F32[i];
    643702                }
    644703            }
     
    647706                if ((rangeMin <= myVector->data.F32[i]) &&
    648707                        (myVector->data.F32[i] <= rangeMax)) {
    649                     unsortedVector->data.F32[count++] = maskVector->data.F32[i];
     708                    unsortedVector->data.F32[count++] = myVector->data.F32[i];
    650709                }
    651710            }
     
    657716            for (i=0;i<myVector->n;i++) {
    658717                if (!(maskVal & maskVector->data.U8[i])) {
    659                     unsortedVector->data.F32[count++] = maskVector->data.F32[i];
    660                 }
    661             }
    662         } else {
    663             for (i=0;i<myVector->n;i++) {
    664                 unsortedVector->data.F32[i] = maskVector->data.F32[i];
     718                    unsortedVector->data.F32[count++] = myVector->data.F32[i];
     719                }
     720            }
     721        } else {
     722            for (i=0;i<myVector->n;i++) {
     723                unsortedVector->data.F32[i] = myVector->data.F32[i];
    665724            }
    666725        }
     
    679738    psVectorFree(unsortedVector);
    680739    psVectorFree(sortedVector);
     740    // GUS: This is the
    681741}
    682742
     
    691751        PS_STAT_ROBUST_QUARTILE
    692752    I have included all that computation in a single function, as opposed to
    693     breaking it across several functions for one primary reason: the all
     753    breaking it across several functions for one primary reason: they all
    694754    require the same basic initial processing steps (calculate the histogram,
    695755    etc.) however there is no currently defined means, in the SDRS, to
     
    719779    // is really required.
    720780
    721     if (0.0 == stats->sampleUQ) {
    722 
    723         // GUS: fix this
    724         //        stats->options = stats->options | PS_STAT_SAMPLE_UQ;
     781    if (isnan(stats->sampleUQ) ||
     782            isnan(stats->sampleLQ)) {
     783        stats->options = stats->options | PS_STAT_SAMPLE_QUARTILE;
    725784        p_psVectorSampleQuartiles(myVector,
    726785                                  maskVector,
     
    729788    }
    730789
    731     if (isnan(stats->sampleLQ)) {
    732         // GUS: fix this
    733         //        stats->options = stats->options | PS_STAT_SAMPLE_LQ;
    734         p_psVectorSampleQuartiles(myVector,
    735                                   maskVector,
    736                                   maskVal,
    737                                   stats);
    738     }
    739 
    740790    // Compute the initial bin size of the robust histogram.
    741791    sigmaE = (stats->sampleUQ - stats->sampleLQ) / 1.34f;
     
    753803    robustHistogram = psHistogramAlloc(stats->min,
    754804                                       stats->max,
    755                                        binSize);
    756     // Populate the histogram arrat.
     805                                       1 + (int) ((stats->max - stats->min) / binSize));
     806
     807
     808    // Populate the histogram array.
    757809    // GUS: fix this
    758810    //    robustHistogram = psHistogramVector(robustHistogram, myVector);
     
    811863        stats->robustLQ = 0.0;
    812864    }
     865    stats->robustNfit = 0.0;
     866    stats->robustN50 = 0.0;
     867    psHistogramFree(robustHistogram);
    813868}
    814869
     
    836891
    837892    if (0 != isnan(stats->sampleMean)) {
    838         psAbort(__func__, "stats->sampleMean == NAN");
     893        p_psVectorSampleMean(myVector, maskVector, maskVal, stats);
    839894    }
    840895    mean = stats->sampleMean;
     
    920975    }
    921976
    922     tmpMask = psVectorAlloc(myVector->nalloc, maskVector->type.type);
    923 
    924     tmpMask->n = maskVector->n;
    925     for (i=0;i<tmpMask->n;i++) {
    926         tmpMask->data.U8[i] = maskVector->data.U8[i];
     977
     978    tmpMask = psVectorAlloc(myVector->n, PS_TYPE_U8);
     979    tmpMask->n = myVector->n;
     980
     981    if (maskVector != NULL) {
     982        for (i=0;i<tmpMask->n;i++) {
     983            tmpMask->data.U8[i] = maskVector->data.U8[i];
     984        }
    927985    }
    928986
    929987    // 1. Compute the sample median.
     988    // GUS: This seems odd.  Verify with IfA that we want to calculate the
     989    // median here, not the mean.
    930990    p_psVectorSampleMedian(myVector, maskVector, maskVal, stats);
    931991
     
    9421002
    9431003    for (i=0;i<stats->clipIter;i++) {
     1004        //        printf("p_psVectorClippedStats(): Iteration %d (%f %f)\n", i,
     1005        //                clippedMean, clippedStdev);
    9441006        for (j=0;j<myVector->n;j++) {
    9451007            // a) Exclude all values x_i for which |x_i - x| > K * stdev
    946             if ( fabs(myVector->data.F32[j] - clippedMean) >
     1008            if (fabs(myVector->data.F32[j] - clippedMean) >
    9471009                    (stats->clipSigma * clippedStdev)) {
    9481010                tmpMask->data.U8[i] = 0xff;
     
    9941056    if (in->type.type != PS_TYPE_F32) {
    9951057        psAbort(__func__,
    996                 "Only data type PS_TYPE_F32 is currently supported.");
    997     }
     1058                "Only data type PS_TYPE_F32 is currently supported (0x%x).",
     1059                in->type.type);
     1060    }
     1061
    9981062    if (mask != NULL) {
    9991063        if (in->n != mask->n) {
     
    10181082
    10191083    // ************************************************************************
     1084    // GUS: The Stdev calculation requires the mean.  Should we assume the
     1085    // mean has already been calculated?  Or should we always calculate it?
    10201086    if (stats->options & PS_STAT_SAMPLE_STDEV) {
     1087        p_psVectorSampleMean(in, mask, maskVal, stats);
    10211088        p_psVectorSampleStdev(in, mask, maskVal, stats);
    10221089    }
  • trunk/psLib/src/dataManip/psStats.h

    r797 r889  
    8181typedef struct
    8282{
    83     const psVector *restrict bounds; ///< Bounds for the bins (type F32)
     83    psVector *bounds;                ///< Bounds for the bins (type F32)
    8484    psVector *nums;                  ///< Number in each of the bins (INT)
    8585    int minNum;                      ///< Number below the minimum
     
    102102
    103103/** Destructor \ingroup MathGroup **/
    104 void psHistogramFree(psHistogram *restrict myHist);          ///< Histogram to destroy
     104void psHistogramFree(psHistogram *myHist);          ///< Histogram to destroy
    105105
    106106
Note: See TracChangeset for help on using the changeset viewer.