From 198a24338975a7156e7135786cb0e2e462ead8b2 Mon Sep 17 00:00:00 2001 From: Ger van Diepen <diepen@astron.nl> Date: Wed, 14 Jun 2006 12:28:56 +0000 Subject: [PATCH] BugID: 711 Use new ParmDB layout Added preliminary support for gaussian sources Added support for parmexpr --- .gitattributes | 48 +++++ CEP/BB/BBS/src/MNS/MeqFunklet.cc | 3 +- CEP/BB/BBS/src/MNS/MeqLMN.cc | 4 +- CEP/BB/BBS/src/MNS/MeqLMN.h | 8 +- CEP/BB/BBS/src/MNS/MeqParmFunklet.cc | 29 ++- CEP/BB/BBS/src/MNS/MeqParmFunklet.h | 9 +- CEP/BB/BBS/src/MNS/MeqPointSource.cc | 22 +-- CEP/BB/BBS/src/MNS/MeqPointSource.h | 42 +---- CEP/BB/BBS/src/MNS/MeqSourceList.cc | 113 +++++++----- CEP/BB/BBS/src/MNS/MeqSourceList.h | 37 ++-- CEP/BB/BBS/src/Makefile.am | 6 + CEP/BB/BBS/src/Prediffer.cc | 173 +++++++++--------- CEP/BB/BBS/src/Prediffer.h | 2 +- .../DEFAULTVALUES/table.dat | Bin 0 -> 2205 bytes .../tParmMerge.in_mep1/DEFAULTVALUES/table.f0 | Bin 0 -> 7696 bytes .../DEFAULTVALUES/table.f0i | Bin 0 -> 197 bytes .../DEFAULTVALUES/table.info | 5 + .../DEFAULTVALUES/table.lock | Bin 0 -> 325 bytes .../tParmMerge.in_mep1/OLDVALUES/table.dat | Bin 0 -> 4600 bytes .../tParmMerge.in_mep1/OLDVALUES/table.f0 | Bin 0 -> 5124 bytes .../tParmMerge.in_mep1/OLDVALUES/table.f0i | Bin 0 -> 16 bytes .../tParmMerge.in_mep1/OLDVALUES/table.info | 3 + .../tParmMerge.in_mep1/OLDVALUES/table.lock | Bin 0 -> 325 bytes CEP/BB/BBS/test/tParmMerge.in_mep1/table.dat | Bin 0 -> 4717 bytes CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0 | Bin 0 -> 18960 bytes CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0i | Bin 0 -> 296 bytes CEP/BB/BBS/test/tParmMerge.in_mep1/table.info | 4 + CEP/BB/BBS/test/tParmMerge.in_mep1/table.lock | Bin 0 -> 325 bytes .../DEFAULTVALUES/table.dat | Bin 0 -> 2205 bytes .../tParmMerge.in_mep2/DEFAULTVALUES/table.f0 | Bin 0 -> 7696 bytes .../DEFAULTVALUES/table.f0i | Bin 0 -> 197 bytes .../DEFAULTVALUES/table.info | 5 + .../DEFAULTVALUES/table.lock | Bin 0 -> 325 bytes .../tParmMerge.in_mep2/OLDVALUES/table.dat | Bin 0 -> 4600 bytes .../tParmMerge.in_mep2/OLDVALUES/table.f0 | Bin 0 -> 5124 bytes .../tParmMerge.in_mep2/OLDVALUES/table.f0i | Bin 0 -> 16 bytes .../tParmMerge.in_mep2/OLDVALUES/table.info | 3 + .../tParmMerge.in_mep2/OLDVALUES/table.lock | Bin 0 -> 325 bytes CEP/BB/BBS/test/tParmMerge.in_mep2/table.dat | Bin 0 -> 4717 bytes CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0 | Bin 0 -> 18960 bytes CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0i | Bin 0 -> 880 bytes CEP/BB/BBS/test/tParmMerge.in_mep2/table.info | 4 + CEP/BB/BBS/test/tParmMerge.in_mep2/table.lock | Bin 0 -> 325 bytes CEP/BB/BBS/test/tPredSolv.cc | 24 +-- .../BBSKernel/include/BBSKernel/MNS/MeqLMN.h | 8 +- .../include/BBSKernel/MNS/MeqParmFunklet.h | 9 +- .../include/BBSKernel/MNS/MeqPointSource.h | 42 +---- .../include/BBSKernel/MNS/MeqSourceList.h | 37 ++-- .../BBSKernel/include/BBSKernel/Prediffer.h | 2 +- CEP/BB/BBSKernel/src/MNS/MeqFunklet.cc | 3 +- CEP/BB/BBSKernel/src/MNS/MeqLMN.cc | 4 +- CEP/BB/BBSKernel/src/MNS/MeqLMN.h | 8 +- CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.cc | 29 ++- CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.h | 9 +- CEP/BB/BBSKernel/src/MNS/MeqPointSource.cc | 22 +-- CEP/BB/BBSKernel/src/MNS/MeqPointSource.h | 42 +---- CEP/BB/BBSKernel/src/MNS/MeqSourceList.cc | 113 +++++++----- CEP/BB/BBSKernel/src/MNS/MeqSourceList.h | 37 ++-- CEP/BB/BBSKernel/src/Makefile.am | 6 + CEP/BB/BBSKernel/src/Prediffer.cc | 173 +++++++++--------- CEP/BB/BBSKernel/src/Prediffer.h | 2 +- .../DEFAULTVALUES/table.dat | Bin 0 -> 2205 bytes .../tParmMerge.in_mep1/DEFAULTVALUES/table.f0 | Bin 0 -> 7696 bytes .../DEFAULTVALUES/table.f0i | Bin 0 -> 197 bytes .../DEFAULTVALUES/table.info | 5 + .../DEFAULTVALUES/table.lock | Bin 0 -> 325 bytes .../tParmMerge.in_mep1/OLDVALUES/table.dat | Bin 0 -> 4600 bytes .../tParmMerge.in_mep1/OLDVALUES/table.f0 | Bin 0 -> 5124 bytes .../tParmMerge.in_mep1/OLDVALUES/table.f0i | Bin 0 -> 16 bytes .../tParmMerge.in_mep1/OLDVALUES/table.info | 3 + .../tParmMerge.in_mep1/OLDVALUES/table.lock | Bin 0 -> 325 bytes .../test/tParmMerge.in_mep1/table.dat | Bin 0 -> 4717 bytes .../test/tParmMerge.in_mep1/table.f0 | Bin 0 -> 18960 bytes .../test/tParmMerge.in_mep1/table.f0i | Bin 0 -> 296 bytes .../test/tParmMerge.in_mep1/table.info | 4 + .../test/tParmMerge.in_mep1/table.lock | Bin 0 -> 325 bytes .../DEFAULTVALUES/table.dat | Bin 0 -> 2205 bytes .../tParmMerge.in_mep2/DEFAULTVALUES/table.f0 | Bin 0 -> 7696 bytes .../DEFAULTVALUES/table.f0i | Bin 0 -> 197 bytes .../DEFAULTVALUES/table.info | 5 + .../DEFAULTVALUES/table.lock | Bin 0 -> 325 bytes .../tParmMerge.in_mep2/OLDVALUES/table.dat | Bin 0 -> 4600 bytes .../tParmMerge.in_mep2/OLDVALUES/table.f0 | Bin 0 -> 5124 bytes .../tParmMerge.in_mep2/OLDVALUES/table.f0i | Bin 0 -> 16 bytes .../tParmMerge.in_mep2/OLDVALUES/table.info | 3 + .../tParmMerge.in_mep2/OLDVALUES/table.lock | Bin 0 -> 325 bytes .../test/tParmMerge.in_mep2/table.dat | Bin 0 -> 4717 bytes .../test/tParmMerge.in_mep2/table.f0 | Bin 0 -> 18960 bytes .../test/tParmMerge.in_mep2/table.f0i | Bin 0 -> 880 bytes .../test/tParmMerge.in_mep2/table.info | 4 + .../test/tParmMerge.in_mep2/table.lock | Bin 0 -> 325 bytes CEP/BB/BBSKernel/test/tPredSolv.cc | 24 +-- 92 files changed, 638 insertions(+), 500 deletions(-) create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.dat create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0 create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0i create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.info create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.lock create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/table.dat create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0 create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0i create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/table.info create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep1/table.lock create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.dat create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0 create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0i create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.info create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.lock create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/table.dat create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0 create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0i create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/table.info create mode 100644 CEP/BB/BBS/test/tParmMerge.in_mep2/table.lock create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.dat create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0 create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0i create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.info create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.lock create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.dat create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0 create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0i create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.info create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.lock create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.dat create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0 create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0i create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.info create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.lock create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.dat create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0 create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0i create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.info create mode 100644 CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.lock diff --git a/.gitattributes b/.gitattributes index 7812b3d0e9e..80df140b1ae 100644 --- a/.gitattributes +++ b/.gitattributes @@ -26,6 +26,54 @@ 3rdparty/sourceforge/dtemplatelib/tests/tests.res -text svneol=unset#unset 3rdparty/sourceforge/dtemplatelib/tests/tests_build_sh.opt -text svneol=unset#unset 3rdparty/sourceforge/log4cplus/log4cplus-1.0.2.tar.gz -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/table.dat -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0 -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0i -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep1/table.lock -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/table.dat -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0 -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0i -text svneol=unset#unset +CEP/BB/BBS/test/tParmMerge.in_mep2/table.lock -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.dat -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0 -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0i -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.lock -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.dat -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0 -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0i -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.lock -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.dat -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0 -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0i -text svneol=unset#unset +CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.lock -text svneol=unset#unset CEP/BB/BB_GUI/make_jar.sh -text svneol=native#application/octet-stream CEP/BB/ParmFacade/test/tParmFacade.in_mep/DEFAULTVALUES/table.dat -text svneol=unset#unset CEP/BB/ParmFacade/test/tParmFacade.in_mep/DEFAULTVALUES/table.f0 -text svneol=unset#unset diff --git a/CEP/BB/BBS/src/MNS/MeqFunklet.cc b/CEP/BB/BBS/src/MNS/MeqFunklet.cc index de408f8d3aa..66898602b54 100644 --- a/CEP/BB/BBS/src/MNS/MeqFunklet.cc +++ b/CEP/BB/BBS/src/MNS/MeqFunklet.cc @@ -89,7 +89,8 @@ MeqFunklet* MeqFunklet::make (const ParmDB::ParmValue& pvalue, return new MeqTabular(pvalue); } ASSERTSTR (false, - "Unknown funklet found for parameter " << name); + "Unknown funklet type " << pvalue.rep().itsType + << " found for parameter " << name); } int MeqFunklet::makeSolvable (int scidIndex) diff --git a/CEP/BB/BBS/src/MNS/MeqLMN.cc b/CEP/BB/BBS/src/MNS/MeqLMN.cc index 57450b4bdfc..ec541891b68 100644 --- a/CEP/BB/BBS/src/MNS/MeqLMN.cc +++ b/CEP/BB/BBS/src/MNS/MeqLMN.cc @@ -23,7 +23,7 @@ #include <lofar_config.h> #include <BBS/MNS/MeqLMN.h> -#include <BBS/MNS/MeqPointSource.h> +#include <BBS/MNS/MeqSource.h> #include <BBS/MNS/MeqPhaseRef.h> #include <BBS/MNS/MeqRequest.h> #include <BBS/MNS/MeqMatrixTmp.h> @@ -32,7 +32,7 @@ namespace LOFAR { -MeqLMN::MeqLMN (MeqPointSource* source) +MeqLMN::MeqLMN (MeqSource* source) : itsSource (source) { addChild (itsSource->getRa()); diff --git a/CEP/BB/BBS/src/MNS/MeqLMN.h b/CEP/BB/BBS/src/MNS/MeqLMN.h index 46701b0f780..4f47863a4e5 100644 --- a/CEP/BB/BBS/src/MNS/MeqLMN.h +++ b/CEP/BB/BBS/src/MNS/MeqLMN.h @@ -37,7 +37,7 @@ namespace LOFAR { // @{ //# Forward Declarations -class MeqPointSource; +class MeqSource; class MeqPhaseRef; @@ -45,9 +45,9 @@ class MeqLMN: public MeqExprRep { public: // Construct for the given point source. - explicit MeqLMN (MeqPointSource*); + explicit MeqLMN (MeqSource*); - const MeqPointSource& getSource() const + const MeqSource& getSource() const { return *itsSource; } // Set the phase reference position. @@ -60,7 +60,7 @@ public: MeqResultVec getAnResultVec (const MeqRequest& request); private: - MeqPointSource* itsSource; + MeqSource* itsSource; const MeqPhaseRef* itsPhaseRef; }; diff --git a/CEP/BB/BBS/src/MNS/MeqParmFunklet.cc b/CEP/BB/BBS/src/MNS/MeqParmFunklet.cc index e1910128a5e..ddb76f7e32f 100644 --- a/CEP/BB/BBS/src/MNS/MeqParmFunklet.cc +++ b/CEP/BB/BBS/src/MNS/MeqParmFunklet.cc @@ -22,8 +22,11 @@ #include <lofar_config.h> #include <BBS/MNS/MeqParmFunklet.h> +#include <BBS/MNS/MeqParmExpr.h> #include <BBS/MNS/MeqPolc.h> #include <BBS/ParmData.h> +#include <ParmDB/ParmValue.h> +#include <ParmDB/ParmDB.h> #include <Common/LofarLogger.h> #include <casa/BasicMath/Math.h> @@ -49,7 +52,11 @@ MeqParmFunklet::MeqParmFunklet (const string& name, MeqParmGroup* group, itsNrPert (0), itsPertInx (-1), itsTable (table) -{} +{ + // See if the parm is a parm-expression. + // If so, create parm-funklets for them. + +} MeqParmFunklet::~MeqParmFunklet() { @@ -58,6 +65,26 @@ MeqParmFunklet::~MeqParmFunklet() } } +MeqExprRep* MeqParmFunklet::create (const string& name, + MeqParmGroup* group, + ParmDB::ParmDB* table) +{ + // If the parm is an expression, use that. + map<string,ParmDB::ParmValueSet> pset; + table->getDefValues (pset, name); + if (! pset.empty()) { + ParmDB::ParmValueSet& pvset = pset.begin()->second; + if (! pvset.getValues().empty()) { + ParmDB::ParmValueRep& pv = pvset.getValues()[0].rep(); + if (pv.itsType == "parmexpr") { + return new MeqParmExpr (pv.itsExpr, group, table); + } + } + } + // It is a normal funklet. + return new MeqParmFunklet (name, group, table); +} + void MeqParmFunklet::add (const MeqFunklet& funklet) { itsFunklets.push_back (funklet.clone()); diff --git a/CEP/BB/BBS/src/MNS/MeqParmFunklet.h b/CEP/BB/BBS/src/MNS/MeqParmFunklet.h index 2158e2d0776..2fa319206aa 100644 --- a/CEP/BB/BBS/src/MNS/MeqParmFunklet.h +++ b/CEP/BB/BBS/src/MNS/MeqParmFunklet.h @@ -20,7 +20,7 @@ //# //# $Id$ -#if !defined(MNS_MEQPARMFUNKLET_H) +#ifndef MNS_MEQPARMFUNKLET_H #define MNS_MEQPARMFUNKLET_H // \file @@ -58,6 +58,13 @@ public: virtual ~MeqParmFunklet(); + // Make the correct object depending on the parm type. + // For a parm expression a MeqParmExpr object is created, otherwise + // a MeqParmFunklet. + static MeqExprRep* create (const string& name, + MeqParmGroup* group, + ParmDB::ParmDB* table); + // Get the requested result of the parameter. virtual MeqResult getResult (const MeqRequest&); diff --git a/CEP/BB/BBS/src/MNS/MeqPointSource.cc b/CEP/BB/BBS/src/MNS/MeqPointSource.cc index e2642d1d06d..aa4cbb71011 100644 --- a/CEP/BB/BBS/src/MNS/MeqPointSource.cc +++ b/CEP/BB/BBS/src/MNS/MeqPointSource.cc @@ -26,24 +26,18 @@ namespace LOFAR { -MeqPointSource::MeqPointSource() -: itsSourceNr (-1), - itsGroupNr (-1) -{} - MeqPointSource::MeqPointSource (const string& name, const MeqExpr& fluxI, const MeqExpr& fluxQ, const MeqExpr& fluxU, const MeqExpr& fluxV, const MeqExpr& ra, const MeqExpr& dec) -: itsSourceNr (-1), - itsGroupNr (-1), - itsName (name), - itsI (fluxI), - itsQ (fluxQ), - itsU (fluxU), - itsV (fluxV), - itsRa (ra), - itsDec (dec) +: MeqSource (name, "", ra, dec), + itsI (fluxI), + itsQ (fluxQ), + itsU (fluxU), + itsV (fluxV) +{} + +MeqPointSource::~MeqPointSource() {} } diff --git a/CEP/BB/BBS/src/MNS/MeqPointSource.h b/CEP/BB/BBS/src/MNS/MeqPointSource.h index 69e78bf73ad..47f11bc9ef4 100644 --- a/CEP/BB/BBS/src/MNS/MeqPointSource.h +++ b/CEP/BB/BBS/src/MNS/MeqPointSource.h @@ -20,16 +20,14 @@ //# //# $Id$ -#if !defined(MNS_MEQPOINTSOURCE_H) +#ifndef MNS_MEQPOINTSOURCE_H #define MNS_MEQPOINTSOURCE_H // \file // Class holding a point source //# Includes -#include <BBS/MNS/MeqExpr.h> -#include <BBS/MNS/MeqResult.h> -#include <BBS/MNS/MeqRequest.h> +#include <BBS/MNS/MeqSource.h> #include <Common/lofar_string.h> namespace LOFAR { @@ -38,23 +36,16 @@ namespace LOFAR { // \addtogroup MNS // @{ -//# Forward Declarations -class MeqPhaseRef; - -class MeqPointSource +class MeqPointSource: public MeqSource { public: - // The default constructor. - MeqPointSource(); - MeqPointSource (const string& name, const MeqExpr& fluxI, const MeqExpr& fluxQ, const MeqExpr& fluxU, const MeqExpr& fluxV, const MeqExpr& ra, const MeqExpr& dec); - const string& getName() const - { return itsName; } + virtual ~MeqPointSource(); MeqExpr& getI() { return itsI; } @@ -64,37 +55,12 @@ public: { return itsU; } MeqExpr& getV() { return itsV; } - MeqExpr& getRa() - { return itsRa; } - MeqExpr& getDec() - { return itsDec; } - - // Get the source nr. - int getSourceNr() const - { return itsSourceNr; } - - // Get the group nr. - int getGroupNr() const - { return itsGroupNr; } - - // Set the source nr. - void setSourceNr (int sourceNr) - { itsSourceNr = sourceNr; } - - // Set the group nr. - void setGroupNr (int groupNr) - { itsGroupNr = groupNr; } private: - int itsSourceNr; - int itsGroupNr; - string itsName; MeqExpr itsI; MeqExpr itsQ; MeqExpr itsU; MeqExpr itsV; - MeqExpr itsRa; - MeqExpr itsDec; }; // @} diff --git a/CEP/BB/BBS/src/MNS/MeqSourceList.cc b/CEP/BB/BBS/src/MNS/MeqSourceList.cc index a3741c89032..3ac37f2eebb 100644 --- a/CEP/BB/BBS/src/MNS/MeqSourceList.cc +++ b/CEP/BB/BBS/src/MNS/MeqSourceList.cc @@ -22,11 +22,14 @@ #include <lofar_config.h> #include <BBS/MNS/MeqSourceList.h> +#include <BBS/MNS/MeqPointSource.h> +#include <BBS/MNS/MeqGaussSource.h> #include <BBS/MNS/MeqParmFunklet.h> #include <Common/LofarLogger.h> #include <casa/Arrays/Vector.h> -#include <casa/Utilities/GenSort.h> +#include <casa/Utilities/GenSort.cc> // for automatic template +#include <algorithm> using namespace casa; @@ -35,79 +38,103 @@ namespace LOFAR { MeqSourceList::MeqSourceList (ParmDB::ParmDB& parmTable, MeqParmGroup* group) { // Get the vector of all parms containing a source name. - vector<string> nams = parmTable.getNames("RA.*"); + // Also get all parms representing a gaussian source. + vector<string> nams = parmTable.getNames("RA:*"); + vector<string> gnams = parmTable.getNames("Phi:*"); if (nams.size() == 0) { map<string,ParmDB::ParmValueSet> pset; - parmTable.getDefValues (pset, "RA.*"); + parmTable.getDefValues (pset, "RA:*"); for (map<string,ParmDB::ParmValueSet>::const_iterator iter = pset.begin(); iter != pset.end(); iter++) { nams.push_back (iter->first); } + pset.clear(); + parmTable.getDefValues (pset, "Phi:*"); + for (map<string,ParmDB::ParmValueSet>::const_iterator iter = pset.begin(); + iter != pset.end(); + iter++) { + gnams.push_back (iter->first); + } } - vector<int> srcs(nams.size()); - // Extract the sourcenrs from the names. + // Extract the sourcenames from the parmnames. for (uint i=0; i<nams.size(); i++) { string name = nams[i]; - // Remove first part from the name which looks like RA.CPn.. - string::size_type idx = name.rfind ('.'); + // Remove first part from the name which looks like RA:name. + string::size_type idx = name.rfind (':'); ASSERT (idx != string::npos); - // Remove first part (RA or so). name = name.substr (idx+1); nams[i] = name; - int srcnr = -1; - // Get sourcenr from name which looks like CPn. - if (name.substr(0,2) == "CP") { - istringstream istr(name.substr(2)); - istr >> srcnr; - srcs[i] = srcnr-1; - } } - // Sort the srcnrs uniquely. + // Extract the sourcenames from the parmnames. + for (uint i=0; i<gnams.size(); i++) { + string name = gnams[i]; + // Remove first part from the name which looks like RA:name. + string::size_type idx = name.rfind (':'); + ASSERT (idx != string::npos); + name = name.substr (idx+1); + gnams[i] = name; + } + // Sort the names uniquely. Vector<uInt> index; - int nr = GenSortIndirect<int>::sort (index, &srcs[0], srcs.size(), - Sort::Ascending, - Sort::QuickSort|Sort::NoDuplicates); + int nr = GenSortIndirect<string>::sort (index, &nams[0], nams.size(), + Sort::Ascending, + Sort::QuickSort|Sort::NoDuplicates); for (int i=0; i<nr; i++) { int inx = index(i); - string name = nams[inx]; - MeqParmFunklet* mr = new MeqParmFunklet("RA."+name, + const string& name = nams[inx]; + MeqParmFunklet* mr = new MeqParmFunklet("RA:"+name, group, &parmTable); - MeqParmFunklet* md = new MeqParmFunklet("DEC."+name, + MeqParmFunklet* md = new MeqParmFunklet("DEC:"+name, group, &parmTable); - MeqParmFunklet* mi = new MeqParmFunklet("StokesI."+name, + MeqParmFunklet* mi = new MeqParmFunklet("StokesI:"+name, group, &parmTable); - MeqParmFunklet* mq = new MeqParmFunklet("StokesQ."+name, + MeqParmFunklet* mq = new MeqParmFunklet("StokesQ:"+name, group, &parmTable); - MeqParmFunklet* mu = new MeqParmFunklet("StokesU."+name, + MeqParmFunklet* mu = new MeqParmFunklet("StokesU:"+name, group, &parmTable); - MeqParmFunklet* mv = new MeqParmFunklet("StokesV."+name, + MeqParmFunklet* mv = new MeqParmFunklet("StokesV:"+name, group, &parmTable); - add (MeqPointSource(name, mi, mq, mu, mv, mr, md)); + if (std::find(gnams.begin(), gnams.end(), name) == gnams.end()) { + add (new MeqPointSource(name, mi, mq, mu, mv, mr, md)); + } else { + MeqParmFunklet* mmin = new MeqParmFunklet("Minor:"+name, + group, &parmTable); + MeqParmFunklet* mmaj = new MeqParmFunklet("Major:"+name, + group, &parmTable); + MeqParmFunklet* mphi = new MeqParmFunklet("Phi:"+name, + group, &parmTable); + add (new MeqGaussSource(name, mi, mq, mu, mv, mr, md, mmin, mmaj, mphi)); + } // cout << "Found source " << name << " (srcnr=" << srcnr << ')' << endl; } } -void MeqSourceList::add (const MeqPointSource& source) +MeqSourceList::~MeqSourceList() { - itsSelected.push_back (itsSources.size()); - itsSources.push_back (source); + for (vector<MeqSource*>::iterator iter = itsSources.begin(); + iter != itsSources.end(); + iter++) { + delete *iter; + } } -void MeqSourceList::setSelected (const vector<int>& sel) +const vector<int>& MeqSourceList::getGroup (const string& groupName) const { - if (sel.size() == 0) { - itsSelected.resize (itsSources.size()); - for (unsigned int i=0; i<itsSources.size(); i++) { - itsSelected[i] = i; - } - } else { - for (unsigned int i=0; i<sel.size(); i++) { - ASSERT (sel[i] >= 0); - ASSERT (sel[i] < int(itsSources.size())); - } - itsSelected = sel; - } + map<string,vector<int> >::const_iterator idx = itsGroupMap.find (groupName); + ASSERTSTR (idx != itsGroupMap.end(), + "Source group " << groupName << " is unknown"); + return idx->second; +} + +void MeqSourceList::add (MeqSource* source) +{ + int idx = itsSources.size(); + itsSources.push_back (source); + itsNameMap[source->getName()] = idx; + vector<int>& group = itsGroupMap[source->getGroupName()]; + group.push_back (idx); } } + diff --git a/CEP/BB/BBS/src/MNS/MeqSourceList.h b/CEP/BB/BBS/src/MNS/MeqSourceList.h index 488fc6b9875..0d2f3478a2b 100644 --- a/CEP/BB/BBS/src/MNS/MeqSourceList.h +++ b/CEP/BB/BBS/src/MNS/MeqSourceList.h @@ -30,6 +30,7 @@ #include <BBS/MNS/MeqPointSource.h> #include <ParmDB/ParmDB.h> #include <Common/lofar_vector.h> +#include <Common/lofar_map.h> namespace LOFAR { @@ -50,28 +51,32 @@ public: // Fill the source list from the sources in the parm table. MeqSourceList (ParmDB::ParmDB& parmTable, MeqParmGroup* group); - // Get the number of sources to be used. - int size() const - { return itsSelected.size(); } + ~MeqSourceList(); - // Get the actual source number in the source list. - int actualSourceNr (int sourceNr) const - { return itsSelected[sourceNr]; } + // Get the total number of sources. + uint size() const + { return itsSources.size(); } - // Get the i-th selected source. - MeqPointSource& operator[] (int i) - { return itsSources[itsSelected[i]]; } + // Get the i-th source. + MeqSource& operator[] (int i) + { return *itsSources[i]; } + + // Get the source indices in the given group. + const vector<int>& getGroup (const string& groupName) const; - // Set the sources to be actually used. - // An empty vector selects all sources. - void setSelected (const vector<int>&); - private: + // Forbid copies. + // <group> + MeqSourceList (const MeqSourceList&); + MeqSourceList& operator= (const MeqSourceList&); + // </group> + // Add a source. - void add (const MeqPointSource&); + void add (MeqSource*); - vector<MeqPointSource> itsSources; - vector<int> itsSelected; + vector<MeqSource*> itsSources; + map<string,int> itsNameMap; + map<string,vector<int> > itsGroupMap; }; // @} diff --git a/CEP/BB/BBS/src/Makefile.am b/CEP/BB/BBS/src/Makefile.am index f800eb5379c..629bea39f12 100644 --- a/CEP/BB/BBS/src/Makefile.am +++ b/CEP/BB/BBS/src/Makefile.am @@ -18,6 +18,7 @@ MNS/MeqDiag.h \ MNS/MeqDomain.h \ MNS/MeqExpr.h \ MNS/MeqFunklet.h \ +MNS/MeqGaussSource.h \ MNS/MeqJonesCMul2.h \ MNS/MeqJonesCMul3.h \ MNS/MeqJonesExpr.h \ @@ -37,6 +38,7 @@ MNS/MeqMatrixRealSca.h \ MNS/MeqMatrixRep.h \ MNS/MeqMatrixTmp.h \ MNS/MeqParm.h \ +MNS/MeqParmExpr.h \ MNS/MeqParmFunklet.h \ MNS/MeqParmSingle.h \ MNS/MeqPhaseRef.h \ @@ -46,6 +48,7 @@ MNS/MeqRequest.h \ MNS/MeqRequestId.h \ MNS/MeqResult.h \ MNS/MeqResultVec.h \ +MNS/MeqSource.h \ MNS/MeqSourceList.h \ MNS/MeqStatExpr.h \ MNS/MeqStation.h \ @@ -74,6 +77,7 @@ MNS/MeqDFTPS.cc \ MNS/MeqDomain.cc \ MNS/MeqExpr.cc \ MNS/MeqFunklet.cc \ +MNS/MeqGaussSource.cc \ MNS/MeqJonesCMul2.cc \ MNS/MeqJonesCMul3.cc \ MNS/MeqJonesExpr.cc \ @@ -92,6 +96,7 @@ MNS/MeqMatrixRealSca.cc \ MNS/MeqMatrixRep.cc \ MNS/MeqMatrixTmp.cc \ MNS/MeqParm.cc \ +MNS/MeqParmExpr.cc \ MNS/MeqParmFunklet.cc \ MNS/MeqParmSingle.cc \ MNS/MeqPhaseRef.cc \ @@ -100,6 +105,7 @@ MNS/MeqPolc.cc \ MNS/MeqRequest.cc \ MNS/MeqResult.cc \ MNS/MeqResultVec.cc \ +MNS/MeqSource.cc \ MNS/MeqSourceList.cc \ MNS/MeqStatExpr.cc \ MNS/MeqStation.cc \ diff --git a/CEP/BB/BBS/src/Prediffer.cc b/CEP/BB/BBS/src/Prediffer.cc index ccc0a16b40c..5812e873855 100644 --- a/CEP/BB/BBS/src/Prediffer.cc +++ b/CEP/BB/BBS/src/Prediffer.cc @@ -143,6 +143,7 @@ Prediffer::Prediffer(const string& msName, itsGSMMEPName (skyPdm.getTableName()), itsGSMMEP (skyPdm), itsCalcUVW (calcUVW), + itsSources (0), itsSrcGrp (sourceGroups), itsNrPert (0), itsNCorr (0), @@ -242,6 +243,7 @@ Prediffer::~Prediffer() { LOG_TRACE_FLOW( "Prediffer destructor" ); + delete itsSources; for (vector<MeqStatUVW*>::iterator iter = itsStatUVW.begin(); iter != itsStatUVW.end(); iter++) { @@ -423,16 +425,16 @@ void Prediffer::countBaseCorr() // // ~getSources // -// Get all sources from the GSM table. +// Get all sources from the parmtable. // //---------------------------------------------------------------------- void Prediffer::getSources() { // Get the sources from the ParmTable - itsSources = MeqSourceList(itsGSMMEP, &itsParmGroup); - int nrsrc = itsSources.size(); + itsSources = new MeqSourceList(itsGSMMEP, &itsParmGroup); + int nrsrc = itsSources->size(); for (int i=0; i<nrsrc; ++i) { - itsSources[i].setSourceNr (i); + (*itsSources)[i].setSourceNr (i); } // Make a map for the sources actually used. itsSrcNrMap.reserve (nrsrc); @@ -444,7 +446,6 @@ void Prediffer::getSources() vec[0] = i+1; // source nrs are 1-relative itsSrcGrp[i] = vec; itsSrcNrMap.push_back (i); - itsSources[i].setGroupNr (i); // group nrs are 0-relative } } else { for (uint j=0; j<itsSrcGrp.size(); ++j) { @@ -454,10 +455,7 @@ void Prediffer::getSources() ASSERTSTR (srcs[i] > 0 && srcs[i] <= nrsrc, "Sourcenr " << srcs[i] << " must be > 0 and <= #sources (=" << nrsrc << ')'); - ASSERTSTR (itsSources[srcs[i]-1].getGroupNr() < 0, - "Sourcenr " << srcs[i] << " multiply used in groups"); - itsSources[srcs[i]-1].setGroupNr (j); - itsSources[srcs[i]-1].setSourceNr (itsSrcNrMap.size()); + (*itsSources)[srcs[i]-1].setSourceNr (itsSrcNrMap.size()); itsSrcNrMap.push_back (srcs[i]-1); } } @@ -467,7 +465,7 @@ void Prediffer::getSources() itsLMN.reserve (nrused); for (int i=0; i<nrused; ++i) { int src = itsSrcNrMap[i]; - MeqLMN* lmn = new MeqLMN(&(itsSources[src])); + MeqLMN* lmn = new MeqLMN(&((*itsSources)[src])); lmn->setPhaseRef (&itsPhaseRef); itsLMN.push_back (lmn); } @@ -498,11 +496,11 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, int nrgrp = itsSrcGrp.size(); itsStatUVW.reserve (nrstat); // EJ is real/imag or ampl/phase - string ejname1 = "real."; - string ejname2 = "imag."; + string ejname1 = "real:"; + string ejname2 = "imag:"; if (asAP) { - ejname1 = "ampl."; - ejname2 = "phase."; + ejname1 = "ampl:"; + ejname2 = "phase:"; } // Vector containing StatExpr-s. vector<MeqJonesExpr> statExpr(nrstat); @@ -523,21 +521,21 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, uvw = new MeqStatUVW (itsStations[i], &itsPhaseRef); // Do pure station parameters only if told so. if (useStatParm) { - MeqExpr frot (new MeqParmFunklet ("frot." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr drot (new MeqParmFunklet ("drot." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr dell (new MeqParmFunklet ("dell." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr gain11 (new MeqParmFunklet ("gain.11." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr gain22 (new MeqParmFunklet ("gain.22." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); + MeqExpr frot (MeqParmFunklet::create ("frot:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr drot (MeqParmFunklet::create ("drot:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr dell (MeqParmFunklet::create ("dell:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr gain11 (MeqParmFunklet::create ("gain:11:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr gain22 (MeqParmFunklet::create ("gain:22:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); statExpr[i] = MeqJonesExpr(new MeqStatExpr (frot, drot, dell, gain11, gain22)); } @@ -553,22 +551,22 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, if (useTEJ) { // Make a gain/phase expression per station. string nm = itsStations[i]->getName(); - MeqExpr ej11r (new MeqParmFunklet ("EJ11." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej11i (new MeqParmFunklet ("EJ11." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12r (new MeqParmFunklet ("EJ12." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12i (new MeqParmFunklet ("EJ12." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21r (new MeqParmFunklet ("EJ21." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21i (new MeqParmFunklet ("EJ21." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22r (new MeqParmFunklet ("EJ22." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22i (new MeqParmFunklet ("EJ22." + ejname2 + nm, - &itsParmGroup, &itsMEP)); + MeqExpr ej11r (MeqParmFunklet::create ("EJ11:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej11i (MeqParmFunklet::create ("EJ11:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12r (MeqParmFunklet::create ("EJ12:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12i (MeqParmFunklet::create ("EJ12:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21r (MeqParmFunklet::create ("EJ21:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21i (MeqParmFunklet::create ("EJ21:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22r (MeqParmFunklet::create ("EJ22:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22i (MeqParmFunklet::create ("EJ22:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); if (asAP) { ej11 = new MeqExprAPToComplex (ej11r, ej11i); ej12 = new MeqExprAPToComplex (ej12r, ej12i); @@ -589,23 +587,23 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, for (int j=0; j<nrgrp; j++) { ostringstream ostr; ostr << j+1; - string nm = itsStations[i]->getName() + ".SG" + ostr.str(); - MeqExpr ej11r (new MeqParmFunklet ("EJ11." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej11i (new MeqParmFunklet ("EJ11." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12r (new MeqParmFunklet ("EJ12." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12i (new MeqParmFunklet ("EJ12." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21r (new MeqParmFunklet ("EJ21." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21i (new MeqParmFunklet ("EJ21." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22r (new MeqParmFunklet ("EJ22." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22i (new MeqParmFunklet ("EJ22." + ejname2 + nm, - &itsParmGroup, &itsMEP)); + string nm = itsStations[i]->getName() + ":SG" + ostr.str(); + MeqExpr ej11r (MeqParmFunklet::create ("EJ11:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej11i (MeqParmFunklet::create ("EJ11:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12r (MeqParmFunklet::create ("EJ12:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12i (MeqParmFunklet::create ("EJ12:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21r (MeqParmFunklet::create ("EJ21:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21i (MeqParmFunklet::create ("EJ21:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22r (MeqParmFunklet::create ("EJ22:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22i (MeqParmFunklet::create ("EJ22:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); if (asAP) { ej11 = new MeqExprAPToComplex (ej11r, ej11i); ej12 = new MeqExprAPToComplex (ej12r, ej12i); @@ -661,9 +659,10 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, MeqExpr expr1 (new MeqBaseDFTPS (pdfts[ant1*nrsrc + src], pdfts[ant2*nrsrc + src], itsLMN[src])); - vecSrc.push_back (MeqJonesExpr - (new MeqBaseLinPS(expr1, - &(itsSources[itsSrcNrMap[src]])))); + // For the time being only point sources are supported. + MeqPointSource& mps = dynamic_cast<MeqPointSource&> + ((*itsSources)[itsSrcNrMap[src]]); + vecSrc.push_back (MeqJonesExpr (new MeqBaseLinPS(expr1, &mps))); } MeqJonesExpr sum; // Sum all sources in the group. @@ -1970,28 +1969,28 @@ void Prediffer::fillUVW() bool Prediffer::setPeelGroups (const vector<int>& peelGroups, const vector<int>& extraGroups) { - vector<int> allNrs; - for (uint i=0; i<extraGroups.size(); ++i) { - ASSERT (extraGroups[i] >= 0 && extraGroups[i] < int(itsSrcGrp.size())); - const vector<int>& grp = itsSrcGrp[i]; - for (uint j=0; j<grp.size(); ++j) { - allNrs.push_back (grp[j] - 1); - } - } - vector<int> peelNrs; - for (uint i=0; i<peelGroups.size(); ++i) { - ASSERT (peelGroups[i] >= 0 && peelGroups[i] < int(itsSrcGrp.size())); - const vector<int>& grp = itsSrcGrp[peelGroups[i]]; - for (uint j=0; j<grp.size(); ++j) { - peelNrs.push_back (grp[j] - 1); - allNrs.push_back (grp[j] - 1); - } - } - LOG_TRACE_OBJ_STR( "peel sources " << peelNrs << "; predict sources " - << allNrs ); - ASSERT (peelNrs.size() > 0); - itsSources.setSelected (allNrs); - itsPeelSourceNrs = peelNrs; +// vector<int> allNrs; +// for (uint i=0; i<extraGroups.size(); ++i) { +// ASSERT (extraGroups[i] >= 0 && extraGroups[i] < int(itsSrcGrp.size())); +// const vector<int>& grp = itsSrcGrp[i]; +// for (uint j=0; j<grp.size(); ++j) { +// allNrs.push_back (grp[j] - 1); +// } +// } +// vector<int> peelNrs; +// for (uint i=0; i<peelGroups.size(); ++i) { +// ASSERT (peelGroups[i] >= 0 && peelGroups[i] < int(itsSrcGrp.size())); +// const vector<int>& grp = itsSrcGrp[peelGroups[i]]; +// for (uint j=0; j<grp.size(); ++j) { +// peelNrs.push_back (grp[j] - 1); +// allNrs.push_back (grp[j] - 1); +// } +// } +// LOG_TRACE_OBJ_STR( "peel sources " << peelNrs << "; predict sources " +// << allNrs ); +// ASSERT (peelNrs.size() > 0); +// itsSources.setSelected (allNrs); +// itsPeelSourceNrs = peelNrs; return true; } diff --git a/CEP/BB/BBS/src/Prediffer.h b/CEP/BB/BBS/src/Prediffer.h index 63077c47e98..8a72f2a54de 100644 --- a/CEP/BB/BBS/src/Prediffer.h +++ b/CEP/BB/BBS/src/Prediffer.h @@ -327,7 +327,7 @@ private: MeqPhaseRef itsPhaseRef; //# Phase reference position in J2000 - MeqSourceList itsSources; + MeqSourceList* itsSources; vector<vector<int> > itsSrcGrp; //# sources in each group vector<int> itsSrcNrMap; //# map of all srcnr to used srcnr vector<int> itsPeelSourceNrs; diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat b/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..92402a83c552826f665500bf9c72bb5f7a2f3e6f GIT binary patch literal 2205 zcmc&$%}(1u5MF)~;sEzTFFteUP>G8JK17NW%WDvv(AG9pRO3Y(r&4cy1`d__GI@|b zOyQelo%#oa2`!8?+THovZ)eA|UMv<1#(KXPW1UcZP7_Sl!JFVUaNkeGG&7p+Z%8b? zI7wy^7G(O-bL}{}67w{-Z-f%pNuDVCn@H!$3~HhS?PEtW%MopweQ7$(>?^5k&xQ3N zcw2h}NhDQ_B|+H-_a7vs-67Q4m7FZ&yvHMv3Uw^g`E^FYk9e*Krfm#1$Bu@ECEMk> z$YP;lo_ivDOt4L6C0Yp^9hr#6=kbLXKBbQ69q@f{loH=d>5JtYwX{s1bvzmK&>4sP z0b&b`J!7elkGVDU<!qWyC1t$G4cV-oT#E7>^6r^4I(1(N`woQId*HW%J&-cBLD-Ux z)#H=VnKKx*uL(FY_Wyx5E4fxGJH8u)r@_Dphm)}e)uy70YB3J4C<+sSlGwyr&oW`X z4BSy`oCUsOd|mN20oK}9-#zyOm-CmT@(r3-?aHli=(%VQp5Ho;|MtF7_J6Q-@#fLp zH<~Cx(+{J03CM^@%S`tz%PK9eP-yGFEu|tZf3g)t{fj7+v~#aifn|C1;>(&!vJ1se z`~~1QfZc*OIQPuC8cFyBMQ4!8=qo1VOb;k%?FalYQU*KVE_e&Pq^BI02K5OAU%v;< Cwu-g@ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 b/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b57f473278b80ae392b2c1b3bc67402cbae601e4 GIT binary patch literal 7696 zcmeHJJxjzu5FPdWXhd5(OH03M5eva0SnMxYZUZOgav@xCSXv5#js5)u8^LNzf5-g+ zYa2n|yX?V%$>B8tlNp%2$?lMuc{`KDd+#qrWE*ORHgz_4W*FIY4GYrQgaTK21Nnxm z6sBy2`v)vcox{4qe`0_qN<ka=J0#9iH72@BT|DARQ}>~01UZ22Ld{J-OXBO?#d+)^ zo6%<`+~0$)Lobp+_jdLWwn*s)9T@!{SQh;m>-0H<E{aYc?tg6*&nXR7nFTw1Q5F;I zFOvlc<K!%th0YNuYoW07bo#2_0Tc9uPG1WLqn460oA-~L2tFJ_`*_YinX^xWT}x6e z3X%<yF3ase|6;d@8ZEU32Kd)VIiFrdMghkGn-2W5rt}Jsr+{w(n+}g3uj9}6m$NEt jdi^_1FHq}K29yD1Kp9X5lmTTx8Bhk40cAiL_{G2v*mtgO literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i b/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..33964e5347f22d5a9eaa6ae1342396eeccdbe615 GIT binary patch literal 197 zcmZQzU|={3#4x}FWH16Th=u}(9dfO&19!}`XJG9Hi^JrZfyzMYfHYVShI*&~1A|rw svO4y>bOo3_AhRIghkbsLf-kZ-V`@+;GQa=OSB;o{28W^)7Zh<u06S(BjsO4v literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info b/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info new file mode 100644 index 00000000000..1e2a62505a0 --- /dev/null +++ b/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info @@ -0,0 +1,5 @@ +Type = MEPold +SubType = + +Initial ME Parameter values +Old ME Parameter values diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock b/CEP/BB/BBS/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..36c25acc40a05c4842e28d04895408068789d419 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcMhz-P?K+F!rOh7CN#H>y^`N`Qp21o%2vjYG^ CMh95{ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.dat b/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..376d73371132c857d6ea34689eb29aae972076cd GIT binary patch literal 4600 zcmdT|&2G~`5O&ifB<T+nsS@R6@ebU$IO!HF#g655OM5~l2`D19E5|)><G^#}C3q8r zI0E0S*U8!misPsxj5JyAx3jyS$FsY$nNFuuO*{FaX<E(m-;alQs6a{fpe<+Yj{@0p z{0&G`RL+N!J}PAT)MEObANjY#co^xi90U#83t_7F!yv{Wqu}G*ZlZq(Bi&-KdI>!c zmhP}0Mgvr7=I78>f+&*#6s@H?oyyK<yzh_ws1uIwZvz_q6^|pLr%QvXZ3t?pYDYZw zgMl9ncx?H>GT?yB6e-1xUYUf-)%?60hg?Up1%A(rDDpom?i+;n2%VYxnw_4_J;U~R zLa_kHhO`u~kLRZ8gp*M`3d!TCZ^)*+bC-KIN4*Z-u6Io{L00>gc-Mq&@>8Ck9HbD- zDzndbonzw38~Iwh?8z;2T(z2NA|%)HBN;#NN?OHwA0hg`ajst(-AlISru7?w7d?YM z(5AJ@)ph2&J$LtMx5IF(L*OY2&Ia#wuZ(uL_(6tFnzjS}?p<7P<_R`M&j>Q!@`|kS zj<JTbcjZJrbeQX1x^2TVd-mEsmmM}p8{`P$<1OTk`H&{A?_Aa`%roVemgVz@<plHT z&0A)^ezSh)Zca~*u$-kC#I!N!Fd~DBS^VfwlP{X1yaVOri^+G6UBfY4W_!EEF?WG! zv1`X=oUgNF{=qdS7mZENv>37*%b_m^DV8NBw#n~CpPSB-Uve~xJJJOT)K1sj^iD`d zBm$H7Fcr&Oe$obEJ-=I|uoy$;@+vmZomG^we#%u<Y?d6RpqNP}Um0wk++^Wd@{obm z!#UGXpB;V~cy_pC(EQ$=Hqv`Hl)X~L>$5FNMUyQ-Mbu@e;@QwwTQcF6HvGgNAovGF z`wrdb+(JR@7Q$czu+|=j{ZDwH&Zkhw-WT*kS%uPGREIu-((&1ZwxG1K4xvZTW9Vb( W6H;_KA^nO<Du0_OZQr;g@|8dJ>=A<i literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0 b/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b4837eddcf727ef2745f1c5f0fd58a644041c6a8 GIT binary patch literal 5124 zcmeH}u?oU45Qd{x(LoT!-O<rU5C_2_IOGX}$spERLI-j3$?|IYUrV>pO^Waz{0(=P za_N^2e~d96l~QxaRJL$7I8$j`j8IV7QmFyfp(Kb8LUM`8tjPlk_2#C`=U)+!8<oIs z5Ccv=g^bas!ue-=(;L)Q&=y)i=6Wx4e-6$E@3bx3eQ4GFHP$h7$RC$m+e{Ya4F(C2 z011!)36KB@^g*B>_ajqZ_}rA|dc!w~b=pB)o=f&fU%{zoSdum?S?rp=hvEP2bU8AE P1W14cNPq-Lpg#g%NjY9? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0i b/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..c09f05b309fbcc6ff12c9eb91aff39455347c41e GIT binary patch literal 16 PcmZQzU|<jcVi*7b0MGyt literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.info b/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.info new file mode 100644 index 00000000000..a1a976ed494 --- /dev/null +++ b/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.info @@ -0,0 +1,3 @@ +Type = +SubType = + diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.lock b/CEP/BB/BBS/test/tParmMerge.in_mep1/OLDVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..bda58097b47771545f500a22ba10e538987277a8 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5QBgy5HmrsB#>rx%E?d81~NbjK$r;tLaPT? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/table.dat b/CEP/BB/BBS/test/tParmMerge.in_mep1/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..1febb8e5ea7b978633f4a5f540b4967cf5ba8148 GIT binary patch literal 4717 zcmdT|&2G~`5O$j%lC+_;QYFgC;sM$dH!e=HrIr%Mc%9OoDw6~hk=n?058OELG(1Ee ziUUXBo3+<jr$KQNm4uN-Ykxbt`|Wskch-~1WTI(DBTdsvuJ?XC#KUf)J1A@R*c<st z&A|nbs(5J)@A`?^QHSZDz0kWIM#E5#l1@;my%eT;Kky@TGV(u8?e6psL8x~atiD6{ zgrzg=2jKv(G%_)%#fUOk0cgF&&W&E%y)@cA#sTa@rBu7^*8GZ|WxnmP8?yz|QesX6 z9iE<@p3QbyCs6H*EMGzAFns~|Aya^29>+;}!u#IX3!B0C{??}%z2;F!KG73{qGbqw z;8m;h$nytYIN(vo^XCD3WTwbU+-OoHR4(S{UfcA&NH)Olxe<om7sY*p;2!asy06;o zTHG}(mm-2>F~>@57*8M1RnrdcM$srBk4xW>&Fapb@7WpZW$<>~D;f!skGG6qYOy*! zY7NQ7vdFB~wsVX<c^%Jct3A14j*C`PNrdE5eoO-i50A8x7O^fMME^I=<@B^7=J^)C z_8S806X=FqU1pBcb(Y*~H$b})1Y;cnPth({;obJ7(P-yC$k0gJ27h<Y&pC4io7`an zYq7PX+)$X5c+*(I+1qj=@7v6Adrre}&91ey&yxm^buQ0_G;zIgSUWdQ$xoK6=MT9O zhw?jSzPVUFbl0bs^e~^L=|{9N=rAIKU2!p>7K`^_HTj|zt2+>lbFr(~hQlm(yEx8V zU~25jb{OZ&ESZ0BjhRWdtFGB$$Zk3|eL2YD&n<VQ*nZ8=O=rn3^hCF8`t+m^C;$@% z@=i!bB-E&w+{08XbNP`K!g_kQkg(_@$>mjSnmel~W&M<^s#uyFN>GfHBwrb9n%rdJ zG<nFt>fxNJD5r;C22Kx`3_81a%SxJeMcFG=e7Z%cXuKt;h`J0_JRACIO(xuA#ZUZo z!EYDs2eiO>2L-Wv5C-D6Ok*7MKcSWyA44HKU(pU_5lVYe8TtfDfm(&uptQ2+$4DLe a6nX%CMv6v<q~Gu&<!=MY`n5|UzxxLi=_1eo literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0 b/CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..f83deca64494f24bbe78f5fe426a0895bb722519 GIT binary patch literal 18960 zcmeI2ze~eF6vyK)a1n~SxH&jDs*{rz2f-mI<Sz(KKrwAY=patTQE+$kPjC^OGKznO z|A648o4(iFp+novOUiv7yuM5B((ikpyU-(PS(fE-5CkjY(ID<6agjuWFzzkLiC}S6 zT;jYQh<%IARn1`89N)@`(O`3)FiQk<M%82)l-H8D&T15eC%q)S(wSD@6kikH7H^41 z7u`HdPm3fi(j<&?9b--VH^i63kFtK}(te4?i5;qbBLl{%59La|ct?Dix{lHQz^vJc zVq-gWg-^?(Ed%~P3+^MGKnwy9fB*y_;D&(y^0WJyya!|V<7OSA0s#m>00IzjM<9=j z?ykt`GaGI1nYOzO{8q~QSw{)zlh(g&zo}5YTLK@4m7a}m)$3PVZ&x|kSbs)tGiaIm zZFH+%zuK0m-^Thga+Sfp5qfnc*f5<llh0ej@^Y2V=&hNE-MbP*r%?p-y{_7G6}<aA zHx++*S9w+N(A3@17u+7&-TTwS=gZ@PjlLoH{nvrr``hRn3F?Ia1Rwwb2tWV=5P$## qAOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1RyZG1bzVKrJ%C_ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0i b/CEP/BB/BBS/test/tParmMerge.in_mep1/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..5a497c3e4359126508ed7aae16bcc14821094dab GIT binary patch literal 296 zcmZQzU|`T-1QJld1f)S+gwO|jkQA~wOdcc#0T49|3<3@yIfS@~14Ld0O&phc0jPQj h2ap*sJ0WH;ILw*}0z2XEfypxi6`<OS%Y5?P0|4F84-x<X literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/table.info b/CEP/BB/BBS/test/tParmMerge.in_mep1/table.info new file mode 100644 index 00000000000..f785028b10d --- /dev/null +++ b/CEP/BB/BBS/test/tParmMerge.in_mep1/table.info @@ -0,0 +1,4 @@ +Type = MEP +SubType = + +ME Parameter values diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep1/table.lock b/CEP/BB/BBS/test/tParmMerge.in_mep1/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..18ff0cf15fe51e32036517fc984c70cd6a22f23f GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5HkU>C=jzk*^(f(Q%-(zHjn{Q0K%*QLsSP} literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat b/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..92402a83c552826f665500bf9c72bb5f7a2f3e6f GIT binary patch literal 2205 zcmc&$%}(1u5MF)~;sEzTFFteUP>G8JK17NW%WDvv(AG9pRO3Y(r&4cy1`d__GI@|b zOyQelo%#oa2`!8?+THovZ)eA|UMv<1#(KXPW1UcZP7_Sl!JFVUaNkeGG&7p+Z%8b? zI7wy^7G(O-bL}{}67w{-Z-f%pNuDVCn@H!$3~HhS?PEtW%MopweQ7$(>?^5k&xQ3N zcw2h}NhDQ_B|+H-_a7vs-67Q4m7FZ&yvHMv3Uw^g`E^FYk9e*Krfm#1$Bu@ECEMk> z$YP;lo_ivDOt4L6C0Yp^9hr#6=kbLXKBbQ69q@f{loH=d>5JtYwX{s1bvzmK&>4sP z0b&b`J!7elkGVDU<!qWyC1t$G4cV-oT#E7>^6r^4I(1(N`woQId*HW%J&-cBLD-Ux z)#H=VnKKx*uL(FY_Wyx5E4fxGJH8u)r@_Dphm)}e)uy70YB3J4C<+sSlGwyr&oW`X z4BSy`oCUsOd|mN20oK}9-#zyOm-CmT@(r3-?aHli=(%VQp5Ho;|MtF7_J6Q-@#fLp zH<~Cx(+{J03CM^@%S`tz%PK9eP-yGFEu|tZf3g)t{fj7+v~#aifn|C1;>(&!vJ1se z`~~1QfZc*OIQPuC8cFyBMQ4!8=qo1VOb;k%?FalYQU*KVE_e&Pq^BI02K5OAU%v;< Cwu-g@ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 b/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b57f473278b80ae392b2c1b3bc67402cbae601e4 GIT binary patch literal 7696 zcmeHJJxjzu5FPdWXhd5(OH03M5eva0SnMxYZUZOgav@xCSXv5#js5)u8^LNzf5-g+ zYa2n|yX?V%$>B8tlNp%2$?lMuc{`KDd+#qrWE*ORHgz_4W*FIY4GYrQgaTK21Nnxm z6sBy2`v)vcox{4qe`0_qN<ka=J0#9iH72@BT|DARQ}>~01UZ22Ld{J-OXBO?#d+)^ zo6%<`+~0$)Lobp+_jdLWwn*s)9T@!{SQh;m>-0H<E{aYc?tg6*&nXR7nFTw1Q5F;I zFOvlc<K!%th0YNuYoW07bo#2_0Tc9uPG1WLqn460oA-~L2tFJ_`*_YinX^xWT}x6e z3X%<yF3ase|6;d@8ZEU32Kd)VIiFrdMghkGn-2W5rt}Jsr+{w(n+}g3uj9}6m$NEt jdi^_1FHq}K29yD1Kp9X5lmTTx8Bhk40cAiL_{G2v*mtgO literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i b/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..33964e5347f22d5a9eaa6ae1342396eeccdbe615 GIT binary patch literal 197 zcmZQzU|={3#4x}FWH16Th=u}(9dfO&19!}`XJG9Hi^JrZfyzMYfHYVShI*&~1A|rw svO4y>bOo3_AhRIghkbsLf-kZ-V`@+;GQa=OSB;o{28W^)7Zh<u06S(BjsO4v literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info b/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info new file mode 100644 index 00000000000..1e2a62505a0 --- /dev/null +++ b/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info @@ -0,0 +1,5 @@ +Type = MEPold +SubType = + +Initial ME Parameter values +Old ME Parameter values diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock b/CEP/BB/BBS/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..36c25acc40a05c4842e28d04895408068789d419 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcMhz-P?K+F!rOh7CN#H>y^`N`Qp21o%2vjYG^ CMh95{ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.dat b/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..376d73371132c857d6ea34689eb29aae972076cd GIT binary patch literal 4600 zcmdT|&2G~`5O&ifB<T+nsS@R6@ebU$IO!HF#g655OM5~l2`D19E5|)><G^#}C3q8r zI0E0S*U8!misPsxj5JyAx3jyS$FsY$nNFuuO*{FaX<E(m-;alQs6a{fpe<+Yj{@0p z{0&G`RL+N!J}PAT)MEObANjY#co^xi90U#83t_7F!yv{Wqu}G*ZlZq(Bi&-KdI>!c zmhP}0Mgvr7=I78>f+&*#6s@H?oyyK<yzh_ws1uIwZvz_q6^|pLr%QvXZ3t?pYDYZw zgMl9ncx?H>GT?yB6e-1xUYUf-)%?60hg?Up1%A(rDDpom?i+;n2%VYxnw_4_J;U~R zLa_kHhO`u~kLRZ8gp*M`3d!TCZ^)*+bC-KIN4*Z-u6Io{L00>gc-Mq&@>8Ck9HbD- zDzndbonzw38~Iwh?8z;2T(z2NA|%)HBN;#NN?OHwA0hg`ajst(-AlISru7?w7d?YM z(5AJ@)ph2&J$LtMx5IF(L*OY2&Ia#wuZ(uL_(6tFnzjS}?p<7P<_R`M&j>Q!@`|kS zj<JTbcjZJrbeQX1x^2TVd-mEsmmM}p8{`P$<1OTk`H&{A?_Aa`%roVemgVz@<plHT z&0A)^ezSh)Zca~*u$-kC#I!N!Fd~DBS^VfwlP{X1yaVOri^+G6UBfY4W_!EEF?WG! zv1`X=oUgNF{=qdS7mZENv>37*%b_m^DV8NBw#n~CpPSB-Uve~xJJJOT)K1sj^iD`d zBm$H7Fcr&Oe$obEJ-=I|uoy$;@+vmZomG^we#%u<Y?d6RpqNP}Um0wk++^Wd@{obm z!#UGXpB;V~cy_pC(EQ$=Hqv`Hl)X~L>$5FNMUyQ-Mbu@e;@QwwTQcF6HvGgNAovGF z`wrdb+(JR@7Q$czu+|=j{ZDwH&Zkhw-WT*kS%uPGREIu-((&1ZwxG1K4xvZTW9Vb( W6H;_KA^nO<Du0_OZQr;g@|8dJ>=A<i literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0 b/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b4837eddcf727ef2745f1c5f0fd58a644041c6a8 GIT binary patch literal 5124 zcmeH}u?oU45Qd{x(LoT!-O<rU5C_2_IOGX}$spERLI-j3$?|IYUrV>pO^Waz{0(=P za_N^2e~d96l~QxaRJL$7I8$j`j8IV7QmFyfp(Kb8LUM`8tjPlk_2#C`=U)+!8<oIs z5Ccv=g^bas!ue-=(;L)Q&=y)i=6Wx4e-6$E@3bx3eQ4GFHP$h7$RC$m+e{Ya4F(C2 z011!)36KB@^g*B>_ajqZ_}rA|dc!w~b=pB)o=f&fU%{zoSdum?S?rp=hvEP2bU8AE P1W14cNPq-Lpg#g%NjY9? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0i b/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..c09f05b309fbcc6ff12c9eb91aff39455347c41e GIT binary patch literal 16 PcmZQzU|<jcVi*7b0MGyt literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.info b/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.info new file mode 100644 index 00000000000..a1a976ed494 --- /dev/null +++ b/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.info @@ -0,0 +1,3 @@ +Type = +SubType = + diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.lock b/CEP/BB/BBS/test/tParmMerge.in_mep2/OLDVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..bda58097b47771545f500a22ba10e538987277a8 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5QBgy5HmrsB#>rx%E?d81~NbjK$r;tLaPT? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/table.dat b/CEP/BB/BBS/test/tParmMerge.in_mep2/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..838639a5f0db6a34dbe950b6930a7c29b6c1fb83 GIT binary patch literal 4717 zcmdT|&2G~`5O(uNk~Wl9szf<iJV1Nm#>Hti)KcOYuT$DnWs-m*QX9GMfg1;&hKI;Q zao`Aiv-UdcG$>B0k}%R}?Qdsyza7u+&U!kXPBrattZ7==_1;fLcql+C&>d*qo_J$F zso6gVQWGz&(d_^)WO~?T`e!fnZbs24)T5*mRA?`SsXhq&2%U`mk2AYl{X-DyT?VV~ z&|P8aj0QnC#4C+VOzJVB3|0i%XtB1@@3<F6r_VTmJ*bpguhUvw(YMUEeRgfOU|LSh zX`q9X)05NrE*k`@U6JK0=mMrM0N-Z{P|V{fDUbQUn|R?_FuA+&X-2Pk6p~N$#Gqsu z!XJ3m8a(p+p%)H$)b;#Dz%H37vKBX*6bY5f`MFm%eJ_#?@Oy5Aq4z~`-!QmCyr%A} zo%Jm48kS2DL9(1<H8zZ=kLQ|c2e;#B9FWJQZ^&kS=Pvf_9Q6u#JMJZo1j)x+MliKl zpB}Y_<YHN3R%_ci#-6;2XSLOy+%U&wtEntPawR{efrN)gT1m@T7ZIZW8|O-TS`qVn zi(mT<f%P$TL$0nc$LTpM?zJ1B-3)?>4uPj=m#gw#=fY@q@*iYqq-}%0d+j!7u3(cp zOkgdxc9a_mlQKUuR&e&VoXC4NbKJhuG+eW1t?cup!DF4v^C3-KuN~IO%~SG|<@)(U zuEe48j+t-HR}bBX(@T0-%+mBD+8A^gkwHOR45-EOJy=b?sKxpYMB`lSs<z=U%iS)H za~GI8yR;p~`6^51A6#SRlI@ynb{Vppu1#MKvix()T`9JI;OC~Z<QIC9H*EU+_bAXv zbhnmwLNX!|SaJ_jvCQR1R>T+i^ll+x(MOWYtJo}eR#D3ODOXjoG&z)@7%54<GT1D+ z$--&!kb%|1Ia5(d55EkY9xfSle(#o*H1DdiSE~4Ii&D{eOHdJY8LD_T^wpY7xXFs2 z`0Ik-F4_-hk@GGJVs|eL#BZ7ABp7@`Ej2!ZLUz8Q9m*1v_9BX<Cr}F18nh0jl|?^B c8qlZEedse%G&&&th8HP+8%WkaxFqt0KWYgg*Z=?k literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0 b/CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..e05e8439f942720587eb4ee06e42831f28b3e0cd GIT binary patch literal 18960 zcmeI1y-Nc@5XIL|Y=lEC6f7)6u1u_~G+0P1g2FXvkKBP`z6dFTRj>+zy=DFc8zI$| zVrgk<nMSbFPG@rOL?qD=F_7gA3~#eHm%aDf4OwoZD2fh@F^iI3-7g1zE%53&zdR!y zW_C$ZbXq@1yh}{QO|yW{m(tNIMn7ee2<VJz$TEn|<-v7UJui1y4#I}cwC0B7vZO2N zNP4HGYB4;j1z{}=a(-27lF;jGl5>*##Y*8U`4a8udqE3y^b65`qc^2MYf_RwjjlC% z-C)i39c<uJ=nDVoDKb*<|4+f+kxn3k1W14cNPq;!LqPxex%(Ns2jlK%JnN97kN^pg z011%5_y|<}S}85V>B|vqZ+~g017qgV|65zi7$Xp<R*D6^P2aTsr9HyXyoCfn;AJmv z46C+*Tgk+ZhE?1AJMjNq*U`TT-GUm+BJr2#Am6Ta{&z5w_t3l^bVzieEgb(jmL5+W z$9ByV^z%RqzS~gOQvbbEGx2^6|1Rde1I@yJ7m6~9B?R<bSECb)$zt9gp^aqTEnWX7 z@cjmD!S^bBcc2+d{Wsy;f$ugn1>X<QyrurHo^RW)cQ?DkDsWjN*!YW|VfX$?oizw( zgak-{1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@ I1SX!q2f5JSBLDyZ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0i b/CEP/BB/BBS/test/tParmMerge.in_mep2/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..dc8bb6443a3481bb1c31d7cb0173140e8275c5d9 GIT binary patch literal 880 zcmb`FK?=e^3`JwRu<p8WA>vYoGPv^q&DNcGg;KYQx6zw;2fa&=U^7WN8XTlxU>Zn1 z$?Km1066FUM<VO<L=Km_n(}*H`&8p#4M2(1i}g8je{Je1eJT0{(hS|nGXQT_iu=H$ zeZv3To0|V0o^1$+#}E#e!Wwz9kvyxB{uIF<{b%N>gr~x`IbD>6a(-wV)v}lBkKOyr zAFJ2<VjkK>hk3m4c)2%^&j*Dc_*6el^4WKzd@kXa)hl0D(=PIW4)bjgiulGtZ?@Zi P_sQ;4jw-=n^^xNRn-@WX literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/table.info b/CEP/BB/BBS/test/tParmMerge.in_mep2/table.info new file mode 100644 index 00000000000..f785028b10d --- /dev/null +++ b/CEP/BB/BBS/test/tParmMerge.in_mep2/table.info @@ -0,0 +1,4 @@ +Type = MEP +SubType = + +ME Parameter values diff --git a/CEP/BB/BBS/test/tParmMerge.in_mep2/table.lock b/CEP/BB/BBS/test/tParmMerge.in_mep2/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..bdf9db95453ccd639ff18180bd352650711e4f50 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5VHZXC=hc3F%u9=0x_#oPJVJWkO5Kv!khp^ CXa{Qm literal 0 HcmV?d00001 diff --git a/CEP/BB/BBS/test/tPredSolv.cc b/CEP/BB/BBS/test/tPredSolv.cc index a6080a930f0..ceeb728d875 100644 --- a/CEP/BB/BBS/test/tPredSolv.cc +++ b/CEP/BB/BBS/test/tPredSolv.cc @@ -209,9 +209,9 @@ int main (int argc, const char* argv[]) vector<int> corr; pre1.select (antVec2, antVec2, false, corr); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve (pre1, solv, 9); cout << "End of first test" << endl; } @@ -236,9 +236,9 @@ int main (int argc, const char* argv[]) pre1.select (antVec2, antVec2, false, corr); // no autocorrelations pre2.select (antVec2, antVec2, false, corr); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve2 (pre1, pre2, solv, 1); cout << "End of test with two prediffers" << endl; } @@ -257,9 +257,9 @@ int main (int argc, const char* argv[]) vector<int> antVec2; pre1.select (antVec2, antVec2, false, corrVec); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve (pre1, solv, 5); cout << "End of test with 21 antennas" << endl; } @@ -282,9 +282,9 @@ int main (int argc, const char* argv[]) vector<int> corr; pre1.select (antVec2, antVec2, false, corr); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve1 (pre1, solv, 5); cout << "End of test with updating parmtable" << endl; } diff --git a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqLMN.h b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqLMN.h index 46701b0f780..4f47863a4e5 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqLMN.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqLMN.h @@ -37,7 +37,7 @@ namespace LOFAR { // @{ //# Forward Declarations -class MeqPointSource; +class MeqSource; class MeqPhaseRef; @@ -45,9 +45,9 @@ class MeqLMN: public MeqExprRep { public: // Construct for the given point source. - explicit MeqLMN (MeqPointSource*); + explicit MeqLMN (MeqSource*); - const MeqPointSource& getSource() const + const MeqSource& getSource() const { return *itsSource; } // Set the phase reference position. @@ -60,7 +60,7 @@ public: MeqResultVec getAnResultVec (const MeqRequest& request); private: - MeqPointSource* itsSource; + MeqSource* itsSource; const MeqPhaseRef* itsPhaseRef; }; diff --git a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqParmFunklet.h b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqParmFunklet.h index 2158e2d0776..2fa319206aa 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqParmFunklet.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqParmFunklet.h @@ -20,7 +20,7 @@ //# //# $Id$ -#if !defined(MNS_MEQPARMFUNKLET_H) +#ifndef MNS_MEQPARMFUNKLET_H #define MNS_MEQPARMFUNKLET_H // \file @@ -58,6 +58,13 @@ public: virtual ~MeqParmFunklet(); + // Make the correct object depending on the parm type. + // For a parm expression a MeqParmExpr object is created, otherwise + // a MeqParmFunklet. + static MeqExprRep* create (const string& name, + MeqParmGroup* group, + ParmDB::ParmDB* table); + // Get the requested result of the parameter. virtual MeqResult getResult (const MeqRequest&); diff --git a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqPointSource.h b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqPointSource.h index 69e78bf73ad..47f11bc9ef4 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqPointSource.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqPointSource.h @@ -20,16 +20,14 @@ //# //# $Id$ -#if !defined(MNS_MEQPOINTSOURCE_H) +#ifndef MNS_MEQPOINTSOURCE_H #define MNS_MEQPOINTSOURCE_H // \file // Class holding a point source //# Includes -#include <BBS/MNS/MeqExpr.h> -#include <BBS/MNS/MeqResult.h> -#include <BBS/MNS/MeqRequest.h> +#include <BBS/MNS/MeqSource.h> #include <Common/lofar_string.h> namespace LOFAR { @@ -38,23 +36,16 @@ namespace LOFAR { // \addtogroup MNS // @{ -//# Forward Declarations -class MeqPhaseRef; - -class MeqPointSource +class MeqPointSource: public MeqSource { public: - // The default constructor. - MeqPointSource(); - MeqPointSource (const string& name, const MeqExpr& fluxI, const MeqExpr& fluxQ, const MeqExpr& fluxU, const MeqExpr& fluxV, const MeqExpr& ra, const MeqExpr& dec); - const string& getName() const - { return itsName; } + virtual ~MeqPointSource(); MeqExpr& getI() { return itsI; } @@ -64,37 +55,12 @@ public: { return itsU; } MeqExpr& getV() { return itsV; } - MeqExpr& getRa() - { return itsRa; } - MeqExpr& getDec() - { return itsDec; } - - // Get the source nr. - int getSourceNr() const - { return itsSourceNr; } - - // Get the group nr. - int getGroupNr() const - { return itsGroupNr; } - - // Set the source nr. - void setSourceNr (int sourceNr) - { itsSourceNr = sourceNr; } - - // Set the group nr. - void setGroupNr (int groupNr) - { itsGroupNr = groupNr; } private: - int itsSourceNr; - int itsGroupNr; - string itsName; MeqExpr itsI; MeqExpr itsQ; MeqExpr itsU; MeqExpr itsV; - MeqExpr itsRa; - MeqExpr itsDec; }; // @} diff --git a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqSourceList.h b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqSourceList.h index 488fc6b9875..0d2f3478a2b 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqSourceList.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/MNS/MeqSourceList.h @@ -30,6 +30,7 @@ #include <BBS/MNS/MeqPointSource.h> #include <ParmDB/ParmDB.h> #include <Common/lofar_vector.h> +#include <Common/lofar_map.h> namespace LOFAR { @@ -50,28 +51,32 @@ public: // Fill the source list from the sources in the parm table. MeqSourceList (ParmDB::ParmDB& parmTable, MeqParmGroup* group); - // Get the number of sources to be used. - int size() const - { return itsSelected.size(); } + ~MeqSourceList(); - // Get the actual source number in the source list. - int actualSourceNr (int sourceNr) const - { return itsSelected[sourceNr]; } + // Get the total number of sources. + uint size() const + { return itsSources.size(); } - // Get the i-th selected source. - MeqPointSource& operator[] (int i) - { return itsSources[itsSelected[i]]; } + // Get the i-th source. + MeqSource& operator[] (int i) + { return *itsSources[i]; } + + // Get the source indices in the given group. + const vector<int>& getGroup (const string& groupName) const; - // Set the sources to be actually used. - // An empty vector selects all sources. - void setSelected (const vector<int>&); - private: + // Forbid copies. + // <group> + MeqSourceList (const MeqSourceList&); + MeqSourceList& operator= (const MeqSourceList&); + // </group> + // Add a source. - void add (const MeqPointSource&); + void add (MeqSource*); - vector<MeqPointSource> itsSources; - vector<int> itsSelected; + vector<MeqSource*> itsSources; + map<string,int> itsNameMap; + map<string,vector<int> > itsGroupMap; }; // @} diff --git a/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h b/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h index 63077c47e98..8a72f2a54de 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h @@ -327,7 +327,7 @@ private: MeqPhaseRef itsPhaseRef; //# Phase reference position in J2000 - MeqSourceList itsSources; + MeqSourceList* itsSources; vector<vector<int> > itsSrcGrp; //# sources in each group vector<int> itsSrcNrMap; //# map of all srcnr to used srcnr vector<int> itsPeelSourceNrs; diff --git a/CEP/BB/BBSKernel/src/MNS/MeqFunklet.cc b/CEP/BB/BBSKernel/src/MNS/MeqFunklet.cc index de408f8d3aa..66898602b54 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqFunklet.cc +++ b/CEP/BB/BBSKernel/src/MNS/MeqFunklet.cc @@ -89,7 +89,8 @@ MeqFunklet* MeqFunklet::make (const ParmDB::ParmValue& pvalue, return new MeqTabular(pvalue); } ASSERTSTR (false, - "Unknown funklet found for parameter " << name); + "Unknown funklet type " << pvalue.rep().itsType + << " found for parameter " << name); } int MeqFunklet::makeSolvable (int scidIndex) diff --git a/CEP/BB/BBSKernel/src/MNS/MeqLMN.cc b/CEP/BB/BBSKernel/src/MNS/MeqLMN.cc index 57450b4bdfc..ec541891b68 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqLMN.cc +++ b/CEP/BB/BBSKernel/src/MNS/MeqLMN.cc @@ -23,7 +23,7 @@ #include <lofar_config.h> #include <BBS/MNS/MeqLMN.h> -#include <BBS/MNS/MeqPointSource.h> +#include <BBS/MNS/MeqSource.h> #include <BBS/MNS/MeqPhaseRef.h> #include <BBS/MNS/MeqRequest.h> #include <BBS/MNS/MeqMatrixTmp.h> @@ -32,7 +32,7 @@ namespace LOFAR { -MeqLMN::MeqLMN (MeqPointSource* source) +MeqLMN::MeqLMN (MeqSource* source) : itsSource (source) { addChild (itsSource->getRa()); diff --git a/CEP/BB/BBSKernel/src/MNS/MeqLMN.h b/CEP/BB/BBSKernel/src/MNS/MeqLMN.h index 46701b0f780..4f47863a4e5 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqLMN.h +++ b/CEP/BB/BBSKernel/src/MNS/MeqLMN.h @@ -37,7 +37,7 @@ namespace LOFAR { // @{ //# Forward Declarations -class MeqPointSource; +class MeqSource; class MeqPhaseRef; @@ -45,9 +45,9 @@ class MeqLMN: public MeqExprRep { public: // Construct for the given point source. - explicit MeqLMN (MeqPointSource*); + explicit MeqLMN (MeqSource*); - const MeqPointSource& getSource() const + const MeqSource& getSource() const { return *itsSource; } // Set the phase reference position. @@ -60,7 +60,7 @@ public: MeqResultVec getAnResultVec (const MeqRequest& request); private: - MeqPointSource* itsSource; + MeqSource* itsSource; const MeqPhaseRef* itsPhaseRef; }; diff --git a/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.cc b/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.cc index e1910128a5e..ddb76f7e32f 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.cc +++ b/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.cc @@ -22,8 +22,11 @@ #include <lofar_config.h> #include <BBS/MNS/MeqParmFunklet.h> +#include <BBS/MNS/MeqParmExpr.h> #include <BBS/MNS/MeqPolc.h> #include <BBS/ParmData.h> +#include <ParmDB/ParmValue.h> +#include <ParmDB/ParmDB.h> #include <Common/LofarLogger.h> #include <casa/BasicMath/Math.h> @@ -49,7 +52,11 @@ MeqParmFunklet::MeqParmFunklet (const string& name, MeqParmGroup* group, itsNrPert (0), itsPertInx (-1), itsTable (table) -{} +{ + // See if the parm is a parm-expression. + // If so, create parm-funklets for them. + +} MeqParmFunklet::~MeqParmFunklet() { @@ -58,6 +65,26 @@ MeqParmFunklet::~MeqParmFunklet() } } +MeqExprRep* MeqParmFunklet::create (const string& name, + MeqParmGroup* group, + ParmDB::ParmDB* table) +{ + // If the parm is an expression, use that. + map<string,ParmDB::ParmValueSet> pset; + table->getDefValues (pset, name); + if (! pset.empty()) { + ParmDB::ParmValueSet& pvset = pset.begin()->second; + if (! pvset.getValues().empty()) { + ParmDB::ParmValueRep& pv = pvset.getValues()[0].rep(); + if (pv.itsType == "parmexpr") { + return new MeqParmExpr (pv.itsExpr, group, table); + } + } + } + // It is a normal funklet. + return new MeqParmFunklet (name, group, table); +} + void MeqParmFunklet::add (const MeqFunklet& funklet) { itsFunklets.push_back (funklet.clone()); diff --git a/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.h b/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.h index 2158e2d0776..2fa319206aa 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.h +++ b/CEP/BB/BBSKernel/src/MNS/MeqParmFunklet.h @@ -20,7 +20,7 @@ //# //# $Id$ -#if !defined(MNS_MEQPARMFUNKLET_H) +#ifndef MNS_MEQPARMFUNKLET_H #define MNS_MEQPARMFUNKLET_H // \file @@ -58,6 +58,13 @@ public: virtual ~MeqParmFunklet(); + // Make the correct object depending on the parm type. + // For a parm expression a MeqParmExpr object is created, otherwise + // a MeqParmFunklet. + static MeqExprRep* create (const string& name, + MeqParmGroup* group, + ParmDB::ParmDB* table); + // Get the requested result of the parameter. virtual MeqResult getResult (const MeqRequest&); diff --git a/CEP/BB/BBSKernel/src/MNS/MeqPointSource.cc b/CEP/BB/BBSKernel/src/MNS/MeqPointSource.cc index e2642d1d06d..aa4cbb71011 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqPointSource.cc +++ b/CEP/BB/BBSKernel/src/MNS/MeqPointSource.cc @@ -26,24 +26,18 @@ namespace LOFAR { -MeqPointSource::MeqPointSource() -: itsSourceNr (-1), - itsGroupNr (-1) -{} - MeqPointSource::MeqPointSource (const string& name, const MeqExpr& fluxI, const MeqExpr& fluxQ, const MeqExpr& fluxU, const MeqExpr& fluxV, const MeqExpr& ra, const MeqExpr& dec) -: itsSourceNr (-1), - itsGroupNr (-1), - itsName (name), - itsI (fluxI), - itsQ (fluxQ), - itsU (fluxU), - itsV (fluxV), - itsRa (ra), - itsDec (dec) +: MeqSource (name, "", ra, dec), + itsI (fluxI), + itsQ (fluxQ), + itsU (fluxU), + itsV (fluxV) +{} + +MeqPointSource::~MeqPointSource() {} } diff --git a/CEP/BB/BBSKernel/src/MNS/MeqPointSource.h b/CEP/BB/BBSKernel/src/MNS/MeqPointSource.h index 69e78bf73ad..47f11bc9ef4 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqPointSource.h +++ b/CEP/BB/BBSKernel/src/MNS/MeqPointSource.h @@ -20,16 +20,14 @@ //# //# $Id$ -#if !defined(MNS_MEQPOINTSOURCE_H) +#ifndef MNS_MEQPOINTSOURCE_H #define MNS_MEQPOINTSOURCE_H // \file // Class holding a point source //# Includes -#include <BBS/MNS/MeqExpr.h> -#include <BBS/MNS/MeqResult.h> -#include <BBS/MNS/MeqRequest.h> +#include <BBS/MNS/MeqSource.h> #include <Common/lofar_string.h> namespace LOFAR { @@ -38,23 +36,16 @@ namespace LOFAR { // \addtogroup MNS // @{ -//# Forward Declarations -class MeqPhaseRef; - -class MeqPointSource +class MeqPointSource: public MeqSource { public: - // The default constructor. - MeqPointSource(); - MeqPointSource (const string& name, const MeqExpr& fluxI, const MeqExpr& fluxQ, const MeqExpr& fluxU, const MeqExpr& fluxV, const MeqExpr& ra, const MeqExpr& dec); - const string& getName() const - { return itsName; } + virtual ~MeqPointSource(); MeqExpr& getI() { return itsI; } @@ -64,37 +55,12 @@ public: { return itsU; } MeqExpr& getV() { return itsV; } - MeqExpr& getRa() - { return itsRa; } - MeqExpr& getDec() - { return itsDec; } - - // Get the source nr. - int getSourceNr() const - { return itsSourceNr; } - - // Get the group nr. - int getGroupNr() const - { return itsGroupNr; } - - // Set the source nr. - void setSourceNr (int sourceNr) - { itsSourceNr = sourceNr; } - - // Set the group nr. - void setGroupNr (int groupNr) - { itsGroupNr = groupNr; } private: - int itsSourceNr; - int itsGroupNr; - string itsName; MeqExpr itsI; MeqExpr itsQ; MeqExpr itsU; MeqExpr itsV; - MeqExpr itsRa; - MeqExpr itsDec; }; // @} diff --git a/CEP/BB/BBSKernel/src/MNS/MeqSourceList.cc b/CEP/BB/BBSKernel/src/MNS/MeqSourceList.cc index a3741c89032..3ac37f2eebb 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqSourceList.cc +++ b/CEP/BB/BBSKernel/src/MNS/MeqSourceList.cc @@ -22,11 +22,14 @@ #include <lofar_config.h> #include <BBS/MNS/MeqSourceList.h> +#include <BBS/MNS/MeqPointSource.h> +#include <BBS/MNS/MeqGaussSource.h> #include <BBS/MNS/MeqParmFunklet.h> #include <Common/LofarLogger.h> #include <casa/Arrays/Vector.h> -#include <casa/Utilities/GenSort.h> +#include <casa/Utilities/GenSort.cc> // for automatic template +#include <algorithm> using namespace casa; @@ -35,79 +38,103 @@ namespace LOFAR { MeqSourceList::MeqSourceList (ParmDB::ParmDB& parmTable, MeqParmGroup* group) { // Get the vector of all parms containing a source name. - vector<string> nams = parmTable.getNames("RA.*"); + // Also get all parms representing a gaussian source. + vector<string> nams = parmTable.getNames("RA:*"); + vector<string> gnams = parmTable.getNames("Phi:*"); if (nams.size() == 0) { map<string,ParmDB::ParmValueSet> pset; - parmTable.getDefValues (pset, "RA.*"); + parmTable.getDefValues (pset, "RA:*"); for (map<string,ParmDB::ParmValueSet>::const_iterator iter = pset.begin(); iter != pset.end(); iter++) { nams.push_back (iter->first); } + pset.clear(); + parmTable.getDefValues (pset, "Phi:*"); + for (map<string,ParmDB::ParmValueSet>::const_iterator iter = pset.begin(); + iter != pset.end(); + iter++) { + gnams.push_back (iter->first); + } } - vector<int> srcs(nams.size()); - // Extract the sourcenrs from the names. + // Extract the sourcenames from the parmnames. for (uint i=0; i<nams.size(); i++) { string name = nams[i]; - // Remove first part from the name which looks like RA.CPn.. - string::size_type idx = name.rfind ('.'); + // Remove first part from the name which looks like RA:name. + string::size_type idx = name.rfind (':'); ASSERT (idx != string::npos); - // Remove first part (RA or so). name = name.substr (idx+1); nams[i] = name; - int srcnr = -1; - // Get sourcenr from name which looks like CPn. - if (name.substr(0,2) == "CP") { - istringstream istr(name.substr(2)); - istr >> srcnr; - srcs[i] = srcnr-1; - } } - // Sort the srcnrs uniquely. + // Extract the sourcenames from the parmnames. + for (uint i=0; i<gnams.size(); i++) { + string name = gnams[i]; + // Remove first part from the name which looks like RA:name. + string::size_type idx = name.rfind (':'); + ASSERT (idx != string::npos); + name = name.substr (idx+1); + gnams[i] = name; + } + // Sort the names uniquely. Vector<uInt> index; - int nr = GenSortIndirect<int>::sort (index, &srcs[0], srcs.size(), - Sort::Ascending, - Sort::QuickSort|Sort::NoDuplicates); + int nr = GenSortIndirect<string>::sort (index, &nams[0], nams.size(), + Sort::Ascending, + Sort::QuickSort|Sort::NoDuplicates); for (int i=0; i<nr; i++) { int inx = index(i); - string name = nams[inx]; - MeqParmFunklet* mr = new MeqParmFunklet("RA."+name, + const string& name = nams[inx]; + MeqParmFunklet* mr = new MeqParmFunklet("RA:"+name, group, &parmTable); - MeqParmFunklet* md = new MeqParmFunklet("DEC."+name, + MeqParmFunklet* md = new MeqParmFunklet("DEC:"+name, group, &parmTable); - MeqParmFunklet* mi = new MeqParmFunklet("StokesI."+name, + MeqParmFunklet* mi = new MeqParmFunklet("StokesI:"+name, group, &parmTable); - MeqParmFunklet* mq = new MeqParmFunklet("StokesQ."+name, + MeqParmFunklet* mq = new MeqParmFunklet("StokesQ:"+name, group, &parmTable); - MeqParmFunklet* mu = new MeqParmFunklet("StokesU."+name, + MeqParmFunklet* mu = new MeqParmFunklet("StokesU:"+name, group, &parmTable); - MeqParmFunklet* mv = new MeqParmFunklet("StokesV."+name, + MeqParmFunklet* mv = new MeqParmFunklet("StokesV:"+name, group, &parmTable); - add (MeqPointSource(name, mi, mq, mu, mv, mr, md)); + if (std::find(gnams.begin(), gnams.end(), name) == gnams.end()) { + add (new MeqPointSource(name, mi, mq, mu, mv, mr, md)); + } else { + MeqParmFunklet* mmin = new MeqParmFunklet("Minor:"+name, + group, &parmTable); + MeqParmFunklet* mmaj = new MeqParmFunklet("Major:"+name, + group, &parmTable); + MeqParmFunklet* mphi = new MeqParmFunklet("Phi:"+name, + group, &parmTable); + add (new MeqGaussSource(name, mi, mq, mu, mv, mr, md, mmin, mmaj, mphi)); + } // cout << "Found source " << name << " (srcnr=" << srcnr << ')' << endl; } } -void MeqSourceList::add (const MeqPointSource& source) +MeqSourceList::~MeqSourceList() { - itsSelected.push_back (itsSources.size()); - itsSources.push_back (source); + for (vector<MeqSource*>::iterator iter = itsSources.begin(); + iter != itsSources.end(); + iter++) { + delete *iter; + } } -void MeqSourceList::setSelected (const vector<int>& sel) +const vector<int>& MeqSourceList::getGroup (const string& groupName) const { - if (sel.size() == 0) { - itsSelected.resize (itsSources.size()); - for (unsigned int i=0; i<itsSources.size(); i++) { - itsSelected[i] = i; - } - } else { - for (unsigned int i=0; i<sel.size(); i++) { - ASSERT (sel[i] >= 0); - ASSERT (sel[i] < int(itsSources.size())); - } - itsSelected = sel; - } + map<string,vector<int> >::const_iterator idx = itsGroupMap.find (groupName); + ASSERTSTR (idx != itsGroupMap.end(), + "Source group " << groupName << " is unknown"); + return idx->second; +} + +void MeqSourceList::add (MeqSource* source) +{ + int idx = itsSources.size(); + itsSources.push_back (source); + itsNameMap[source->getName()] = idx; + vector<int>& group = itsGroupMap[source->getGroupName()]; + group.push_back (idx); } } + diff --git a/CEP/BB/BBSKernel/src/MNS/MeqSourceList.h b/CEP/BB/BBSKernel/src/MNS/MeqSourceList.h index 488fc6b9875..0d2f3478a2b 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqSourceList.h +++ b/CEP/BB/BBSKernel/src/MNS/MeqSourceList.h @@ -30,6 +30,7 @@ #include <BBS/MNS/MeqPointSource.h> #include <ParmDB/ParmDB.h> #include <Common/lofar_vector.h> +#include <Common/lofar_map.h> namespace LOFAR { @@ -50,28 +51,32 @@ public: // Fill the source list from the sources in the parm table. MeqSourceList (ParmDB::ParmDB& parmTable, MeqParmGroup* group); - // Get the number of sources to be used. - int size() const - { return itsSelected.size(); } + ~MeqSourceList(); - // Get the actual source number in the source list. - int actualSourceNr (int sourceNr) const - { return itsSelected[sourceNr]; } + // Get the total number of sources. + uint size() const + { return itsSources.size(); } - // Get the i-th selected source. - MeqPointSource& operator[] (int i) - { return itsSources[itsSelected[i]]; } + // Get the i-th source. + MeqSource& operator[] (int i) + { return *itsSources[i]; } + + // Get the source indices in the given group. + const vector<int>& getGroup (const string& groupName) const; - // Set the sources to be actually used. - // An empty vector selects all sources. - void setSelected (const vector<int>&); - private: + // Forbid copies. + // <group> + MeqSourceList (const MeqSourceList&); + MeqSourceList& operator= (const MeqSourceList&); + // </group> + // Add a source. - void add (const MeqPointSource&); + void add (MeqSource*); - vector<MeqPointSource> itsSources; - vector<int> itsSelected; + vector<MeqSource*> itsSources; + map<string,int> itsNameMap; + map<string,vector<int> > itsGroupMap; }; // @} diff --git a/CEP/BB/BBSKernel/src/Makefile.am b/CEP/BB/BBSKernel/src/Makefile.am index f800eb5379c..629bea39f12 100644 --- a/CEP/BB/BBSKernel/src/Makefile.am +++ b/CEP/BB/BBSKernel/src/Makefile.am @@ -18,6 +18,7 @@ MNS/MeqDiag.h \ MNS/MeqDomain.h \ MNS/MeqExpr.h \ MNS/MeqFunklet.h \ +MNS/MeqGaussSource.h \ MNS/MeqJonesCMul2.h \ MNS/MeqJonesCMul3.h \ MNS/MeqJonesExpr.h \ @@ -37,6 +38,7 @@ MNS/MeqMatrixRealSca.h \ MNS/MeqMatrixRep.h \ MNS/MeqMatrixTmp.h \ MNS/MeqParm.h \ +MNS/MeqParmExpr.h \ MNS/MeqParmFunklet.h \ MNS/MeqParmSingle.h \ MNS/MeqPhaseRef.h \ @@ -46,6 +48,7 @@ MNS/MeqRequest.h \ MNS/MeqRequestId.h \ MNS/MeqResult.h \ MNS/MeqResultVec.h \ +MNS/MeqSource.h \ MNS/MeqSourceList.h \ MNS/MeqStatExpr.h \ MNS/MeqStation.h \ @@ -74,6 +77,7 @@ MNS/MeqDFTPS.cc \ MNS/MeqDomain.cc \ MNS/MeqExpr.cc \ MNS/MeqFunklet.cc \ +MNS/MeqGaussSource.cc \ MNS/MeqJonesCMul2.cc \ MNS/MeqJonesCMul3.cc \ MNS/MeqJonesExpr.cc \ @@ -92,6 +96,7 @@ MNS/MeqMatrixRealSca.cc \ MNS/MeqMatrixRep.cc \ MNS/MeqMatrixTmp.cc \ MNS/MeqParm.cc \ +MNS/MeqParmExpr.cc \ MNS/MeqParmFunklet.cc \ MNS/MeqParmSingle.cc \ MNS/MeqPhaseRef.cc \ @@ -100,6 +105,7 @@ MNS/MeqPolc.cc \ MNS/MeqRequest.cc \ MNS/MeqResult.cc \ MNS/MeqResultVec.cc \ +MNS/MeqSource.cc \ MNS/MeqSourceList.cc \ MNS/MeqStatExpr.cc \ MNS/MeqStation.cc \ diff --git a/CEP/BB/BBSKernel/src/Prediffer.cc b/CEP/BB/BBSKernel/src/Prediffer.cc index ccc0a16b40c..5812e873855 100644 --- a/CEP/BB/BBSKernel/src/Prediffer.cc +++ b/CEP/BB/BBSKernel/src/Prediffer.cc @@ -143,6 +143,7 @@ Prediffer::Prediffer(const string& msName, itsGSMMEPName (skyPdm.getTableName()), itsGSMMEP (skyPdm), itsCalcUVW (calcUVW), + itsSources (0), itsSrcGrp (sourceGroups), itsNrPert (0), itsNCorr (0), @@ -242,6 +243,7 @@ Prediffer::~Prediffer() { LOG_TRACE_FLOW( "Prediffer destructor" ); + delete itsSources; for (vector<MeqStatUVW*>::iterator iter = itsStatUVW.begin(); iter != itsStatUVW.end(); iter++) { @@ -423,16 +425,16 @@ void Prediffer::countBaseCorr() // // ~getSources // -// Get all sources from the GSM table. +// Get all sources from the parmtable. // //---------------------------------------------------------------------- void Prediffer::getSources() { // Get the sources from the ParmTable - itsSources = MeqSourceList(itsGSMMEP, &itsParmGroup); - int nrsrc = itsSources.size(); + itsSources = new MeqSourceList(itsGSMMEP, &itsParmGroup); + int nrsrc = itsSources->size(); for (int i=0; i<nrsrc; ++i) { - itsSources[i].setSourceNr (i); + (*itsSources)[i].setSourceNr (i); } // Make a map for the sources actually used. itsSrcNrMap.reserve (nrsrc); @@ -444,7 +446,6 @@ void Prediffer::getSources() vec[0] = i+1; // source nrs are 1-relative itsSrcGrp[i] = vec; itsSrcNrMap.push_back (i); - itsSources[i].setGroupNr (i); // group nrs are 0-relative } } else { for (uint j=0; j<itsSrcGrp.size(); ++j) { @@ -454,10 +455,7 @@ void Prediffer::getSources() ASSERTSTR (srcs[i] > 0 && srcs[i] <= nrsrc, "Sourcenr " << srcs[i] << " must be > 0 and <= #sources (=" << nrsrc << ')'); - ASSERTSTR (itsSources[srcs[i]-1].getGroupNr() < 0, - "Sourcenr " << srcs[i] << " multiply used in groups"); - itsSources[srcs[i]-1].setGroupNr (j); - itsSources[srcs[i]-1].setSourceNr (itsSrcNrMap.size()); + (*itsSources)[srcs[i]-1].setSourceNr (itsSrcNrMap.size()); itsSrcNrMap.push_back (srcs[i]-1); } } @@ -467,7 +465,7 @@ void Prediffer::getSources() itsLMN.reserve (nrused); for (int i=0; i<nrused; ++i) { int src = itsSrcNrMap[i]; - MeqLMN* lmn = new MeqLMN(&(itsSources[src])); + MeqLMN* lmn = new MeqLMN(&((*itsSources)[src])); lmn->setPhaseRef (&itsPhaseRef); itsLMN.push_back (lmn); } @@ -498,11 +496,11 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, int nrgrp = itsSrcGrp.size(); itsStatUVW.reserve (nrstat); // EJ is real/imag or ampl/phase - string ejname1 = "real."; - string ejname2 = "imag."; + string ejname1 = "real:"; + string ejname2 = "imag:"; if (asAP) { - ejname1 = "ampl."; - ejname2 = "phase."; + ejname1 = "ampl:"; + ejname2 = "phase:"; } // Vector containing StatExpr-s. vector<MeqJonesExpr> statExpr(nrstat); @@ -523,21 +521,21 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, uvw = new MeqStatUVW (itsStations[i], &itsPhaseRef); // Do pure station parameters only if told so. if (useStatParm) { - MeqExpr frot (new MeqParmFunklet ("frot." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr drot (new MeqParmFunklet ("drot." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr dell (new MeqParmFunklet ("dell." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr gain11 (new MeqParmFunklet ("gain.11." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); - MeqExpr gain22 (new MeqParmFunklet ("gain.22." + - itsStations[i]->getName(), - &itsParmGroup, &itsMEP)); + MeqExpr frot (MeqParmFunklet::create ("frot:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr drot (MeqParmFunklet::create ("drot:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr dell (MeqParmFunklet::create ("dell:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr gain11 (MeqParmFunklet::create ("gain:11:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); + MeqExpr gain22 (MeqParmFunklet::create ("gain:22:" + + itsStations[i]->getName(), + &itsParmGroup, &itsMEP)); statExpr[i] = MeqJonesExpr(new MeqStatExpr (frot, drot, dell, gain11, gain22)); } @@ -553,22 +551,22 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, if (useTEJ) { // Make a gain/phase expression per station. string nm = itsStations[i]->getName(); - MeqExpr ej11r (new MeqParmFunklet ("EJ11." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej11i (new MeqParmFunklet ("EJ11." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12r (new MeqParmFunklet ("EJ12." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12i (new MeqParmFunklet ("EJ12." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21r (new MeqParmFunklet ("EJ21." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21i (new MeqParmFunklet ("EJ21." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22r (new MeqParmFunklet ("EJ22." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22i (new MeqParmFunklet ("EJ22." + ejname2 + nm, - &itsParmGroup, &itsMEP)); + MeqExpr ej11r (MeqParmFunklet::create ("EJ11:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej11i (MeqParmFunklet::create ("EJ11:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12r (MeqParmFunklet::create ("EJ12:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12i (MeqParmFunklet::create ("EJ12:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21r (MeqParmFunklet::create ("EJ21:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21i (MeqParmFunklet::create ("EJ21:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22r (MeqParmFunklet::create ("EJ22:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22i (MeqParmFunklet::create ("EJ22:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); if (asAP) { ej11 = new MeqExprAPToComplex (ej11r, ej11i); ej12 = new MeqExprAPToComplex (ej12r, ej12i); @@ -589,23 +587,23 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, for (int j=0; j<nrgrp; j++) { ostringstream ostr; ostr << j+1; - string nm = itsStations[i]->getName() + ".SG" + ostr.str(); - MeqExpr ej11r (new MeqParmFunklet ("EJ11." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej11i (new MeqParmFunklet ("EJ11." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12r (new MeqParmFunklet ("EJ12." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej12i (new MeqParmFunklet ("EJ12." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21r (new MeqParmFunklet ("EJ21." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej21i (new MeqParmFunklet ("EJ21." + ejname2 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22r (new MeqParmFunklet ("EJ22." + ejname1 + nm, - &itsParmGroup, &itsMEP)); - MeqExpr ej22i (new MeqParmFunklet ("EJ22." + ejname2 + nm, - &itsParmGroup, &itsMEP)); + string nm = itsStations[i]->getName() + ":SG" + ostr.str(); + MeqExpr ej11r (MeqParmFunklet::create ("EJ11:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej11i (MeqParmFunklet::create ("EJ11:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12r (MeqParmFunklet::create ("EJ12:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej12i (MeqParmFunklet::create ("EJ12:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21r (MeqParmFunklet::create ("EJ21:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej21i (MeqParmFunklet::create ("EJ21:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22r (MeqParmFunklet::create ("EJ22:" + ejname1 + nm, + &itsParmGroup, &itsMEP)); + MeqExpr ej22i (MeqParmFunklet::create ("EJ22:" + ejname2 + nm, + &itsParmGroup, &itsMEP)); if (asAP) { ej11 = new MeqExprAPToComplex (ej11r, ej11i); ej12 = new MeqExprAPToComplex (ej12r, ej12i); @@ -661,9 +659,10 @@ void Prediffer::makeLOFARExpr (bool useTEJ, bool usePEJ, bool asAP, MeqExpr expr1 (new MeqBaseDFTPS (pdfts[ant1*nrsrc + src], pdfts[ant2*nrsrc + src], itsLMN[src])); - vecSrc.push_back (MeqJonesExpr - (new MeqBaseLinPS(expr1, - &(itsSources[itsSrcNrMap[src]])))); + // For the time being only point sources are supported. + MeqPointSource& mps = dynamic_cast<MeqPointSource&> + ((*itsSources)[itsSrcNrMap[src]]); + vecSrc.push_back (MeqJonesExpr (new MeqBaseLinPS(expr1, &mps))); } MeqJonesExpr sum; // Sum all sources in the group. @@ -1970,28 +1969,28 @@ void Prediffer::fillUVW() bool Prediffer::setPeelGroups (const vector<int>& peelGroups, const vector<int>& extraGroups) { - vector<int> allNrs; - for (uint i=0; i<extraGroups.size(); ++i) { - ASSERT (extraGroups[i] >= 0 && extraGroups[i] < int(itsSrcGrp.size())); - const vector<int>& grp = itsSrcGrp[i]; - for (uint j=0; j<grp.size(); ++j) { - allNrs.push_back (grp[j] - 1); - } - } - vector<int> peelNrs; - for (uint i=0; i<peelGroups.size(); ++i) { - ASSERT (peelGroups[i] >= 0 && peelGroups[i] < int(itsSrcGrp.size())); - const vector<int>& grp = itsSrcGrp[peelGroups[i]]; - for (uint j=0; j<grp.size(); ++j) { - peelNrs.push_back (grp[j] - 1); - allNrs.push_back (grp[j] - 1); - } - } - LOG_TRACE_OBJ_STR( "peel sources " << peelNrs << "; predict sources " - << allNrs ); - ASSERT (peelNrs.size() > 0); - itsSources.setSelected (allNrs); - itsPeelSourceNrs = peelNrs; +// vector<int> allNrs; +// for (uint i=0; i<extraGroups.size(); ++i) { +// ASSERT (extraGroups[i] >= 0 && extraGroups[i] < int(itsSrcGrp.size())); +// const vector<int>& grp = itsSrcGrp[i]; +// for (uint j=0; j<grp.size(); ++j) { +// allNrs.push_back (grp[j] - 1); +// } +// } +// vector<int> peelNrs; +// for (uint i=0; i<peelGroups.size(); ++i) { +// ASSERT (peelGroups[i] >= 0 && peelGroups[i] < int(itsSrcGrp.size())); +// const vector<int>& grp = itsSrcGrp[peelGroups[i]]; +// for (uint j=0; j<grp.size(); ++j) { +// peelNrs.push_back (grp[j] - 1); +// allNrs.push_back (grp[j] - 1); +// } +// } +// LOG_TRACE_OBJ_STR( "peel sources " << peelNrs << "; predict sources " +// << allNrs ); +// ASSERT (peelNrs.size() > 0); +// itsSources.setSelected (allNrs); +// itsPeelSourceNrs = peelNrs; return true; } diff --git a/CEP/BB/BBSKernel/src/Prediffer.h b/CEP/BB/BBSKernel/src/Prediffer.h index 63077c47e98..8a72f2a54de 100644 --- a/CEP/BB/BBSKernel/src/Prediffer.h +++ b/CEP/BB/BBSKernel/src/Prediffer.h @@ -327,7 +327,7 @@ private: MeqPhaseRef itsPhaseRef; //# Phase reference position in J2000 - MeqSourceList itsSources; + MeqSourceList* itsSources; vector<vector<int> > itsSrcGrp; //# sources in each group vector<int> itsSrcNrMap; //# map of all srcnr to used srcnr vector<int> itsPeelSourceNrs; diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..92402a83c552826f665500bf9c72bb5f7a2f3e6f GIT binary patch literal 2205 zcmc&$%}(1u5MF)~;sEzTFFteUP>G8JK17NW%WDvv(AG9pRO3Y(r&4cy1`d__GI@|b zOyQelo%#oa2`!8?+THovZ)eA|UMv<1#(KXPW1UcZP7_Sl!JFVUaNkeGG&7p+Z%8b? zI7wy^7G(O-bL}{}67w{-Z-f%pNuDVCn@H!$3~HhS?PEtW%MopweQ7$(>?^5k&xQ3N zcw2h}NhDQ_B|+H-_a7vs-67Q4m7FZ&yvHMv3Uw^g`E^FYk9e*Krfm#1$Bu@ECEMk> z$YP;lo_ivDOt4L6C0Yp^9hr#6=kbLXKBbQ69q@f{loH=d>5JtYwX{s1bvzmK&>4sP z0b&b`J!7elkGVDU<!qWyC1t$G4cV-oT#E7>^6r^4I(1(N`woQId*HW%J&-cBLD-Ux z)#H=VnKKx*uL(FY_Wyx5E4fxGJH8u)r@_Dphm)}e)uy70YB3J4C<+sSlGwyr&oW`X z4BSy`oCUsOd|mN20oK}9-#zyOm-CmT@(r3-?aHli=(%VQp5Ho;|MtF7_J6Q-@#fLp zH<~Cx(+{J03CM^@%S`tz%PK9eP-yGFEu|tZf3g)t{fj7+v~#aifn|C1;>(&!vJ1se z`~~1QfZc*OIQPuC8cFyBMQ4!8=qo1VOb;k%?FalYQU*KVE_e&Pq^BI02K5OAU%v;< Cwu-g@ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b57f473278b80ae392b2c1b3bc67402cbae601e4 GIT binary patch literal 7696 zcmeHJJxjzu5FPdWXhd5(OH03M5eva0SnMxYZUZOgav@xCSXv5#js5)u8^LNzf5-g+ zYa2n|yX?V%$>B8tlNp%2$?lMuc{`KDd+#qrWE*ORHgz_4W*FIY4GYrQgaTK21Nnxm z6sBy2`v)vcox{4qe`0_qN<ka=J0#9iH72@BT|DARQ}>~01UZ22Ld{J-OXBO?#d+)^ zo6%<`+~0$)Lobp+_jdLWwn*s)9T@!{SQh;m>-0H<E{aYc?tg6*&nXR7nFTw1Q5F;I zFOvlc<K!%th0YNuYoW07bo#2_0Tc9uPG1WLqn460oA-~L2tFJ_`*_YinX^xWT}x6e z3X%<yF3ase|6;d@8ZEU32Kd)VIiFrdMghkGn-2W5rt}Jsr+{w(n+}g3uj9}6m$NEt jdi^_1FHq}K29yD1Kp9X5lmTTx8Bhk40cAiL_{G2v*mtgO literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..33964e5347f22d5a9eaa6ae1342396eeccdbe615 GIT binary patch literal 197 zcmZQzU|={3#4x}FWH16Th=u}(9dfO&19!}`XJG9Hi^JrZfyzMYfHYVShI*&~1A|rw svO4y>bOo3_AhRIghkbsLf-kZ-V`@+;GQa=OSB;o{28W^)7Zh<u06S(BjsO4v literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info new file mode 100644 index 00000000000..1e2a62505a0 --- /dev/null +++ b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.info @@ -0,0 +1,5 @@ +Type = MEPold +SubType = + +Initial ME Parameter values +Old ME Parameter values diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/DEFAULTVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..36c25acc40a05c4842e28d04895408068789d419 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcMhz-P?K+F!rOh7CN#H>y^`N`Qp21o%2vjYG^ CMh95{ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.dat b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..376d73371132c857d6ea34689eb29aae972076cd GIT binary patch literal 4600 zcmdT|&2G~`5O&ifB<T+nsS@R6@ebU$IO!HF#g655OM5~l2`D19E5|)><G^#}C3q8r zI0E0S*U8!misPsxj5JyAx3jyS$FsY$nNFuuO*{FaX<E(m-;alQs6a{fpe<+Yj{@0p z{0&G`RL+N!J}PAT)MEObANjY#co^xi90U#83t_7F!yv{Wqu}G*ZlZq(Bi&-KdI>!c zmhP}0Mgvr7=I78>f+&*#6s@H?oyyK<yzh_ws1uIwZvz_q6^|pLr%QvXZ3t?pYDYZw zgMl9ncx?H>GT?yB6e-1xUYUf-)%?60hg?Up1%A(rDDpom?i+;n2%VYxnw_4_J;U~R zLa_kHhO`u~kLRZ8gp*M`3d!TCZ^)*+bC-KIN4*Z-u6Io{L00>gc-Mq&@>8Ck9HbD- zDzndbonzw38~Iwh?8z;2T(z2NA|%)HBN;#NN?OHwA0hg`ajst(-AlISru7?w7d?YM z(5AJ@)ph2&J$LtMx5IF(L*OY2&Ia#wuZ(uL_(6tFnzjS}?p<7P<_R`M&j>Q!@`|kS zj<JTbcjZJrbeQX1x^2TVd-mEsmmM}p8{`P$<1OTk`H&{A?_Aa`%roVemgVz@<plHT z&0A)^ezSh)Zca~*u$-kC#I!N!Fd~DBS^VfwlP{X1yaVOri^+G6UBfY4W_!EEF?WG! zv1`X=oUgNF{=qdS7mZENv>37*%b_m^DV8NBw#n~CpPSB-Uve~xJJJOT)K1sj^iD`d zBm$H7Fcr&Oe$obEJ-=I|uoy$;@+vmZomG^we#%u<Y?d6RpqNP}Um0wk++^Wd@{obm z!#UGXpB;V~cy_pC(EQ$=Hqv`Hl)X~L>$5FNMUyQ-Mbu@e;@QwwTQcF6HvGgNAovGF z`wrdb+(JR@7Q$czu+|=j{ZDwH&Zkhw-WT*kS%uPGREIu-((&1ZwxG1K4xvZTW9Vb( W6H;_KA^nO<Du0_OZQr;g@|8dJ>=A<i literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0 b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b4837eddcf727ef2745f1c5f0fd58a644041c6a8 GIT binary patch literal 5124 zcmeH}u?oU45Qd{x(LoT!-O<rU5C_2_IOGX}$spERLI-j3$?|IYUrV>pO^Waz{0(=P za_N^2e~d96l~QxaRJL$7I8$j`j8IV7QmFyfp(Kb8LUM`8tjPlk_2#C`=U)+!8<oIs z5Ccv=g^bas!ue-=(;L)Q&=y)i=6Wx4e-6$E@3bx3eQ4GFHP$h7$RC$m+e{Ya4F(C2 z011!)36KB@^g*B>_ajqZ_}rA|dc!w~b=pB)o=f&fU%{zoSdum?S?rp=hvEP2bU8AE P1W14cNPq-Lpg#g%NjY9? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0i b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..c09f05b309fbcc6ff12c9eb91aff39455347c41e GIT binary patch literal 16 PcmZQzU|<jcVi*7b0MGyt literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.info b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.info new file mode 100644 index 00000000000..a1a976ed494 --- /dev/null +++ b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.info @@ -0,0 +1,3 @@ +Type = +SubType = + diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.lock b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/OLDVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..bda58097b47771545f500a22ba10e538987277a8 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5QBgy5HmrsB#>rx%E?d81~NbjK$r;tLaPT? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.dat b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..1febb8e5ea7b978633f4a5f540b4967cf5ba8148 GIT binary patch literal 4717 zcmdT|&2G~`5O$j%lC+_;QYFgC;sM$dH!e=HrIr%Mc%9OoDw6~hk=n?058OELG(1Ee ziUUXBo3+<jr$KQNm4uN-Ykxbt`|Wskch-~1WTI(DBTdsvuJ?XC#KUf)J1A@R*c<st z&A|nbs(5J)@A`?^QHSZDz0kWIM#E5#l1@;my%eT;Kky@TGV(u8?e6psL8x~atiD6{ zgrzg=2jKv(G%_)%#fUOk0cgF&&W&E%y)@cA#sTa@rBu7^*8GZ|WxnmP8?yz|QesX6 z9iE<@p3QbyCs6H*EMGzAFns~|Aya^29>+;}!u#IX3!B0C{??}%z2;F!KG73{qGbqw z;8m;h$nytYIN(vo^XCD3WTwbU+-OoHR4(S{UfcA&NH)Olxe<om7sY*p;2!asy06;o zTHG}(mm-2>F~>@57*8M1RnrdcM$srBk4xW>&Fapb@7WpZW$<>~D;f!skGG6qYOy*! zY7NQ7vdFB~wsVX<c^%Jct3A14j*C`PNrdE5eoO-i50A8x7O^fMME^I=<@B^7=J^)C z_8S806X=FqU1pBcb(Y*~H$b})1Y;cnPth({;obJ7(P-yC$k0gJ27h<Y&pC4io7`an zYq7PX+)$X5c+*(I+1qj=@7v6Adrre}&91ey&yxm^buQ0_G;zIgSUWdQ$xoK6=MT9O zhw?jSzPVUFbl0bs^e~^L=|{9N=rAIKU2!p>7K`^_HTj|zt2+>lbFr(~hQlm(yEx8V zU~25jb{OZ&ESZ0BjhRWdtFGB$$Zk3|eL2YD&n<VQ*nZ8=O=rn3^hCF8`t+m^C;$@% z@=i!bB-E&w+{08XbNP`K!g_kQkg(_@$>mjSnmel~W&M<^s#uyFN>GfHBwrb9n%rdJ zG<nFt>fxNJD5r;C22Kx`3_81a%SxJeMcFG=e7Z%cXuKt;h`J0_JRACIO(xuA#ZUZo z!EYDs2eiO>2L-Wv5C-D6Ok*7MKcSWyA44HKU(pU_5lVYe8TtfDfm(&uptQ2+$4DLe a6nX%CMv6v<q~Gu&<!=MY`n5|UzxxLi=_1eo literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0 b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..f83deca64494f24bbe78f5fe426a0895bb722519 GIT binary patch literal 18960 zcmeI2ze~eF6vyK)a1n~SxH&jDs*{rz2f-mI<Sz(KKrwAY=patTQE+$kPjC^OGKznO z|A648o4(iFp+novOUiv7yuM5B((ikpyU-(PS(fE-5CkjY(ID<6agjuWFzzkLiC}S6 zT;jYQh<%IARn1`89N)@`(O`3)FiQk<M%82)l-H8D&T15eC%q)S(wSD@6kikH7H^41 z7u`HdPm3fi(j<&?9b--VH^i63kFtK}(te4?i5;qbBLl{%59La|ct?Dix{lHQz^vJc zVq-gWg-^?(Ed%~P3+^MGKnwy9fB*y_;D&(y^0WJyya!|V<7OSA0s#m>00IzjM<9=j z?ykt`GaGI1nYOzO{8q~QSw{)zlh(g&zo}5YTLK@4m7a}m)$3PVZ&x|kSbs)tGiaIm zZFH+%zuK0m-^Thga+Sfp5qfnc*f5<llh0ej@^Y2V=&hNE-MbP*r%?p-y{_7G6}<aA zHx++*S9w+N(A3@17u+7&-TTwS=gZ@PjlLoH{nvrr``hRn3F?Ia1Rwwb2tWV=5P$## qAOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1RyZG1bzVKrJ%C_ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0i b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..5a497c3e4359126508ed7aae16bcc14821094dab GIT binary patch literal 296 zcmZQzU|`T-1QJld1f)S+gwO|jkQA~wOdcc#0T49|3<3@yIfS@~14Ld0O&phc0jPQj h2ap*sJ0WH;ILw*}0z2XEfypxi6`<OS%Y5?P0|4F84-x<X literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.info b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.info new file mode 100644 index 00000000000..f785028b10d --- /dev/null +++ b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.info @@ -0,0 +1,4 @@ +Type = MEP +SubType = + +ME Parameter values diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.lock b/CEP/BB/BBSKernel/test/tParmMerge.in_mep1/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..18ff0cf15fe51e32036517fc984c70cd6a22f23f GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5HkU>C=jzk*^(f(Q%-(zHjn{Q0K%*QLsSP} literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..92402a83c552826f665500bf9c72bb5f7a2f3e6f GIT binary patch literal 2205 zcmc&$%}(1u5MF)~;sEzTFFteUP>G8JK17NW%WDvv(AG9pRO3Y(r&4cy1`d__GI@|b zOyQelo%#oa2`!8?+THovZ)eA|UMv<1#(KXPW1UcZP7_Sl!JFVUaNkeGG&7p+Z%8b? zI7wy^7G(O-bL}{}67w{-Z-f%pNuDVCn@H!$3~HhS?PEtW%MopweQ7$(>?^5k&xQ3N zcw2h}NhDQ_B|+H-_a7vs-67Q4m7FZ&yvHMv3Uw^g`E^FYk9e*Krfm#1$Bu@ECEMk> z$YP;lo_ivDOt4L6C0Yp^9hr#6=kbLXKBbQ69q@f{loH=d>5JtYwX{s1bvzmK&>4sP z0b&b`J!7elkGVDU<!qWyC1t$G4cV-oT#E7>^6r^4I(1(N`woQId*HW%J&-cBLD-Ux z)#H=VnKKx*uL(FY_Wyx5E4fxGJH8u)r@_Dphm)}e)uy70YB3J4C<+sSlGwyr&oW`X z4BSy`oCUsOd|mN20oK}9-#zyOm-CmT@(r3-?aHli=(%VQp5Ho;|MtF7_J6Q-@#fLp zH<~Cx(+{J03CM^@%S`tz%PK9eP-yGFEu|tZf3g)t{fj7+v~#aifn|C1;>(&!vJ1se z`~~1QfZc*OIQPuC8cFyBMQ4!8=qo1VOb;k%?FalYQU*KVE_e&Pq^BI02K5OAU%v;< Cwu-g@ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b57f473278b80ae392b2c1b3bc67402cbae601e4 GIT binary patch literal 7696 zcmeHJJxjzu5FPdWXhd5(OH03M5eva0SnMxYZUZOgav@xCSXv5#js5)u8^LNzf5-g+ zYa2n|yX?V%$>B8tlNp%2$?lMuc{`KDd+#qrWE*ORHgz_4W*FIY4GYrQgaTK21Nnxm z6sBy2`v)vcox{4qe`0_qN<ka=J0#9iH72@BT|DARQ}>~01UZ22Ld{J-OXBO?#d+)^ zo6%<`+~0$)Lobp+_jdLWwn*s)9T@!{SQh;m>-0H<E{aYc?tg6*&nXR7nFTw1Q5F;I zFOvlc<K!%th0YNuYoW07bo#2_0Tc9uPG1WLqn460oA-~L2tFJ_`*_YinX^xWT}x6e z3X%<yF3ase|6;d@8ZEU32Kd)VIiFrdMghkGn-2W5rt}Jsr+{w(n+}g3uj9}6m$NEt jdi^_1FHq}K29yD1Kp9X5lmTTx8Bhk40cAiL_{G2v*mtgO literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..33964e5347f22d5a9eaa6ae1342396eeccdbe615 GIT binary patch literal 197 zcmZQzU|={3#4x}FWH16Th=u}(9dfO&19!}`XJG9Hi^JrZfyzMYfHYVShI*&~1A|rw svO4y>bOo3_AhRIghkbsLf-kZ-V`@+;GQa=OSB;o{28W^)7Zh<u06S(BjsO4v literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info new file mode 100644 index 00000000000..1e2a62505a0 --- /dev/null +++ b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.info @@ -0,0 +1,5 @@ +Type = MEPold +SubType = + +Initial ME Parameter values +Old ME Parameter values diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/DEFAULTVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..36c25acc40a05c4842e28d04895408068789d419 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcMhz-P?K+F!rOh7CN#H>y^`N`Qp21o%2vjYG^ CMh95{ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.dat b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..376d73371132c857d6ea34689eb29aae972076cd GIT binary patch literal 4600 zcmdT|&2G~`5O&ifB<T+nsS@R6@ebU$IO!HF#g655OM5~l2`D19E5|)><G^#}C3q8r zI0E0S*U8!misPsxj5JyAx3jyS$FsY$nNFuuO*{FaX<E(m-;alQs6a{fpe<+Yj{@0p z{0&G`RL+N!J}PAT)MEObANjY#co^xi90U#83t_7F!yv{Wqu}G*ZlZq(Bi&-KdI>!c zmhP}0Mgvr7=I78>f+&*#6s@H?oyyK<yzh_ws1uIwZvz_q6^|pLr%QvXZ3t?pYDYZw zgMl9ncx?H>GT?yB6e-1xUYUf-)%?60hg?Up1%A(rDDpom?i+;n2%VYxnw_4_J;U~R zLa_kHhO`u~kLRZ8gp*M`3d!TCZ^)*+bC-KIN4*Z-u6Io{L00>gc-Mq&@>8Ck9HbD- zDzndbonzw38~Iwh?8z;2T(z2NA|%)HBN;#NN?OHwA0hg`ajst(-AlISru7?w7d?YM z(5AJ@)ph2&J$LtMx5IF(L*OY2&Ia#wuZ(uL_(6tFnzjS}?p<7P<_R`M&j>Q!@`|kS zj<JTbcjZJrbeQX1x^2TVd-mEsmmM}p8{`P$<1OTk`H&{A?_Aa`%roVemgVz@<plHT z&0A)^ezSh)Zca~*u$-kC#I!N!Fd~DBS^VfwlP{X1yaVOri^+G6UBfY4W_!EEF?WG! zv1`X=oUgNF{=qdS7mZENv>37*%b_m^DV8NBw#n~CpPSB-Uve~xJJJOT)K1sj^iD`d zBm$H7Fcr&Oe$obEJ-=I|uoy$;@+vmZomG^we#%u<Y?d6RpqNP}Um0wk++^Wd@{obm z!#UGXpB;V~cy_pC(EQ$=Hqv`Hl)X~L>$5FNMUyQ-Mbu@e;@QwwTQcF6HvGgNAovGF z`wrdb+(JR@7Q$czu+|=j{ZDwH&Zkhw-WT*kS%uPGREIu-((&1ZwxG1K4xvZTW9Vb( W6H;_KA^nO<Du0_OZQr;g@|8dJ>=A<i literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0 b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..b4837eddcf727ef2745f1c5f0fd58a644041c6a8 GIT binary patch literal 5124 zcmeH}u?oU45Qd{x(LoT!-O<rU5C_2_IOGX}$spERLI-j3$?|IYUrV>pO^Waz{0(=P za_N^2e~d96l~QxaRJL$7I8$j`j8IV7QmFyfp(Kb8LUM`8tjPlk_2#C`=U)+!8<oIs z5Ccv=g^bas!ue-=(;L)Q&=y)i=6Wx4e-6$E@3bx3eQ4GFHP$h7$RC$m+e{Ya4F(C2 z011!)36KB@^g*B>_ajqZ_}rA|dc!w~b=pB)o=f&fU%{zoSdum?S?rp=hvEP2bU8AE P1W14cNPq-Lpg#g%NjY9? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0i b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..c09f05b309fbcc6ff12c9eb91aff39455347c41e GIT binary patch literal 16 PcmZQzU|<jcVi*7b0MGyt literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.info b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.info new file mode 100644 index 00000000000..a1a976ed494 --- /dev/null +++ b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.info @@ -0,0 +1,3 @@ +Type = +SubType = + diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.lock b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/OLDVALUES/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..bda58097b47771545f500a22ba10e538987277a8 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5QBgy5HmrsB#>rx%E?d81~NbjK$r;tLaPT? literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.dat b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.dat new file mode 100644 index 0000000000000000000000000000000000000000..838639a5f0db6a34dbe950b6930a7c29b6c1fb83 GIT binary patch literal 4717 zcmdT|&2G~`5O(uNk~Wl9szf<iJV1Nm#>Hti)KcOYuT$DnWs-m*QX9GMfg1;&hKI;Q zao`Aiv-UdcG$>B0k}%R}?Qdsyza7u+&U!kXPBrattZ7==_1;fLcql+C&>d*qo_J$F zso6gVQWGz&(d_^)WO~?T`e!fnZbs24)T5*mRA?`SsXhq&2%U`mk2AYl{X-DyT?VV~ z&|P8aj0QnC#4C+VOzJVB3|0i%XtB1@@3<F6r_VTmJ*bpguhUvw(YMUEeRgfOU|LSh zX`q9X)05NrE*k`@U6JK0=mMrM0N-Z{P|V{fDUbQUn|R?_FuA+&X-2Pk6p~N$#Gqsu z!XJ3m8a(p+p%)H$)b;#Dz%H37vKBX*6bY5f`MFm%eJ_#?@Oy5Aq4z~`-!QmCyr%A} zo%Jm48kS2DL9(1<H8zZ=kLQ|c2e;#B9FWJQZ^&kS=Pvf_9Q6u#JMJZo1j)x+MliKl zpB}Y_<YHN3R%_ci#-6;2XSLOy+%U&wtEntPawR{efrN)gT1m@T7ZIZW8|O-TS`qVn zi(mT<f%P$TL$0nc$LTpM?zJ1B-3)?>4uPj=m#gw#=fY@q@*iYqq-}%0d+j!7u3(cp zOkgdxc9a_mlQKUuR&e&VoXC4NbKJhuG+eW1t?cup!DF4v^C3-KuN~IO%~SG|<@)(U zuEe48j+t-HR}bBX(@T0-%+mBD+8A^gkwHOR45-EOJy=b?sKxpYMB`lSs<z=U%iS)H za~GI8yR;p~`6^51A6#SRlI@ynb{Vppu1#MKvix()T`9JI;OC~Z<QIC9H*EU+_bAXv zbhnmwLNX!|SaJ_jvCQR1R>T+i^ll+x(MOWYtJo}eR#D3ODOXjoG&z)@7%54<GT1D+ z$--&!kb%|1Ia5(d55EkY9xfSle(#o*H1DdiSE~4Ii&D{eOHdJY8LD_T^wpY7xXFs2 z`0Ik-F4_-hk@GGJVs|eL#BZ7ABp7@`Ej2!ZLUz8Q9m*1v_9BX<Cr}F18nh0jl|?^B c8qlZEedse%G&&&th8HP+8%WkaxFqt0KWYgg*Z=?k literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0 b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0 new file mode 100644 index 0000000000000000000000000000000000000000..e05e8439f942720587eb4ee06e42831f28b3e0cd GIT binary patch literal 18960 zcmeI1y-Nc@5XIL|Y=lEC6f7)6u1u_~G+0P1g2FXvkKBP`z6dFTRj>+zy=DFc8zI$| zVrgk<nMSbFPG@rOL?qD=F_7gA3~#eHm%aDf4OwoZD2fh@F^iI3-7g1zE%53&zdR!y zW_C$ZbXq@1yh}{QO|yW{m(tNIMn7ee2<VJz$TEn|<-v7UJui1y4#I}cwC0B7vZO2N zNP4HGYB4;j1z{}=a(-27lF;jGl5>*##Y*8U`4a8udqE3y^b65`qc^2MYf_RwjjlC% z-C)i39c<uJ=nDVoDKb*<|4+f+kxn3k1W14cNPq;!LqPxex%(Ns2jlK%JnN97kN^pg z011%5_y|<}S}85V>B|vqZ+~g017qgV|65zi7$Xp<R*D6^P2aTsr9HyXyoCfn;AJmv z46C+*Tgk+ZhE?1AJMjNq*U`TT-GUm+BJr2#Am6Ta{&z5w_t3l^bVzieEgb(jmL5+W z$9ByV^z%RqzS~gOQvbbEGx2^6|1Rde1I@yJ7m6~9B?R<bSECb)$zt9gp^aqTEnWX7 z@cjmD!S^bBcc2+d{Wsy;f$ugn1>X<QyrurHo^RW)cQ?DkDsWjN*!YW|VfX$?oizw( zgak-{1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@1W14cNPq-LfCNZ@ I1SX!q2f5JSBLDyZ literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0i b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.f0i new file mode 100644 index 0000000000000000000000000000000000000000..dc8bb6443a3481bb1c31d7cb0173140e8275c5d9 GIT binary patch literal 880 zcmb`FK?=e^3`JwRu<p8WA>vYoGPv^q&DNcGg;KYQx6zw;2fa&=U^7WN8XTlxU>Zn1 z$?Km1066FUM<VO<L=Km_n(}*H`&8p#4M2(1i}g8je{Je1eJT0{(hS|nGXQT_iu=H$ zeZv3To0|V0o^1$+#}E#e!Wwz9kvyxB{uIF<{b%N>gr~x`IbD>6a(-wV)v}lBkKOyr zAFJ2<VjkK>hk3m4c)2%^&j*Dc_*6el^4WKzd@kXa)hl0D(=PIW4)bjgiulGtZ?@Zi P_sQ;4jw-=n^^xNRn-@WX literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.info b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.info new file mode 100644 index 00000000000..f785028b10d --- /dev/null +++ b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.info @@ -0,0 +1,4 @@ +Type = MEP +SubType = + +ME Parameter values diff --git a/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.lock b/CEP/BB/BBSKernel/test/tParmMerge.in_mep2/table.lock new file mode 100644 index 0000000000000000000000000000000000000000..bdf9db95453ccd639ff18180bd352650711e4f50 GIT binary patch literal 325 zcmZQz7zMx(u-yj)K-v<BS&A$3l7TcM5VHZXC=hc3F%u9=0x_#oPJVJWkO5Kv!khp^ CXa{Qm literal 0 HcmV?d00001 diff --git a/CEP/BB/BBSKernel/test/tPredSolv.cc b/CEP/BB/BBSKernel/test/tPredSolv.cc index a6080a930f0..ceeb728d875 100644 --- a/CEP/BB/BBSKernel/test/tPredSolv.cc +++ b/CEP/BB/BBSKernel/test/tPredSolv.cc @@ -209,9 +209,9 @@ int main (int argc, const char* argv[]) vector<int> corr; pre1.select (antVec2, antVec2, false, corr); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve (pre1, solv, 9); cout << "End of first test" << endl; } @@ -236,9 +236,9 @@ int main (int argc, const char* argv[]) pre1.select (antVec2, antVec2, false, corr); // no autocorrelations pre2.select (antVec2, antVec2, false, corr); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve2 (pre1, pre2, solv, 1); cout << "End of test with two prediffers" << endl; } @@ -257,9 +257,9 @@ int main (int argc, const char* argv[]) vector<int> antVec2; pre1.select (antVec2, antVec2, false, corrVec); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve (pre1, solv, 5); cout << "End of test with 21 antennas" << endl; } @@ -282,9 +282,9 @@ int main (int argc, const char* argv[]) vector<int> corr; pre1.select (antVec2, antVec2, false, corr); // no autocorrelations vector<string> solv(3); - solv[0] = "RA.*"; - solv[1] = "DEC.*"; - solv[2] = "StokesI.*"; + solv[0] = "RA:*"; + solv[1] = "DEC:*"; + solv[2] = "StokesI:*"; doSolve1 (pre1, solv, 5); cout << "End of test with updating parmtable" << endl; } -- GitLab