Index: trunk/archive/pslib/include/psStats.h
===================================================================
--- trunk/archive/pslib/include/psStats.h	(revision 671)
+++ trunk/archive/pslib/include/psStats.h	(revision 753)
@@ -12,49 +12,44 @@
     PS_STAT_SAMPLE_MEDIAN         = 0x000002,
     PS_STAT_SAMPLE_STDEV          = 0x000004,
-    PS_STAT_SAMPLE_UQ 		  = 0x000008, 
-    PS_STAT_SAMPLE_LQ 		  = 0x000010,
-    PS_STAT_ROBUST_MEAN           = 0x000020,
-    PS_STAT_ROBUST_MEAN_NVALUES   = 0x000040,
-    PS_STAT_ROBUST_MEDIAN         = 0x000080,
-    PS_STAT_ROBUST_MEDIAN_NVALUES = 0x000100,
-    PS_STAT_ROBUST_MODE           = 0x000200,
-    PS_STAT_ROBUST_MODE_NVALUES   = 0x000400,
-    PS_STAT_ROBUST_STDEV          = 0x000800,
-    PS_STAT_ROBUST_UQ 		  = 0x001000, 
-    PS_STAT_ROBUST_LQ 		  = 0x002000,
-    PS_STAT_CLIPPED_MEAN          = 0x004000,
-    PS_STAT_CLIPPED_MEAN_NVALUES  = 0x008000,
-    PS_STAT_CLIPPED_MEAN_NSIGMA   = 0x010000,
-    PS_STAT_CLIPPED_STDEV         = 0x020000,
-    PS_STAT_MAX     		  = 0x040000,     
-    PS_STAT_MIN     		  = 0x080000,
-    PS_STAT_NVALUES 		  = 0x100000
+    PS_STAT_SAMPLE_QUARTILE       = 0x000008, 
+    PS_STAT_ROBUST_MEAN           = 0x000010,
+    PS_STAT_ROBUST_MEDIAN         = 0x000020,
+    PS_STAT_ROBUST_MODE           = 0x000040,
+    PS_STAT_ROBUST_STDEV          = 0x000080,
+    PS_STAT_ROBUST_QUARTILE       = 0x000100, 
+    PS_STAT_CLIPPED_MEAN          = 0x000200,
+    PS_STAT_CLIPPED_STDEV         = 0x000400,
+    PS_STAT_MAX                   = 0x000800,     
+    PS_STAT_MIN                   = 0x001000,
+    PS_STAT_USE_RANGE             = 0x002000,
+    PS_STAT_USE_BINSIZE           = 0x004000,
+    PS_STAT_ROBUST_FOR_SAMPLE     = 0x008000
 } psStatsOptions;    			  
 
 /** generic statistics structure */
 typedef struct {
-    double sampleMean;			///< formal mean of sample
-    double sampleMedian;		///< formal median of sample
-    double sampleStdev;			///< standard deviation of sample
-    double sampleUQ;			///< upper quartile of sample
-    double sampleLQ;			///< lower quartile of sample
-    double robustMean;			///< robust mean of data
-    int    robustMeanNvalues;		///< number of measurements used for robust mean
-    double robustMedian;		///< robust median of data
-    int    robustMedianNvalues;		///< number of measurements used for robust median
-    double robustMode;			///< Robust mode of data
-    int    robustModeNvalues;		///< Number of measurements used for robust mode
-    double robustStdev;			///< robust standard deviation of data
-    double robustUQ;			///< robust upper quartile
-    double robustLQ;			///< robust lower quartile
-    double clippedMean;			///< Nsigma clipped mean
-    int    clippedMeanNvalues;		///< number of data points used for clipped mean
-    double clippedStdev;		///< standard deviation after clipping
-    double clipSigma;			///< Nsigma used for clipping; user input
-    int    clipIter;			///< Number of clipping iterations; user input
-    double min;				///< minimum data value in data
-    double max;				///< maximum data value in data
-    int    nValues;			///< number of data values in data
-    psStatsOptions options;		///< bitmask of calculated values
+    double sampleMean;                  ///< formal mean of sample
+    double sampleMedian;                ///< formal median of sample
+    double sampleStdev;                 ///< standard deviation of sample
+    double sampleUQ;                    ///< upper quartile of sample
+    double sampleLQ;                    ///< lower quartile of sample
+    double sampleLimit;                 ///< Number of datapoints to 
+    double robustMean;                  ///< robust mean of data
+    double robustMedian;                ///< robust median of data
+    double robustMode;                  ///< Robust mode of data
+    double robustStdev;                 ///< robust standard deviation of data
+    double robustUQ;                    ///< robust upper quartile
+    double robustLQ;                    ///< robust lower quartile
+    int    robustN50;                   ///< Number of points UQ-LQ
+    int    robustNfit;                  ///< Number of points in Gauss. fit
+    double clippedMean;                 ///< Nsigma clipped mean
+    double clippedStdev;                ///< standard deviation after clipping
+    int    clippedNvalues;              ///< number of data points used for clipped mean
+    double clipSigma;                   ///< Nsigma used for clipping; user input
+    int    clipIter;                    ///< Number of clipping iterations; user input
+    double min;                         ///< minimum data value in data; input range
+    double max;                         ///< maximum data value in data; input range
+    double binsize;		        ///< binsize for robust fit (input/output)
+    psStatsOptions options;             ///< bitmask of calculated values
 } psStats;
 
@@ -85,5 +80,4 @@
     const psVector *restrict bounds;	///< Bounds for the bins
     psVector *nums;			///< Number in each of the bins
-    const float minVal, maxVal;		///< Minimum and maximum values
     int minNum, maxNum;			///< Number below the minimum and above the maximum
     int uniform;			///< Is it a uniform distribution?
@@ -99,7 +93,5 @@
 /** Generic constructor \ingroup MathGroup */
 psHistogram *
-psHistogramAllocGeneric(const psVector *restrict bounds, ///< Bounds for the bins
-			float minVal,	///< Minimum value
-			float maxVal)	///< Maximum value
+psHistogramAllocGeneric(const psVector *restrict bounds) ///< Bounds for the bins
 ;
 
@@ -112,5 +104,5 @@
 /** Calculate a histogram \ingroup MathGroup **/
 psHistogram *
-psVectorHistogram(psHistogram *restrict myHist, ///< Histogram data
+psHistogramVector(psHistogram *restrict myHist, ///< Histogram data
 		  const psVector *restrict myArray) ///< Array to analyse
 ;
