Commits
Ville Suoranta authored 09899e7025f Merge
260 260 | for (uInt iant=0;iant<ants.nelements();++iant) { |
261 261 | Int thisant=ants(iant); |
262 262 | blc(2)=trc(2)=thisant; // the MS antenna index (not loop index) |
263 263 | Array<Float> currtsys(tsys.xyPlane(iant)); |
264 264 | solveAllRPar()(blc,trc).nonDegenerate(2)=currtsys; |
265 265 | solveAllParOK()(blc,trc)=true; |
266 266 | |
267 267 | // Increment tsys counter |
268 268 | ++tsyscount(ispw,thisant); |
269 269 | |
270 - | negTsys(ispw,thisant)+=ntrue(currtsys<FLT_MIN); |
270 + | negTsys(ispw,thisant)+=nfalse(currtsys>=FLT_MIN); |
271 271 | |
272 272 | // Issue warnings for completely bogus Tsys spectra (per pol) |
273 273 | for (Int ipol=0;ipol<npol;++ipol) { |
274 - | if (nfalse(Matrix<Float>(currtsys).row(ipol)<FLT_MIN)==0) |
274 + | if (ntrue(Matrix<Float>(currtsys).row(ipol)>=FLT_MIN)==0) |
275 275 | logSink() << " Tsys data for ant id=" |
276 276 | << thisant << " (pol=" << ipol<< ")" |
277 277 | << " in spw " << ispw |
278 278 | << " at t=" << MVTime(refTime()/C::day).string(MVTime::YMD,7) |
279 279 | << " are all negative or zero will be entirely flagged." |
280 280 | << LogIO::WARN << LogIO::POST; |
281 281 | } |
282 282 | } |
283 283 | // Flag any Tsys<=0.0 |
284 284 | |
285 - | LogicalArray mask((solveAllRPar()<FLT_MIN)); |
286 - | MaskedArray<Bool> negs(solveAllParOK(),mask); |
285 + | LogicalArray mask((solveAllRPar()>=FLT_MIN)); |
286 + | MaskedArray<Bool> negs(solveAllParOK(),!mask); |
287 287 | negs=false; |
288 288 | |
289 289 | Bool uniform=True; |
290 290 | if (specify.isDefined("uniform")) |
291 291 | uniform=specify.asBool("uniform"); |
292 292 | |
293 293 | if (uniform) |
294 294 | keepNCT(); |
295 295 | else |
296 296 | keepNCT(ants); |