- Timestamp:
- 12/18/06 16:37:04 (18 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/RowAccumulator.cpp
r979 r1314 13 13 14 14 #include <casa/Arrays/MaskArrMath.h> 15 #include <casa/Arrays/MaskArrLogi.h> 15 16 #include <casa/Arrays/ArrayMath.h> 17 #include <casa/Arrays/ArrayLogical.h> 16 18 #include "RowAccumulator.h" 17 19 … … 40 42 if (!initialized_) { 41 43 Vector<Float> dummy(v.nelements(), 0.0); 42 spectrum_.setData(dummy, Vector<Bool>(m.nelements(), True)); 43 n_.setData(Vector<Float>(v.nelements(), 0.0), m); 44 weightSum_.setData(Vector<Float>(v.nelements(), 0.0), m); 44 Vector<Bool> dummymsk(m.nelements(), True); 45 spectrum_.setData(dummy, dummymsk); 46 n_.setData(Vector<Float>(v.nelements(), 0.0), dummymsk); 47 weightSum_.setData(Vector<Float>(v.nelements(), 0.0), dummymsk); 45 48 tsysSum_.resize(tsys.nelements()); tsysSum_=0.0; 46 49 } … … 48 51 Float totalweight = 1.0; 49 52 totalweight *= addTsys(tsys); 50 totalweight *= addInterval(interval); 51 addTime(time); 53 // only add these if not everything masked 54 if ( !allEQ(m, False) ) { 55 totalweight *= addInterval(interval); 56 addTime(time); 57 } 52 58 addSpectrum(v, m, totalweight); 53 59 initialized_ = True; … … 134 140 casa::Vector< casa::Float > asap::RowAccumulator::getTsys( ) const 135 141 { 136 // @fixme this assum mes tsys.nelements() == 1142 // @fixme this assumes tsys.nelements() == 1 137 143 return tsysSum_/max(n_); 138 144 } -
trunk/src/STMath.cpp
r1308 r1314 167 167 Vector<Bool> bflag(flag.shape()); 168 168 convertArray(bflag, flag); 169 /* 169 170 if ( allEQ(bflag, True) ) { 170 171 continue;//don't accumulate 171 172 } 173 */ 172 174 specCol.get(k, spec); 173 175 tsysCol.get(k, tsys);
Note:
See TracChangeset
for help on using the changeset viewer.