Changeset 9907 for trunk/ppMerge/src/ppMergeScaleZero.c
- Timestamp:
- Nov 7, 2006, 5:34:39 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeScaleZero.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeScaleZero.c
r9824 r9907 11 11 #include "ppMerge.h" 12 12 #include "ppMergeScaleZero.h" 13 14 // Extract a particular statistic from the stats15 static inline double getStat(const psStats *stats, // Statistics structure16 psStatsOptions option // Statistic option to return17 )18 {19 switch (option) {20 case PS_STAT_SAMPLE_MEAN:21 return stats->sampleMean;22 case PS_STAT_SAMPLE_MEDIAN:23 return stats->sampleMedian;24 case PS_STAT_ROBUST_MEDIAN:25 return stats->robustMedian;26 case PS_STAT_FITTED_MEAN:27 return stats->fittedMean;28 case PS_STAT_CLIPPED_MEAN:29 return stats->clippedMean;30 default:31 psAbort(__func__, "Invalid statistics option: %x\n", option);32 }33 return NAN; // Token return34 }35 36 13 37 14 // Get the scale and zero for each chip of each input … … 262 239 psFree(sample); 263 240 psFree(sampleMask); 264 background->data.F32[i][cellNum] = getStat(bgStats, options->mean);241 background->data.F32[i][cellNum] = psStatsGetValue(bgStats, options->mean); 265 242 psTrace("ppMerge", 3, "Background for %s, cell %d is %f\n", name, cellNum, 266 243 background->data.F32[i][cellNum]);
Note:
See TracChangeset
for help on using the changeset viewer.
