Commits

David Mehringer authored 4c3f2e991ad
StatWtTVI bug fixes
No tags

code/mstransform/TVI/StatWtTVI.cc

Modified
258 258 auto spw = spws[i];
259 259 blcb.spw = spw;
260 260 auto bins = _chanBins.find(spw)->second;
261 261 auto biter = bins.begin();
262 262 auto bend = bins.end();
263 263 blc[2] = i;
264 264 trc[2] = i;
265 265 for (; biter!=bend; ++biter) {
266 266 blc[1] = biter->start;
267 267 trc[1] = biter->end;
268 - if (_weights.find(blcb)->second == 0) {
269 - flagCube(blc, trc) = True;
270 - }
268 + blcb.chanBin = *biter;
269 + flagCube(blc, trc) = _weights.find(blcb)->second == 0;
271 270 }
272 271 }
273 272 _newFlag = flagCube.copy();
274 273 }
275 274
276 275 void StatWtTVI::flagRow (Vector<Bool>& flagRow) const {
277 276 ThrowIf(! _weightsComputed, "Weights have not been computed yet");
278 277 if (! _newFlagRow.empty()) {
279 278 flagRow = _newFlagRow.copy();
280 279 return;
281 280 }
282 281 Cube<Bool> flags;
283 282 flag(flags);
284 283 getVii()->flagRow(flagRow);
285 284 auto nrows = nRows();
286 285 for (Int i=0; i<nrows; ++i) {
287 - flagRow[i] = anyTrue(flags.xyPlane(i));
286 + flagRow[i] = allTrue(flags.xyPlane(i));
288 287 }
289 288 _newFlagRow = flagRow.copy();
290 289 }
291 290
292 291 void StatWtTVI::originChunks(Bool forceRewind) {
293 292 // Drive next lower layer
294 293 getVii()->originChunks(forceRewind);
295 294 _weightsComputed = False;
296 295 _gatherAndComputeWeights();
297 296 _weightsComputed = True;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut