Changeset 1398 for trunk/src/RowAccumulator.cpp
- Timestamp:
- 10/24/07 15:57:31 (17 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.