diff --git a/CEP/DP3/DPPP/configure.in b/CEP/DP3/DPPP/configure.in index 900306d786aeefc4bcc011e4fe94f0a5d34e1bec..2fd590921eefefb4a08a041023f9f9046155b430 100644 --- a/CEP/DP3/DPPP/configure.in +++ b/CEP/DP3/DPPP/configure.in @@ -50,8 +50,12 @@ dnl Check for LOFAR specific things dnl lofar_GENERAL(1) lofar_AIPSPP(1) -lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypes.h) -lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h) +lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypes.h,,) +lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h,,) +lofar_INTERNAL(LCS/Blob,Blob,,1,Blob/BlobHeader.h,,) +lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) +lofar_INTERNAL(CEP/Imager/MWCommon,MWCommon,,1,MWCommon/ClusterDesc.h,,) +lofar_INTERNAL(CEP/MS,MS,,1,MS/VdsMaker.h,bbms,) dnl dnl Output Makefiles diff --git a/CEP/DP3/DPPP/include/DPPP/MsFile.h b/CEP/DP3/DPPP/include/DPPP/MsFile.h index 8c49a5fad5cecced16302b54958bf8e7b1e199f6..9beb77a378f63c01a5d318a0806f589d8b1255dd 100644 --- a/CEP/DP3/DPPP/include/DPPP/MsFile.h +++ b/CEP/DP3/DPPP/include/DPPP/MsFile.h @@ -47,7 +47,7 @@ namespace LOFAR /// Iterator to process all data from one integration time at the same time casa::TableIterator TimeIterator(); /// creates a new measurement set - void Init(MsInfo& Info, RunDetails& Details); + void Init(MsInfo& Info, RunDetails& Details, int Squashing); void PrintInfo(void); ///< prints some numbers for debug purposes /// processes the tables from TimeIterator to fill the next timeslot to be processed in DataBuffer void UpdateTimeslotData(casa::TableIterator& Data_iter, diff --git a/CEP/DP3/DPPP/include/DPPP/PipelineProcessControl.h b/CEP/DP3/DPPP/include/DPPP/PipelineProcessControl.h index 8d6c7afe1f7869a101bd53c07d0fc0743efc4a43..a0c8743e1bda138fd792233182cb40c4aafeb024 100644 --- a/CEP/DP3/DPPP/include/DPPP/PipelineProcessControl.h +++ b/CEP/DP3/DPPP/include/DPPP/PipelineProcessControl.h @@ -48,6 +48,7 @@ namespace LOFAR private: std::string itsInMS; ///< Name and location of input MS std::string itsOutMS; ///< Name and location of output MS + std::string itsClusterDesc; ///< Name and location of ClusterDesc file unsigned int itsBandpass; ///< from ParameterSet unsigned int itsFlagger; ///< From ParameterSet unsigned int itsSquasher; ///< From ParameterSet diff --git a/CEP/DP3/DPPP/src/MsFile.cc b/CEP/DP3/DPPP/src/MsFile.cc index ee0f1ce4f1a453e9f08159feafe8db64cf346375..b3debf360a137cf417735d21bb0a1c5cc3a3da60 100644 --- a/CEP/DP3/DPPP/src/MsFile.cc +++ b/CEP/DP3/DPPP/src/MsFile.cc @@ -92,7 +92,7 @@ void MsFile::TableResize(TableDesc tdesc, IPosition ipos, string name, Table& ta } //===============>>> MsFile::PrintInfo <<<=============== -void MsFile::Init(MsInfo& Info, RunDetails& Details) +void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing) { cout << "Please wait, preparing output MS" << endl; Block<String> tempblock(SELECTblock); @@ -115,8 +115,17 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details) Vector<Int> temp_pos = ipos.asVector(); std::cout << "Old shape: " << temp_pos(0) << ":" << temp_pos(1) << std::endl; int old_nchan = temp_pos(1); - int new_nchan = Details.NChan/Details.Step; - temp_pos(1) = new_nchan; + int new_nchan; + if (Squashing) + { new_nchan = Details.NChan/Details.Step; + temp_pos(1) = new_nchan; + } + else + { new_nchan = old_nchan; + Details.NChan = old_nchan; + Details.Step = 1; + Details.Start = 0; + } std::cout << "New shape: " << temp_pos(0) << ":" << temp_pos(1) << std::endl; IPosition data_ipos(temp_pos); diff --git a/CEP/DP3/DPPP/src/PipelineProcessControl.cc b/CEP/DP3/DPPP/src/PipelineProcessControl.cc index 5db45fb64ed0456690300965cfb1cfb6a659cbb1..1cf89349cfa463399de584209e9e9d129dc34084 100644 --- a/CEP/DP3/DPPP/src/PipelineProcessControl.cc +++ b/CEP/DP3/DPPP/src/PipelineProcessControl.cc @@ -23,6 +23,8 @@ #include <casa/Inputs/Input.h> #include <ms/MeasurementSets.h> +#include <MS/VdsMaker.h> + #include <DPPP/PipelineProcessControl.h> #include <DPPP/MsInfo.h> #include <DPPP/MsFile.h> @@ -39,6 +41,7 @@ #define PIPELINE_VERSION "0.23" // 0.23 Added AbsoluteThreshold for MADFlagger +// 0.24 Added writing VDS file namespace LOFAR { @@ -83,6 +86,7 @@ namespace LOFAR myDetails->TimeStep = ParamSet->getUint32("timestep", 1); //DataSquasher itsInMS = ParamSet->getString("msin"); itsOutMS = ParamSet->getString("msout"); + itsClusterDesc = ParamSet->getString("clusterdesc"); itsBandpass = ParamSet->getUint32("bandpass", 0); itsFlagger = ParamSet->getUint32("flagger", 0); itsSquasher = ParamSet->getUint32("squasher", 0); @@ -98,12 +102,15 @@ namespace LOFAR { try{ std::cout << "Runnning pipeline please wait..." << std::endl; - myFile->Init(*myInfo, *myDetails); + myFile->Init(*myInfo, *myDetails, itsSquasher); MsInfo* outInfo = new MsInfo(itsOutMS); outInfo->Update(); outInfo->PrintInfo(); myPipeline->Run(outInfo, myDetails->Columns); delete outInfo; + if (!itsClusterDesc.empty()) + { LOFAR::VdsMaker::create (itsClusterDesc, itsOutMS + ".vds", itsOutMS, "", true); + } } catch(casa::AipsError& err) {