Index: trunk/ppMerge/src/ppMergeScaleZero.c
===================================================================
--- trunk/ppMerge/src/ppMergeScaleZero.c	(revision 9824)
+++ trunk/ppMerge/src/ppMergeScaleZero.c	(revision 9907)
@@ -11,27 +11,4 @@
 #include "ppMerge.h"
 #include "ppMergeScaleZero.h"
-
-// Extract a particular statistic from the stats
-static inline double getStat(const psStats *stats, // Statistics structure
-                             psStatsOptions option // Statistic option to return
-    )
-{
-    switch (option) {
-      case PS_STAT_SAMPLE_MEAN:
-        return stats->sampleMean;
-      case PS_STAT_SAMPLE_MEDIAN:
-        return stats->sampleMedian;
-      case PS_STAT_ROBUST_MEDIAN:
-        return stats->robustMedian;
-      case PS_STAT_FITTED_MEAN:
-        return stats->fittedMean;
-      case PS_STAT_CLIPPED_MEAN:
-        return stats->clippedMean;
-      default:
-        psAbort(__func__, "Invalid statistics option: %x\n", option);
-    }
-    return NAN;                         // Token return
-}
-
 
 // Get the scale and zero for each chip of each input
@@ -262,5 +239,5 @@
                     psFree(sample);
                     psFree(sampleMask);
-                    background->data.F32[i][cellNum] = getStat(bgStats, options->mean);
+                    background->data.F32[i][cellNum] = psStatsGetValue(bgStats, options->mean);
                     psTrace("ppMerge", 3, "Background for %s, cell %d is %f\n", name, cellNum,
                             background->data.F32[i][cellNum]);
