Changeset 2829
- Timestamp:
- 07/31/13 12:22:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r2818 r2829 128 128 ScalarColumn<uInt> cycColOut(tout,"CYCLENO"); 129 129 ScalarColumn<uInt> scanColOut(tout,"SCANNO"); 130 ScalarColumn<uInt> flagRowColOut(tout,"FLAGROW"); 130 131 131 132 // set up the output table rows. These are based on the structure of the … … 141 142 ROScalarColumn<Double> mjdCol, intCol; 142 143 ROScalarColumn<Int> scanIDCol; 144 ROScalarColumn<uInt> flagRowCol; 143 145 144 146 //Vector<uInt> rowstodelete; … … 240 242 intCol.attach(baset,"INTERVAL"); 241 243 mjdCol.attach(baset,"TIME"); 244 flagRowCol.attach(baset,"FLAGROW"); 242 245 Vector<Float> spec,tsys; 243 246 Vector<uChar> flag; 244 247 Double inter,time; 248 uInt flagRow; 245 249 246 250 for (uInt l = 0; l < rows.nelements(); ++l ) { … … 248 252 flagCol.get(k, flag); 249 253 Vector<Bool> bflag(flag.shape()); 250 convertArray(bflag, flag); 254 flagRowCol.get(k, flagRow); 255 if (flagRow > 0) 256 bflag = true; 257 else 258 convertArray(bflag, flag); 251 259 /* 252 260 if ( allEQ(bflag, True) ) { … … 334 342 intCol.attach(subt,"INTERVAL"); 335 343 mjdCol.attach(subt,"TIME"); 344 flagRowCol.attach(subt,"FLAGROW"); 336 345 for (uInt k = 0; k < subt.nrow(); ++k ) { 337 346 flagCol.get(k, flag); 338 347 Vector<Bool> bflag(flag.shape()); 339 convertArray(bflag, flag); 348 flagRowCol.get(k, flagRow); 349 if (flagRow > 0) 350 bflag = true; 351 else 352 convertArray(bflag, flag); 340 353 /* 341 354 if ( allEQ(bflag, True) ) { … … 387 400 // which requires resetting this value 388 401 cycColOut.put(i, uInt(0)); 402 // completely flagged rows are removed anyway 403 flagRowColOut.put(i, uInt(0)); 389 404 } else { 390 405 os << "For output row="<<i<<", all input rows of data are flagged. no averaging" << LogIO::POST;
Note:
See TracChangeset
for help on using the changeset viewer.