Changeset 1514 for branches/alma/src/MathUtils.cpp
- Timestamp:
- 02/23/09 20:55:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/src/MathUtils.cpp
r1446 r1514 76 76 } 77 77 78 IPosition mathutil::minMaxPos(const String& which, 79 const MaskedArray<Float>& data) 80 { 81 Float minVal, maxVal; 82 IPosition minPos(data.ndim(), 0), maxPos(data.ndim(), 0); 83 minMax(minVal, maxVal, minPos, maxPos, data); 84 String str(which); 85 str.upcase(); 86 if (str.matches(String("MINPOS"))) { 87 return minPos; 88 } else if (str.matches(String("MAXPOS"))) { 89 return maxPos; 90 } else { 91 String msg = str + " is not a valid type of statistics"; 92 throw(AipsError(msg)); 93 } 94 //return 0.0; 95 } 78 96 79 97 void mathutil::replaceMaskByZero(Vector<Float>& data, const Vector<Bool>& mask)
Note: See TracChangeset
for help on using the changeset viewer.