Changeset 1398
- Timestamp:
- 10/24/07 15:57:31 (17 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/RowAccumulator.cpp
r1352 r1398 44 44 Vector<Bool> dummymsk(m.nelements(), True); 45 45 spectrum_.setData(dummy, dummymsk); 46 n_.setData(Vector< Float>(v.nelements(), 0.0), dummymsk);46 n_.setData(Vector<uInt>(v.nelements(), 0), dummymsk); 47 47 weightSum_.setData(Vector<Float>(v.nelements(), 0.0), dummymsk); 48 48 tsysSum_.resize(tsys.nelements()); tsysSum_=0.0; … … 79 79 weightSum_ += wadd; 80 80 spectrum_ += data; 81 const MaskedArray< Float> inc(Vector<Float>(m.nelements(),1.0), m);81 const MaskedArray<uInt> inc(Vector<uInt>(m.nelements(),1), m); 82 82 n_ += inc; 83 83 } … … 125 125 casa::Double asap::RowAccumulator::getTime( ) const 126 126 { 127 Float n = max(n_); 128 if (n < 1.0) n = 1.0; 129 return timeSum_/n; 127 uInt n = max(n_); 128 return timeSum_/Float(n); 130 129 } 131 130 … … 138 137 { 139 138 // Return the "total" mask - False where no points have been accumulated. 140 return (n_.getArray() > Float(0.0));139 return (n_.getArray() > uInt(0)); 141 140 } 142 141 … … 144 143 { 145 144 // @fixme this assumes tsys.nelements() == 1 146 return tsysSum_/ max(n_);145 return tsysSum_/Float(max(n_)); 147 146 } 148 147 -
trunk/src/RowAccumulator.h
r1353 r1398 99 99 //these are Vectors 100 100 casa::MaskedArray<casa::Float> spectrum_; 101 casa::MaskedArray<casa::Float> n_, weightSum_; 101 casa::MaskedArray<casa::Float> weightSum_; 102 casa::MaskedArray<casa::uInt> n_; 102 103 103 104 casa::Vector<casa::Bool> userMask_;
Note:
See TracChangeset
for help on using the changeset viewer.