Changeset 176
- Timestamp:
- 01/07/05 11:18:03 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MathUtils.cc
r137 r176 31 31 32 32 #include <casa/aips.h> 33 #include <casa/Arrays/Vector.h> 33 34 #include <casa/Arrays/MaskedArray.h> 34 35 #include <casa/Arrays/MaskArrMath.h> … … 38 39 39 40 using namespace casa; 40 //using namespace asap;41 41 42 42 43 43 44 float mathutil::statistics (const std::string& which, const MaskedArray<Float>& data)44 float mathutil::statistics (const String& which, const MaskedArray<Float>& data) 45 45 { 46 46 String str(which); … … 70 70 } 71 71 72 73 void mathutil::replaceMaskByZero (Vector<Float>& data, const Vector<Bool>& mask) 74 { 75 for (uInt i=0; i<data.nelements(); i++) { 76 if (!mask[i]) data[i] = 0.0; 77 } 78 } 79 -
trunk/src/MathUtils.h
r136 r176 38 38 39 39 template <class T> 40 41 // Hanning smoothing 40 42 void hanning(casa::Vector<T>& out, casa::Vector<casa::Bool>& outmask, 41 43 const casa::Vector<T>& in, const casa::Vector<casa::Bool>& mask, 42 44 casa::Bool relaxed=False, casa::Bool ignoreOther=False); 43 45 44 float statistics (const std::string& which, const casa::MaskedArray<casa::Float>& data); 46 // Generate specified statistic 47 float statistics (const casa::String& which, const casa::MaskedArray<casa::Float>& data); 48 49 // Replace masked value by zero 50 void replaceMaskByZero (casa::Vector<casa::Float>& data, const casa::Vector<casa::Bool>& mask); 45 51 }; 46 52
Note:
See TracChangeset
for help on using the changeset viewer.