Changeset 7278 for trunk/psModules/src/imcombine/pmReadoutCombine.c
- Timestamp:
- Jun 1, 2006, 2:55:23 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmReadoutCombine.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmReadoutCombine.c
r7259 r7278 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-06-0 1 03:39:15$7 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-06-02 00:55:23 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 30 30 ) 31 31 { 32 assert(stats); 33 32 34 switch (option) { 33 35 case PS_STAT_SAMPLE_MEAN: … … 96 98 if (zero) { 97 99 PS_ASSERT_VECTOR_TYPE(zero, PS_TYPE_F32, false); 98 if (zero->n != inputs->n) { 99 psError(PS_ERR_UNKNOWN, true, "Zero vector has incorrect size (%d vs %d).\n", 100 zero->n, inputs->n); 101 return false; 102 } 100 PS_ASSERT_VECTOR_SIZE(zero, inputs->n, false); 103 101 } 104 102 if (scale) { 105 103 PS_ASSERT_VECTOR_TYPE(scale, PS_TYPE_F32, false); 106 if (scale->n != inputs->n) { 107 psError(PS_ERR_UNKNOWN, true, "Scale vector has incorrect size (%d vs %d).\n", 108 scale->n, inputs->n); 109 return false; 110 } 111 } 112 assert(params->fracLow >= 0.0 && params->fracLow < 1.0); 113 assert(params->fracHigh >= 0.0 && params->fracHigh < 1.0); 114 assert(params->combine == PS_STAT_SAMPLE_MEAN || 115 params->combine == PS_STAT_SAMPLE_MEDIAN || 116 params->combine == PS_STAT_ROBUST_MEDIAN || 117 params->combine == PS_STAT_FITTED_MEAN || 118 params->combine == PS_STAT_CLIPPED_MEAN); 104 PS_ASSERT_VECTOR_SIZE(scale, inputs->n, false); 105 } 106 PS_ASSERT_FLOAT_WITHIN_RANGE(params->fracLow, 0.0, 1.0, false); 107 PS_ASSERT_FLOAT_WITHIN_RANGE(params->fracHigh, 0.0, 1.0, false); 108 if (params->combine != PS_STAT_SAMPLE_MEAN && params->combine != PS_STAT_SAMPLE_MEDIAN && 109 params->combine != PS_STAT_ROBUST_MEDIAN && params->combine != PS_STAT_FITTED_MEAN && 110 params->combine != PS_STAT_CLIPPED_MEAN) { 111 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Combination method is not SAMPLE_MEAN, SAMPLE_MEDIAN, " 112 "ROBUST_MEDIAN, FITTED_MEAN or CLIPPED_MEAN.\n"); 113 return false; 114 } 119 115 120 116 psStats *stats = psStatsAlloc(params->combine); // The statistics to use in the combination
Note:
See TracChangeset
for help on using the changeset viewer.
