Changeset 1333 for trunk/src/STMath.cpp
- Timestamp:
- 04/18/07 16:18:40 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r1321 r1333 137 137 ROScalarColumn<Double> mjdCol, intCol; 138 138 ROScalarColumn<Int> scanIDCol; 139 140 Vector<uInt> rowstodelete; 139 141 140 142 for (uInt i=0; i < tout.nrow(); ++i) { … … 180 182 } 181 183 } 184 const Vector<Bool>& msk = acc.getMask(); 185 if ( allEQ(msk, False) ) { 186 uint n = rowstodelete.nelements(); 187 rowstodelete.resize(n+1, True); 188 rowstodelete[n] = i; 189 continue; 190 } 191 cout << "write "<< i << endl; 182 192 //write out 183 specColOut.put(i, acc.getSpectrum());184 const Vector<Bool>& msk = acc.getMask();185 193 Vector<uChar> flg(msk.shape()); 186 194 convertArray(flg, !msk); 187 195 flagColOut.put(i, flg); 196 specColOut.put(i, acc.getSpectrum()); 188 197 tsysColOut.put(i, acc.getTsys()); 189 198 intColOut.put(i, acc.getInterval()); … … 194 203 cycColOut.put(i, uInt(0)); 195 204 acc.reset(); 205 } 206 if (rowstodelete.nelements() > 0) { 207 cout << rowstodelete << endl; 208 tout.removeRow(rowstodelete); 209 if (tout.nrow() == 0) { 210 throw(AipsError("Can't average fully flagged data.")); 211 } 196 212 } 197 213 return out;
Note:
See TracChangeset
for help on using the changeset viewer.