Commits

Kumar Golap authored and Ville Suoranta committed 0ee73ea084d Merge
Pull request #816: CAS-13984

Merge in CASA/casa6 from CAS-13984 to master * commit 'd07bbe948ef122c157853c403f1e7d78ee56a06f': Fix a bug with a null visiter when it was not necessary to use it.

casatools/src/code/msvis/MSVis/VisBufferUtil.cc

Modified
1028 1028 //cerr << std::setprecision(12) <<"msid " << oldPCMSId_p << " time "<< timeph << " val " << retval.toString() << endl;
1029 1029
1030 1030 return retval;
1031 1031
1032 1032
1033 1033
1034 1034 }
1035 1035
1036 1036
1037 1037 MDirection VisBufferUtil::getEphemBasedPhaseDir(const vi::VisBuffer2& vb, const String& ephemPath, const MDirection&refDir, const Double t){
1038 - MEpoch ep(Quantity(t, "s"), vb.getVi()->getImpl()->getEpoch().getRef());
1039 - mframe_.resetEpoch(ep);
1038 +
1039 +
1040 1040 if(!Table::isReadable(ephemPath, False))
1041 1041 return refDir;
1042 + if(!(vb.getVi()->getImpl())){
1043 + throw(AipsError("VisibilityIterator is not attached to an ms"));
1044 + }
1045 + MEpoch ep(Quantity(t, "s"), vb.getVi()->getImpl()->getEpoch().getRef());
1046 + mframe_.resetEpoch(ep);
1042 1047 MeasComet mcomet(Path(ephemPath).absoluteName());
1043 1048 mframe_.set(mcomet);
1044 1049 MDirection::Ref outref1(MDirection::AZEL, mframe_);
1045 1050 MDirection tmpazel=MDirection::Convert(MDirection(MDirection::COMET), outref1)();
1046 1051 MDirection::Types outtype=(MDirection::Types) refDir.getRef().getType();
1047 1052 MDirection::Ref outref(outtype, mframe_);
1048 1053 MDirection outdir=MDirection::Convert(tmpazel, outref)();
1049 1054 MVDirection mvoutdir(outdir.getAngle());
1050 1055 MVDirection mvrefdir(refDir.getAngle());
1051 1056 //copying what ROMSFieldColumns::extractDirMeas does

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

Add shortcut