IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 644


Ignore:
Timestamp:
May 11, 2004, 3:14:30 PM (22 years ago)
Author:
gusciora
Message:

...

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psStats.h

    r642 r644  
    8080    PS_STAT_SAMPLE_MEDIAN         = 0x000002,
    8181    PS_STAT_SAMPLE_STDEV          = 0x000004,
    82     PS_STAT_SAMPLE_UQ     = 0x000008,
    83     PS_STAT_SAMPLE_LQ     = 0x000010,
     82    PS_STAT_SAMPLE_UQ             = 0x000008,
     83    PS_STAT_SAMPLE_LQ             = 0x000010,
    8484    PS_STAT_ROBUST_MEAN           = 0x000020,
    8585    PS_STAT_ROBUST_MEAN_NVALUES   = 0x000040,
     
    8989    PS_STAT_ROBUST_MODE_NVALUES   = 0x000400,
    9090    PS_STAT_ROBUST_STDEV          = 0x000800,
    91     PS_STAT_ROBUST_UQ     = 0x001000,
    92     PS_STAT_ROBUST_LQ     = 0x002000,
     91    PS_STAT_ROBUST_UQ             = 0x001000,
     92    PS_STAT_ROBUST_LQ             = 0x002000,
    9393    PS_STAT_CLIPPED_MEAN          = 0x004000,
    9494    PS_STAT_CLIPPED_MEAN_NVALUES  = 0x008000,
    9595    PS_STAT_CLIPPED_MEAN_NSIGMA   = 0x010000,
    9696    PS_STAT_CLIPPED_STDEV         = 0x020000,
    97     PS_STAT_MAX         = 0x040000,
    98     PS_STAT_MIN         = 0x080000,
    99     PS_STAT_NVALUES     = 0x100000
     97    PS_STAT_MAX                   = 0x040000,
     98    PS_STAT_MIN                   = 0x080000,
     99    PS_STAT_NVALUES               = 0x100000
    100100} psStatsOptions;
    101101
     
    104104typedef struct
    105105{
    106     double sampleMean;   ///< formal mean of sample
    107     double sampleMedian;  ///< formal median of sample
    108     double sampleStdev;   ///< standard deviation of sample
    109     double sampleUQ;   ///< upper quartile of sample
    110     double sampleLQ;   ///< lower quartile of sample
    111     double robustMean;   ///< robust mean of array
    112     int    robustMeanNvalues;  ///< number of measurements used for robust mean
    113     double robustMedian;  ///< robust median of array
    114     int    robustMedianNvalues;  ///< number of measurements used for robust median
    115     double robustMode;   ///< Robust mode of array
    116     int    robustModeNvalues;  ///< Number of measurements used for robust mode
    117     double robustStdev;   ///< robust standard deviation of array
    118     double robustUQ;   ///< robust upper quartile
    119     double robustLQ;   ///< robust lower quartile
    120     double clippedMean;   ///< Nsigma clipped mean
     106    double sampleMean;          ///< formal mean of sample
     107    double sampleMedian;        ///< formal median of sample
     108    double sampleStdev;         ///< standard deviation of sample
     109    double sampleUQ;            ///< upper quartile of sample
     110    double sampleLQ;            ///< lower quartile of sample
     111    double robustMean;          ///< robust mean of array
     112    int    robustMeanNvalues;   ///< number of measurements used for robust mean
     113    double robustMedian;        ///< robust median of array
     114    int    robustMedianNvalues; ///< number of measurements used for robust median
     115    double robustMode;          ///< Robust mode of array
     116    int    robustModeNvalues;   ///< Number of measurements used for robust mode
     117    double robustStdev;         ///< robust standard deviation of array
     118    double robustUQ;            ///< robust upper quartile
     119    double robustLQ;            ///< robust lower quartile
     120    double clippedMean;         ///< Nsigma clipped mean
    121121    int    clippedMeanNvalues;  ///< number of data points used for clipped mean
    122     double clippedStdev;  ///< standard deviation after clipping
    123     double clipSigma;   ///< Nsigma used for clipping; user input
    124     int    clipIter;   ///< Number of clipping iterations; user input
    125     double min;    ///< minimum data value in array
    126     double max;    ///< maximum data value in array
    127     int    nValues;   ///< number of data values in array
    128     psStatsOptions options;  ///< bitmask of calculated values
     122    double clippedStdev;        ///< standard deviation after clipping
     123    double clipSigma;           ///< Nsigma used for clipping; user input
     124    int    clipIter;            ///< Number of clipping iterations; user input
     125    double min;                 ///< minimum data value in array
     126    double max;                 ///< maximum data value in array
     127    int    nValues;             ///< number of data values in array
     128    psStatsOptions options;     ///< bitmask of calculated values
    129129}
    130130psStats;
     
    151151           );
    152152
    153 /***********************************************************************************************************/
    154 
    155153/** Histograms  */
    156154typedef struct
     
    158156    const psVector *restrict lower; ///< Lower bounds for the bins (FLOAT)
    159157    const psVector *restrict upper; ///< Upper bounds for the bins (FLOAT)
    160     psVector *nums;   ///< Number in each of the bins (INT)
     158    psVector *nums;                 ///< Number in each of the bins (INT)
    161159    float minVal;
    162     float maxVal;  ///< Minimum and maximum values
     160    float maxVal;                   ///< Minimum and maximum values
    163161    int minNum;
    164     int maxNum;   ///< Number below the minimum and above the maximum
     162    int maxNum;                     ///< Number below the minimum and above the maximum
    165163}
    166164psHistogram;
     
    170168psHistogramAlloc(float lower,  ///< Lower limit for the bins
    171169                 float upper,  ///< Upper limit for the bins
    172                  float size  ///< Size of the bins
     170                 float size    ///< Size of the bins
    173171                );
    174172
     
    177175psHistogramAllocGeneric(const psVector *restrict lower, ///< Lower bounds for the bins
    178176                        const psVector *restrict upper, ///< Upper bounds for the bins
    179                         float minVal, ///< Minimum value
    180                         float maxVal ///< Maximum value
     177                        float minVal,                   ///< Minimum value
     178                        float maxVal                    ///< Maximum value
    181179                       );
    182180
    183181/** Destructor \ingroup MathGroup **/
    184182void
    185 psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy
     183psHistogramFree(psHistogram *restrict myHist          ///< Histogram to destroy
    186184               );
    187185
     
    189187/** Calculate a histogram \ingroup MathGroup **/
    190188psHistogram *
    191 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data
     189psGetArrayHistogram(psHistogram *restrict myHist,     ///< Histogram data
    192190                    const psVector *restrict myVector ///< Vector to analyse
    193191                   );
  • trunk/psLib/src/math/psStats.h

    r642 r644  
    8080    PS_STAT_SAMPLE_MEDIAN         = 0x000002,
    8181    PS_STAT_SAMPLE_STDEV          = 0x000004,
    82     PS_STAT_SAMPLE_UQ     = 0x000008,
    83     PS_STAT_SAMPLE_LQ     = 0x000010,
     82    PS_STAT_SAMPLE_UQ             = 0x000008,
     83    PS_STAT_SAMPLE_LQ             = 0x000010,
    8484    PS_STAT_ROBUST_MEAN           = 0x000020,
    8585    PS_STAT_ROBUST_MEAN_NVALUES   = 0x000040,
     
    8989    PS_STAT_ROBUST_MODE_NVALUES   = 0x000400,
    9090    PS_STAT_ROBUST_STDEV          = 0x000800,
    91     PS_STAT_ROBUST_UQ     = 0x001000,
    92     PS_STAT_ROBUST_LQ     = 0x002000,
     91    PS_STAT_ROBUST_UQ             = 0x001000,
     92    PS_STAT_ROBUST_LQ             = 0x002000,
    9393    PS_STAT_CLIPPED_MEAN          = 0x004000,
    9494    PS_STAT_CLIPPED_MEAN_NVALUES  = 0x008000,
    9595    PS_STAT_CLIPPED_MEAN_NSIGMA   = 0x010000,
    9696    PS_STAT_CLIPPED_STDEV         = 0x020000,
    97     PS_STAT_MAX         = 0x040000,
    98     PS_STAT_MIN         = 0x080000,
    99     PS_STAT_NVALUES     = 0x100000
     97    PS_STAT_MAX                   = 0x040000,
     98    PS_STAT_MIN                   = 0x080000,
     99    PS_STAT_NVALUES               = 0x100000
    100100} psStatsOptions;
    101101
     
    104104typedef struct
    105105{
    106     double sampleMean;   ///< formal mean of sample
    107     double sampleMedian;  ///< formal median of sample
    108     double sampleStdev;   ///< standard deviation of sample
    109     double sampleUQ;   ///< upper quartile of sample
    110     double sampleLQ;   ///< lower quartile of sample
    111     double robustMean;   ///< robust mean of array
    112     int    robustMeanNvalues;  ///< number of measurements used for robust mean
    113     double robustMedian;  ///< robust median of array
    114     int    robustMedianNvalues;  ///< number of measurements used for robust median
    115     double robustMode;   ///< Robust mode of array
    116     int    robustModeNvalues;  ///< Number of measurements used for robust mode
    117     double robustStdev;   ///< robust standard deviation of array
    118     double robustUQ;   ///< robust upper quartile
    119     double robustLQ;   ///< robust lower quartile
    120     double clippedMean;   ///< Nsigma clipped mean
     106    double sampleMean;          ///< formal mean of sample
     107    double sampleMedian;        ///< formal median of sample
     108    double sampleStdev;         ///< standard deviation of sample
     109    double sampleUQ;            ///< upper quartile of sample
     110    double sampleLQ;            ///< lower quartile of sample
     111    double robustMean;          ///< robust mean of array
     112    int    robustMeanNvalues;   ///< number of measurements used for robust mean
     113    double robustMedian;        ///< robust median of array
     114    int    robustMedianNvalues; ///< number of measurements used for robust median
     115    double robustMode;          ///< Robust mode of array
     116    int    robustModeNvalues;   ///< Number of measurements used for robust mode
     117    double robustStdev;         ///< robust standard deviation of array
     118    double robustUQ;            ///< robust upper quartile
     119    double robustLQ;            ///< robust lower quartile
     120    double clippedMean;         ///< Nsigma clipped mean
    121121    int    clippedMeanNvalues;  ///< number of data points used for clipped mean
    122     double clippedStdev;  ///< standard deviation after clipping
    123     double clipSigma;   ///< Nsigma used for clipping; user input
    124     int    clipIter;   ///< Number of clipping iterations; user input
    125     double min;    ///< minimum data value in array
    126     double max;    ///< maximum data value in array
    127     int    nValues;   ///< number of data values in array
    128     psStatsOptions options;  ///< bitmask of calculated values
     122    double clippedStdev;        ///< standard deviation after clipping
     123    double clipSigma;           ///< Nsigma used for clipping; user input
     124    int    clipIter;            ///< Number of clipping iterations; user input
     125    double min;                 ///< minimum data value in array
     126    double max;                 ///< maximum data value in array
     127    int    nValues;             ///< number of data values in array
     128    psStatsOptions options;     ///< bitmask of calculated values
    129129}
    130130psStats;
     
    151151           );
    152152
    153 /***********************************************************************************************************/
    154 
    155153/** Histograms  */
    156154typedef struct
     
    158156    const psVector *restrict lower; ///< Lower bounds for the bins (FLOAT)
    159157    const psVector *restrict upper; ///< Upper bounds for the bins (FLOAT)
    160     psVector *nums;   ///< Number in each of the bins (INT)
     158    psVector *nums;                 ///< Number in each of the bins (INT)
    161159    float minVal;
    162     float maxVal;  ///< Minimum and maximum values
     160    float maxVal;                   ///< Minimum and maximum values
    163161    int minNum;
    164     int maxNum;   ///< Number below the minimum and above the maximum
     162    int maxNum;                     ///< Number below the minimum and above the maximum
    165163}
    166164psHistogram;
     
    170168psHistogramAlloc(float lower,  ///< Lower limit for the bins
    171169                 float upper,  ///< Upper limit for the bins
    172                  float size  ///< Size of the bins
     170                 float size    ///< Size of the bins
    173171                );
    174172
     
    177175psHistogramAllocGeneric(const psVector *restrict lower, ///< Lower bounds for the bins
    178176                        const psVector *restrict upper, ///< Upper bounds for the bins
    179                         float minVal, ///< Minimum value
    180                         float maxVal ///< Maximum value
     177                        float minVal,                   ///< Minimum value
     178                        float maxVal                    ///< Maximum value
    181179                       );
    182180
    183181/** Destructor \ingroup MathGroup **/
    184182void
    185 psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy
     183psHistogramFree(psHistogram *restrict myHist          ///< Histogram to destroy
    186184               );
    187185
     
    189187/** Calculate a histogram \ingroup MathGroup **/
    190188psHistogram *
    191 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data
     189psGetArrayHistogram(psHistogram *restrict myHist,     ///< Histogram data
    192190                    const psVector *restrict myVector ///< Vector to analyse
    193191                   );
Note: See TracChangeset for help on using the changeset viewer.