simple 10-Jul-2019 13:16:15 Build ARD - Build And Package - ARD-25-fix - Tag Branch for Packages #6 (ARD-BPT22-TBFP-6) started building on agent cbt-el7-4.cv.nrao.edu simple 10-Jul-2019 13:16:15 Remote agent on host cbt-el7-4.cv.nrao.edu simple 10-Jul-2019 13:16:15 Build working directory is /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP simple 10-Jul-2019 13:16:15 Executing build ARD - Build And Package - ARD-25-fix - Tag Branch for Packages #6 (ARD-BPT22-TBFP-6) simple 10-Jul-2019 13:16:15 Skipping execution of task 'Checkout Default Repository' as it is disabled simple 10-Jul-2019 13:16:15 Running pre-build action: VCS Version Collector simple 10-Jul-2019 13:16:15 Skipping execution of task 'Checkout Default Repository' as it is disabled command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.repository.branch.name} with ARD-25-fix command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.buildNumber} with 6 command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.planRepository.revision} with 32f3c33fae955702f78d7d9b8a2a06967202f868 command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.build.working.directory} with /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.repository.branch.name} with ARD-25-fix command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.build.working.directory} with /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.repository.branch.name} with ARD-25-fix command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.build.working.directory} with /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP command 10-Jul-2019 13:16:15 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git simple 10-Jul-2019 13:16:15 Starting task 'Script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' command 10-Jul-2019 13:16:15 Beginning to execute external process for build 'ARD - Build And Package - ARD-25-fix - Tag Branch for Packages #6 (ARD-BPT22-TBFP-6)'\n ... running command line: \n/bin/sh /export/home/cbt-el7-4/bamboohome/temp/ARD-BPT22-TBFP-6-ScriptBuildTask-3387305053982358155.sh\n ... in: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP\n ... using extra environment variables: \nbamboo_planRepository_1_branch=ARD-25-fix\nbamboo_capability_buildmachinetype=build\nbamboo_planRepository_2_branch=master\nbamboo_planRepository_1_branchDisplayName=ARD-25-fix\nbamboo_repository_revision_number=32f3c33fae955702f78d7d9b8a2a06967202f868\nbamboo_repository_20938876_previous_revision_number=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66\nbamboo_resultsUrl=https://open-bamboo.nrao.edu/browse/ARD-BPT22-TBFP-6\nbamboo_repository_20938876_git_username=\nbamboo_build_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP\nbamboo_planRepository_1_name=OPEN-CASA-FULL\nbamboo_buildKey=ARD-BPT22-TBFP\nbamboo_shortPlanName=ARD-25-fix\nbamboo_capability_hostname=cbt-el7-4.cv.nrao.edu\nbamboo_planRepository_2_username=\nbamboo_planRepository_name=OPEN-CASA-FULL\nbamboo_buildNumber=6\nbamboo_planRepository_2_branchDisplayName=master\nbamboo_capability_system_jdk_JDK_1_8_0_131=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-2.b11.el7_3.x86_64\nbamboo_shortJobName=Tag Branch for Packages\nbamboo_buildResultsUrl=https://open-bamboo.nrao.edu/browse/ARD-BPT22-TBFP-6\nbamboo_planRepository_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_agentId=6160386\nbamboo_planName=ARD - Build And Package - ARD-25-fix\nbamboo_shortPlanKey=BPT22\nbamboo_shortJobKey=TBFP\nbamboo_planRepository_2_name=OPEN-CASA-PKG\nbamboo_planRepository_revision=32f3c33fae955702f78d7d9b8a2a06967202f868\nbamboo_buildTimeStamp=2019-07-10T13:11:40.632-04:00\nbamboo_repository_previous_revision_number=100caf8034f66dde70718d191f614696bf767f0e\nbamboo_casaadm_password=********\nbamboo_repository_20938876_git_branch=master\nbamboo_planRepository_previousRevision=100caf8034f66dde70718d191f614696bf767f0e\nbamboo_repository_34079941_revision_number=32f3c33fae955702f78d7d9b8a2a06967202f868\nbamboo_repository_34079941_name=OPEN-CASA-FULL\nbamboo_repository_34079941_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_repository_20938876_branch_name=master\nbamboo_repository_20938876_name=OPEN-CASA-PKG\nbamboo_capability_system_jdk_JDK_1_8_0_144=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64\nbamboo_repository_git_branch=ARD-25-fix\nbamboo_buildResultKey=ARD-BPT22-TBFP-6\nbamboo_repository_branch_name=ARD-25-fix\nbamboo_capability_system_jdk_JDK_1_8_0_102=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64\nbamboo_buildPlanName=ARD - Build And Package - ARD-25-fix - Tag Branch for Packages\nbamboo_planRepository_1_revision=32f3c33fae955702f78d7d9b8a2a06967202f868\nbamboo_repository_34079941_git_username=\nbamboo_capability_system_jdk_JDK_1_8_0_141=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.el7_4.x86_64\nbamboo_capability_system_hg_executable=/bin/hg\nbamboo_repository_name=OPEN-CASA-PKG\nbamboo_planRepository_2_previousRevision=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66\nbamboo_repository_34079941_branch_name=ARD-25-fix\nbamboo_dependenciesDisabled=false\nbamboo_buildFailed=false\nbamboo_repository_34079941_git_branch=ARD-25-fix\nbamboo_capability_isCIMachine=true\nbamboo_planRepository_branch=ARD-25-fix\nbamboo_agentWorkingDirectory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir\nbamboo_capability_system_git_executable=/bin/git\nbamboo_planRepository_2_revision=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66\nbamboo_repository_git_username=\nbamboo_capability_system_jdk_JDK_1_8_0_111=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64\nbamboo_capability_tag=true\nbamboo_planRepository_1_previousRevision=100caf8034f66dde70718d191f614696bf767f0e\nbamboo_capability_operating_system=EL7\nbamboo_planRepository_branchDisplayName=ARD-25-fix\nbamboo_capability_system_jdk_JDK_1_8_0_151=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64\nbamboo_planRepository_1_type=bbserver\nbamboo_planRepository_branchName=ARD-25-fix\nbamboo_capability_project=CASA\nbamboo_repository_20938876_revision_number=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66\nbamboo_planRepository_2_type=bbserver\nbamboo_capability_system_jdk_JDK=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64\nbamboo_plan_storageTag=plan-33890390\nbamboo_hg_cache_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/_hg-repositories-cache\nbamboo_planRepository_2_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa-pkg.git\nbamboo_planRepository_1_username=\nbamboo_planRepository_type=bbserver\nbamboo_git_cache_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/_git-repositories-cache\nbamboo_ManualBuildTriggerReason_userName=rurvashi\nbamboo_repository_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_planRepository_2_branchName=master\nbamboo_capability_system_builder_ant_Ant=/usr\nbamboo_tmp_directory=/export/home/cbt-el7-4/bamboohome/temp\nbamboo_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP\nbamboo_planKey=ARD-BPT22\nbamboo_planRepository_1_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_planRepository_username=\nbamboo_capability_system_jdk_JDK_1_8=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64\nbamboo_repository_34079941_previous_revision_number=100caf8034f66dde70718d191f614696bf767f0e\nbamboo_repository_20938876_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa-pkg.git\nbamboo_capability_system_jdk_JDK_1_8_0_161=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64\nbamboo_planRepository_1_branchName=ARD-25-fix\n build 10-Jul-2019 13:16:15 6 build 10-Jul-2019 13:16:15 32f3c33fae955702f78d7d9b8a2a06967202f868 build 10-Jul-2019 13:16:15 ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git build 10-Jul-2019 13:16:16 Fetching origin build 10-Jul-2019 13:16:17 Already up-to-date. build 10-Jul-2019 13:16:26 Starting a Gradle Daemon (subsequent builds will be faster) build 10-Jul-2019 13:16:31 :compileJava UP-TO-DATE build 10-Jul-2019 13:16:31 :compileGroovy UP-TO-DATE build 10-Jul-2019 13:16:31 :processResources UP-TO-DATE build 10-Jul-2019 13:16:31 :classes UP-TO-DATE build 10-Jul-2019 13:16:31 :jar UP-TO-DATE build 10-Jul-2019 13:16:31 :compileTestJava UP-TO-DATE build 10-Jul-2019 13:16:33 :compileTestGroovy UP-TO-DATE build 10-Jul-2019 13:16:33 :processTestResources UP-TO-DATE build 10-Jul-2019 13:16:33 :testClasses UP-TO-DATE build 10-Jul-2019 13:16:33 :test UP-TO-DATE build 10-Jul-2019 13:16:33 :uploadArchives build 10-Jul-2019 13:16:33 build 10-Jul-2019 13:16:33 BUILD SUCCESSFUL build 10-Jul-2019 13:16:33 build 10-Jul-2019 13:16:33 Total time: 16.355 secs build 10-Jul-2019 13:16:36 :createTag build 10-Jul-2019 13:16:36 workdir: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP/taggitworkdir build 10-Jul-2019 13:16:36 sourcedir: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP/taggitworkdir/casa build 10-Jul-2019 13:16:36 gitremote: ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git build 10-Jul-2019 13:16:36 branch: ARD-25-fix build 10-Jul-2019 13:16:36 Push option: true error 10-Jul-2019 13:16:37 Switched to branch 'master' build 10-Jul-2019 13:16:38 build 10-Jul-2019 13:16:38 Fetching origin error 10-Jul-2019 13:16:40 From ssh://open-bitbucket.nrao.edu:7999/casa/casa error 10-Jul-2019 13:16:40 03735d4..d68b56e master -> origin/master error 10-Jul-2019 13:16:40 cb5a0cc..f2c3e8f ARD-23-fix -> origin/ARD-23-fix error 10-Jul-2019 13:16:40 b810881..6b70b07 ARD-24 -> origin/ARD-24 error 10-Jul-2019 13:16:40 8c12b2d..66bd098 ARD-25 -> origin/ARD-25 error 10-Jul-2019 13:16:40 100caf8..32f3c33 ARD-25-fix -> origin/ARD-25-fix error 10-Jul-2019 13:16:40 * [new branch] CAS-11893 -> origin/CAS-11893 error 10-Jul-2019 13:16:40 838fb7c..14931c4 CAS-12434 -> origin/CAS-12434 error 10-Jul-2019 13:16:40 * [new branch] CAS-12554 -> origin/CAS-12554 error 10-Jul-2019 13:16:40 82fdb88..99b5784 CAS-6747 -> origin/CAS-6747 error 10-Jul-2019 13:16:40 e31ecc9..1f6a11f bugfix/CAS-12433 -> origin/bugfix/CAS-12433 error 10-Jul-2019 13:16:41 a69aaf7..898f14a bugfix/CAS-12545 -> origin/bugfix/CAS-12545 error 10-Jul-2019 13:16:41 cda513f..b900771 release/5.4.2 -> origin/release/5.4.2 error 10-Jul-2019 13:16:41 * [new tag] 5.4.2-rel-7 -> 5.4.2-rel-7 error 10-Jul-2019 13:16:41 * [new tag] 5.6.0-mas-42 -> 5.6.0-mas-42 error 10-Jul-2019 13:16:41 * [new tag] bugfix-CAS-12433-2 -> bugfix-CAS-12433-2 error 10-Jul-2019 13:16:41 * [new tag] bugfix-CAS-12545-2 -> bugfix-CAS-12545-2 error 10-Jul-2019 13:16:41 * [new tag] test-CAS-12434-2 -> test-CAS-12434-2 error 10-Jul-2019 13:16:41 * [new tag] test-CAS-12554-1 -> test-CAS-12554-1 error 10-Jul-2019 13:16:41 * [new tag] test-CAS-6747-2 -> test-CAS-6747-2 error 10-Jul-2019 13:16:41 From ssh://open-bitbucket.nrao.edu:7999/casa/casa error 10-Jul-2019 13:16:41 * [new tag] 5.6.0-mas-43 -> 5.6.0-mas-43 error 10-Jul-2019 13:16:41 * [new tag] bugfix-CAS-12433-1 -> bugfix-CAS-12433-1 error 10-Jul-2019 13:16:41 * [new tag] test-CAS-12495-4 -> test-CAS-12495-4 build 10-Jul-2019 13:16:41 Updating 03735d4..d68b56e build 10-Jul-2019 13:16:41 Fast-forward build 10-Jul-2019 13:16:41 casacore | 2 +- build 10-Jul-2019 13:16:41 code/plotms/Data/CalCache.cc | 29 +- build 10-Jul-2019 13:16:41 code/plotms/Data/MSCache.cc | 32 +- build 10-Jul-2019 13:16:41 code/plotms/Data/MSCacheVolMeter.cc | 13 +- build 10-Jul-2019 13:16:41 code/plotms/Data/PlotMSAtm.cc | 652 ++++++++++++++++----- build 10-Jul-2019 13:16:41 code/plotms/Data/PlotMSAtm.h | 97 ++- build 10-Jul-2019 13:16:41 code/plotms/Data/PlotMSCacheBase.cc | 329 ++++++----- build 10-Jul-2019 13:16:41 code/plotms/Data/PlotMSCacheBase.h | 16 +- build 10-Jul-2019 13:16:41 code/plotms/Data/PlotMSIndexer.cc | 87 +-- build 10-Jul-2019 13:16:41 code/plotms/Data/PlotMSIndexer.h | 2 +- build 10-Jul-2019 13:16:41 code/plotms/Gui/PlotMSAxisWidget.cc | 4 +- build 10-Jul-2019 13:16:41 code/plotms/GuiTabs/PlotMSAxesTab.cc | 599 +++++++++---------- build 10-Jul-2019 13:16:41 code/plotms/GuiTabs/PlotMSAxesTab.qo.h | 39 +- build 10-Jul-2019 13:16:41 code/plotms/GuiTabs/PlotMSAxesTab.ui | 104 +++- build 10-Jul-2019 13:16:41 code/plotms/PlotMS/PlotMSConstants.cc | 56 +- build 10-Jul-2019 13:16:41 code/plotms/PlotMS/PlotMSConstants.h | 4 +- build 10-Jul-2019 13:16:41 code/plotms/PlotMS/PlotMSDBusApp.cc | 7 + build 10-Jul-2019 13:16:41 code/plotms/PlotMS/PlotMSDBusApp.h | 1 + build 10-Jul-2019 13:16:41 code/plotms/PlotMS/PlotMSSelection.cc | 4 +- build 10-Jul-2019 13:16:41 code/plotms/Plots/PlotMSPlot.cc | 188 +++--- build 10-Jul-2019 13:16:41 code/plotms/Plots/PlotMSPlotParameterGroups.cc | 14 + build 10-Jul-2019 13:16:41 code/plotms/Plots/PlotMSPlotParameterGroups.h | 15 +- build 10-Jul-2019 13:16:41 .../synthesis/MeasurementComponents/FringeJones.cc | 136 ++--- build 10-Jul-2019 13:16:41 code/synthesis/MeasurementComponents/FringeJones.h | 2 +- build 10-Jul-2019 13:16:41 .../MeasurementComponents/test/tFringeJones_GT.cc | 12 +- build 10-Jul-2019 13:16:41 .../scripts/imagerhelpers/test_imager_helper.py | 34 +- build 10-Jul-2019 13:16:41 gcwrap/python/scripts/task_plotms.py | 13 +- build 10-Jul-2019 13:16:41 gcwrap/python/scripts/task_sdfixscan.py | 7 +- build 10-Jul-2019 13:16:41 gcwrap/python/scripts/task_sdimaging.py | 3 +- build 10-Jul-2019 13:16:41 gcwrap/python/scripts/tests/test_refimager.py | 41 +- build 10-Jul-2019 13:16:41 gcwrap/python/scripts/tests/test_tclean.py | 146 ++++- build 10-Jul-2019 13:16:41 gcwrap/tasks/plotms.xml | 5 + build 10-Jul-2019 13:16:41 gcwrap/tasks/tclean.xml | 2 +- build 10-Jul-2019 13:16:41 gcwrap/tools/plotms/plotms.xml | 51 +- build 10-Jul-2019 13:16:41 gcwrap/tools/plotms/plotms_cmpt.cc | 17 +- build 10-Jul-2019 13:16:41 gcwrap/tools/synthesis/CalTables/PlotCal.cc | 18 +- build 10-Jul-2019 13:16:41 36 files changed, 1796 insertions(+), 985 deletions(-) build 10-Jul-2019 13:16:41 build 10-Jul-2019 13:16:41 edu.nrao.gradle.casa.build.GitRepository@7a9f88d6 build 10-Jul-2019 13:16:41 getLastTag called with build 10-Jul-2019 13:16:41 branch: ARD-25-fix build 10-Jul-2019 13:16:41 env: [bamboo_planRepository_1_branch=ARD-25-fix, PATH=/bin:/usr/bin:/bin, bamboo_planRepository_2_branch=master, bamboo_repository_revision_number=32f3c33fae955702f78d7d9b8a2a06967202f868, bamboo_planRepository_1_branchDisplayName=ARD-25-fix, bamboo_repository_20938876_previous_revision_number=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66, bamboo_repository_20938876_git_username=, WRAPPER_BITS=32, bamboo_buildKey=ARD-BPT22-TBFP, PWD=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP/casa-pkg/gradle/casa-tag, bamboo_capability_system_jdk_JDK_1_8_0_131=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-2.b11.el7_3.x86_64, bamboo_planRepository_2_branchDisplayName=master, bamboo_shortJobName=Tag Branch for Packages, bamboo_buildResultsUrl=https://open-bamboo.nrao.edu/browse/ARD-BPT22-TBFP-6, bamboo_planRepository_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, bamboo_agentId=6160386, bamboo_planRepository_revision=32f3c33fae955702f78d7d9b8a2a06967202f868, bamboo_casaadm_password=********, bamboo_planRepository_previousRevision=100caf8034f66dde70718d191f614696bf767f0e, bamboo_repository_20938876_git_branch=master, bamboo_repository_34079941_revision_number=32f3c33fae955702f78d7d9b8a2a06967202f868, bamboo_repository_34079941_name=OPEN-CASA-FULL, bamboo_repository_20938876_name=OPEN-CASA-PKG, bamboo_capability_system_jdk_JDK_1_8_0_144=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64, bamboo_repository_branch_name=ARD-25-fix, SHLVL=3, bamboo_capability_system_jdk_JDK_1_8_0_141=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.el7_4.x86_64, bamboo_repository_34079941_git_username=, WRAPPER_OS=linux, bamboo_dependenciesDisabled=false, XDG_SESSION_ID=1, bamboo_capability_isCIMachine=true, GRADLE_USER_HOME=/users/casaci/.gradle.el6.cbt-el7-4, bamboo_planRepository_branch=ARD-25-fix, bamboo_capability_tag=true, bamboo_capability_system_jdk_JDK_1_8_0_151=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64, bamboo_planRepository_branchName=ARD-25-fix, bamboo_planRepository_1_type=bbserver, WRAPPER_FILE_SEPARATOR=/, bamboo_repository_20938876_revision_number=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66, bamboo_capability_system_jdk_JDK=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64, WRAPPER_PATH_SEPARATOR=:, bamboo_hg_cache_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/_hg-repositories-cache, bamboo_planRepository_type=bbserver, bamboo_planRepository_1_username=, bamboo_ManualBuildTriggerReason_userName=rurvashi, bamboo_git_cache_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/_git-repositories-cache, bamboo_planRepository_2_branchName=master, bamboo_capability_system_builder_ant_Ant=/usr, bamboo_tmp_directory=/export/home/cbt-el7-4/bamboohome/temp, bamboo_planKey=ARD-BPT22, bamboo_planRepository_username=, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, bamboo_capability_system_jdk_JDK_1_8_0_161=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64, bamboo_planRepository_1_branchName=ARD-25-fix, bamboo_capability_buildmachinetype=build, bamboo_resultsUrl=https://open-bamboo.nrao.edu/browse/ARD-BPT22-TBFP-6, bamboo_build_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP, bamboo_planRepository_1_name=OPEN-CASA-FULL, bamboo_shortPlanName=ARD-25-fix, bamboo_capability_hostname=cbt-el7-4.cv.nrao.edu, bamboo_planRepository_2_username=, bamboo_planRepository_name=OPEN-CASA-FULL, LOGNAME=casaci, bamboo_buildNumber=6, SHELL=/bin/sh, bamboo_planName=ARD - Build And Package - ARD-25-fix, bamboo_shortPlanKey=BPT22, OLDPWD=/usr/lib/jvm/gradle-3.2.1, bamboo_shortJobKey=TBFP, bamboo_planRepository_2_name=OPEN-CASA-PKG, bamboo_repository_previous_revision_number=100caf8034f66dde70718d191f614696bf767f0e, bamboo_buildTimeStamp=2019-07-10T13:11:40.632-04:00, bamboo_repository_34079941_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, bamboo_repository_20938876_branch_name=master, bamboo_buildResultKey=ARD-BPT22-TBFP-6, bamboo_repository_git_branch=ARD-25-fix, bamboo_capability_system_jdk_JDK_1_8_0_102=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64, bamboo_buildPlanName=ARD - Build And Package - ARD-25-fix - Tag Branch for Packages, bamboo_planRepository_1_revision=32f3c33fae955702f78d7d9b8a2a06967202f868, bamboo_capability_system_hg_executable=/bin/hg, bamboo_repository_name=OPEN-CASA-PKG, bamboo_repository_34079941_branch_name=ARD-25-fix, bamboo_planRepository_2_previousRevision=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, LANG=en_US.UTF-8, bamboo_buildFailed=false, bamboo_repository_34079941_git_branch=ARD-25-fix, bamboo_agentWorkingDirectory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir, bamboo_capability_system_git_executable=/bin/git, bamboo_planRepository_2_revision=01cbf7554018eb4e0e1c4ed058cb9c0c16d8dd66, bamboo_capability_system_jdk_JDK_1_8_0_111=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64, bamboo_planRepository_1_previousRevision=100caf8034f66dde70718d191f614696bf767f0e, bamboo_repository_git_username=, bamboo_capability_operating_system=EL7, bamboo_planRepository_branchDisplayName=ARD-25-fix, bamboo_capability_project=CASA, bamboo_planRepository_2_type=bbserver, bamboo_plan_storageTag=plan-33890390, USER=casaci, bamboo_planRepository_2_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa-pkg.git, bamboo_repository_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, bamboo_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP, bamboo_planRepository_1_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, bamboo_capability_system_jdk_JDK_1_8=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64, WRAPPER_ARCH=x86, bamboo_repository_34079941_previous_revision_number=100caf8034f66dde70718d191f614696bf767f0e, bamboo_repository_20938876_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa-pkg.git, XDG_RUNTIME_DIR=/run/user/9285, HOME=/users/casaci] build 10-Jul-2019 13:16:41 sourceDir: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT22-TBFP/taggitworkdir/casa build 10-Jul-2019 13:16:41 Resolving CAS-/feature/bugfix tag build 10-Jul-2019 13:16:41 Branch parts: [ARD-25-fix] build 10-Jul-2019 13:16:41 Checking for an existing tag for the branch build 10-Jul-2019 13:16:41 tagGrep: grep test-ARD-25-fix build 10-Jul-2019 13:16:41 java.lang.UNIXProcess@4dd2d927 | java.lang.UNIXProcess@f6fd687 | java.lang.UNIXProcess@e5d0432 | java.lang.UNIXProcess@3b75f27a build 10-Jul-2019 13:16:41 Checking out ARD-25-fix error 10-Jul-2019 13:16:41 Switched to branch 'ARD-25-fix' build 10-Jul-2019 13:16:42 Your branch is behind 'origin/ARD-25-fix' by 73 commits, and can be fast-forwarded. build 10-Jul-2019 13:16:42 (use "git pull" to update your local branch) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Updating ARD-25-fix build 10-Jul-2019 13:16:42 Updating 100caf8..32f3c33 build 10-Jul-2019 13:16:42 Fast-forward build 10-Jul-2019 13:16:42 casacore | 2 +- build 10-Jul-2019 13:16:42 code/calanalysis/CalAnalysis/CalAnalysis.cc | 535 +++++++------- build 10-Jul-2019 13:16:42 code/calanalysis/CalAnalysis/CalAnalysis.h | 163 ++--- build 10-Jul-2019 13:16:42 .../calanalysis/CalAnalysis/CalAnalysisSPW_INFO.cc | 43 +- build 10-Jul-2019 13:16:42 code/calanalysis/CalAnalysis/CalStats.cc | 101 ++- build 10-Jul-2019 13:16:42 code/calanalysis/CalAnalysis/CalStats.h | 34 +- build 10-Jul-2019 13:16:42 code/calanalysis/CalAnalysis/CalStatsFitter.cc | 116 +-- build 10-Jul-2019 13:16:42 code/calanalysis/CalAnalysis/CalStatsFitter.h | 12 +- build 10-Jul-2019 13:16:42 code/imageanalysis/CMakeLists.txt | 3 - build 10-Jul-2019 13:16:42 code/plotms/Data/CalCache.cc | 29 +- build 10-Jul-2019 13:16:42 code/plotms/Data/MSCache.cc | 32 +- build 10-Jul-2019 13:16:42 code/plotms/Data/MSCacheVolMeter.cc | 13 +- build 10-Jul-2019 13:16:42 code/plotms/Data/PlotMSAtm.cc | 652 ++++++++++++----- build 10-Jul-2019 13:16:42 code/plotms/Data/PlotMSAtm.h | 97 ++- build 10-Jul-2019 13:16:42 code/plotms/Data/PlotMSCacheBase.cc | 329 +++++---- build 10-Jul-2019 13:16:42 code/plotms/Data/PlotMSCacheBase.h | 16 +- build 10-Jul-2019 13:16:42 code/plotms/Data/PlotMSIndexer.cc | 87 ++- build 10-Jul-2019 13:16:42 code/plotms/Data/PlotMSIndexer.h | 2 +- build 10-Jul-2019 13:16:42 code/plotms/Gui/PlotMSAxisWidget.cc | 4 +- build 10-Jul-2019 13:16:42 code/plotms/Gui/PlotMSPlotter.cc | 18 + build 10-Jul-2019 13:16:42 code/plotms/Gui/PlotMSPlotter.qo.h | 15 +- build 10-Jul-2019 13:16:42 code/plotms/GuiTabs/PlotMSAxesTab.cc | 599 +++++++-------- build 10-Jul-2019 13:16:42 code/plotms/GuiTabs/PlotMSAxesTab.qo.h | 39 +- build 10-Jul-2019 13:16:42 code/plotms/GuiTabs/PlotMSAxesTab.ui | 104 ++- build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMS.cc | 194 ++++- build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMS.h | 26 +- build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMSConstants.cc | 56 +- build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMSConstants.h | 4 +- build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMSDBusApp.cc | 7 + build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMSDBusApp.h | 1 + build 10-Jul-2019 13:16:42 code/plotms/PlotMS/PlotMSSelection.cc | 4 +- build 10-Jul-2019 13:16:42 code/plotms/PlotMS/grpcPlotMSAdaptor.cc | 803 +++++++++++++++++++++ build 10-Jul-2019 13:16:42 code/plotms/PlotMS/grpcPlotMSAdaptor.qo.h | 219 ++++++ build 10-Jul-2019 13:16:42 code/plotms/Plots/PlotMSPlot.cc | 188 +++-- build 10-Jul-2019 13:16:42 code/plotms/Plots/PlotMSPlotParameterGroups.cc | 14 + build 10-Jul-2019 13:16:42 code/plotms/Plots/PlotMSPlotParameterGroups.h | 15 +- build 10-Jul-2019 13:16:42 code/plotms/apps/casaplotms/casaplotms.cc | 202 +++++- build 10-Jul-2019 13:16:42 code/plotms/protos/plotms.proto | 226 ++++++ build 10-Jul-2019 13:16:42 code/synthesis/CMakeLists.txt | 3 + build 10-Jul-2019 13:16:42 code/synthesis/ImagerObjects/SynthesisImager.cc | 16 +- build 10-Jul-2019 13:16:42 code/synthesis/ImagerObjects/SynthesisImager.h | 6 +- build 10-Jul-2019 13:16:42 code/synthesis/ImagerObjects/SynthesisImagerVi2.cc | 14 +- build 10-Jul-2019 13:16:42 code/synthesis/ImagerObjects/SynthesisImagerVi2.h | 4 +- build 10-Jul-2019 13:16:42 .../ImagerObjects/SynthesisUtilMethods.cc | 8 +- build 10-Jul-2019 13:16:42 .../synthesis/ImagerObjects/SynthesisUtilMethods.h | 5 +- build 10-Jul-2019 13:16:42 code/synthesis/ImagerObjects2/SynthesisImager.cc | 16 +- build 10-Jul-2019 13:16:42 code/synthesis/ImagerObjects2/SynthesisImager.h | 6 +- build 10-Jul-2019 13:16:42 code/synthesis/MeasurementComponents/PBMosaicFT.cc | 26 +- build 10-Jul-2019 13:16:42 .../MeasurementComponents/nPBWProjectFT.cc | 30 +- build 10-Jul-2019 13:16:42 .../MeasurementComponents/nPBWProjectFT.h | 2 +- build 10-Jul-2019 13:16:42 .../MeasurementEquations}/AntennaResponses.cc | 2 +- build 10-Jul-2019 13:16:42 .../MeasurementEquations}/AntennaResponses.h | 0 build 10-Jul-2019 13:16:42 code/synthesis/MeasurementEquations/Imager.cc | 6 +- build 10-Jul-2019 13:16:42 code/synthesis/MeasurementEquations/Imager.h | 4 +- build 10-Jul-2019 13:16:42 code/synthesis/MeasurementEquations/Imager2.cc | 18 +- build 10-Jul-2019 13:16:42 code/synthesis/MeasurementEquations/Simulator.cc | 2 +- build 10-Jul-2019 13:16:42 code/synthesis/MeasurementEquations/VPManager.h | 2 +- build 10-Jul-2019 13:16:42 .../test/tAntennaResponses.cc | 2 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines/ALMAAperture.h | 2 +- build 10-Jul-2019 13:16:42 .../TransformMachines/AWProjectFT.FORTRANSTUFF | 12 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines/AWProjectFT.cc | 16 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines/AWProjectFT.h | 2 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines/AWProjectWBFT.cc | 26 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines/BeamCalc.cc | 2 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/AWConvFunc.cc | 6 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/AWConvFunc.h | 2 +- build 10-Jul-2019 13:16:42 .../TransformMachines2/AWProjectFT.FORTRANSTUFF | 12 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/AWProjectFT.cc | 26 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/AWProjectFT.h | 2 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/AWProjectWBFT.cc | 28 +- build 10-Jul-2019 13:16:42 .../TransformMachines2/ConvolutionFunction.h | 2 +- build 10-Jul-2019 13:16:42 .../TransformMachines2/IlluminationConvFunc.h | 2 +- build 10-Jul-2019 13:16:42 .../TransformMachines2/PointingOffsets.cc | 20 +- build 10-Jul-2019 13:16:42 .../synthesis/TransformMachines2/PointingOffsets.h | 12 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/VB2CFBMap.cc | 8 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/VB2CFBMap.h | 4 +- build 10-Jul-2019 13:16:42 code/synthesis/TransformMachines2/test/tAWPFTM.cc | 6 +- build 10-Jul-2019 13:16:42 code/synthesis/fortran/fpbmos.f | 44 +- build 10-Jul-2019 13:16:42 code/synthesis/fortran/fpbwproj.f | 20 +- build 10-Jul-2019 13:16:42 .../scripts/imagerhelpers/input_parameters.py | 5 +- build 10-Jul-2019 13:16:42 .../scripts/imagerhelpers/test_imager_helper.py | 34 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/task_plotms.py | 13 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/task_sdfixscan.py | 7 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/task_sdimaging.py | 3 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/task_tclean.py | 7 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/task_tclean2.py | 4 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/task_tsdimaging.py | 1 + build 10-Jul-2019 13:16:42 gcwrap/python/scripts/tests/test_calanalysis.py | 345 ++++++--- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/tests/test_imhead.py | 3 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/tests/test_refimager.py | 41 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/tests/test_refimager_old.py | 8 +- build 10-Jul-2019 13:16:42 .../python/scripts/tests/test_req_task_listobs.py | 20 +- build 10-Jul-2019 13:16:42 gcwrap/python/scripts/tests/test_tclean.py | 148 +++- build 10-Jul-2019 13:16:42 gcwrap/tasks/plotms.xml | 5 + build 10-Jul-2019 13:16:42 gcwrap/tasks/tclean.xml | 31 +- build 10-Jul-2019 13:16:42 gcwrap/tools/calanalysis/calanalysis_cmpt.cc | 4 +- build 10-Jul-2019 13:16:42 gcwrap/tools/plotms/plotms.xml | 51 +- build 10-Jul-2019 13:16:42 gcwrap/tools/plotms/plotms_cmpt.cc | 17 +- build 10-Jul-2019 13:16:42 gcwrap/tools/synthesis/synthesisimager_cmpt.cc | 6 +- build 10-Jul-2019 13:16:42 gcwrap/tools/synthesis/vpmanager_cmpt.cc | 2 +- build 10-Jul-2019 13:16:42 gcwrap/tools/tables/tableplot_cmpt.cc | 10 +- build 10-Jul-2019 13:16:42 101 files changed, 4354 insertions(+), 1841 deletions(-) build 10-Jul-2019 13:16:42 create mode 100644 code/plotms/PlotMS/grpcPlotMSAdaptor.cc build 10-Jul-2019 13:16:42 create mode 100644 code/plotms/PlotMS/grpcPlotMSAdaptor.qo.h build 10-Jul-2019 13:16:42 create mode 100644 code/plotms/protos/plotms.proto build 10-Jul-2019 13:16:42 rename code/{imageanalysis/ImageAnalysis => synthesis/MeasurementEquations}/AntennaResponses.cc (99%) build 10-Jul-2019 13:16:42 rename code/{imageanalysis/ImageAnalysis => synthesis/MeasurementEquations}/AntennaResponses.h (100%) build 10-Jul-2019 13:16:42 rename code/{imageanalysis/ImageAnalysis => synthesis/MeasurementEquations}/test/tAntennaResponses.cc (99%) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Constructing a new tag based on test-ARD-25-fix-5 build 10-Jul-2019 13:16:42 Branch: ARD-25-fix build 10-Jul-2019 13:16:42 ARD- detected build 10-Jul-2019 13:16:42 Prefix: test-ARD-25-fix build 10-Jul-2019 13:16:42 test-ARD-25-fix-6 build 10-Jul-2019 13:16:42 Last tag: test-ARD-25-fix-5 build 10-Jul-2019 13:16:42 Branch: ARD-25-fix build 10-Jul-2019 13:16:42 Comparing tag to branch with: git diff --exit-code test-ARD-25-fix-5 ARD-25-fix build 10-Jul-2019 13:16:42 diff --git a/casacore b/casacore build 10-Jul-2019 13:16:42 index 0f7c684..ed4e188 160000 build 10-Jul-2019 13:16:42 --- a/casacore build 10-Jul-2019 13:16:42 +++ b/casacore build 10-Jul-2019 13:16:42 @@ -1 +1 @@ build 10-Jul-2019 13:16:42 -Subproject commit 0f7c684b0a636a4e3e9ef2e5f2ecf0659cf33bd9 build 10-Jul-2019 13:16:42 +Subproject commit ed4e1882481c201de07700d40b654b86ab304dee build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalAnalysis.cc b/code/calanalysis/CalAnalysis/CalAnalysis.cc build 10-Jul-2019 13:16:42 index 58c6063..093f420 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalAnalysis.cc build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalAnalysis.cc build 10-Jul-2019 13:16:42 @@ -341,7 +341,7 @@ CalAnalysis::CalAnalysis( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 feedSet( feedGet(oTableName) ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - spwInfoSet( spwInfoGet(oTableName) ); build 10-Jul-2019 13:16:42 + spwInfoSet(CalAnalysis::SPW_INFO(oTableName)); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return build 10-Jul-2019 13:16:42 @@ -400,7 +400,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the String instance containing the new format calibration table build 10-Jul-2019 13:16:42 +The String instance containing the new format calibration table build 10-Jul-2019 13:16:42 name, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -412,14 +412,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::calName( void ) const { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Copy the private variable containing the new format calibration table name build 10-Jul-2019 13:16:42 - // and return it build 10-Jul-2019 13:16:42 +String CalAnalysis::calName( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poCalName = new String( oCalName ); build 10-Jul-2019 13:16:42 + // return the variable containing the new format calibration table name build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poCalName ); build 10-Jul-2019 13:16:42 + return oCalName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -439,7 +436,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the String instance containing the MS name, returned via the build 10-Jul-2019 13:16:42 +The String instance containing the MS name, returned via the build 10-Jul-2019 13:16:42 function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -451,13 +448,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::msName( void ) const { build 10-Jul-2019 13:16:42 +String CalAnalysis::msName( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Copy the private variable containing the MS name and return it build 10-Jul-2019 13:16:42 + // return the private variable containing the MS name build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poMSName = new String( oMSName ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poMSName ); build 10-Jul-2019 13:16:42 + return oMSName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -477,7 +472,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the String instance containing the visibility calibration type, build 10-Jul-2019 13:16:42 +The String instance containing the visibility calibration type, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -489,14 +484,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::visCal( void ) const { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Copy the private variable containing the visibility calibration type and build 10-Jul-2019 13:16:42 - // return it build 10-Jul-2019 13:16:42 +String CalAnalysis::visCal( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poVisCal = new String( oVisCal ); build 10-Jul-2019 13:16:42 + // Return opy the private variable containing the visibility calibration type build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poVisCal ); build 10-Jul-2019 13:16:42 + return oVisCal; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -516,7 +508,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the String instance containing the parameter type, returned via build 10-Jul-2019 13:16:42 +The String instance containing the parameter type, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -528,13 +520,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::parType( void ) const { build 10-Jul-2019 13:16:42 +String CalAnalysis::parType( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Copy the private variable containing the parameter type and return it build 10-Jul-2019 13:16:42 + // Return the private variable containing the parameter type build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poParType = new String( oParType ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poParType ); build 10-Jul-2019 13:16:42 + return oParType; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -566,13 +556,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::polBasis( void ) const { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Copy the private variable containing the polarization basis and return it build 10-Jul-2019 13:16:42 +String CalAnalysis::polBasis( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poPolBasis = new String( oPolBasis ); build 10-Jul-2019 13:16:42 + // Return the variable containing the polarization basis build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poPolBasis ); build 10-Jul-2019 13:16:42 + return oPolBasis; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -592,7 +580,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the fields, returned via build 10-Jul-2019 13:16:42 +The Vector instance containing the fields, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -604,13 +592,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::field( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::field( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the field numbers and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poField = new Vector( oField.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poField ); build 10-Jul-2019 13:16:42 + return oField.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -630,7 +616,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the antenna numbers, build 10-Jul-2019 13:16:42 +The Vector instance containing the antenna numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -642,13 +628,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::antenna( void ) const { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Copy the private variable containing the antenna numbers and return it build 10-Jul-2019 13:16:42 +Vector CalAnalysis::antenna( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAntenna = new Vector( oAntenna.copy() ); build 10-Jul-2019 13:16:42 + // Return a copy of the private variable containing the antenna numbers build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poAntenna ); build 10-Jul-2019 13:16:42 + return oAntenna.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -668,7 +652,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the antenna 1 numbers, build 10-Jul-2019 13:16:42 +The the Vector instance containing the antenna 1 numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -680,13 +664,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::antenna1( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::antenna1( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the antenna 1 numbers and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAntenna1 = new Vector( oAntenna1.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poAntenna1 ); build 10-Jul-2019 13:16:42 + return oAntenna1.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -706,7 +688,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the antenna 2 numbers, build 10-Jul-2019 13:16:42 +The Vector instance containing the antenna 2 numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -718,13 +700,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::antenna2( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::antenna2( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the antenna 2 numbers and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAntenna2 = new Vector( oAntenna2.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poAntenna2 ); build 10-Jul-2019 13:16:42 + return oAntenna2.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -744,7 +724,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the times, returned via build 10-Jul-2019 13:16:42 +The Vector instance containing the times, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -756,13 +736,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::time( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::time( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the times and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poTime = new Vector( oTime.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poTime ); build 10-Jul-2019 13:16:42 + return oTime.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -782,7 +760,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the feeds, returned via build 10-Jul-2019 13:16:42 +The Vector instance containing the feeds, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -794,13 +772,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::feed( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::feed( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the feeds and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poFeed = new Vector( oFeed.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poFeed ); build 10-Jul-2019 13:16:42 + return oFeed.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -820,7 +796,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the uInt variable containing the spectral windows, returned via build 10-Jul-2019 13:16:42 +The uInt variable containing the spectral windows, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -834,14 +810,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -uInt& CalAnalysis::numspw( void ) const { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Copy the private variable containing the number of spectral windows and build 10-Jul-2019 13:16:42 - // return it build 10-Jul-2019 13:16:42 +uInt CalAnalysis::numspw( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - uInt* puiNumSPW = new uInt( oSPWInfo.uiNumSPW ); build 10-Jul-2019 13:16:42 + // Return the variable containing the number of spectral windows build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *puiNumSPW ); build 10-Jul-2019 13:16:42 + return oSPWInfo.uiNumSPW; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -861,7 +834,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the spectral windows, build 10-Jul-2019 13:16:42 +The Vector instance containing the spectral windows, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -875,13 +848,11 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::spw( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::spw( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the spectral windows and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poSPW = new Vector( oSPWInfo.oSPW.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poSPW ); build 10-Jul-2019 13:16:42 + return oSPWInfo.oSPW.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -913,14 +884,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::numChannel( void ) const { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::numChannel( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the number of channels for each build 10-Jul-2019 13:16:42 // spectral window and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poNumChannel = new Vector( oSPWInfo.oNumChannel.copy() ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poNumChannel ); build 10-Jul-2019 13:16:42 + return oSPWInfo.oNumChannel.copy(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -952,20 +921,20 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector >& CalAnalysis::freq( void ) const { build 10-Jul-2019 13:16:42 +Vector > CalAnalysis::freq( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy the private variable containing the frequencies for each spectral build 10-Jul-2019 13:16:42 // window and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumSPW = oSPWInfo.uiNumSPW; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector >* poFreq = new Vector >( uiNumSPW ); build 10-Jul-2019 13:16:42 + Vector > freq( uiNumSPW ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( uInt s=0; soperator[](s) = oSPWInfo.oFrequency[s].copy(); build 10-Jul-2019 13:16:42 + freq[s] = oSPWInfo.oFrequency[s].copy(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poFreq ); build 10-Jul-2019 13:16:42 + return freq; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1008,13 +977,13 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::calNameGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +String CalAnalysis::calNameGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the new format calibration table name and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poTableName = new String( oTableName ); build 10-Jul-2019 13:16:42 + String poTableName = oTableName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poTableName ); build 10-Jul-2019 13:16:42 + return poTableName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1087,7 +1056,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::msNameGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +String CalAnalysis::msNameGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the record containing the main table keywords build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1099,9 +1068,9 @@ String& CalAnalysis::msNameGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 // Get the associated MS name and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiIndex = oR.fieldNumber( String( "MSName" ) ); build 10-Jul-2019 13:16:42 - String* poMSName = new String( RecordFieldPtr(oR,uiIndex).get() ); build 10-Jul-2019 13:16:42 + String poMSName = RecordFieldPtr(oR,uiIndex).get(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poMSName ); build 10-Jul-2019 13:16:42 + return poMSName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1172,7 +1141,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::visCalGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +String CalAnalysis::visCalGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the record containing the main table keywords build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1184,9 +1153,9 @@ String& CalAnalysis::visCalGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 // Get the visibility calibration type and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiIndex = oR.fieldNumber( String( "VisCal" ) ); build 10-Jul-2019 13:16:42 - String* poVisCal = new String( RecordFieldPtr(oR,uiIndex).get() ); build 10-Jul-2019 13:16:42 + String poVisCal = RecordFieldPtr(oR,uiIndex).get(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poVisCal ); build 10-Jul-2019 13:16:42 + return poVisCal; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1260,7 +1229,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::parTypeGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +String CalAnalysis::parTypeGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the record containing the main table keywords build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1272,9 +1241,9 @@ String& CalAnalysis::parTypeGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 // Get the parameter column type and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiIndex = oR.fieldNumber( String( "ParType" ) ); build 10-Jul-2019 13:16:42 - String* poParType = new String( RecordFieldPtr(oR,uiIndex).get() ); build 10-Jul-2019 13:16:42 + String poParType = RecordFieldPtr(oR,uiIndex).get(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poParType ); build 10-Jul-2019 13:16:42 + return poParType; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1347,7 +1316,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalAnalysis::polBasisGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +String CalAnalysis::polBasisGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the record containing the main table keywords build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1360,12 +1329,12 @@ String& CalAnalysis::polBasisGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 // letter, and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiIndex = oR.fieldNumber( String( "PolBasis" ) ); build 10-Jul-2019 13:16:42 - String* poPolBasis = new String( RecordFieldPtr(oR,uiIndex).get() ); build 10-Jul-2019 13:16:42 + String poPolBasis = RecordFieldPtr(oR,uiIndex).get(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poPolBasis->upcase(); build 10-Jul-2019 13:16:42 - poPolBasis->operator=( poPolBasis->operator[](0) ); build 10-Jul-2019 13:16:42 + poPolBasis.upcase(); build 10-Jul-2019 13:16:42 + poPolBasis.operator=( poPolBasis.operator[](0) ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poPolBasis ); build 10-Jul-2019 13:16:42 + return poPolBasis; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1425,7 +1394,7 @@ oTableName - This reference to a String instance contains the new format build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the field numbers, build 10-Jul-2019 13:16:42 +The Vector instance containing the field numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1440,7 +1409,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::fieldGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::fieldGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the field numbers from the new format calibration table build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1450,12 +1419,13 @@ Vector& CalAnalysis::fieldGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 Vector oFieldInt; build 10-Jul-2019 13:16:42 oROSC.getColumn( oFieldInt, true ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector oFieldUnique( unique(oFieldInt) ); build 10-Jul-2019 13:16:42 + Vector oFieldUnique; build 10-Jul-2019 13:16:42 + unique(oFieldInt, oFieldUnique); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poField = new Vector( oFieldUnique.nelements() ); build 10-Jul-2019 13:16:42 - convertArray( *poField, oFieldUnique ); build 10-Jul-2019 13:16:42 + Vector field( oFieldUnique.nelements() ); build 10-Jul-2019 13:16:42 + convertArray( field, oFieldUnique ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poField ); build 10-Jul-2019 13:16:42 + return field; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1516,7 +1486,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oFieldOut - This reference to the Vector instance contains the checked and build 10-Jul-2019 13:16:42 fixed field numbers. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1528,19 +1498,19 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::fieldCheck( const Vector& oFieldIn, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::fieldCheck( const Vector& oFieldIn, build 10-Jul-2019 13:16:42 Vector& oFieldOut ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success = false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the input field numbers and return the fixed field numbers build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oFieldIn.nelements() == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumFieldOut = 0; build 10-Jul-2019 13:16:42 @@ -1555,16 +1525,16 @@ Bool& CalAnalysis::fieldCheck( const Vector& oFieldIn, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumFieldOut == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1586,7 +1556,7 @@ oTableName - This reference to a String instance contains the new format build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the antenna numbers, build 10-Jul-2019 13:16:42 +The Vector instance containing the antenna numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1598,7 +1568,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::antennaGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::antennaGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Create a temporary antenna subtable instance and get the number of antennas build 10-Jul-2019 13:16:42 // (the number of rows) build 10-Jul-2019 13:16:42 @@ -1609,10 +1579,10 @@ Vector& CalAnalysis::antennaGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Create the vector containing the antenna numbers and return it build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAntenna = new Vector( uiNumRow ); build 10-Jul-2019 13:16:42 - indgen( *poAntenna, 0 ); build 10-Jul-2019 13:16:42 + Vector antenna( uiNumRow ); build 10-Jul-2019 13:16:42 + indgen( antenna, 0 ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poAntenna ); build 10-Jul-2019 13:16:42 + return antenna; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -1674,7 +1644,7 @@ oTableName - This reference to a String instance contains the new format build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the antenna 1 numbers, build 10-Jul-2019 13:16:42 +The Vector instance containing the antenna 1 numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1686,7 +1656,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::antenna1Get( const String& oTableName ) { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::antenna1Get( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the antenna 1 numbers from the new format calibration table build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1696,12 +1666,13 @@ Vector& CalAnalysis::antenna1Get( const String& oTableName ) { build 10-Jul-2019 13:16:42 Vector oAntenna1Int; build 10-Jul-2019 13:16:42 oROSC.getColumn( oAntenna1Int, true ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector oAntenna1Unique( unique(oAntenna1Int) ); build 10-Jul-2019 13:16:42 + Vector oAntenna1Unique; build 10-Jul-2019 13:16:42 + unique(oAntenna1Int, oAntenna1Unique); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAntenna1 = new Vector( oAntenna1Unique.nelements() ); build 10-Jul-2019 13:16:42 - convertArray( *poAntenna1, oAntenna1Unique ); build 10-Jul-2019 13:16:42 + Vector antenna1( oAntenna1Unique.nelements() ); build 10-Jul-2019 13:16:42 + convertArray( antenna1, oAntenna1Unique ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poAntenna1 ); build 10-Jul-2019 13:16:42 + return antenna1; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1764,7 +1735,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oAntenna1Out - This reference to the Vector instance contains the checked build 10-Jul-2019 13:16:42 and fixed antenna 1 numbers. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1780,19 +1751,19 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::antenna1Check( const Vector& oAntenna1In, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::antenna1Check( const Vector& oAntenna1In, build 10-Jul-2019 13:16:42 Vector& oAntenna1Out ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success(false); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the input antenna 1 numbers and return the fixed antenna 1 numbers build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oAntenna1In.nelements() == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumAntenna1Out = 0; build 10-Jul-2019 13:16:42 @@ -1807,16 +1778,16 @@ Bool& CalAnalysis::antenna1Check( const Vector& oAntenna1In, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumAntenna1Out == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1838,7 +1809,7 @@ oTableName - This reference to a String instance contains the new format build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the antenna 2 numbers, build 10-Jul-2019 13:16:42 +The Vector instance containing the antenna 2 numbers, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1850,7 +1821,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::antenna2Get( const String& oTableName ) { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::antenna2Get( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the antenna 2 numbers from the new format calibration table build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1860,9 +1831,13 @@ Vector& CalAnalysis::antenna2Get( const String& oTableName ) { build 10-Jul-2019 13:16:42 Vector oAntenna2Int; build 10-Jul-2019 13:16:42 oROSC.getColumn( oAntenna2Int, true ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAntenna2 = new Vector( unique(oAntenna2Int) ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poAntenna2 ); build 10-Jul-2019 13:16:42 + Vector uniqueA2; build 10-Jul-2019 13:16:42 + unique(oAntenna2Int, uniqueA2); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector antenna2( uniqueA2 ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + return antenna2; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1925,7 +1900,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oAntenna2Out - This reference to the Vector instance contains the checked build 10-Jul-2019 13:16:42 and fixed antenna 2 numbers. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -1939,19 +1914,19 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::antenna2Check( const Vector& oAntenna2In, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::antenna2Check( const Vector& oAntenna2In, build 10-Jul-2019 13:16:42 Vector& oAntenna2Out ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the input antenna 1 numbers and return the fixed antenna 1 numbers build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oAntenna2In.nelements() == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumAntenna2Out = 0; build 10-Jul-2019 13:16:42 @@ -1966,16 +1941,16 @@ Bool& CalAnalysis::antenna2Check( const Vector& oAntenna2In, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumAntenna2Out == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1996,7 +1971,7 @@ oTableName - This reference to a String instance contains the new format build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the times, returned via build 10-Jul-2019 13:16:42 +The Vector instance containing the times, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2008,7 +1983,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::timeGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::timeGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Create a temporary new format calibration table instance build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2021,13 +1996,13 @@ Vector& CalAnalysis::timeGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 Vector oTimeTemp; build 10-Jul-2019 13:16:42 oROSC.getColumn( oTimeTemp, true ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poTime = new Vector( 0 ); build 10-Jul-2019 13:16:42 - *poTime = unique( oTimeTemp ); build 10-Jul-2019 13:16:42 + Vector timev( 0 ); build 10-Jul-2019 13:16:42 + unique( oTimeTemp, timev ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the time stamps build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poTime ); build 10-Jul-2019 13:16:42 + return timev; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2091,7 +2066,7 @@ dStartTimeOut - This reference to a Double variable contains the start time. build 10-Jul-2019 13:16:42 dStopTimeOut - This reference to a Double variable contains the stop time. build 10-Jul-2019 13:16:42 oTimeOut - This reference to the Vector instance containing the build 10-Jul-2019 13:16:42 time stamps. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2105,30 +2080,30 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::timeCheck( const Double& dStartTimeIn, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::timeCheck( const Double& dStartTimeIn, build 10-Jul-2019 13:16:42 const Double& dStopTimeIn, Double& dStartTimeOut, Double& dStopTimeOut, build 10-Jul-2019 13:16:42 Vector& oTimeOut ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the start and stop times build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( dStartTimeIn > dStopTimeIn ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( dStartTimeIn > oTime[uiNumTime-1] ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( dStopTimeIn < oTime[0] ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2145,8 +2120,8 @@ Bool& CalAnalysis::timeCheck( const Double& dStartTimeIn, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oTimeOut.nelements() == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 dStartTimeOut = min( oTimeOut ); build 10-Jul-2019 13:16:42 @@ -2155,9 +2130,9 @@ Bool& CalAnalysis::timeCheck( const Double& dStartTimeIn, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2181,7 +2156,7 @@ oTableName - This reference to a String instance contains the new format build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the feeds, returned via build 10-Jul-2019 13:16:42 +The Vector instance containing the feeds, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2196,7 +2171,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalAnalysis::feedGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 +Vector CalAnalysis::feedGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the number of feeds from the new format calibration table build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2221,27 +2196,27 @@ Vector& CalAnalysis::feedGet( const String& oTableName ) { build 10-Jul-2019 13:16:42 // Set the feeds build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumFeedTemp = oParamErrCell0.shape()[0]; build 10-Jul-2019 13:16:42 - Vector* poFeed = new Vector( uiNumFeedTemp, "" ); build 10-Jul-2019 13:16:42 + Vector feed( uiNumFeedTemp, "" ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumFeedTemp == 1 ) { build 10-Jul-2019 13:16:42 - poFeed->operator[](0) = "S"; build 10-Jul-2019 13:16:42 + feed[0] = "S"; build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 if ( polBasisGet(oTableName) == "L" ) { build 10-Jul-2019 13:16:42 - poFeed->operator[](0) = "X"; build 10-Jul-2019 13:16:42 - poFeed->operator[](1) = "Y"; build 10-Jul-2019 13:16:42 + feed[0] = "X"; build 10-Jul-2019 13:16:42 + feed[1] = "Y"; build 10-Jul-2019 13:16:42 } else if ( polBasisGet(oTableName) == "R" ) { build 10-Jul-2019 13:16:42 - poFeed->operator[](0) = "R"; build 10-Jul-2019 13:16:42 - poFeed->operator[](1) = "L"; build 10-Jul-2019 13:16:42 + feed[0] = "R"; build 10-Jul-2019 13:16:42 + feed[1] = "L"; build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - poFeed->operator[](0) = "1"; build 10-Jul-2019 13:16:42 - poFeed->operator[](1) = "2"; build 10-Jul-2019 13:16:42 + feed[0] = "1"; build 10-Jul-2019 13:16:42 + feed[1] = "2"; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the feeds build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poFeed ); build 10-Jul-2019 13:16:42 + return feed; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2303,7 +2278,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oFeedOut - This reference to the Vector instance contains the checked build 10-Jul-2019 13:16:42 and fixed feeds. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2317,19 +2292,19 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::feedCheck( const Vector& oFeedIn, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::feedCheck( const Vector& oFeedIn, build 10-Jul-2019 13:16:42 Vector& oFeedOut ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the input feed values build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oFeedIn.nelements() == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumFeedOut = 0; build 10-Jul-2019 13:16:42 @@ -2344,27 +2319,27 @@ Bool& CalAnalysis::feedCheck( const Vector& oFeedIn, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumFeedOut == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the unique feed vector build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 oFeedOut.resize(); build 10-Jul-2019 13:16:42 - oFeedOut = unique( oFeedIn ); build 10-Jul-2019 13:16:42 + unique( oFeedIn, oFeedOut ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oFeedOut.nelements() > 2 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oFeedOut.nelements() == 1 ) { build 10-Jul-2019 13:16:42 if ( oFeedOut[0] != "R" && oFeedOut[0] != "L" && build 10-Jul-2019 13:16:42 oFeedOut[0] != "X" && oFeedOut[0] != "Y" && build 10-Jul-2019 13:16:42 oFeedOut[0] != "1" && oFeedOut[0] != "2" && oFeedOut[0] != "S" ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2373,15 +2348,15 @@ Bool& CalAnalysis::feedCheck( const Vector& oFeedIn, build 10-Jul-2019 13:16:42 if ( oFeedOut[0] != "R" && oFeedOut[0] != "L" && build 10-Jul-2019 13:16:42 oFeedOut[0] != "X" && oFeedOut[0] != "Y" && build 10-Jul-2019 13:16:42 oFeedOut[0] != "1" && oFeedOut[0] != "2" ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oFeedOut[1] != "R" && oFeedOut[1] != "L" && build 10-Jul-2019 13:16:42 oFeedOut[1] != "X" && oFeedOut[1] != "Y" && build 10-Jul-2019 13:16:42 oFeedOut[1] != "1" && oFeedOut[1] != "2" ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oFeedOut[0] == "L" && oFeedOut[1] == "R" ) { build 10-Jul-2019 13:16:42 @@ -2404,9 +2379,9 @@ Bool& CalAnalysis::feedCheck( const Vector& oFeedIn, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2509,7 +2484,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oInputOut - This reference to an INPUT instance contains the checked and fixed build 10-Jul-2019 13:16:42 inputs to the CalAnalysis::stats() member function. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2521,12 +2496,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 CalAnalysis::INPUT& oInputOut ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the fields and create a new field vector build 10-Jul-2019 13:16:42 @@ -2534,8 +2509,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 if ( !fieldCheck( oInputIn.oField, oInputOut.oField ) ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "One or more invalid fields" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2544,15 +2519,15 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 if ( !antenna1Check( oInputIn.oAntenna1, oInputOut.oAntenna1 ) ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "One or more invalid antenna 1" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( !antenna2Check( oInputIn.oAntenna2, oInputOut.oAntenna2 ) ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "One or more invalid antenna 2" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2564,8 +2539,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 if ( !bTimeCheck ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Invalid start and/or stop times" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2574,8 +2549,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 if ( !feedCheck( oInputIn.oFeed, oInputOut.oFeed ) ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Invalid feed(s)" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2593,8 +2568,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 if ( !bSPWCheck ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Invalid spectral window information" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2605,8 +2580,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "User-defined iteration axis must be frequency/time" build 10-Jul-2019 13:16:42 << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 oInputOut.eAxisIterUserID = oInputIn.eAxisIterUserID; build 10-Jul-2019 13:16:42 @@ -2619,8 +2594,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 oInputIn.eRAP != CalAnalysis::PHASE ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Invalid RAP parameter" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 oInputOut.eRAP = oInputIn.eRAP; build 10-Jul-2019 13:16:42 @@ -2638,8 +2613,8 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 if ( oInputIn.dJumpMax < 0.0 ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "statsCheckInput()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Invalid maximum jump parameter" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 oInputOut.dJumpMax = oInputIn.dJumpMax; build 10-Jul-2019 13:16:42 @@ -2647,9 +2622,9 @@ Bool& CalAnalysis::statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2710,7 +2685,7 @@ oFParamGroup - This Vector > instance contains the real build 10-Jul-2019 13:16:42 oParamErrGroup - This Vector > instance contains the parameter build 10-Jul-2019 13:16:42 errors. build 10-Jul-2019 13:16:42 oFlagGroup - This Vector > instance contains the flags. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2722,7 +2697,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 const CalAnalysis::INPUT& oInput, Vector& oFieldGroup, build 10-Jul-2019 13:16:42 Vector& oAntenna1Group, Vector& oAntenna2Group, build 10-Jul-2019 13:16:42 Vector >& oTimeUniqueGroup, build 10-Jul-2019 13:16:42 @@ -2732,7 +2707,7 @@ Bool& CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the selected rows build 10-Jul-2019 13:16:42 @@ -2742,8 +2717,8 @@ Bool& CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 if ( !rowSelect( oNCT, oInput, oRowSelect ) ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "getGroup()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "No matching rows selected" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2764,8 +2739,8 @@ Bool& CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 if ( !bRowGroup ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "getGroup()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Cannot group the data" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2777,8 +2752,8 @@ Bool& CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 if ( !bFreqGroup ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "getGroup()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Cannot group frequencies" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2791,16 +2766,16 @@ Bool& CalAnalysis::getGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 if ( !bCubeGroup ) { build 10-Jul-2019 13:16:42 LogIO log( LogOrigin( "CalAnalysis", "getGroup()", WHERE ) ); build 10-Jul-2019 13:16:42 log << LogIO::WARN << "Cannot group cubes" << LogIO::POST; build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2823,7 +2798,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oRowSelect - This Vector instance contains the row numbers selected by the build 10-Jul-2019 13:16:42 inputs. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2835,12 +2810,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::rowSelect( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::rowSelect( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 const CalAnalysis::INPUT& oInput, Vector& oRowSelect ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Create the column accessors build 10-Jul-2019 13:16:42 @@ -2891,16 +2866,16 @@ Bool& CalAnalysis::rowSelect( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 // Were any rows found? It not, return false build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumRowSelect == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -2941,7 +2916,7 @@ oTimeGroup - This Vector > instance contains the times for build 10-Jul-2019 13:16:42 each group. build 10-Jul-2019 13:16:42 oTimeUniqueGroup - This Vector > instance contains the unique build 10-Jul-2019 13:16:42 times for each group. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -2953,7 +2928,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::rowGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::rowGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 const Vector& oRowSelect, Vector >& oRowGroup, build 10-Jul-2019 13:16:42 Vector& oFieldGroup, Vector& oAntenna1Group, build 10-Jul-2019 13:16:42 Vector& oAntenna2Group, Vector >& oSPWGroup, build 10-Jul-2019 13:16:42 @@ -2962,7 +2937,7 @@ Bool& CalAnalysis::rowGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // If there are no rows, return false build 10-Jul-2019 13:16:42 @@ -2970,8 +2945,8 @@ Bool& CalAnalysis::rowGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 uInt uiNumRow = oRowSelect.nelements(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumRow == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -3086,17 +3061,17 @@ Bool& CalAnalysis::rowGroup( const NewCalTable& oNCT, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( uInt g=0; g( oSPWGroup[g] ); build 10-Jul-2019 13:16:42 + unique( oSPWGroup[g], oSPWUniqueGroup[g] ); build 10-Jul-2019 13:16:42 oTimeUniqueGroup[g].resize(); build 10-Jul-2019 13:16:42 - oTimeUniqueGroup[g] = unique( oTimeGroup[g] ); build 10-Jul-2019 13:16:42 + unique( oTimeGroup[g], oTimeUniqueGroup[g] ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -3124,7 +3099,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oSPWMap - This Vector instance contains the mapped spectral windows. build 10-Jul-2019 13:16:42 oChanStart - This Vector instance contains the start channels. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -3136,12 +3111,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::chanSPW( const Vector& oSPW, const INPUT& oInput, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::chanSPW( const Vector& oSPW, const INPUT& oInput, build 10-Jul-2019 13:16:42 Vector& oSPWMap, Vector& oChanStart ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Initialize the number of spectral windows, the spectral window map and build 10-Jul-2019 13:16:42 @@ -3157,8 +3132,8 @@ Bool& CalAnalysis::chanSPW( const Vector& oSPW, const INPUT& oInput, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( uInt s=0; s& oSPW, const INPUT& oInput, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -3202,7 +3177,7 @@ Outputs: build 10-Jul-2019 13:16:42 oFreqGroup - This Vector >instance contains the frequencies (for build 10-Jul-2019 13:16:42 each group. They can come from multiple spectral windows (which build 10-Jul-2019 13:16:42 are in different rows). build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the success boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the success boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -3214,13 +3189,13 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::freqGroup( const INPUT& oInput, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::freqGroup( const INPUT& oInput, build 10-Jul-2019 13:16:42 const Vector >& oSPWUniqueGroup, build 10-Jul-2019 13:16:42 Vector >& oFreqGroup ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success = false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Create the instance for the spectral window subtable of the new format build 10-Jul-2019 13:16:42 @@ -3246,8 +3221,8 @@ Bool& CalAnalysis::freqGroup( const INPUT& oInput, build 10-Jul-2019 13:16:42 Vector oSPWMap; build 10-Jul-2019 13:16:42 Vector oChanStart; build 10-Jul-2019 13:16:42 if ( !chanSPW( oSPWUniqueGroup[g], oInput, oSPWMap, oChanStart ) ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( uInt s=0; s > instance contains the real build 10-Jul-2019 13:16:42 oParamErrGroup - This Vector > instance contains the parameter build 10-Jul-2019 13:16:42 errors. build 10-Jul-2019 13:16:42 oFlagGroup - This Vector > instance contains the flags. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the check boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -3335,7 +3310,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 const Vector >& oRowGroup, build 10-Jul-2019 13:16:42 const Vector >& oSPWGroup, build 10-Jul-2019 13:16:42 const Vector >& oSPWUniqueGroup, build 10-Jul-2019 13:16:42 @@ -3348,18 +3323,18 @@ Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Create accessors for the CPARAM/FPARAM, PARAMERR, and FLAG columns build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - ArrayColumn* poCParamCol = NULL; build 10-Jul-2019 13:16:42 - ArrayColumn* poFParamCol = NULL; build 10-Jul-2019 13:16:42 + ArrayColumn poCParamCol; build 10-Jul-2019 13:16:42 + ArrayColumn poFParamCol; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oParType == String("Complex") ) { build 10-Jul-2019 13:16:42 - poCParamCol = new ArrayColumn( oNCT, String("CPARAM") ); build 10-Jul-2019 13:16:42 + poCParamCol = ArrayColumn( oNCT, String("CPARAM") ); build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - poFParamCol = new ArrayColumn( oNCT, String("FPARAM") ); build 10-Jul-2019 13:16:42 + poFParamCol = ArrayColumn( oNCT, String("FPARAM") ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 ArrayColumn oParamErrCol( oNCT, String("PARAMERR") ); build 10-Jul-2019 13:16:42 @@ -3385,8 +3360,8 @@ Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 Vector oSPWMap; build 10-Jul-2019 13:16:42 Vector oChanStart; build 10-Jul-2019 13:16:42 if ( !chanSPW( oSPWUniqueGroup[g], oInput, oSPWMap, oChanStart ) ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Initialize the shape of the output instances for the group build 10-Jul-2019 13:16:42 @@ -3418,14 +3393,14 @@ Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 Array oCParamCube; build 10-Jul-2019 13:16:42 Array oFParamCube; build 10-Jul-2019 13:16:42 if ( oParType == String("Complex") ) { build 10-Jul-2019 13:16:42 - IPosition oShape( poCParamCol->operator()(uiRow).shape() ); build 10-Jul-2019 13:16:42 + IPosition oShape( poCParamCol( uiRow ).shape() ); build 10-Jul-2019 13:16:42 oCParamCube.resize( oShape, false ); build 10-Jul-2019 13:16:42 - oCParamCube = poCParamCol->operator()( uiRow ); build 10-Jul-2019 13:16:42 + oCParamCube = poCParamCol( uiRow ); build 10-Jul-2019 13:16:42 oFParamCube = Array( oShape, 0.0 ); build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - IPosition oShape( poFParamCol->operator()(uiRow).shape() ); build 10-Jul-2019 13:16:42 + IPosition oShape( poFParamCol(uiRow).shape() ); build 10-Jul-2019 13:16:42 oFParamCube.resize( oShape, false ); build 10-Jul-2019 13:16:42 - oFParamCube = poFParamCol->operator()( uiRow ); build 10-Jul-2019 13:16:42 + oFParamCube = poFParamCol( uiRow ); build 10-Jul-2019 13:16:42 oCParamCube = Array( oShape, Complex(0.0,0.0) ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -3440,8 +3415,8 @@ Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 // Map the spectral window build 10-Jul-2019 13:16:42 uInt s = 0; build 10-Jul-2019 13:16:42 if ( !where( oSPWGroup[g][r], oSPWUniqueGroup[g], s ) ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the number of input channels and the channels for the mapped build 10-Jul-2019 13:16:42 @@ -3452,8 +3427,8 @@ Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 // Map the time build 10-Jul-2019 13:16:42 uInt t = 0; build 10-Jul-2019 13:16:42 if ( !where( oTimeGroup[g][r], oTimeUniqueGroup[g], t ) ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Map the cubes from the new format calibration tables to the output build 10-Jul-2019 13:16:42 @@ -3476,9 +3451,9 @@ Bool& CalAnalysis::cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalAnalysis.h b/code/calanalysis/CalAnalysis/CalAnalysis.h build 10-Jul-2019 13:16:42 index 4ea796e..e05089a 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalAnalysis.h build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalAnalysis.h build 10-Jul-2019 13:16:42 @@ -331,10 +331,10 @@ class CalAnalysis { build 10-Jul-2019 13:16:42 SPW_INFO( void ); build 10-Jul-2019 13:16:42 ~SPW_INFO( void ); build 10-Jul-2019 13:16:42 SPW_INFO& operator=( const SPW_INFO& oSPWInfoIn ); build 10-Jul-2019 13:16:42 - casacore::Bool& freq( const casacore::Vector& oSPWIn, build 10-Jul-2019 13:16:42 + casacore::Bool freq( const casacore::Vector& oSPWIn, build 10-Jul-2019 13:16:42 const casacore::Vector >& oChannelIn, build 10-Jul-2019 13:16:42 casacore::Vector& oFreqOut ) const; build 10-Jul-2019 13:16:42 - casacore::Bool& spwInfoCheck( const casacore::Vector& oSPWIn, build 10-Jul-2019 13:16:42 + casacore::Bool spwInfoCheck( const casacore::Vector& oSPWIn, build 10-Jul-2019 13:16:42 const casacore::Vector >& oChannelIn, casacore::Vector& oSPWOut, build 10-Jul-2019 13:16:42 casacore::Vector >& oChannelOut ) const; build 10-Jul-2019 13:16:42 }; build 10-Jul-2019 13:16:42 @@ -381,115 +381,115 @@ class CalAnalysis { build 10-Jul-2019 13:16:42 virtual ~CalAnalysis( void ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the calibration table name and keyword private variables build 10-Jul-2019 13:16:42 - casacore::String& calName( void ) const; build 10-Jul-2019 13:16:42 - casacore::String& msName( void ) const; build 10-Jul-2019 13:16:42 - casacore::String& visCal( void ) const; build 10-Jul-2019 13:16:42 - casacore::String& parType( void ) const; build 10-Jul-2019 13:16:42 - casacore::String& polBasis( void ) const; build 10-Jul-2019 13:16:42 + casacore::String calName( void ) const; build 10-Jul-2019 13:16:42 + casacore::String msName( void ) const; build 10-Jul-2019 13:16:42 + casacore::String visCal( void ) const; build 10-Jul-2019 13:16:42 + casacore::String parType( void ) const; build 10-Jul-2019 13:16:42 + casacore::String polBasis( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the fields, antennas, times, and feeds build 10-Jul-2019 13:16:42 // spectral windows build 10-Jul-2019 13:16:42 - casacore::Vector& field( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& antenna( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& antenna1( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& antenna2( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& time( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& feed( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector field( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector antenna( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector antenna1( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector antenna2( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector time( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector feed( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the number of spectral windows, spectral windows, number of channels build 10-Jul-2019 13:16:42 // for each spectral window, and frequencies for each spectral window build 10-Jul-2019 13:16:42 - casacore::uInt& numspw( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& spw( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& numChannel( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector >& freq( void ) const; build 10-Jul-2019 13:16:42 + casacore::uInt numspw( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector spw( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector numChannel( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector > freq( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Calculate statistics for the specified fields, antennas, time range, build 10-Jul-2019 13:16:42 // feeds, spectral windows, and channels (allowed T: CalStats::NONE gets build 10-Jul-2019 13:16:42 // data without calculating statistics, CalStatsFitter::FIT calculates fits, build 10-Jul-2019 13:16:42 // and CalStatsHist::HIST calculates histogram statistics). build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 - casacore::Vector >& stats( const INPUT& oInput, build 10-Jul-2019 13:16:42 + casacore::Vector > stats( const INPUT& oInput, build 10-Jul-2019 13:16:42 const CalStats::ARG& oArg ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // casacore::Function to determine whether a value is present in an array build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 - static casacore::Bool& exists( const T& tValue, const casacore::Vector& oValue ); build 10-Jul-2019 13:16:42 + static casacore::Bool exists( const T& tValue, const casacore::Vector& oValue ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // casacore::Function to determine the index of a value present in an array build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 - static casacore::Bool& where( const T& tValue, const casacore::Vector& oInput, build 10-Jul-2019 13:16:42 + static casacore::Bool where( const T& tValue, const casacore::Vector& oInput, build 10-Jul-2019 13:16:42 casacore::uInt& uiIndex ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // casacore::Function to return sorted unique values of a vector build 10-Jul-2019 13:16:42 + // casacore::Function to calculate sorted unique values of a vector build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 - static casacore::Vector& unique( const casacore::Vector& oVector ); build 10-Jul-2019 13:16:42 + static void unique( const casacore::Vector& oVector, casacore::Vector& unq); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the calibration table name and set the private variable build 10-Jul-2019 13:16:42 casacore::String oCalName; build 10-Jul-2019 13:16:42 - casacore::String& calNameGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::String calNameGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void calNameSet( const casacore::String& oCalNameIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the associated casacore::MS name and set the private variable build 10-Jul-2019 13:16:42 casacore::String oMSName; build 10-Jul-2019 13:16:42 - casacore::String& msNameGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::String msNameGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void msNameSet( const casacore::String& oMSNameIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the visibility calibration type and set the private variable build 10-Jul-2019 13:16:42 casacore::String oVisCal; build 10-Jul-2019 13:16:42 - casacore::String& visCalGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::String visCalGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void visCalSet( const casacore::String& oVisCalIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the parameter column type and set the private variable build 10-Jul-2019 13:16:42 casacore::String oParType; build 10-Jul-2019 13:16:42 - casacore::String& parTypeGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::String parTypeGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void parTypeSet( const casacore::String& oParTypeIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the polarization basis and set the private variable build 10-Jul-2019 13:16:42 casacore::String oPolBasis; build 10-Jul-2019 13:16:42 - casacore::String& polBasisGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::String polBasisGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void polBasisSet( const casacore::String& oPolBasisIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the field numbers and set the private variables build 10-Jul-2019 13:16:42 casacore::uInt uiNumField; casacore::Vector oField; build 10-Jul-2019 13:16:42 - casacore::Vector& fieldGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::Vector fieldGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void fieldSet( const casacore::Vector& oFieldIn ); build 10-Jul-2019 13:16:42 - casacore::Bool& fieldCheck( const casacore::Vector& oFieldIn, build 10-Jul-2019 13:16:42 + casacore::Bool fieldCheck( const casacore::Vector& oFieldIn, build 10-Jul-2019 13:16:42 casacore::Vector& oFieldOut ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the antenna numbers and set the private variables build 10-Jul-2019 13:16:42 casacore::uInt uiNumAntenna; casacore::Vector oAntenna; build 10-Jul-2019 13:16:42 - casacore::Vector& antennaGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::Vector antennaGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void antennaSet( const casacore::Vector& oAntennaIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the antenna 1 numbers and set the private variables build 10-Jul-2019 13:16:42 casacore::uInt uiNumAntenna1; casacore::Vector oAntenna1; build 10-Jul-2019 13:16:42 - casacore::Vector& antenna1Get( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::Vector antenna1Get( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void antenna1Set( const casacore::Vector& oAntenna1In ); build 10-Jul-2019 13:16:42 - casacore::Bool& antenna1Check( const casacore::Vector& oAntenna1In, build 10-Jul-2019 13:16:42 + casacore::Bool antenna1Check( const casacore::Vector& oAntenna1In, build 10-Jul-2019 13:16:42 casacore::Vector& oAntenna1Out ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the antenna 2 numbers and set the private variables build 10-Jul-2019 13:16:42 casacore::uInt uiNumAntenna2; casacore::Vector oAntenna2; build 10-Jul-2019 13:16:42 - casacore::Vector& antenna2Get( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::Vector antenna2Get( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void antenna2Set( const casacore::Vector& oAntenna2In ); build 10-Jul-2019 13:16:42 - casacore::Bool& antenna2Check( const casacore::Vector& oAntenna2In, build 10-Jul-2019 13:16:42 + casacore::Bool antenna2Check( const casacore::Vector& oAntenna2In, build 10-Jul-2019 13:16:42 casacore::Vector& oAntenna2Out ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the times and set the private variables build 10-Jul-2019 13:16:42 casacore::uInt uiNumTime; casacore::Vector oTime; build 10-Jul-2019 13:16:42 - casacore::Vector& timeGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::Vector timeGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void timeSet( const casacore::Vector& oTimeIn ); build 10-Jul-2019 13:16:42 - casacore::Bool& timeCheck( const casacore::Double& dStartTimeIn, const casacore::Double& dStopTimeIn, build 10-Jul-2019 13:16:42 + casacore::Bool timeCheck( const casacore::Double& dStartTimeIn, const casacore::Double& dStopTimeIn, build 10-Jul-2019 13:16:42 casacore::Double& dStartTimeOut, casacore::Double& dStopTimeOut, build 10-Jul-2019 13:16:42 casacore::Vector& oTimeOut ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the feeds and set the private variables build 10-Jul-2019 13:16:42 casacore::uInt uiNumFeed; casacore::Vector oFeed; build 10-Jul-2019 13:16:42 - casacore::Vector& feedGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 + casacore::Vector feedGet( const casacore::String& oTableName ); build 10-Jul-2019 13:16:42 void feedSet( const casacore::Vector& oFeedIn ); build 10-Jul-2019 13:16:42 - casacore::Bool& feedCheck( const casacore::Vector& oFeedIn, build 10-Jul-2019 13:16:42 + casacore::Bool feedCheck( const casacore::Vector& oFeedIn, build 10-Jul-2019 13:16:42 casacore::Vector& oFeedOut ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the spectral window information and set the private variables build 10-Jul-2019 13:16:42 @@ -498,12 +498,12 @@ class CalAnalysis { build 10-Jul-2019 13:16:42 void spwInfoSet( const SPW_INFO& oSPWInfoIn ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check and possibly fix the inputs to the stats() member function build 10-Jul-2019 13:16:42 - casacore::Bool& statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 + casacore::Bool statsCheckInput( const CalAnalysis::INPUT& oInputIn, build 10-Jul-2019 13:16:42 CalAnalysis::INPUT& oInputOut ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Gets the data from the new format calibration table grouped according to build 10-Jul-2019 13:16:42 // unique combinations of (field,antenna1,antenna2) build 10-Jul-2019 13:16:42 - casacore::Bool& getGroup( const NewCalTable& oNCT, const CalAnalysis::INPUT& oInput, build 10-Jul-2019 13:16:42 + casacore::Bool getGroup( const NewCalTable& oNCT, const CalAnalysis::INPUT& oInput, build 10-Jul-2019 13:16:42 casacore::Vector& oFieldGroup, casacore::Vector& oAntenna1Group, build 10-Jul-2019 13:16:42 casacore::Vector& oAntenna2Group, casacore::Vector >& oTimeUniqueGroup, build 10-Jul-2019 13:16:42 casacore::Vector >& oFreqGroup, build 10-Jul-2019 13:16:42 @@ -513,11 +513,11 @@ class CalAnalysis { build 10-Jul-2019 13:16:42 casacore::Vector >& oFlagGroup ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Select the rows based on the inputs build 10-Jul-2019 13:16:42 - casacore::Bool& rowSelect( const NewCalTable& oNCT, const CalAnalysis::INPUT& oInput, build 10-Jul-2019 13:16:42 + casacore::Bool rowSelect( const NewCalTable& oNCT, const CalAnalysis::INPUT& oInput, build 10-Jul-2019 13:16:42 casacore::Vector& oRowSelect ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return rows and other quantities for each group build 10-Jul-2019 13:16:42 - casacore::Bool& rowGroup( const NewCalTable& oNCT, const casacore::Vector& oRowSelect, build 10-Jul-2019 13:16:42 + casacore::Bool rowGroup( const NewCalTable& oNCT, const casacore::Vector& oRowSelect, build 10-Jul-2019 13:16:42 casacore::Vector >& oRowGroup, casacore::Vector& oFieldGroup, build 10-Jul-2019 13:16:42 casacore::Vector& oAntenna1Group, casacore::Vector& oAntenna2Group, build 10-Jul-2019 13:16:42 casacore::Vector >& oSPWGroup, build 10-Jul-2019 13:16:42 @@ -527,16 +527,16 @@ class CalAnalysis { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // casacore::Map the spectral windows and determine the start channels (for build 10-Jul-2019 13:16:42 // concatenating frequencies from different spectral windows) build 10-Jul-2019 13:16:42 - casacore::Bool& chanSPW( const casacore::Vector& oSPW, const INPUT& oInput, build 10-Jul-2019 13:16:42 + casacore::Bool chanSPW( const casacore::Vector& oSPW, const INPUT& oInput, build 10-Jul-2019 13:16:42 casacore::Vector& oSPWMap, casacore::Vector& oChanStart ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the frequencies for each goup build 10-Jul-2019 13:16:42 - casacore::Bool& freqGroup( const INPUT& oInput, build 10-Jul-2019 13:16:42 + casacore::Bool freqGroup( const INPUT& oInput, build 10-Jul-2019 13:16:42 const casacore::Vector >& oSPWUniqueGroup, build 10-Jul-2019 13:16:42 casacore::Vector >& oFreqGroup ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the data cubes for each group build 10-Jul-2019 13:16:42 - casacore::Bool& cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 + casacore::Bool cubeGroup( const NewCalTable& oNCT, const INPUT& oInput, build 10-Jul-2019 13:16:42 const casacore::Vector >& oRowGroup, build 10-Jul-2019 13:16:42 const casacore::Vector >& oSPWGroup, build 10-Jul-2019 13:16:42 const casacore::Vector >& oSPWUniqueGroup, build 10-Jul-2019 13:16:42 @@ -637,14 +637,13 @@ Modification history: build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 -casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 +casacore::Vector > CalAnalysis::stats( build 10-Jul-2019 13:16:42 const CalAnalysis::INPUT& oInput, const CalStats::ARG& oArg ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Initialize the output vector containing statistics for each field ID, build 10-Jul-2019 13:16:42 // antenna 1, and antenna 2 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::Vector >* poOutput = build 10-Jul-2019 13:16:42 - new casacore::Vector >(); build 10-Jul-2019 13:16:42 + casacore::Vector > output; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check and fix the inputs build 10-Jul-2019 13:16:42 @@ -656,7 +655,7 @@ casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 if ( !bCheck ) { build 10-Jul-2019 13:16:42 casacore::LogIO log( casacore::LogOrigin( "CalAnalysis", "stats()", WHERE ) ); build 10-Jul-2019 13:16:42 log << casacore::LogIO::WARN << "Invalid parameter(s)" << casacore::LogIO::POST; build 10-Jul-2019 13:16:42 - return( *poOutput ); build 10-Jul-2019 13:16:42 + return output; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -686,7 +685,7 @@ casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 if ( !bGetGroup ) { build 10-Jul-2019 13:16:42 casacore::LogIO log( casacore::LogOrigin( "CalAnalysis", "stats()", WHERE ) ); build 10-Jul-2019 13:16:42 log << casacore::LogIO::WARN << "Cannot parse group(s)" << casacore::LogIO::POST; build 10-Jul-2019 13:16:42 - return( *poOutput ); build 10-Jul-2019 13:16:42 + return output; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -695,20 +694,20 @@ casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 casacore::uInt uiNumGroup = oFieldGroup.nelements(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poOutput->resize( uiNumGroup, false ); build 10-Jul-2019 13:16:42 + output.resize( uiNumGroup, false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Send each group to CalStats() and perform the desired operation build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( casacore::uInt g=0; goperator[](g).uiField = oFieldGroup[g]; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).uiAntenna1 = oAntenna1Group[g]; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).iAntenna2 = oAntenna2Group[g]; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).eRAP = oInputNew.eRAP; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).bNorm = oInputNew.bNorm; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).bUnwrap = oInputNew.bUnwrap; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).dJumpMax = oInputNew.dJumpMax; build 10-Jul-2019 13:16:42 + output[g].uiField = oFieldGroup[g]; build 10-Jul-2019 13:16:42 + output[g].uiAntenna1 = oAntenna1Group[g]; build 10-Jul-2019 13:16:42 + output[g].iAntenna2 = oAntenna2Group[g]; build 10-Jul-2019 13:16:42 + output[g].eRAP = oInputNew.eRAP; build 10-Jul-2019 13:16:42 + output[g].bNorm = oInputNew.bNorm; build 10-Jul-2019 13:16:42 + output[g].bUnwrap = oInputNew.bUnwrap; build 10-Jul-2019 13:16:42 + output[g].dJumpMax = oInputNew.dJumpMax; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 CalStats* poCS = NULL; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -735,7 +734,7 @@ casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 throw( casacore::AipsError( "Invalid parameter (REAL, AMPLITUDE, or PHASE)" ) ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poOutput->operator[](g).oOut = poCS->stats( oArg ); build 10-Jul-2019 13:16:42 + output[g].oOut = poCS->stats( oArg ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 delete poCS; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -747,7 +746,7 @@ casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 << ", iteration (field,antenna1,antenna2) = (" << oFieldGroup[g] build 10-Jul-2019 13:16:42 << "," << oAntenna1Group[g] << "," << oAntenna2Group[g] build 10-Jul-2019 13:16:42 << "), continuing ..." << casacore::LogIO::POST; build 10-Jul-2019 13:16:42 - poOutput->operator[](g).oOut = CalStats::OUT(); build 10-Jul-2019 13:16:42 + output[g].oOut = CalStats::OUT(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -755,7 +754,7 @@ casacore::Vector >& CalAnalysis::stats( build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the reference to the casacore::Vector > instance build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poOutput ); build 10-Jul-2019 13:16:42 + return output; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -794,17 +793,17 @@ Modification history: build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 -casacore::Bool& CalAnalysis::exists( const T& tValue, const casacore::Vector& oValue ) { build 10-Jul-2019 13:16:42 +casacore::Bool CalAnalysis::exists( const T& tValue, const casacore::Vector& oValue ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Determine whether the value is present in an array and return the boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::Bool* pbValue = new casacore::Bool( false ); build 10-Jul-2019 13:16:42 + casacore::Bool value = false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( casacore::uInt v=0; v build 10-Jul-2019 13:16:42 -casacore::Bool& CalAnalysis::where( const T& tValue, const casacore::Vector& oInput, build 10-Jul-2019 13:16:42 +casacore::Bool CalAnalysis::where( const T& tValue, const casacore::Vector& oInput, build 10-Jul-2019 13:16:42 casacore::uInt& uiIndex ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Find the index in the input vector build 10-Jul-2019 13:16:42 @@ -855,15 +854,15 @@ casacore::Bool& CalAnalysis::where( const T& tValue, const casacore::Vector& build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // If the value was found return true, otherwise return false build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::Bool* pbSuccess = new casacore::Bool; build 10-Jul-2019 13:16:42 + casacore::Bool success = false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiIndex < oInput.nelements() ) { build 10-Jul-2019 13:16:42 - *pbSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - *pbSuccess = false; build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *pbSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -875,7 +874,7 @@ CalAnalysis::unique build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Description: build 10-Jul-2019 13:16:42 ------------ build 10-Jul-2019 13:16:42 -This member function returns a unique sorted vector from an input vector. build 10-Jul-2019 13:16:42 +This member function produces a unique sorted vector from an input vector. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Inputs: build 10-Jul-2019 13:16:42 ------- build 10-Jul-2019 13:16:42 @@ -883,8 +882,7 @@ oVector - This reference to a casacore::Vector instance contains the values. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the unique sorted casacore::Vector instance, returned via the function build 10-Jul-2019 13:16:42 -value. build 10-Jul-2019 13:16:42 +unq - The unique sorted casacore::Vector instance build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 --------------------- build 10-Jul-2019 13:16:42 @@ -896,12 +894,7 @@ Modification history: build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 -casacore::Vector& CalAnalysis::unique( const casacore::Vector& oVector ) { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Initialize the unique vector build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - casacore::Vector* poVectorUnique = new casacore::Vector(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +void CalAnalysis::unique( const casacore::Vector& oVector, casacore::Vector& unq ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Form the unique vector build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -917,8 +910,8 @@ casacore::Vector& CalAnalysis::unique( const casacore::Vector& oVector ) { build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( !bDupe ) { build 10-Jul-2019 13:16:42 - poVectorUnique->resize( poVectorUnique->nelements()+1, true ); build 10-Jul-2019 13:16:42 - poVectorUnique->operator[](poVectorUnique->nelements()-1) = oVector[v1]; build 10-Jul-2019 13:16:42 + unq.resize( unq.nelements()+1, true ); build 10-Jul-2019 13:16:42 + unq.operator[](unq.nelements()-1) = oVector[v1]; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -929,13 +922,7 @@ casacore::Vector& CalAnalysis::unique( const casacore::Vector& oVector ) { build 10-Jul-2019 13:16:42 casacore::Sort::Order eOrder = casacore::Sort::Ascending; build 10-Jul-2019 13:16:42 casacore::Int iOptions = casacore::Sort::QuickSort; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::GenSort::sort( *poVectorUnique, eOrder, (int) iOptions ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Return the unique sorted vector build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poVectorUnique ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 + casacore::GenSort::sort( unq, eOrder, (int) iOptions ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalAnalysisSPW_INFO.cc b/code/calanalysis/CalAnalysis/CalAnalysisSPW_INFO.cc build 10-Jul-2019 13:16:42 index e7560db..02e69b0 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalAnalysisSPW_INFO.cc build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalAnalysisSPW_INFO.cc build 10-Jul-2019 13:16:42 @@ -351,7 +351,7 @@ Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 oFreqOut - The reference to the Vector instance containing the build 10-Jul-2019 13:16:42 frequencies. build 10-Jul-2019 13:16:42 -The reference to the Bool variable containing the success boolean, returned via build 10-Jul-2019 13:16:42 +The Bool variable containing the success boolean, returned via build 10-Jul-2019 13:16:42 the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -363,19 +363,19 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::SPW_INFO::freq( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::SPW_INFO::freq( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 const Vector >& oChannelIn, Vector& oFreqOut ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check the inputs build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( oSPWIn.nelements() != oChannelIn.nelements() ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -399,9 +399,9 @@ Bool& CalAnalysis::SPW_INFO::freq( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -444,27 +444,27 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Bool& CalAnalysis::SPW_INFO::spwInfoCheck( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 +Bool CalAnalysis::SPW_INFO::spwInfoCheck( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 const Vector >& oChannelIn, Vector& oSPWOut, build 10-Jul-2019 13:16:42 Vector >& oChannelOut ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Declare the success boolean build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Bool* poSuccess = new Bool( false ); build 10-Jul-2019 13:16:42 + Bool success( false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Does this instance contain valid spectral window and channel numbers? build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( !bValid ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the output sorted unique spectral window number vector build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 oSPWOut.resize(); build 10-Jul-2019 13:16:42 - oSPWOut = unique( oSPWIn ); build 10-Jul-2019 13:16:42 + unique( oSPWIn, oSPWOut ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 uInt uiNumSPWOut = oSPWOut.nelements(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -472,14 +472,14 @@ Bool& CalAnalysis::SPW_INFO::spwInfoCheck( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 // Check the output spectral window numbers build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( uiNumSPWOut == 0 ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( uInt s=0; s( oSPWOut[s], oSPW ) ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -509,7 +509,8 @@ Bool& CalAnalysis::SPW_INFO::spwInfoCheck( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 // Get output sorted unique channels within each spectral window build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( uInt s=0; s oChannelTemp( unique(oChannelOut[s]) ); build 10-Jul-2019 13:16:42 + Vector oChannelTemp; build 10-Jul-2019 13:16:42 + unique(oChannelOut[s], oChannelTemp); build 10-Jul-2019 13:16:42 oChannelOut[s].resize(); build 10-Jul-2019 13:16:42 oChannelOut[s] = oChannelTemp; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -521,8 +522,8 @@ Bool& CalAnalysis::SPW_INFO::spwInfoCheck( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 uInt uiNumChannelOut = oChannelOut[s].nelements(); build 10-Jul-2019 13:16:42 for ( uInt c=0; c= oNumChannel[oSPWOut[s]] ) { build 10-Jul-2019 13:16:42 - *poSuccess = false; build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + success = false; build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -530,9 +531,9 @@ Bool& CalAnalysis::SPW_INFO::spwInfoCheck( const Vector& oSPWIn, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - *poSuccess = true; build 10-Jul-2019 13:16:42 + success = true; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poSuccess ); build 10-Jul-2019 13:16:42 + return success; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalStats.cc b/code/calanalysis/CalAnalysis/CalStats.cc build 10-Jul-2019 13:16:42 index 39173ea..f72d565 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalStats.cc build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalStats.cc build 10-Jul-2019 13:16:42 @@ -546,7 +546,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the IPosition instance containing the iteration axis IDs, build 10-Jul-2019 13:16:42 +The IPosition instance containing the iteration axis IDs, build 10-Jul-2019 13:16:42 returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -558,14 +558,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -IPosition& CalStats::axisIterID( void ) const { build 10-Jul-2019 13:16:42 +IPosition CalStats::axisIterID( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the IPosition instance containing the iteration build 10-Jul-2019 13:16:42 + // Return the IPosition instance containing the iteration build 10-Jul-2019 13:16:42 // axis IDs build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - IPosition* poAxisIterID = new IPosition( oAxisIterID ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poAxisIterID ); build 10-Jul-2019 13:16:42 + return oAxisIterID; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -585,7 +583,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the CalStats::AXIS instance containing the non-iteration axis build 10-Jul-2019 13:16:42 +The CalStats::AXIS instance containing the non-iteration axis build 10-Jul-2019 13:16:42 IDs, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -597,14 +595,14 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -CalStats::AXIS& CalStats::axisNonIterID( void ) const { build 10-Jul-2019 13:16:42 +CalStats::AXIS CalStats::axisNonIterID( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the CalStats::AXIS instance containing the build 10-Jul-2019 13:16:42 - // non-iteration axis IDs build 10-Jul-2019 13:16:42 + // Return the CalStats::AXIS instance containing the non-iteration build 10-Jul-2019 13:16:42 + // axis IDs build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - CalStats::AXIS* peAxisNonIterID = new CalStats::AXIS( eAxisNonIterID ); build 10-Jul-2019 13:16:42 + CalStats::AXIS axisNonIterID( eAxisNonIterID ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *peAxisNonIterID ); build 10-Jul-2019 13:16:42 + return axisNonIterID; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -624,7 +622,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the feed iteration axis build 10-Jul-2019 13:16:42 +The Vector instance containing the feed iteration axis build 10-Jul-2019 13:16:42 values, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -636,14 +634,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalStats::axisIterFeed( void ) const { build 10-Jul-2019 13:16:42 +Vector CalStats::axisIterFeed( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the Vector instance containing the feed build 10-Jul-2019 13:16:42 + // Return the Vector instance containing the feed build 10-Jul-2019 13:16:42 // iteration axis values build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAxisIterFeed = new Vector( oAxisIterFeed ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poAxisIterFeed ); build 10-Jul-2019 13:16:42 + return oAxisIterFeed; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -663,7 +659,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the user-defined build 10-Jul-2019 13:16:42 +The Vector instance containing the user-defined build 10-Jul-2019 13:16:42 iteration axis values, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -675,14 +671,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalStats::axisIterUser( void ) const { build 10-Jul-2019 13:16:42 +Vector CalStats::axisIterUser( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the Vector instance containing the build 10-Jul-2019 13:16:42 + // Return the Vector instance containing the build 10-Jul-2019 13:16:42 // user-defined iteration axis values build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAxisIterUser = new Vector( oAxisIterUser ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poAxisIterUser ); build 10-Jul-2019 13:16:42 + return oAxisIterUser; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -702,7 +696,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the Vector instance containing the non-iteration axis build 10-Jul-2019 13:16:42 +The Vector instance containing the non-iteration axis build 10-Jul-2019 13:16:42 values, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -714,14 +708,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -Vector& CalStats::axisNonIter( void ) const { build 10-Jul-2019 13:16:42 +Vector CalStats::axisNonIter( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the Vector instance containing the build 10-Jul-2019 13:16:42 + // Return the Vector instance containing the build 10-Jul-2019 13:16:42 // non-iteration axis values build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - Vector* poAxisNonIter = new Vector( oAxisNonIter ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poAxisNonIter ); build 10-Jul-2019 13:16:42 + return oAxisNonIter; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -741,7 +733,7 @@ None. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the IPosition instance containing the shape of the output build 10-Jul-2019 13:16:42 +The IPosition instance containing the shape of the output build 10-Jul-2019 13:16:42 statistics cube, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 @@ -753,14 +745,12 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -IPosition& CalStats::statsShape( void ) const { build 10-Jul-2019 13:16:42 +IPosition CalStats::statsShape( void ) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the IPosition instance containing the shape of the build 10-Jul-2019 13:16:42 + // Return the IPosition instance containing the shape of the build 10-Jul-2019 13:16:42 // output statistics cube build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - IPosition* poStatsShape = new IPosition( oStatsShape ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poStatsShape ); build 10-Jul-2019 13:16:42 + return oStatsShape; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -896,7 +886,7 @@ eAxis - This reference to the CalStats::AXIS enum. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The String reference to the axis string, returned via the function value. build 10-Jul-2019 13:16:42 +The axis string, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 --------------------- build 10-Jul-2019 13:16:42 @@ -907,28 +897,28 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalStats::axisName( const CalStats::AXIS& eAxis ) { build 10-Jul-2019 13:16:42 +String CalStats::axisName( const CalStats::AXIS& eAxis ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the string corresponding to the CalStats::AXIS enum build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poAxisName; build 10-Jul-2019 13:16:42 + String axisName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 switch ((uInt) eAxis) { build 10-Jul-2019 13:16:42 case (uInt) CalStats::FEED: build 10-Jul-2019 13:16:42 - poAxisName = new String( "FEED" ); build 10-Jul-2019 13:16:42 + axisName = "FEED"; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) CalStats::FREQUENCY: build 10-Jul-2019 13:16:42 - poAxisName = new String( "FREQUENCY" ); build 10-Jul-2019 13:16:42 + axisName = "FREQUENCY"; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) CalStats::TIME: build 10-Jul-2019 13:16:42 - poAxisName = new String( "TIME" ); build 10-Jul-2019 13:16:42 + axisName = "TIME"; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 throw( AipsError( "Invalid axis" ) ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poAxisName ); build 10-Jul-2019 13:16:42 + return axisName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -960,7 +950,7 @@ oDummy5 - This reference to a CalStats::ARG instance is a dummy. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The reference to the CalStats::NONE instance, returned via the function value. build 10-Jul-2019 13:16:42 +The CalStats::NONE instance, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 --------------------- build 10-Jul-2019 13:16:42 @@ -971,17 +961,14 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -template <> CalStats::NONE& CalStats::statsWrap( build 10-Jul-2019 13:16:42 +template <> CalStats::NONE CalStats::statsWrap( build 10-Jul-2019 13:16:42 const Vector& /*oDummy1*/, const Vector& /*oDummy2*/, build 10-Jul-2019 13:16:42 const Vector& /*oDummy3*/, Vector& /*oDummy4*/, build 10-Jul-2019 13:16:42 const CalStats::ARG& /*oDummy5*/ ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to a CalStats::NONE instance build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - CalStats::NONE* poNone = new CalStats::NONE(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return( *poNone ); build 10-Jul-2019 13:16:42 + // Return a CalStats::NONE instance build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + return CalStats::NONE(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 @@ -1008,7 +995,7 @@ oArg - This reference to a CalStats::ARG instance contains build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -oFlag - This reference to a Vector instance contains the flags. build 10-Jul-2019 13:16:42 +oFlag - This reference to Vector instance contains the flags. build 10-Jul-2019 13:16:42 The reference to the CalStatsFitter::FIT instance, returned via the function build 10-Jul-2019 13:16:42 value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1023,24 +1010,24 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -template <> CalStatsFitter::FIT& CalStats::statsWrap( build 10-Jul-2019 13:16:42 +template <> CalStatsFitter::FIT CalStats::statsWrap( build 10-Jul-2019 13:16:42 const Vector& oAbs, const Vector& oValue, build 10-Jul-2019 13:16:42 const Vector& oValueErr, Vector& oFlag, build 10-Jul-2019 13:16:42 const CalStats::ARG& oArg ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Perform the fit and return the reference to a CalStatsFitter::FIT instance build 10-Jul-2019 13:16:42 + // Perform the fit and return the CalStatsFitter::FIT instance build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - CalStatsFitter::FIT* poFit = new CalStatsFitter::FIT(); build 10-Jul-2019 13:16:42 + CalStatsFitter::FIT fit; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 - *poFit = CalStatsFitter::fit( oAbs, oValue, oValueErr, oFlag, oArg.eOrder, build 10-Jul-2019 13:16:42 - oArg.eType, oArg.eWeight ); build 10-Jul-2019 13:16:42 + fit = CalStatsFitter::fit( oAbs, oValue, oValueErr, oFlag, oArg.eOrder, build 10-Jul-2019 13:16:42 + oArg.eType, oArg.eWeight ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 catch ( AipsError oAE ) { build 10-Jul-2019 13:16:42 throw( oAE ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poFit ); build 10-Jul-2019 13:16:42 + return fit; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalStats.h b/code/calanalysis/CalAnalysis/CalStats.h build 10-Jul-2019 13:16:42 index 113e6cf..f49ce8c 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalStats.h build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalStats.h build 10-Jul-2019 13:16:42 @@ -297,16 +297,16 @@ class CalStats { build 10-Jul-2019 13:16:42 virtual ~CalStats( void ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Axis ID states build 10-Jul-2019 13:16:42 - casacore::IPosition& axisIterID( void ) const; build 10-Jul-2019 13:16:42 - AXIS& axisNonIterID( void ) const; build 10-Jul-2019 13:16:42 + casacore::IPosition axisIterID( void ) const; build 10-Jul-2019 13:16:42 + AXIS axisNonIterID( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Axis value states build 10-Jul-2019 13:16:42 - casacore::Vector& axisIterFeed( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& axisIterUser( void ) const; build 10-Jul-2019 13:16:42 - casacore::Vector& axisNonIter( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector axisIterFeed( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector axisIterUser( void ) const; build 10-Jul-2019 13:16:42 + casacore::Vector axisNonIter( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Output statistics cube shape state build 10-Jul-2019 13:16:42 - casacore::IPosition& statsShape( void ) const; build 10-Jul-2019 13:16:42 + casacore::IPosition statsShape( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // casacore::Input data states build 10-Jul-2019 13:16:42 casacore::Cube& value( void ) const; build 10-Jul-2019 13:16:42 @@ -314,15 +314,15 @@ class CalStats { build 10-Jul-2019 13:16:42 casacore::Cube& flag( void ) const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // The axis names build 10-Jul-2019 13:16:42 - static casacore::String& axisName( const AXIS& eAxis ); build 10-Jul-2019 13:16:42 + static casacore::String axisName( const AXIS& eAxis ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Calculate statistics (allowed T: CalStats::NONE gets data without build 10-Jul-2019 13:16:42 // calculating statistics, CalStatsFitter::FIT calculates fits, and build 10-Jul-2019 13:16:42 // CalStatsHist::HIST calculates histogram statistics). Member function build 10-Jul-2019 13:16:42 // stats() is the main user interface and statsWrap() is the supporting build 10-Jul-2019 13:16:42 // wrapper. build 10-Jul-2019 13:16:42 - template casacore::Matrix >& stats( const ARG& oArg ); build 10-Jul-2019 13:16:42 - template T& statsWrap( const casacore::Vector& oAbs, build 10-Jul-2019 13:16:42 + template casacore::Matrix > stats( const ARG& oArg ); build 10-Jul-2019 13:16:42 + template T statsWrap( const casacore::Vector& oAbs, build 10-Jul-2019 13:16:42 const casacore::Vector& oValue, const casacore::Vector& oValueErr, build 10-Jul-2019 13:16:42 casacore::Vector& oFlag, const ARG& oArg ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -404,16 +404,14 @@ CalStats::OUT::OUT( void ) { build 10-Jul-2019 13:16:42 oAxes = CalStats::AXES(); build 10-Jul-2019 13:16:42 oData = CalStats::DATA(); build 10-Jul-2019 13:16:42 oT = T(); build 10-Jul-2019 13:16:42 - return; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Copy constructor build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 -CalStats::OUT::OUT( const CalStats::OUT& oOut ) { build 10-Jul-2019 13:16:42 + CalStats::OUT::OUT( const CalStats::OUT& oOut ) { build 10-Jul-2019 13:16:42 oAxes = CalStats::AXES( oOut.oAxes ); build 10-Jul-2019 13:16:42 oData = CalStats::DATA( oOut.oData ); build 10-Jul-2019 13:16:42 oT = T( oOut.oT ); build 10-Jul-2019 13:16:42 - return; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Destructor build 10-Jul-2019 13:16:42 @@ -472,13 +470,13 @@ Modification history: build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 -casacore::Matrix >& CalStats::stats( const CalStats::ARG& oArg ) { build 10-Jul-2019 13:16:42 +casacore::Matrix> CalStats::stats( const CalStats::ARG& oArg ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Initialize the CalStats::OUT array and its iterator build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::Array >* poOut = new casacore::Array >( oStatsShape ); build 10-Jul-2019 13:16:42 + casacore::Array > out( oStatsShape ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::ArrayIterator > oOutIter( *poOut, oAxisIterID, false ); build 10-Jul-2019 13:16:42 + casacore::ArrayIterator > oOutIter( out, oAxisIterID, false ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // For each iteration, convert the resulting arrays to vectors and feed them build 10-Jul-2019 13:16:42 @@ -536,10 +534,10 @@ casacore::Matrix >& CalStats::stats( const CalStats::ARG& oA build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the reference to the casacore::Matrix > instance build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poOut->removeDegenerate(); build 10-Jul-2019 13:16:42 - casacore::Matrix >* poMatrix = (casacore::Matrix >*) poOut; build 10-Jul-2019 13:16:42 + out.removeDegenerate(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poMatrix ); build 10-Jul-2019 13:16:42 + casacore::Matrix > outMatrix = out; build 10-Jul-2019 13:16:42 + return outMatrix; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalStatsFitter.cc b/code/calanalysis/CalAnalysis/CalStatsFitter.cc build 10-Jul-2019 13:16:42 index fc26d40..6d4d7ba 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalStatsFitter.cc build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalStatsFitter.cc build 10-Jul-2019 13:16:42 @@ -158,28 +158,28 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -CalStatsFitter::FIT& CalStatsFitter::fit( const Vector& oAbs, build 10-Jul-2019 13:16:42 +CalStatsFitter::FIT CalStatsFitter::fit( const Vector& oAbs, build 10-Jul-2019 13:16:42 const Vector& oValue, const Vector& oValueErr, build 10-Jul-2019 13:16:42 Vector& oFlag, const ORDER& eOrder, const TYPE& eType, build 10-Jul-2019 13:16:42 const WEIGHT& eWeight ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Calculate the desired fit and populate the pointer to the FIT structure build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - CalStatsFitter::FIT* poFit; build 10-Jul-2019 13:16:42 + CalStatsFitter::FIT fit; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 switch ((uInt) eType) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 case (uInt) LSQ: build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 - poFit = new CalStatsFitter::FIT( lsqFit( oAbs, oValue, oValueErr, oFlag, build 10-Jul-2019 13:16:42 - eOrder, eWeight ) ); build 10-Jul-2019 13:16:42 + fit = CalStatsFitter::FIT( lsqFit( oAbs, oValue, oValueErr, oFlag, build 10-Jul-2019 13:16:42 + eOrder, eWeight ) ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 catch ( AipsError oAE ) { build 10-Jul-2019 13:16:42 throw( oAE ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - poFit->eOrder = eOrder; build 10-Jul-2019 13:16:42 - poFit->eType = eType; build 10-Jul-2019 13:16:42 - poFit->eWeight = eWeight; build 10-Jul-2019 13:16:42 + fit.eOrder = eOrder; build 10-Jul-2019 13:16:42 + fit.eType = eType; build 10-Jul-2019 13:16:42 + fit.eWeight = eWeight; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 case (uInt) ROBUST: build 10-Jul-2019 13:16:42 @@ -187,15 +187,15 @@ CalStatsFitter::FIT& CalStatsFitter::fit( const Vector& oAbs, build 10-Jul-2019 13:16:42 case (uInt) AVERAGE: build 10-Jul-2019 13:16:42 case (uInt) LINEAR: build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 - poFit = new CalStatsFitter::FIT( robustFit( build 10-Jul-2019 13:16:42 - oAbs, oValue, oValueErr, oFlag, eOrder, eWeight, 5.0 ) ); build 10-Jul-2019 13:16:42 + fit = CalStatsFitter::FIT( robustFit( oAbs, oValue, oValueErr, oFlag, eOrder, build 10-Jul-2019 13:16:42 + eWeight, 5.0 ) ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 catch ( AipsError oAE ) { build 10-Jul-2019 13:16:42 throw( oAE ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - poFit->eOrder = eOrder; build 10-Jul-2019 13:16:42 - poFit->eType = eType; build 10-Jul-2019 13:16:42 - poFit->eWeight = eWeight; build 10-Jul-2019 13:16:42 + fit.eOrder = eOrder; build 10-Jul-2019 13:16:42 + fit.eType = eType; build 10-Jul-2019 13:16:42 + fit.eWeight = eWeight; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) QUADRATIC: build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 @@ -211,9 +211,9 @@ CalStatsFitter::FIT& CalStatsFitter::fit( const Vector& oAbs, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the FIT structure build 10-Jul-2019 13:16:42 + // Return the FIT structure build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poFit ); build 10-Jul-2019 13:16:42 + return fit; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -234,7 +234,7 @@ eOrder - This reference to the CalStatsFitter::ORDER enum. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The String reference to the order string, returned via the function value. build 10-Jul-2019 13:16:42 +The order string, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 --------------------- build 10-Jul-2019 13:16:42 @@ -245,28 +245,28 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalStatsFitter::orderName( const CalStatsFitter::ORDER& eOrder ) { build 10-Jul-2019 13:16:42 +String CalStatsFitter::orderName( const CalStatsFitter::ORDER& eOrder ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the string corresponding to the CalStatsFitter::ORDER enum build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poOrderName; build 10-Jul-2019 13:16:42 + String orderName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 switch ((uInt) eOrder) { build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::AVERAGE: build 10-Jul-2019 13:16:42 - poOrderName = new String( "AVERAGE" ); build 10-Jul-2019 13:16:42 + orderName = String( "AVERAGE" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::LINEAR: build 10-Jul-2019 13:16:42 - poOrderName = new String( "LINEAR" ); build 10-Jul-2019 13:16:42 + orderName = String( "LINEAR" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::QUADRATIC: build 10-Jul-2019 13:16:42 - poOrderName = new String( "QUADRATIC" ); build 10-Jul-2019 13:16:42 + orderName = String( "QUADRATIC" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 throw( AipsError( "Invalid order" ) ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poOrderName ); build 10-Jul-2019 13:16:42 + return orderName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -286,7 +286,7 @@ eType - This reference to the CalStatsFitter::TYPE enum. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The String reference to the type string, returned via the function value. build 10-Jul-2019 13:16:42 +The type string, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 --------------------- build 10-Jul-2019 13:16:42 @@ -297,25 +297,25 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalStatsFitter::typeName( const CalStatsFitter::TYPE& eType ) { build 10-Jul-2019 13:16:42 +String CalStatsFitter::typeName( const CalStatsFitter::TYPE& eType ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the string corresponding to the CalStatsFitter::TYPE enum build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poTypeName; build 10-Jul-2019 13:16:42 + String typeName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 switch ((uInt) eType) { build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::LSQ: build 10-Jul-2019 13:16:42 - poTypeName = new String( "LSQ" ); build 10-Jul-2019 13:16:42 + typeName = String( "LSQ" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::ROBUST: build 10-Jul-2019 13:16:42 - poTypeName = new String( "ROBUST" ); build 10-Jul-2019 13:16:42 + typeName = String( "ROBUST" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 throw( AipsError( "Invalid type" ) ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poTypeName ); build 10-Jul-2019 13:16:42 + return typeName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -336,7 +336,7 @@ eWeight - This reference to the CalStatsFitter::WEIGHT enum. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Outputs: build 10-Jul-2019 13:16:42 -------- build 10-Jul-2019 13:16:42 -The String reference to the weight string, returned via the function value. build 10-Jul-2019 13:16:42 +The weight string, returned via the function value. build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Modification history: build 10-Jul-2019 13:16:42 --------------------- build 10-Jul-2019 13:16:42 @@ -347,25 +347,25 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -String& CalStatsFitter::weightName( const CalStatsFitter::WEIGHT& eWeight ) { build 10-Jul-2019 13:16:42 +String CalStatsFitter::weightName( const CalStatsFitter::WEIGHT& eWeight ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Return the string corresponding to the CalStatsFitter::WEIGHT enum build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String* poWeightName; build 10-Jul-2019 13:16:42 + String weightName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 switch ((uInt) eWeight) { build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::NO: build 10-Jul-2019 13:16:42 - poWeightName = new String( "NO" ); build 10-Jul-2019 13:16:42 + weightName = String( "NO" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case (uInt) CalStatsFitter::YES: build 10-Jul-2019 13:16:42 - poWeightName = new String( "YES" ); build 10-Jul-2019 13:16:42 + weightName = String( "YES" ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 throw( AipsError( "Invalid weight" ) ); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poWeightName ); build 10-Jul-2019 13:16:42 + return weightName; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -444,7 +444,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -CalStatsFitter::FIT& CalStatsFitter::lsqFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 +CalStatsFitter::FIT CalStatsFitter::lsqFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 const Vector& oValue, const Vector& oValueErr, build 10-Jul-2019 13:16:42 Vector& oFlag, const ORDER& eOrder, const WEIGHT& eWeight ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -510,50 +510,50 @@ CalStatsFitter::FIT& CalStatsFitter::lsqFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 Bool bValid = oFitter.fit( oPars, oAbsC, oValueC, oValueErrC ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Initialize the pointer to the CalStatsFitter::FIT structure build 10-Jul-2019 13:16:42 + // Initialize the CalStatsFitter::FIT structure build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - CalStatsFitter::FIT* poFit = new CalStatsFitter::FIT(); build 10-Jul-2019 13:16:42 + CalStatsFitter::FIT fit; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Populate the pointer to the FIT structure, including abscissa, parameter, build 10-Jul-2019 13:16:42 + // Populate the FIT structure, including abscissa, parameter, build 10-Jul-2019 13:16:42 // and covariance rescaling build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( bValid ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poFit->bValid = bValid; build 10-Jul-2019 13:16:42 + fit.bValid = bValid; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poFit->oPars = Vector( oPars ); build 10-Jul-2019 13:16:42 + fit.oPars = Vector( oPars ); build 10-Jul-2019 13:16:42 for ( uInt o=0; o<=(uInt)eOrder; o++ ) { build 10-Jul-2019 13:16:42 Double dScale = pow(dScaleX,(Int)o) / dScaleY; build 10-Jul-2019 13:16:42 - poFit->oPars[o] /= dScale; build 10-Jul-2019 13:16:42 + fit.oPars[o] /= dScale; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poFit->oModel = Vector( uiNumData, (Double) 0.0 ); build 10-Jul-2019 13:16:42 + fit.oModel = Vector( uiNumData, (Double) 0.0 ); build 10-Jul-2019 13:16:42 for ( uInt o=0; o<=(uInt)eOrder; o++ ) { build 10-Jul-2019 13:16:42 - poFit->oModel += poFit->oPars[o] * pow(oAbs,(Int)o); build 10-Jul-2019 13:16:42 + fit.oModel += fit.oPars[o] * pow(oAbs,(Int)o); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poFit->oRes = Vector( oValue - poFit->oModel ); build 10-Jul-2019 13:16:42 + fit.oRes = Vector( oValue - fit.oModel ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poFit->dResMean = mean( poFit->oRes ); build 10-Jul-2019 13:16:42 - poFit->dResVar = variance( poFit->oRes, poFit->dResMean ); build 10-Jul-2019 13:16:42 + fit.dResMean = mean( fit.oRes ); build 10-Jul-2019 13:16:42 + fit.dResVar = variance( fit.oRes, fit.dResMean ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Double dMetric = oFitter.chiSquare() / ((Double) iDoF); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - poFit->oCovars = Matrix( oFitter.compuCovariance() ); build 10-Jul-2019 13:16:42 + fit.oCovars = Matrix( oFitter.compuCovariance() ); build 10-Jul-2019 13:16:42 for ( uInt o1=0; o1<=(uInt)eOrder; o1++ ) { build 10-Jul-2019 13:16:42 for ( uInt o2=0; o2<=(uInt)eOrder; o2++ ) { build 10-Jul-2019 13:16:42 Double dScale = pow(dScaleX,(Int)o1) * pow(dScaleX,(Int)o2); build 10-Jul-2019 13:16:42 dScale /= pow(dScaleY,2); build 10-Jul-2019 13:16:42 - poFit->oCovars(o1,o2) /= dScale; build 10-Jul-2019 13:16:42 + fit.oCovars(o1,o2) /= dScale; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if ( (Bool) eWeight ) { build 10-Jul-2019 13:16:42 - poFit->dRedChi2 = dMetric; build 10-Jul-2019 13:16:42 + fit.dRedChi2 = dMetric; build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - poFit->oCovars *= dMetric; build 10-Jul-2019 13:16:42 - poFit->dRedChi2 = 1.0; build 10-Jul-2019 13:16:42 + fit.oCovars *= dMetric; build 10-Jul-2019 13:16:42 + fit.dRedChi2 = 1.0; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 @@ -563,9 +563,9 @@ CalStatsFitter::FIT& CalStatsFitter::lsqFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the FIT structure build 10-Jul-2019 13:16:42 + // Return the FIT structure build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poFit ); build 10-Jul-2019 13:16:42 + return fit; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -652,7 +652,7 @@ Modification history: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ----------------------------------------------------------------------------- build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -CalStatsFitter::FIT& CalStatsFitter::robustFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 +CalStatsFitter::FIT CalStatsFitter::robustFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 const Vector& oValue, const Vector& oValueErr, build 10-Jul-2019 13:16:42 Vector& oFlag, const ORDER& eOrder, const WEIGHT& eWeight, build 10-Jul-2019 13:16:42 const Double& dTrim ) { build 10-Jul-2019 13:16:42 @@ -723,20 +723,20 @@ CalStatsFitter::FIT& CalStatsFitter::robustFit( const Vector& oAbs, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Calculate the "trimmed" least-squares fit build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - CalStatsFitter::FIT* poFitTrim = new CalStatsFitter::FIT(); build 10-Jul-2019 13:16:42 + CalStatsFitter::FIT fitTrim; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 - poFitTrim = new CalStatsFitter::FIT( build 10-Jul-2019 13:16:42 - lsqFit( oAbs, oValue, oValueErr, oFlag, eOrder, eWeight ) ); build 10-Jul-2019 13:16:42 + fitTrim = CalStatsFitter::FIT( lsqFit( oAbs, oValue, oValueErr, oFlag, eOrder, build 10-Jul-2019 13:16:42 + eWeight ) ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 catch ( AipsError oAE ) { build 10-Jul-2019 13:16:42 throw( oAE ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Return the reference to the FIT structure (trimmed least-squares fit) build 10-Jul-2019 13:16:42 + // Return the FIT structure (trimmed least-squares fit) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return( *poFitTrim ); build 10-Jul-2019 13:16:42 + return fitTrim; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/calanalysis/CalAnalysis/CalStatsFitter.h b/code/calanalysis/CalAnalysis/CalStatsFitter.h build 10-Jul-2019 13:16:42 index 952796c..5346a93 100644 build 10-Jul-2019 13:16:42 --- a/code/calanalysis/CalAnalysis/CalStatsFitter.h build 10-Jul-2019 13:16:42 +++ b/code/calanalysis/CalAnalysis/CalStatsFitter.h build 10-Jul-2019 13:16:42 @@ -168,24 +168,24 @@ class CalStatsFitter { build 10-Jul-2019 13:16:42 }; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // User interface to all fitting capabilities build 10-Jul-2019 13:16:42 - static FIT& fit( const casacore::Vector& oAbs, const casacore::Vector& oValue, build 10-Jul-2019 13:16:42 + static FIT fit( const casacore::Vector& oAbs, const casacore::Vector& oValue, build 10-Jul-2019 13:16:42 const casacore::Vector& oValueErr, casacore::Vector& oFlag, build 10-Jul-2019 13:16:42 const ORDER& eOrder, const TYPE& eType, const WEIGHT& eWeight ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // The enum names build 10-Jul-2019 13:16:42 - static casacore::String& orderName( const ORDER& eOrder ); build 10-Jul-2019 13:16:42 - static casacore::String& typeName( const TYPE& eOrder ); build 10-Jul-2019 13:16:42 - static casacore::String& weightName( const WEIGHT& eOrder ); build 10-Jul-2019 13:16:42 + static casacore::String orderName( const ORDER& eOrder ); build 10-Jul-2019 13:16:42 + static casacore::String typeName( const TYPE& eOrder ); build 10-Jul-2019 13:16:42 + static casacore::String weightName( const WEIGHT& eOrder ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Least-squares fitting function build 10-Jul-2019 13:16:42 - static FIT& lsqFit( const casacore::Vector& oAbs, build 10-Jul-2019 13:16:42 + static FIT lsqFit( const casacore::Vector& oAbs, build 10-Jul-2019 13:16:42 const casacore::Vector& oValue, const casacore::Vector& oValueErr, build 10-Jul-2019 13:16:42 casacore::Vector& oFlag, const ORDER& eOrder, const WEIGHT& eWeight ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Robust fitting function build 10-Jul-2019 13:16:42 - static FIT& robustFit( const casacore::Vector& oAbs, build 10-Jul-2019 13:16:42 + static FIT robustFit( const casacore::Vector& oAbs, build 10-Jul-2019 13:16:42 const casacore::Vector& oValue, const casacore::Vector& oValueErr, build 10-Jul-2019 13:16:42 casacore::Vector& oFlag, const ORDER& eOrder, const WEIGHT& eWeight, build 10-Jul-2019 13:16:42 const casacore::Double& dTrim ); build 10-Jul-2019 13:16:42 diff --git a/code/imageanalysis/CMakeLists.txt b/code/imageanalysis/CMakeLists.txt build 10-Jul-2019 13:16:42 index 047aef7..09276b4 100644 build 10-Jul-2019 13:16:42 --- a/code/imageanalysis/CMakeLists.txt build 10-Jul-2019 13:16:42 +++ b/code/imageanalysis/CMakeLists.txt build 10-Jul-2019 13:16:42 @@ -37,7 +37,6 @@ Annotations/RegionTextList.cc build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Images/ComponentListImage.cc build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -ImageAnalysis/AntennaResponses.cc build 10-Jul-2019 13:16:42 ImageAnalysis/CasaImageBeamSet.cc build 10-Jul-2019 13:16:42 ImageAnalysis/ComponentImager.cc build 10-Jul-2019 13:16:42 ImageAnalysis/ImageCollapserData.cc build 10-Jul-2019 13:16:42 @@ -120,7 +119,6 @@ install (FILES build 10-Jul-2019 13:16:42 DESTINATION include/casacode/imageanalysis/Utilities build 10-Jul-2019 13:16:42 ) build 10-Jul-2019 13:16:42 install (FILES build 10-Jul-2019 13:16:42 - ImageAnalysis/AntennaResponses.h build 10-Jul-2019 13:16:42 ImageAnalysis/BeamManipulator.h build 10-Jul-2019 13:16:42 ImageAnalysis/BeamManipulator.tcc build 10-Jul-2019 13:16:42 ImageAnalysis/CasaImageBeamSet.h build 10-Jul-2019 13:16:42 @@ -310,7 +308,6 @@ casa_add_unit_test ( MODULES imageanalysis SOURCES Annotations/test/tAnnText.cc build 10-Jul-2019 13:16:42 casa_add_unit_test ( MODULES imageanalysis SOURCES Annotations/test/tAnnVector.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test ( MODULES imageanalysis SOURCES Annotations/test/tRegionTextList.cc ) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -casa_add_unit_test ( MODULES imageanalysis SOURCES ImageAnalysis/test/tAntennaResponses.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test ( MODULES imageanalysis SOURCES ImageAnalysis/test/tCasaImageBeamSet.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test ( MODULES imageanalysis SOURCES ImageAnalysis/test/tComponentImager.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test ( MODULES imageanalysis SOURCES ImageAnalysis/test/tImage2DConvolver.cc ) build 10-Jul-2019 13:16:42 diff --git a/code/imageanalysis/ImageAnalysis/AntennaResponses.cc b/code/imageanalysis/ImageAnalysis/AntennaResponses.cc build 10-Jul-2019 13:16:42 deleted file mode 100644 build 10-Jul-2019 13:16:42 index 24df76c..0000000 build 10-Jul-2019 13:16:42 --- a/code/imageanalysis/ImageAnalysis/AntennaResponses.cc build 10-Jul-2019 13:16:42 +++ /dev/null build 10-Jul-2019 13:16:42 @@ -1,957 +0,0 @@ build 10-Jul-2019 13:16:42 -//# AntennaResponses.h: AntennaResponses provides access to antenna response data build 10-Jul-2019 13:16:42 -//# Copyright (C) 1995-1999,2000-2004 build 10-Jul-2019 13:16:42 -//# Associated Universities, Inc. Washington DC, USA build 10-Jul-2019 13:16:42 -//# Copyright by ESO (in the framework of the ALMA collaboration) build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# This library is free software; you can redistribute it and/or modify it build 10-Jul-2019 13:16:42 -//# under the terms of the GNU Library General Public License as published by build 10-Jul-2019 13:16:42 -//# the Free Software Foundation; either version 2 of the License, or (at your build 10-Jul-2019 13:16:42 -//# option) any later version. build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# This library is distributed in the hope that it will be useful, but WITHOUT build 10-Jul-2019 13:16:42 -//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 10-Jul-2019 13:16:42 -//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public build 10-Jul-2019 13:16:42 -//# License for more details. build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# You should have received a copy of the GNU Library General Public License build 10-Jul-2019 13:16:42 -//# along with this library; if not, write to the Free Software Foundation, build 10-Jul-2019 13:16:42 -//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# Correspondence concerning CASA should be addressed as follows: build 10-Jul-2019 13:16:42 -//# Internet email: aips2-request@nrao.edu. build 10-Jul-2019 13:16:42 -//# Postal address: CASA Project Office build 10-Jul-2019 13:16:42 -//# National Radio Astronomy Observatory build 10-Jul-2019 13:16:42 -//# 520 Edgemont Road build 10-Jul-2019 13:16:42 -//# Charlottesville, VA 22903-2475 USA build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# $Id: $ build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -//# Includes build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -using namespace casacore; build 10-Jul-2019 13:16:42 -namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AntennaResponses::AntennaResponses(const String& path){ build 10-Jul-2019 13:16:42 - init(path); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::init(const String& path){ build 10-Jul-2019 13:16:42 - // reset members to empty build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - paths_p.resize(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - numRows_p = 0; build 10-Jul-2019 13:16:42 - ObsName_p.resize(); build 10-Jul-2019 13:16:42 - StartTime_p.resize(); build 10-Jul-2019 13:16:42 - AntennaType_p.resize(); build 10-Jul-2019 13:16:42 - ReceiverType_p.resize(); build 10-Jul-2019 13:16:42 - BeamId_p.resize(); build 10-Jul-2019 13:16:42 - BeamNumber_p.resize(); build 10-Jul-2019 13:16:42 - ValidCenter_p.resize(); build 10-Jul-2019 13:16:42 - ValidCenterMin_p.resize(); build 10-Jul-2019 13:16:42 - ValidCenterMax_p.resize(); build 10-Jul-2019 13:16:42 - NumSubbands_p.resize(); build 10-Jul-2019 13:16:42 - BandName_p.resize(); build 10-Jul-2019 13:16:42 - SubbandMinFreq_p.resize(); build 10-Jul-2019 13:16:42 - SubbandMaxFreq_p.resize(); build 10-Jul-2019 13:16:42 - FuncType_p.resize(); build 10-Jul-2019 13:16:42 - FuncName_p.resize(); build 10-Jul-2019 13:16:42 - FuncChannel_p.resize(); build 10-Jul-2019 13:16:42 - NomFreq_p.resize(); build 10-Jul-2019 13:16:42 - RotAngOffset_p.resize(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - pathIndex_p.resize(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(path==""){ build 10-Jul-2019 13:16:42 - paths_p.resize(1, ""); build 10-Jul-2019 13:16:42 - return true; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else{ build 10-Jul-2019 13:16:42 - // fill members from table on disk build 10-Jul-2019 13:16:42 - return append(path); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::append(const String& path){ build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(isInit(path)){ build 10-Jul-2019 13:16:42 - // Returns false if the path was already read before. build 10-Jul-2019 13:16:42 - //cout << "Path has been read before." << endl; build 10-Jul-2019 13:16:42 - return false; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // open table build 10-Jul-2019 13:16:42 - Table tab(path); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // get number of rows build 10-Jul-2019 13:16:42 - uInt numRows = tab.nrow(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - uInt nPaths = paths_p.nelements(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(numRows>0){ build 10-Jul-2019 13:16:42 - // read columns and append to vectors; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - ScalarColumn beamIdCol(tab, "BEAM_ID"); build 10-Jul-2019 13:16:42 - ScalarColumn nameCol(tab, "NAME"); build 10-Jul-2019 13:16:42 - ScalarColumn beamNumberCol(tab, "BEAM_NUMBER"); build 10-Jul-2019 13:16:42 - ROScalarMeasColumn startTimeCol(tab, "START_TIME"); build 10-Jul-2019 13:16:42 - ScalarColumn antennaTypeCol(tab, "ANTENNA_TYPE"); build 10-Jul-2019 13:16:42 - ScalarColumn receiverTypeCol(tab, "RECEIVER_TYPE"); build 10-Jul-2019 13:16:42 - ScalarColumn numSubbandsCol(tab, "NUM_SUBBANDS"); build 10-Jul-2019 13:16:42 - ArrayColumn bandNameCol(tab, "BAND_NAME"); build 10-Jul-2019 13:16:42 - ROArrayQuantColumn subbandMinFreqCol(tab, "SUBBAND_MIN_FREQ"); build 10-Jul-2019 13:16:42 - ROArrayQuantColumn subbandMaxFreqCol(tab, "SUBBAND_MAX_FREQ"); build 10-Jul-2019 13:16:42 - ROScalarMeasColumn centerCol(tab, "CENTER"); build 10-Jul-2019 13:16:42 - ROScalarMeasColumn validCenterMinCol(tab, "VALID_CENTER_MIN"); build 10-Jul-2019 13:16:42 - ROScalarMeasColumn validCenterMaxCol(tab, "VALID_CENTER_MAX"); build 10-Jul-2019 13:16:42 - ArrayColumn functionTypeCol(tab, "FUNCTION_TYPE"); build 10-Jul-2019 13:16:42 - ArrayColumn functionNameCol(tab, "FUNCTION_NAME"); build 10-Jul-2019 13:16:42 - ArrayColumn functionChannelCol(tab, "FUNCTION_CHANNEL"); build 10-Jul-2019 13:16:42 - ROArrayQuantColumn nomFreqCol(tab, "NOMINAL_FREQ"); build 10-Jul-2019 13:16:42 - ROArrayQuantColumn rotAngOffsetCol(tab, "RESPONSE_ROTATION_OFFSET"); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - numRows_p += numRows; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - ObsName_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - StartTime_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - AntennaType_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - ReceiverType_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - BeamId_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - BeamNumber_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - ValidCenter_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - ValidCenterMin_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - ValidCenterMax_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - NumSubbands_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - BandName_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - SubbandMinFreq_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - SubbandMaxFreq_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - FuncType_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - FuncName_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - FuncChannel_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - NomFreq_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - RotAngOffset_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - pathIndex_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - for(uInt i=0; i tQ; build 10-Jul-2019 13:16:42 - tQ = subbandMinFreqCol(i); build 10-Jul-2019 13:16:42 - uInt nSubB = tQ.nelements(); build 10-Jul-2019 13:16:42 - SubbandMinFreq_p(j).resize(nSubB); build 10-Jul-2019 13:16:42 - for(uInt k=0; k tFType; build 10-Jul-2019 13:16:42 - tFType = functionTypeCol(i); build 10-Jul-2019 13:16:42 - FuncType_p(j).resize(nSubB); build 10-Jul-2019 13:16:42 - for(uInt k=0; k1){ // don't want trailing "/" build 10-Jul-2019 13:16:42 - tempS.erase(tempS.size()-1,1); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - paths_p(nPaths) = path; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return true; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::isInit(){ build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return (paths_p.nelements()!=0); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::isInit(const String& path){ build 10-Jul-2019 13:16:42 - Bool found = false; build 10-Jul-2019 13:16:42 - for (uInt i=0; i azel = MDirection::Convert(center, build 10-Jul-2019 13:16:42 - MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 - frame) build 10-Jul-2019 13:16:42 - )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Quantity f(0., uHz); build 10-Jul-2019 13:16:42 - if(matchFreq){ build 10-Jul-2019 13:16:42 - f = MFrequency::Convert(freq, MFrequency::TOPO)().get(uHz); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // loop over rows build 10-Jul-2019 13:16:42 - uInt i,j; build 10-Jul-2019 13:16:42 - vector rowV, subBandV; build 10-Jul-2019 13:16:42 - vector timeV; build 10-Jul-2019 13:16:42 - for(i=0; i azelMin = MDirection::Convert(ValidCenterMin_p(i), build 10-Jul-2019 13:16:42 - MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 - frame) build 10-Jul-2019 13:16:42 - )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - Vector azelMax = MDirection::Convert(ValidCenterMax_p(i), build 10-Jul-2019 13:16:42 - MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 - frame) build 10-Jul-2019 13:16:42 - )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // need to accomodate the ambiguity of the AZ build 10-Jul-2019 13:16:42 - Double modAz = fmod(azel(0) - azelMin(0),360.); build 10-Jul-2019 13:16:42 - Double modAzMax = fmod(azelMax(0) - azelMin(0), 360.); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -// cout << " i, j, " << i << ", " << j << " az min actual max" << azelMin(0) << " " build 10-Jul-2019 13:16:42 -// << azel(0) << " " << azelMax(0) << endl; build 10-Jul-2019 13:16:42 -// cout << " i, j, " << i << ", " << j << " cannonised az actual max" << modAz << " " << modAzMax << endl; build 10-Jul-2019 13:16:42 -// cout << " i, j, " << i << ", " << j << " el min actual max" << azelMin(1) << " " << azel(1) << " " << azelMax(1) << endl; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if((fabs(azelMin(0)-azelMax(0))<1e-5 // all AZ are valid (accomodate numerical problems at 360 deg) build 10-Jul-2019 13:16:42 - || ( 0. <= modAz && modAz <= modAzMax)) build 10-Jul-2019 13:16:42 - && azelMin(1) <= azel(1) && azel(1) <= azelMax(1)){ build 10-Jul-2019 13:16:42 - // memorize the applicable row, sub band, and time build 10-Jul-2019 13:16:42 - rval = true; build 10-Jul-2019 13:16:42 - rowV.push_back(i); build 10-Jul-2019 13:16:42 - subBandV.push_back(j); build 10-Jul-2019 13:16:42 - timeV.push_back(StartTime_p(i).get(uS)); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } // end for build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(rval){ build 10-Jul-2019 13:16:42 - Vector sortIndex; build 10-Jul-2019 13:16:42 - GenSortIndirect::sort(sortIndex, Vector(timeV)); build 10-Jul-2019 13:16:42 - // take the latest row build 10-Jul-2019 13:16:42 - row = rowV[sortIndex(sortIndex.nelements()-1)]; build 10-Jul-2019 13:16:42 - subBand = subBandV[sortIndex(sortIndex.nelements()-1)]; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - return rval; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::getRowAndIndex(uInt& row, uInt& subBand, build 10-Jul-2019 13:16:42 - const String& obsName, build 10-Jul-2019 13:16:42 - const Int& beamId, build 10-Jul-2019 13:16:42 - const MFrequency& freq){ build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool rval = false; build 10-Jul-2019 13:16:42 - Unit uHz("Hz"); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // calculate topo frequency build 10-Jul-2019 13:16:42 - Quantity f = MFrequency::Convert(freq, MFrequency::TOPO)().get(uHz); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // loop over rows build 10-Jul-2019 13:16:42 - uInt i,j; build 10-Jul-2019 13:16:42 - for(i=0; i& antTypes, build 10-Jul-2019 13:16:42 - const String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 - const MEpoch& obsTime, build 10-Jul-2019 13:16:42 - const MFrequency& freq, build 10-Jul-2019 13:16:42 - const FuncTypes& requFType, build 10-Jul-2019 13:16:42 - const MDirection& center, build 10-Jul-2019 13:16:42 - const String& receiverType, build 10-Jul-2019 13:16:42 - const Int& beamNumber){ build 10-Jul-2019 13:16:42 - Bool rval = false; build 10-Jul-2019 13:16:42 - Unit uS("s"); build 10-Jul-2019 13:16:42 - Unit uHz("Hz"); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - antTypes.resize(0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // for the combination INTERNAL + 0 freq, return the row and index for the first freq found build 10-Jul-2019 13:16:42 - Bool matchFreq = !((freq.get(uHz).getValue() == 0.) && requFType==INTERNAL); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // calculate azimuth, elevation, and topo frequency build 10-Jul-2019 13:16:42 - // first, get the reference frame build 10-Jul-2019 13:16:42 - MPosition mp; build 10-Jul-2019 13:16:42 - if (!MeasTable::Observatory(mp,obsName)) { build 10-Jul-2019 13:16:42 - // unknown observatory build 10-Jul-2019 13:16:42 - LogIO os(LogOrigin("AntennaResponses", build 10-Jul-2019 13:16:42 - String("getAntennaTypes"), build 10-Jul-2019 13:16:42 - WHERE)); build 10-Jul-2019 13:16:42 - os << LogIO::NORMAL << String("Unknown observatory ") << obsName build 10-Jul-2019 13:16:42 - << LogIO::POST; build 10-Jul-2019 13:16:42 - return false; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - mp=MPosition::Convert(mp, MPosition::ITRF)(); build 10-Jul-2019 13:16:42 - MeasFrame frame(mp, obsTime); build 10-Jul-2019 13:16:42 - Vector azel = MDirection::Convert(center, build 10-Jul-2019 13:16:42 - MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 - frame) build 10-Jul-2019 13:16:42 - )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Quantity f(0., uHz); build 10-Jul-2019 13:16:42 - if(matchFreq){ build 10-Jul-2019 13:16:42 - f = MFrequency::Convert(freq, MFrequency::TOPO)().get(uHz); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // loop over rows build 10-Jul-2019 13:16:42 - uInt i,j; build 10-Jul-2019 13:16:42 - std::map antTypeMap; build 10-Jul-2019 13:16:42 - for(i=0; i azelMin = MDirection::Convert(ValidCenterMin_p(i), build 10-Jul-2019 13:16:42 - MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 - frame) build 10-Jul-2019 13:16:42 - )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - Vector azelMax = MDirection::Convert(ValidCenterMax_p(i), build 10-Jul-2019 13:16:42 - MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 - frame) build 10-Jul-2019 13:16:42 - )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // need to accomodate the ambiguity of the AZ build 10-Jul-2019 13:16:42 - Double modAz = fmod(azel(0) - azelMin(0),360.); build 10-Jul-2019 13:16:42 - Double modAzMax = fmod(azelMax(0) - azelMin(0), 360.); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if((fabs(azelMin(0)-azelMax(0))<1e-5 // all AZ are valid (accomodate numerical problems at 360 deg) build 10-Jul-2019 13:16:42 - || ( 0. <= modAz && modAz <= modAzMax)) build 10-Jul-2019 13:16:42 - && azelMin(1) <= azel(1) && azel(1) <= azelMax(1)){ build 10-Jul-2019 13:16:42 - // memorize the antenna type build 10-Jul-2019 13:16:42 - if( antTypeMap.find(AntennaType_p(i)) == antTypeMap.end( ) ){ build 10-Jul-2019 13:16:42 - rval = true; build 10-Jul-2019 13:16:42 - antTypeMap.insert(std::pair(AntennaType_p(i),1)); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } // end for build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(rval){ build 10-Jul-2019 13:16:42 - antTypes.resize(antTypeMap.size( )); build 10-Jul-2019 13:16:42 - uInt count = 0; build 10-Jul-2019 13:16:42 - for( auto iter = antTypeMap.begin( ); iter != antTypeMap.end( ); ++iter, ++count ){ build 10-Jul-2019 13:16:42 - antTypes(count) = iter->first; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return rval; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::putRow(uInt& row, build 10-Jul-2019 13:16:42 - const String& obsName, build 10-Jul-2019 13:16:42 - const Int& beamId, build 10-Jul-2019 13:16:42 - const Vector& bandName, build 10-Jul-2019 13:16:42 - const Vector& subbandMinFreq, build 10-Jul-2019 13:16:42 - const Vector& subbandMaxFreq, build 10-Jul-2019 13:16:42 - const Vector& funcType, build 10-Jul-2019 13:16:42 - const Vector& funcName, build 10-Jul-2019 13:16:42 - const Vector& funcChannel, build 10-Jul-2019 13:16:42 - const Vector& nomFreq, build 10-Jul-2019 13:16:42 - const Vector& rotAngOffset, build 10-Jul-2019 13:16:42 - const String& antennaType, build 10-Jul-2019 13:16:42 - const MEpoch& startTime, build 10-Jul-2019 13:16:42 - const MDirection& center, build 10-Jul-2019 13:16:42 - const MDirection& validCenterMin, build 10-Jul-2019 13:16:42 - const MDirection& validCenterMax, build 10-Jul-2019 13:16:42 - const String& receiverType, build 10-Jul-2019 13:16:42 - const Int& beamNumber){ build 10-Jul-2019 13:16:42 - // Put the given row into the present antenna reponses table (in memory). build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Returns false, if the table was not initialised or the given data was build 10-Jul-2019 13:16:42 - // not consistent. build 10-Jul-2019 13:16:42 - if(paths_p.nelements()==0){ build 10-Jul-2019 13:16:42 - LogIO os(LogOrigin("AntennaResponses", build 10-Jul-2019 13:16:42 - String("putRow"), build 10-Jul-2019 13:16:42 - WHERE)); build 10-Jul-2019 13:16:42 - os << LogIO::NORMAL << String("Table not initialized.") << obsName build 10-Jul-2019 13:16:42 - << LogIO::POST; build 10-Jul-2019 13:16:42 - return false; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - // Consistency checks: build 10-Jul-2019 13:16:42 - // - all vectors have same dimension which is then used to set numSubbands build 10-Jul-2019 13:16:42 - uInt tNumSubbands = bandName.nelements(); build 10-Jul-2019 13:16:42 - if(!( build 10-Jul-2019 13:16:42 - tNumSubbands == subbandMinFreq.nelements() && build 10-Jul-2019 13:16:42 - tNumSubbands == subbandMaxFreq.nelements() && build 10-Jul-2019 13:16:42 - tNumSubbands == funcType.nelements() && build 10-Jul-2019 13:16:42 - tNumSubbands == funcName.nelements() && build 10-Jul-2019 13:16:42 - tNumSubbands == funcChannel.nelements() && build 10-Jul-2019 13:16:42 - tNumSubbands == nomFreq.nelements() && build 10-Jul-2019 13:16:42 - tNumSubbands == rotAngOffset.nelements()) build 10-Jul-2019 13:16:42 - ){ build 10-Jul-2019 13:16:42 - LogIO os(LogOrigin("AntennaResponses", String("putRow"), WHERE)); build 10-Jul-2019 13:16:42 - os << LogIO::NORMAL << String("Inconsistent vector dimensions.") << obsName build 10-Jul-2019 13:16:42 - << LogIO::POST; build 10-Jul-2019 13:16:42 - return false; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - // - beamId is unique for the given observatory build 10-Jul-2019 13:16:42 - Bool isUnique = true; build 10-Jul-2019 13:16:42 - for(uInt i=0; i ("BEAM_ID", "unique for the given observatory name")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("NAME", "name of the observatory as in the Observatories table")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("BEAM_NUMBER", "for observataories which support several simultaneous beams, zero-based")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("START_TIME", "the time from which onwards this table row is valid, measure fixed to UTC")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("ANTENNA_TYPE", "for heterogeneous arrays: indication of the antenna type")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("RECEIVER_TYPE", "permits multiple receivers per band")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("NUM_SUBBANDS", "number of elements in the array columns in this table")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("BAND_NAME", "name of the frequency band")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("SUBBAND_MIN_FREQ", "minimum frequency of the subband in the observatory frame")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("SUBBAND_MAX_FREQ", "maximum frequency of the subband in the observatory frame")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("CENTER", "the nominal center sky position where this row is valid")); build 10-Jul-2019 13:16:42 - tD.addColumn(ScalarColumnDesc ("CENTER_REF", ColumnDesc::Direct)); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("VALID_CENTER_MIN", "sky position validity range min values")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("VALID_CENTER_MAX", "sky position validity range max values")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("FUNCTION_TYPE")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("FUNCTION_NAME")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("FUNCTION_CHANNEL")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("NOMINAL_FREQ")); build 10-Jul-2019 13:16:42 - tD.addColumn(ArrayColumnDesc ("RESPONSE_ROTATION_OFFSET")); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Add TableMeasures information for designated Measures/Quanta columns build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - TableMeasValueDesc timeMeasVal(tD, "START_TIME"); build 10-Jul-2019 13:16:42 - TableMeasRefDesc timeMeasRef(MEpoch::DEFAULT); build 10-Jul-2019 13:16:42 - TableMeasDesc timeMeasCol(timeMeasVal, timeMeasRef); build 10-Jul-2019 13:16:42 - timeMeasCol.write(tD); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - TableQuantumDesc timeQuantDesc(tD, "START_TIME", Unit ("s")); build 10-Jul-2019 13:16:42 - timeQuantDesc.write(tD); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - TableQuantumDesc freqQuantDesc(tD, "SUBBAND_MIN_FREQ", Unit ("Hz")); build 10-Jul-2019 13:16:42 - freqQuantDesc.write (tD); build 10-Jul-2019 13:16:42 - TableQuantumDesc freqQuantDesc2(tD, "SUBBAND_MAX_FREQ", Unit ("Hz")); build 10-Jul-2019 13:16:42 - freqQuantDesc2.write (tD); build 10-Jul-2019 13:16:42 - TableQuantumDesc freqQuantDesc3(tD, "NOMINAL_FREQ", Unit ("Hz")); build 10-Jul-2019 13:16:42 - freqQuantDesc3.write (tD); build 10-Jul-2019 13:16:42 - TableQuantumDesc angQuantDesc(tD, "RESPONSE_ROTATION_OFFSET", Unit ("deg")); build 10-Jul-2019 13:16:42 - angQuantDesc.write (tD); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - TableMeasValueDesc refDirMeasVal (tD, "CENTER"); build 10-Jul-2019 13:16:42 - TableMeasRefDesc refDirMeasRef (tD, "CENTER_REF"); build 10-Jul-2019 13:16:42 - TableMeasDesc refDirMeasCol (refDirMeasVal, refDirMeasRef); build 10-Jul-2019 13:16:42 - refDirMeasCol.write(tD); build 10-Jul-2019 13:16:42 - TableMeasValueDesc refDirMeasValMin (tD, "VALID_CENTER_MIN"); build 10-Jul-2019 13:16:42 - TableMeasDesc refDirMeasColMin (refDirMeasValMin, refDirMeasRef); build 10-Jul-2019 13:16:42 - refDirMeasColMin.write(tD); build 10-Jul-2019 13:16:42 - TableMeasValueDesc refDirMeasValMax (tD, "VALID_CENTER_MAX"); build 10-Jul-2019 13:16:42 - TableMeasDesc refDirMeasColMax (refDirMeasValMax, refDirMeasRef); build 10-Jul-2019 13:16:42 - refDirMeasColMax.write(tD); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // create the table build 10-Jul-2019 13:16:42 - SetupNewTable newtab (path, tD, Table::New); build 10-Jul-2019 13:16:42 - Table tab(newtab, numRows_p); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(numRows_p>0){ build 10-Jul-2019 13:16:42 - // fill the table build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - ScalarColumn beamIdCol(tab, "BEAM_ID"); build 10-Jul-2019 13:16:42 - ScalarColumn nameCol(tab, "NAME"); build 10-Jul-2019 13:16:42 - ScalarColumn beamNumberCol(tab, "BEAM_NUMBER"); build 10-Jul-2019 13:16:42 - ScalarMeasColumn startTimeCol(tab, "START_TIME"); build 10-Jul-2019 13:16:42 - ScalarColumn antennaTypeCol(tab, "ANTENNA_TYPE"); build 10-Jul-2019 13:16:42 - ScalarColumn receiverTypeCol(tab, "RECEIVER_TYPE"); build 10-Jul-2019 13:16:42 - ScalarColumn numSubbandsCol(tab, "NUM_SUBBANDS"); build 10-Jul-2019 13:16:42 - ArrayColumn bandNameCol(tab, "BAND_NAME"); build 10-Jul-2019 13:16:42 - ArrayQuantColumn subbandMinFreqCol(tab, "SUBBAND_MIN_FREQ"); build 10-Jul-2019 13:16:42 - ArrayQuantColumn subbandMaxFreqCol(tab, "SUBBAND_MAX_FREQ"); build 10-Jul-2019 13:16:42 - ScalarMeasColumn centerCol(tab, "CENTER"); build 10-Jul-2019 13:16:42 - ScalarMeasColumn validCenterMinCol(tab, "VALID_CENTER_MIN"); build 10-Jul-2019 13:16:42 - ScalarMeasColumn validCenterMaxCol(tab, "VALID_CENTER_MAX"); build 10-Jul-2019 13:16:42 - ArrayColumn functionTypeCol(tab, "FUNCTION_TYPE"); build 10-Jul-2019 13:16:42 - ArrayColumn functionNameCol(tab, "FUNCTION_NAME"); build 10-Jul-2019 13:16:42 - ArrayColumn functionChannelCol(tab, "FUNCTION_CHANNEL"); build 10-Jul-2019 13:16:42 - ArrayQuantColumn nomFreqCol(tab, "NOMINAL_FREQ"); build 10-Jul-2019 13:16:42 - ArrayQuantColumn rotAngOffsetCol(tab, "RESPONSE_ROTATION_OFFSET"); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - for(uInt i=0; i bMF(SubbandMinFreq_p(i).nelements()); build 10-Jul-2019 13:16:42 - for(uInt k=0; k iFT(FuncType_p(i).nelements()); build 10-Jul-2019 13:16:42 - for(uInt k=0; k(FuncType_p(i)(k)); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - functionTypeCol.put(i, iFT); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - functionNameCol.put(i, FuncName_p(i)); build 10-Jul-2019 13:16:42 - functionChannelCol.put(i, FuncChannel_p(i)); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - return; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AntennaResponses::FuncTypes AntennaResponses::FuncType(Int i){ build 10-Jul-2019 13:16:42 - if(-1 < i && i < static_cast(AntennaResponses::N_FuncTypes) ){ build 10-Jul-2019 13:16:42 - return static_cast(i); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else{ build 10-Jul-2019 13:16:42 - return AntennaResponses::INVALID; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AntennaResponses::FuncTypes AntennaResponses::FuncType(const String& sftyp){ build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if(sftyp=="NA") return AntennaResponses::NA; build 10-Jul-2019 13:16:42 - if(sftyp=="AIF") return AntennaResponses::AIF; build 10-Jul-2019 13:16:42 - if(sftyp=="EFP") return AntennaResponses::EFP; build 10-Jul-2019 13:16:42 - if(sftyp=="VP") return AntennaResponses::VP; build 10-Jul-2019 13:16:42 - if(sftyp=="VPMAN") return AntennaResponses::VPMAN; build 10-Jul-2019 13:16:42 - if(sftyp=="INTERNAL") return AntennaResponses::INTERNAL; build 10-Jul-2019 13:16:42 - return AntennaResponses::INVALID; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Bool AntennaResponses::getBandName(String& bandName, build 10-Jul-2019 13:16:42 - const String& obsName, build 10-Jul-2019 13:16:42 - const MVFrequency& freq){ build 10-Jul-2019 13:16:42 - // brute force search build 10-Jul-2019 13:16:42 - Quantity f = freq.get(); build 10-Jul-2019 13:16:42 - bandName = ""; build 10-Jul-2019 13:16:42 - Bool rval = false; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - uInt i, j; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - for(i=0; i build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// AntennaResponses provides access to antenna response data build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -//
  • Measure class build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// The location of the AntennaResponses table for a given observatory is set build 10-Jul-2019 13:16:42 -// in the column casacore::String ANTENNA_RESPONSES in the "Observatories" table (accessed build 10-Jul-2019 13:16:42 -// via the casacore::MeasTable class). build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// The detailed rules of how the location and name of the table is derived build 10-Jul-2019 13:16:42 -// from the string found in ANTENNA_RESPONSES is described further down build 10-Jul-2019 13:16:42 -// in the comment to the initAntennaResponses() method. build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// E.g., for ALMA, the location of the table would be build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// data/alma/AntennaResponses build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// and the entry in the Observatories table would be simply "alma/AntennaResponses". build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// "AntennaResponses" is the recommended name of the table but in principle any build 10-Jul-2019 13:16:42 -// name can be used. That name will then have to be given in the Observatories table. build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// Contents of the AntennaResponses table: build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// column 0: casacore::Int BEAM_ID (a unique number in the table for the given observatory name) build 10-Jul-2019 13:16:42 -// column 1: casacore::String NAME (name of the observatory as in the observatory table) build 10-Jul-2019 13:16:42 -// column 2: casacore::Int BEAM_NUMBER (for observataories which support several simultaneous beams, zero-based) build 10-Jul-2019 13:16:42 -// column 3: casacore::Double START_TIME (a casacore::Measure, the time from which onwards this table row is valid) build 10-Jul-2019 13:16:42 -// column 4: casacore::String ANTENNA_TYPE (for ALMA: "DV", "DA", "PM", or "CM") build 10-Jul-2019 13:16:42 -// column 5: casacore::String RECEIVER_TYPE (for ALMA this will not be filled, at least for the moment) build 10-Jul-2019 13:16:42 -// column 6: casacore::Int NUM_SUBBANDS (number of response frequency sub-bands) build 10-Jul-2019 13:16:42 -// column 7: casacore::Array casacore::String (size set by NUM_SUBBANDS) BAND_NAME (for ALMA: "1", "2" etc.) build 10-Jul-2019 13:16:42 -// (if there is more than one sub-band per band, the band name repeats) build 10-Jul-2019 13:16:42 -// column 8: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) SUBBAND_MIN_FREQ build 10-Jul-2019 13:16:42 -// column 9: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) SUBBAND_MAX_FREQ build 10-Jul-2019 13:16:42 -// column 10: casacore::MDirection CENTER (the nominal center sky position where this row is valid, default (0.,90.) AZEL) build 10-Jul-2019 13:16:42 -// column 11: casacore::MDirection VALID_CENTER_MIN (sky position validity range min values, default (0.,0.) AZEL) build 10-Jul-2019 13:16:42 -// column 12: casacore::MDirection VALID_CENTER_MAX (sky position validity range max values, default (360.,90.) AZEL) build 10-Jul-2019 13:16:42 -// column 13: casacore::Array casacore::Int (size set by NUM_SUBBANDS) FUNCTION_TYPE build 10-Jul-2019 13:16:42 -// (uses enum FuncTypes defined below: build 10-Jul-2019 13:16:42 -// EFP = complex electric field pattern image, build 10-Jul-2019 13:16:42 -// VP = voltage pattern image, build 10-Jul-2019 13:16:42 -// AIF = complex aperture illumination function image, build 10-Jul-2019 13:16:42 -// NA = the function is not yet available, build 10-Jul-2019 13:16:42 -// here other codes can be easily added, e.g. build 10-Jul-2019 13:16:42 -// VPMAN = the function is available in casa via the vp manager (details t.b.d.), build 10-Jul-2019 13:16:42 -// INTERNAL = the function is generated on the fly internally build 10-Jul-2019 13:16:42 -// using ray-tracing as for the EVLA) build 10-Jul-2019 13:16:42 -// column 14: casacore::Array casacore::String (size set by NUM_SUBBANDS) FUNCTION_NAME build 10-Jul-2019 13:16:42 -// (names of the images as paths relative to the directory build 10-Jul-2019 13:16:42 -// where this table is located, build 10-Jul-2019 13:16:42 -// empty string if no image is available for the band, e.g. build 10-Jul-2019 13:16:42 -// "ticra_efield_patterns/melco12m_band6_efp.im") build 10-Jul-2019 13:16:42 -// column 15: casacore::Array casacore::uInt (size set by NUM_SUBBANDS) FUNCTION_CHANNEL build 10-Jul-2019 13:16:42 -// (the spectral image channel to use, can be different from 0 in the case build 10-Jul-2019 13:16:42 -// that several antenna responses are stored in one image file) build 10-Jul-2019 13:16:42 -// column 16: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) NOMINAL_FREQ build 10-Jul-2019 13:16:42 -// (the nominal frequency of the channel given by FUNCTION_CHANNEL) build 10-Jul-2019 13:16:42 -// column 17: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) RESPONSE_ROTATION_OFFSET build 10-Jul-2019 13:16:42 -// (the angle of an additional constant rotation of the response image) build 10-Jul-2019 13:16:42 -// project-dependent implementation) build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// It is assured by the table filling code that columns 10, 11, and 12 use the same casacore::MDirection type. build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// Information on receiver bands and corresponding primary beams build 10-Jul-2019 13:16:42 -// (in whatever form) for different antenna types needs to be made build 10-Jul-2019 13:16:42 -// available to the CASA code in a place where imaging code build 10-Jul-2019 13:16:42 -// can pick it up. build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 -//
  • build 10-Jul-2019 13:16:42 -// build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -class AntennaResponses { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -public: build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - enum FuncTypes{ build 10-Jul-2019 13:16:42 - NA, // not available build 10-Jul-2019 13:16:42 - AIF, // complex aperture illumination function build 10-Jul-2019 13:16:42 - EFP, // complex electric field pattern build 10-Jul-2019 13:16:42 - VP, // real voltage pattern build 10-Jul-2019 13:16:42 - VPMAN, // the function is available in casa via the vp manager (details t.b.d.) build 10-Jul-2019 13:16:42 - INTERNAL, // the function is generated on the fly internally build 10-Jul-2019 13:16:42 - N_FuncTypes, build 10-Jul-2019 13:16:42 - ANY, // used in requests build 10-Jul-2019 13:16:42 - INVALID build 10-Jul-2019 13:16:42 - }; build 10-Jul-2019 13:16:42 - // this can of course be extended for additional types if necessary build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Constructor, does not call init() build 10-Jul-2019 13:16:42 - AntennaResponses(){}; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Constructor, calls init() build 10-Jul-2019 13:16:42 - AntennaResponses(const casacore::String& path); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Takes the path (as taken from the new ANTENNA_RESPONSES column of the Observatories table) build 10-Jul-2019 13:16:42 - // and uses it as the name and location of the AntennaResponses table, and then initializes build 10-Jul-2019 13:16:42 - // the member vectors; build 10-Jul-2019 13:16:42 - // can be called repeatedly with different paths; build 10-Jul-2019 13:16:42 - // each call will overwrite the vectors. build 10-Jul-2019 13:16:42 - // If the path is an empty string, the member vectors will be reset to empty, i.e. build 10-Jul-2019 13:16:42 - // this is interpreted to mean that there is no AntennaResponses table on disk. build 10-Jul-2019 13:16:42 - // Returns true unless for some reason the initialisation fails (other than path==""). build 10-Jul-2019 13:16:42 - casacore::Bool init(const casacore::String& path=""); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // As init but does not overwrite the table (member vectors) in memory. build 10-Jul-2019 13:16:42 - // Instead it appends to the vectors. build 10-Jul-2019 13:16:42 - // Returns false if the path was already read before. build 10-Jul-2019 13:16:42 - casacore::Bool append(const casacore::String& path); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // returns true if paths_p has at least one member build 10-Jul-2019 13:16:42 - casacore::Bool isInit(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // returns true if path is a member element of paths_p, i.e. the contents of path was read build 10-Jul-2019 13:16:42 - casacore::Bool isInit(const casacore::String& path); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // find the row containing the information pertinent to the given parameters build 10-Jul-2019 13:16:42 - // (this is also the index in the member vectors) build 10-Jul-2019 13:16:42 - // and the index (subband) to the frequency channel of the response build 10-Jul-2019 13:16:42 - // return false if no matching row could be found build 10-Jul-2019 13:16:42 - casacore::Bool getRowAndIndex(casacore::uInt& row, casacore::uInt& subBand, build 10-Jul-2019 13:16:42 - const casacore::String& obsName, build 10-Jul-2019 13:16:42 - const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 - const casacore::MFrequency& freq, // if requFType==INTERNAL, a frequency value of 0 (zero) will return the first row and band found build 10-Jul-2019 13:16:42 - const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 - const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 - const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 - casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), // the center to be matched with the CENTER column build 10-Jul-2019 13:16:42 - const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 - const casacore::Int& beamNumber = 0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // overloaded method: as previous method but using beamId build 10-Jul-2019 13:16:42 - // (instead of obs. time, ant. type, rec. type, center, and beam number) build 10-Jul-2019 13:16:42 - casacore::Bool getRowAndIndex(casacore::uInt& row, casacore::uInt& subBand, build 10-Jul-2019 13:16:42 - const casacore::String& obsName, build 10-Jul-2019 13:16:42 - const casacore::Int& beamId, build 10-Jul-2019 13:16:42 - const casacore::MFrequency& freq); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // getRowAndIndex is then used by the following methods build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Access methods for the response images: takes an observatory name, build 10-Jul-2019 13:16:42 - // an observation time, the antenna type (e.g. "DV"), the receiverType, build 10-Jul-2019 13:16:42 - // a frequency, a function type (enum FuncTypes, can be ANY, i.e. take the first available), build 10-Jul-2019 13:16:42 - // a direction, and a beam number and finds the appropriate image in the AntennaResponses table build 10-Jul-2019 13:16:42 - // which contains the image of the requested type and returns build 10-Jul-2019 13:16:42 - // the path, the channel to use, the frequency of that channel, and the FuncType of the image. build 10-Jul-2019 13:16:42 - // The image will contain a spectral axis even if degenerate. build 10-Jul-2019 13:16:42 - // The direction axis pair of the stored images is set as follows: build 10-Jul-2019 13:16:42 - // The axes are parallel to the ones given by the coordinate system type of the CENTER column build 10-Jul-2019 13:16:42 - // of the AntennaReponses table. The center of the image is that given by the CENTER column. build 10-Jul-2019 13:16:42 - // Furthermore, the images contain a casacore::Stokes axis (even if degenerate) to express the build 10-Jul-2019 13:16:42 - // beams for the different polarizations or polarization products. build 10-Jul-2019 13:16:42 - // Returns false if no appropriate image could be found. build 10-Jul-2019 13:16:42 - casacore::Bool getImageName(casacore::String& functionImageName, // the path to the image build 10-Jul-2019 13:16:42 - casacore::uInt& funcChannel, // the channel to use in the image build 10-Jul-2019 13:16:42 - casacore::MFrequency& nomFreq, // nominal frequency of the image (in the given channel) build 10-Jul-2019 13:16:42 - FuncTypes& fType, // the function type of the image build 10-Jul-2019 13:16:42 - casacore::MVAngle& rotAngOffset, // the response rotation angle offset build 10-Jul-2019 13:16:42 - const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 - const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 - const casacore::MFrequency& freq, build 10-Jul-2019 13:16:42 - const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 - const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 - const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 - casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 - const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 - const casacore::Int& beamNumber=0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Overloaded method: returning the validity range build 10-Jul-2019 13:16:42 - casacore::Bool getImageName(casacore::String& functionImageName, // the path to the image build 10-Jul-2019 13:16:42 - casacore::uInt& funcChannel, // the channel to use in the image build 10-Jul-2019 13:16:42 - casacore::MFrequency& nomFreq, // nominal frequency of the image (in the given channel) build 10-Jul-2019 13:16:42 - casacore::MFrequency& loFreq, // lower end of the frequency validity range build 10-Jul-2019 13:16:42 - casacore::MFrequency& hiFreq, // upper end of the frequency validity range build 10-Jul-2019 13:16:42 - FuncTypes& fType, // the function type of the image build 10-Jul-2019 13:16:42 - casacore::MVAngle& rotAngOffset, // the response rotation angle offset build 10-Jul-2019 13:16:42 - const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 - const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 - const casacore::MFrequency& freq, build 10-Jul-2019 13:16:42 - const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 - const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 - const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 - casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 - const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 - const casacore::Int& beamNumber=0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Overloaded method: as previous method but using beamId build 10-Jul-2019 13:16:42 - // (instead of obs. time, ant. type, rec. type, center, and functype) build 10-Jul-2019 13:16:42 - casacore::Bool getImageName(casacore::String& functionImageName, build 10-Jul-2019 13:16:42 - casacore::uInt& funcChannel, // the channel to use in the image build 10-Jul-2019 13:16:42 - casacore::MFrequency& nomFreq, // nominal frequency of the image (at the given channel) build 10-Jul-2019 13:16:42 - FuncTypes& fType, // the function type of the image build 10-Jul-2019 13:16:42 - casacore::MVAngle& rotAngOffset, // the response rotation angle offset build 10-Jul-2019 13:16:42 - const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 - const casacore::Int& beamId, build 10-Jul-2019 13:16:42 - const casacore::MFrequency& freq); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Get a vector containing all unique antenna type strings for the given constraints build 10-Jul-2019 13:16:42 - casacore::Bool getAntennaTypes(casacore::Vector& antTypes, build 10-Jul-2019 13:16:42 - const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 - const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 - const casacore::MFrequency& freq, build 10-Jul-2019 13:16:42 - const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 - const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 - casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 - const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 - const casacore::Int& beamNumber=0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Put the given row into the present antenna reponses table (in memory). build 10-Jul-2019 13:16:42 - // If the row exists at the position given by casacore::uInt row, it is overwritten. build 10-Jul-2019 13:16:42 - // If it doesn't exist, the table is resized by one in memory and the new build 10-Jul-2019 13:16:42 - // row is added at the last position. The variable "row" then contains the build 10-Jul-2019 13:16:42 - // actual row that was filled. build 10-Jul-2019 13:16:42 - // Returns false, if the table was not initialised or the given data was build 10-Jul-2019 13:16:42 - // not consistent. build 10-Jul-2019 13:16:42 - // Consistency checks: build 10-Jul-2019 13:16:42 - // - all vectors have same dimension which is then used to set numSubbands build 10-Jul-2019 13:16:42 - // - beamId is unique for the given observatory build 10-Jul-2019 13:16:42 - // - center, validCenterMin, and validCenterMax have the same casacore::MDirection type build 10-Jul-2019 13:16:42 - casacore::Bool putRow(casacore::uInt& row, build 10-Jul-2019 13:16:42 - const casacore::String& obsName, build 10-Jul-2019 13:16:42 - const casacore::Int& beamId, build 10-Jul-2019 13:16:42 - const casacore::Vector& bandName, build 10-Jul-2019 13:16:42 - const casacore::Vector& subbandMinFreq, build 10-Jul-2019 13:16:42 - const casacore::Vector& subbandMaxFreq, build 10-Jul-2019 13:16:42 - const casacore::Vector& funcType, build 10-Jul-2019 13:16:42 - const casacore::Vector& funcName, build 10-Jul-2019 13:16:42 - const casacore::Vector& funcChannel, build 10-Jul-2019 13:16:42 - const casacore::Vector& nomFreq, build 10-Jul-2019 13:16:42 - const casacore::Vector& rotAngOffset, build 10-Jul-2019 13:16:42 - const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 - const casacore::MEpoch& startTime = casacore::MEpoch(casacore::MVEpoch(casacore::Quantity(40588., "d")), casacore::MEpoch::UTC), // beginning of 1970 build 10-Jul-2019 13:16:42 - const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 - casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 - const casacore::MDirection& validCenterMin = casacore::MDirection(casacore::Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - casacore::Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 - const casacore::MDirection& validCenterMax = casacore::MDirection(casacore::Quantity( 360., "deg"), build 10-Jul-2019 13:16:42 - casacore::Quantity( 90., "deg"), build 10-Jul-2019 13:16:42 - casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 - const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 - const casacore::Int& beamNumber = 0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Create an new AntennaReponses table on disk at the given path build 10-Jul-2019 13:16:42 - // and fill it with the table contents presently in memory. build 10-Jul-2019 13:16:42 - // Throw exceptions if there are problems writing the table. build 10-Jul-2019 13:16:42 - void create(const casacore::String& path); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Convert from casacore::Int to FuncType build 10-Jul-2019 13:16:42 - FuncTypes FuncType(casacore::Int i); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Convert from casacore::String to FuncType build 10-Jul-2019 13:16:42 - static FuncTypes FuncType(const casacore::String& sftyp); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // get the name of the band corresponding to the frequency (in the rest frame of the observatory) build 10-Jul-2019 13:16:42 - casacore::Bool getBandName(casacore::String& bandName, build 10-Jul-2019 13:16:42 - const casacore::String& obsName, build 10-Jul-2019 13:16:42 - const casacore::MVFrequency& freq); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -private: build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // after initialization, this contains the name of the path where the build 10-Jul-2019 13:16:42 - // AntennaResponses table was read from; build 10-Jul-2019 13:16:42 - // if append was used to read additional tables in the memory table, build 10-Jul-2019 13:16:42 - // then this vector has several elements representing the different tables build 10-Jul-2019 13:16:42 - casacore::Vector paths_p; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // here a complete copy of the AntennaResponses table is stored build 10-Jul-2019 13:16:42 - casacore::uInt numRows_p; build 10-Jul-2019 13:16:42 - casacore::Vector ObsName_p; build 10-Jul-2019 13:16:42 - casacore::Vector StartTime_p; build 10-Jul-2019 13:16:42 - casacore::Vector AntennaType_p; build 10-Jul-2019 13:16:42 - casacore::Vector ReceiverType_p; build 10-Jul-2019 13:16:42 - casacore::Vector BeamId_p; build 10-Jul-2019 13:16:42 - casacore::Vector BeamNumber_p; build 10-Jul-2019 13:16:42 - casacore::Vector ValidCenter_p; build 10-Jul-2019 13:16:42 - casacore::Vector ValidCenterMin_p; build 10-Jul-2019 13:16:42 - casacore::Vector ValidCenterMax_p; build 10-Jul-2019 13:16:42 - casacore::Vector NumSubbands_p; build 10-Jul-2019 13:16:42 - casacore::Vector > BandName_p; build 10-Jul-2019 13:16:42 - casacore::Vector > SubbandMinFreq_p; build 10-Jul-2019 13:16:42 - casacore::Vector > SubbandMaxFreq_p; build 10-Jul-2019 13:16:42 - casacore::Vector > FuncType_p; build 10-Jul-2019 13:16:42 - casacore::Vector > FuncName_p; build 10-Jul-2019 13:16:42 - casacore::Vector > FuncChannel_p; build 10-Jul-2019 13:16:42 - casacore::Vector > NomFreq_p; build 10-Jul-2019 13:16:42 - casacore::Vector > RotAngOffset_p; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // not part of the table but same number of elements: build 10-Jul-2019 13:16:42 - // memory of the path from which the row was read (index to paths_p) build 10-Jul-2019 13:16:42 - casacore::Vector pathIndex_p; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -}; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -} //# NAMESPACE CASA - END build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -#endif build 10-Jul-2019 13:16:42 diff --git a/code/imageanalysis/ImageAnalysis/test/tAntennaResponses.cc b/code/imageanalysis/ImageAnalysis/test/tAntennaResponses.cc build 10-Jul-2019 13:16:42 deleted file mode 100644 build 10-Jul-2019 13:16:42 index b8c9593..0000000 build 10-Jul-2019 13:16:42 --- a/code/imageanalysis/ImageAnalysis/test/tAntennaResponses.cc build 10-Jul-2019 13:16:42 +++ /dev/null build 10-Jul-2019 13:16:42 @@ -1,485 +0,0 @@ build 10-Jul-2019 13:16:42 -//# tAntennaResponses the AntennaResponses class build 10-Jul-2019 13:16:42 -//# Copyright (C) 2003,2004 build 10-Jul-2019 13:16:42 -//# Associated Universities, Inc. Washington DC, USA. build 10-Jul-2019 13:16:42 -//# Copyright by ESO (in the framework of the ALMA collaboration) build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# This program is free software; you can redistribute it and/or modify it build 10-Jul-2019 13:16:42 -//# under the terms of the GNU General Public License as published by the Free build 10-Jul-2019 13:16:42 -//# Software Foundation; either version 2 of the License, or (at your option) build 10-Jul-2019 13:16:42 -//# any later version. build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# This program is distributed in the hope that it will be useful, but WITHOUT build 10-Jul-2019 13:16:42 -//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 10-Jul-2019 13:16:42 -//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for build 10-Jul-2019 13:16:42 -//# more details. build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# You should have received a copy of the GNU General Public License along build 10-Jul-2019 13:16:42 -//# with this program; if not, write to the Free Software Foundation, Inc., build 10-Jul-2019 13:16:42 -//# 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# Correspondence concerning AIPS++ should be addressed as follows: build 10-Jul-2019 13:16:42 -//# Internet email: aips2-request@nrao.edu. build 10-Jul-2019 13:16:42 -//# Postal address: AIPS++ Project Office build 10-Jul-2019 13:16:42 -//# National Radio Astronomy Observatory build 10-Jul-2019 13:16:42 -//# 520 Edgemont Road build 10-Jul-2019 13:16:42 -//# Charlottesville, VA 22903-2475 USA build 10-Jul-2019 13:16:42 -//# build 10-Jul-2019 13:16:42 -//# $Id: $ build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -using namespace casa; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -int main() { build 10-Jul-2019 13:16:42 - try { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - { build 10-Jul-2019 13:16:42 - { build 10-Jul-2019 13:16:42 - // not initialised build 10-Jul-2019 13:16:42 - AntennaResponses x; build 10-Jul-2019 13:16:42 - AlwaysAssert(!x.isInit(), AipsError); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // table creation from scratch build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector bName(3); build 10-Jul-2019 13:16:42 - bName(0) = "band_1"; build 10-Jul-2019 13:16:42 - bName(1) = "band_2"; build 10-Jul-2019 13:16:42 - bName(2) = "band_3"; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector minFreq(3); build 10-Jul-2019 13:16:42 - Vector maxFreq(3); build 10-Jul-2019 13:16:42 - Vector nomFreq(3); build 10-Jul-2019 13:16:42 - Vector rotAngOffset(3); build 10-Jul-2019 13:16:42 - minFreq(0) = MVFrequency( Quantity(10., "GHz")); build 10-Jul-2019 13:16:42 - maxFreq(0) = MVFrequency( Quantity(100., "GHz")); build 10-Jul-2019 13:16:42 - nomFreq(0) = MVFrequency( Quantity(60., "GHz")); build 10-Jul-2019 13:16:42 - rotAngOffset(0) = MVAngle( Quantity(60., "deg")); build 10-Jul-2019 13:16:42 - minFreq(1) = MVFrequency( Quantity(100., "GHz")); build 10-Jul-2019 13:16:42 - maxFreq(1) = MVFrequency( Quantity(200., "GHz")); build 10-Jul-2019 13:16:42 - nomFreq(1) = MVFrequency( Quantity(150., "GHz")); build 10-Jul-2019 13:16:42 - rotAngOffset(1) = MVAngle( Quantity(60., "deg")); build 10-Jul-2019 13:16:42 - minFreq(2) = MVFrequency( Quantity(200., "GHz")); build 10-Jul-2019 13:16:42 - maxFreq(2) = MVFrequency( Quantity(300., "GHz")); build 10-Jul-2019 13:16:42 - nomFreq(2) = MVFrequency( Quantity(250., "GHz")); build 10-Jul-2019 13:16:42 - rotAngOffset(2) = MVAngle( Quantity(60., "deg")); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector fTyp(3, AntennaResponses::EFP); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector funcName(3); build 10-Jul-2019 13:16:42 - funcName(0) = "tAntennaResponses1.in"; build 10-Jul-2019 13:16:42 - funcName(1) = "tAntennaResponses2.in"; build 10-Jul-2019 13:16:42 - funcName(2) = "tAntennaResponses3.in"; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector funcChannel(3,0); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector fTypB(3, AntennaResponses::VP); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector funcNameB(3); build 10-Jul-2019 13:16:42 - funcNameB(0) = "tAntennaResponses1B.in"; build 10-Jul-2019 13:16:42 - funcNameB(1) = "tAntennaResponses2B.in"; build 10-Jul-2019 13:16:42 - funcNameB(2) = "tAntennaResponses3B.in"; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - Vector fTypC(3, AntennaResponses::INTERNAL); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AntennaResponses aR(""); // empty table in memory build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - uInt ui = 0; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.putRow(ui,"ALMA", 0, bName, minFreq, maxFreq, fTyp, funcName, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 - rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(50., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - ui = 1; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.putRow(ui,"ALMA", 1, bName, minFreq, maxFreq, fTypB, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 - rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(50., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), AipsError); build 10-Jul-2019 13:16:42 - ui = 2; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.putRow(ui,"ALMA", 2, bName, minFreq, maxFreq, fTypB, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 - rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), // one day later build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 50., "deg"), // now between 50 deg and 90 deg build 10-Jul-2019 13:16:42 - Quantity(90., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - aR.create("testAntennaResponses_tmp.dat"); // write table to disk build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - aR.init(); // reset to empty table build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - ui = 0; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.putRow(ui,"ACA", 0, bName, minFreq, maxFreq, fTyp, funcName, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 - rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(50., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - ui = 2; // test setting of row number build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.putRow(ui,"ACA", 1, bName, minFreq, maxFreq, fTypB, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 - rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(50., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(ui==1, AipsError); // ui should have been reset to 1 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.putRow(ui,"ACA", 1, bName, minFreq, maxFreq, fTypC, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 - rotAngOffset, "PM", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(50., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - aR.create("testAntennaResponsesACA_tmp.dat"); // write second table to disk build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // initialisation build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "init 0" << endl; build 10-Jul-2019 13:16:42 - AntennaResponses aR("testAntennaResponses_tmp.dat"); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "init 1" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.isInit("testAntennaResponses_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - cout << "init 2" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.isInit("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "init 3" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.append("testAntennaResponses_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - cout << "init 4" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.append("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - cout << "init 5" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.isInit("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - cout << "init 6" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.append("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // unsuccessful access build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "init 7" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.init("testAntennaResponses_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - String theImageName; build 10-Jul-2019 13:16:42 - uInt theImageChannel; build 10-Jul-2019 13:16:42 - MFrequency theNomFreq; build 10-Jul-2019 13:16:42 - AntennaResponses::FuncTypes theFType; build 10-Jul-2019 13:16:42 - MVAngle theRotAngOffset; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AntennaResponses::FuncTypes requFType = AntennaResponses::EFP; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 0" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ACA", // wrong obs. build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV"), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 1" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(600., "GHz"), MFrequency::TOPO), // wrong freq build 10-Jul-2019 13:16:42 - requFType, "DV"), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 2" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(49999., "d")), MEpoch::UTC), // wrong time build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV"), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 3" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(80., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL)), // wrong center build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 3b" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), // other time build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(30., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL)), // other wrong center build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 4" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "XY", // wrong antenna type build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL)), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 5" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - "rec typ B"), // wrong receiver type build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 6" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - "", build 10-Jul-2019 13:16:42 - 1), // wrong beam number build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 7" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - 1, // wrong beam id build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO)), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 8" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - AntennaResponses::AIF), // wrong image type build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - String myBandName; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MVFrequency( Quantity(9., "GHz"))), // too low freq build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MVFrequency( Quantity(900., "GHz"))), // too high freq build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 - "ASKAP", // wrong observatory build 10-Jul-2019 13:16:42 - MVFrequency( Quantity(9., "GHz"))), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // successful access build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 9" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(250., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(45., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL), build 10-Jul-2019 13:16:42 - "", build 10-Jul-2019 13:16:42 - 0), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert((theRotAngOffset.degree()-60.)<1E-14, AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 10" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - 0, build 10-Jul-2019 13:16:42 - MFrequency( Quantity(250., "GHz"), MFrequency::TOPO)), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 11" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - AntennaResponses::VP, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity(10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.append("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 11b" << endl; build 10-Jul-2019 13:16:42 - MFrequency lofreq, hifreq; build 10-Jul-2019 13:16:42 - Unit uHz("Hz"); build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, build 10-Jul-2019 13:16:42 - lofreq, hifreq, build 10-Jul-2019 13:16:42 - theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - AntennaResponses::VP, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity(10., "deg"), build 10-Jul-2019 13:16:42 - Quantity(40., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL) build 10-Jul-2019 13:16:42 - ), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(lofreq.get(uHz).getValue() == 100E9, AipsError); build 10-Jul-2019 13:16:42 - AlwaysAssert(hifreq.get(uHz).getValue() == 200E9, AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 12" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ACA", build 10-Jul-2019 13:16:42 - 0, build 10-Jul-2019 13:16:42 - MFrequency( Quantity(250., "GHz"), MFrequency::TOPO)), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 13" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 - requFType, "DV", build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(80., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL)), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "access 13b" << endl; build 10-Jul-2019 13:16:42 - AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 - theRotAngOffset, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 - MFrequency( Quantity(0., "GHz"), MFrequency::TOPO), // combination 0 freq + INTERNAL build 10-Jul-2019 13:16:42 - AntennaResponses::INTERNAL, "PM", // returns first freq found build 10-Jul-2019 13:16:42 - MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 - Quantity(80., "deg"), build 10-Jul-2019 13:16:42 - MDirection::AZEL)), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 - "ALMA", build 10-Jul-2019 13:16:42 - MVFrequency( Quantity(160., "GHz"))), build 10-Jul-2019 13:16:42 - AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - AlwaysAssert(myBandName=="band_2", AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // getting the AntennaResponses table location from MeasTable build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - String theAntRespPath; build 10-Jul-2019 13:16:42 - AlwaysAssert(!MeasTable::AntennaResponsesPath(theAntRespPath, "whatever"), AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - theAntRespPath = "dummy_to_be_overwritten"; build 10-Jul-2019 13:16:42 - AlwaysAssert(!MeasTable::AntennaResponsesPath(theAntRespPath, "LOFAR"), AipsError); build 10-Jul-2019 13:16:42 - // LOFAR exists but is empty build 10-Jul-2019 13:16:42 - AlwaysAssert(theAntRespPath=="", AipsError); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - catch (AipsError x) { build 10-Jul-2019 13:16:42 - cerr << x.getMesg() << endl; build 10-Jul-2019 13:16:42 - cout << "FAIL" << endl; build 10-Jul-2019 13:16:42 - return 1; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - catch (...) { build 10-Jul-2019 13:16:42 - cerr << "Exception not derived from AipsError" << endl; build 10-Jul-2019 13:16:42 - cout << "FAIL" << endl; build 10-Jul-2019 13:16:42 - return 2; build 10-Jul-2019 13:16:42 - }; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - cout << "OK" << endl; build 10-Jul-2019 13:16:42 - return 0; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -} build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/CalCache.cc b/code/plotms/Data/CalCache.cc build 10-Jul-2019 13:16:42 index b808840..f95617c 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/CalCache.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/CalCache.cc build 10-Jul-2019 13:16:42 @@ -116,10 +116,11 @@ void CalCache::loadIt(vector& loadAxes, build 10-Jul-2019 13:16:42 // poln ratio build 10-Jul-2019 13:16:42 polnRatio_ = false; build 10-Jul-2019 13:16:42 if (selection_.corr()=="/") { build 10-Jul-2019 13:16:42 - if (calType_=="BPOLY" || calType_[0] == 'T' || calType_[0] == 'F') build 10-Jul-2019 13:16:42 + if (calType_=="BPOLY" || calType_[0] == 'T' || calType_[0] == 'F') { build 10-Jul-2019 13:16:42 throw(AipsError("Polarization ratio plots not supported for " + calType_ + " tables.")); build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 polnRatio_ = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 antnames_.resize(); build 10-Jul-2019 13:16:42 @@ -628,20 +629,28 @@ void CalCache::loadCalAxis(ROCTIter& cti, Int chunk, PMS::Axis axis, String pol) build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 case PMS::ATM: build 10-Jul-2019 13:16:42 - case PMS::TSKY: { build 10-Jul-2019 13:16:42 + case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: { build 10-Jul-2019 13:16:42 casacore::Int spw = cti.thisSpw(); build 10-Jul-2019 13:16:42 casacore::Int scan = cti.thisScan(); build 10-Jul-2019 13:16:42 casacore::Vector freqsGHz = cti.freq()/1e9; build 10-Jul-2019 13:16:42 casacore::Vector curve(1, 0.0); build 10-Jul-2019 13:16:42 - bool isAtm = (axis==PMS::ATM); build 10-Jul-2019 13:16:42 - if (plotmsAtm_) { build 10-Jul-2019 13:16:42 - curve.resize(); build 10-Jul-2019 13:16:42 - curve = plotmsAtm_->calcOverlayCurve(spw, scan, freqsGHz, isAtm); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - if (isAtm) build 10-Jul-2019 13:16:42 + if (axis == PMS::ATM) { build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + plotmsAtm_->calcAtmTskyCurve(curve, spw, scan, freqsGHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 *atm_[chunk] = curve; build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 + } else if (axis == PMS::TSKY) { build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + plotmsAtm_->calcAtmTskyCurve(curve, spw, scan, freqsGHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 *tsky_[chunk] = curve; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + plotmsAtm_->calcImageCurve(curve, spw, scan, freqsGHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + *imageSideband_[chunk] = curve; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/MSCache.cc b/code/plotms/Data/MSCache.cc build 10-Jul-2019 13:16:42 index 7a976ac..e053c24 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/MSCache.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/MSCache.cc build 10-Jul-2019 13:16:42 @@ -181,7 +181,6 @@ void MSCache::loadIt(vector& loadAxes, build 10-Jul-2019 13:16:42 completeLoadPageHeaderCache(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 deleteVi(); // close any open tables build 10-Jul-2019 13:16:42 - deleteAtm(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void MSCache::loadError(String mesg) { build 10-Jul-2019 13:16:42 @@ -1130,7 +1129,8 @@ bool MSCache::useAveragedVisBuffer(PMS::Axis axis) { build 10-Jul-2019 13:16:42 case PMS::PARANG: build 10-Jul-2019 13:16:42 case PMS::ROW: build 10-Jul-2019 13:16:42 case PMS::ATM: build 10-Jul-2019 13:16:42 - case PMS::TSKY: { build 10-Jul-2019 13:16:42 + case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: { build 10-Jul-2019 13:16:42 useAvg = false; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -1967,22 +1967,28 @@ void MSCache::loadAxis(vi::VisBuffer2* vb, Int vbnum, PMS::Axis axis, build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 case PMS::ATM: build 10-Jul-2019 13:16:42 - case PMS::TSKY: { build 10-Jul-2019 13:16:42 + case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: { build 10-Jul-2019 13:16:42 casacore::Int spw = vb->spectralWindows()(0); build 10-Jul-2019 13:16:42 casacore::Int scan = vb->scan()(0); build 10-Jul-2019 13:16:42 - casacore::Array chanFreqGHz = build 10-Jul-2019 13:16:42 - vb->getFrequencies(0, freqFrame_)/1e9; build 10-Jul-2019 13:16:42 + casacore::Array chanFreqGHz = vb->getFrequencies(0, freqFrame_)/1e9; build 10-Jul-2019 13:16:42 casacore::Vector curve(1, 0.0); build 10-Jul-2019 13:16:42 - bool isAtm = (axis==PMS::ATM); build 10-Jul-2019 13:16:42 - if (plotmsAtm_) { build 10-Jul-2019 13:16:42 - curve.resize(); build 10-Jul-2019 13:16:42 - curve = plotmsAtm_->calcOverlayCurve(spw, scan, chanFreqGHz, build 10-Jul-2019 13:16:42 - isAtm); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - if (isAtm) build 10-Jul-2019 13:16:42 + if (axis == PMS::ATM) { build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + plotmsAtm_->calcAtmTskyCurve(curve, spw, scan, chanFreqGHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 *atm_[vbnum] = curve; build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 + } else if (axis == PMS::TSKY) { build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + plotmsAtm_->calcAtmTskyCurve(curve, spw, scan, chanFreqGHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 *tsky_[vbnum] = curve; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + plotmsAtm_->calcImageCurve(curve, spw, scan, chanFreqGHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + *imageSideband_[vbnum] = curve; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 default: { build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/MSCacheVolMeter.cc b/code/plotms/Data/MSCacheVolMeter.cc build 10-Jul-2019 13:16:42 index e5a8656..2eba623 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/MSCacheVolMeter.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/MSCacheVolMeter.cc build 10-Jul-2019 13:16:42 @@ -192,6 +192,9 @@ String MSCacheVolMeter::evalVolume(map axes, Vector axesma build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case PMS::FREQUENCY: build 10-Jul-2019 13:16:42 case PMS::VELOCITY: build 10-Jul-2019 13:16:42 + case PMS::ATM: build 10-Jul-2019 13:16:42 + case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: build 10-Jul-2019 13:16:42 axisVol = sizeof(Double) * sum(nPerDDID_ * nChanPerDDID_); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case PMS::CORR: build 10-Jul-2019 13:16:42 @@ -218,6 +221,7 @@ String MSCacheVolMeter::evalVolume(map axes, Vector axesma build 10-Jul-2019 13:16:42 case PMS::PHASE: build 10-Jul-2019 13:16:42 case PMS::REAL: build 10-Jul-2019 13:16:42 case PMS::IMAG: build 10-Jul-2019 13:16:42 + case PMS::WTxAMP: build 10-Jul-2019 13:16:42 case PMS::WTSP: build 10-Jul-2019 13:16:42 case PMS::SIGMASP: build 10-Jul-2019 13:16:42 axisVol = sizeof(Float) * sum(nRowsPerDDID_ * nChanPerDDID_ * nCorrPerDDID_); build 10-Jul-2019 13:16:42 @@ -265,10 +269,8 @@ String MSCacheVolMeter::evalVolume(map axes, Vector axesma build 10-Jul-2019 13:16:42 case PMS::OPAC: build 10-Jul-2019 13:16:42 case PMS::SNR: build 10-Jul-2019 13:16:42 case PMS::TEC: build 10-Jul-2019 13:16:42 - case PMS::WTxAMP: build 10-Jul-2019 13:16:42 case PMS::ANTPOS: build 10-Jul-2019 13:16:42 - case PMS::ATM: build 10-Jul-2019 13:16:42 - case PMS::TSKY: build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 case PMS::NONE: build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } // switch build 10-Jul-2019 13:16:42 @@ -381,6 +383,9 @@ String MSCacheVolMeter::evalVolume(std::vector vbShapes, build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case PMS::FREQUENCY: build 10-Jul-2019 13:16:42 case PMS::VELOCITY: build 10-Jul-2019 13:16:42 + case PMS::ATM: build 10-Jul-2019 13:16:42 + case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: build 10-Jul-2019 13:16:42 axisVol = sizeof(Double) * sum(nChan); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case PMS::CORR: build 10-Jul-2019 13:16:42 @@ -456,8 +461,6 @@ String MSCacheVolMeter::evalVolume(std::vector vbShapes, build 10-Jul-2019 13:16:42 case PMS::SNR: build 10-Jul-2019 13:16:42 case PMS::TEC: build 10-Jul-2019 13:16:42 case PMS::ANTPOS: build 10-Jul-2019 13:16:42 - case PMS::ATM: build 10-Jul-2019 13:16:42 - case PMS::TSKY: build 10-Jul-2019 13:16:42 case PMS::NONE: build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } // switch build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/PlotMSAtm.cc b/code/plotms/Data/PlotMSAtm.cc build 10-Jul-2019 13:16:42 index 89d89a5..345bab5 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/PlotMSAtm.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/PlotMSAtm.cc build 10-Jul-2019 13:16:42 @@ -30,7 +30,9 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 @@ -44,115 +46,170 @@ using namespace casacore; build 10-Jul-2019 13:16:42 namespace casa { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSAtm::PlotMSAtm(casacore::String filename, PlotMSSelection& userSel, build 10-Jul-2019 13:16:42 - bool isMS, PlotMSCacheBase* parent): build 10-Jul-2019 13:16:42 - isMS_(isMS), build 10-Jul-2019 13:16:42 - parent_(parent), build 10-Jul-2019 13:16:42 - ms_(NULL), build 10-Jul-2019 13:16:42 - caltable_(NULL), build 10-Jul-2019 13:16:42 + bool showatm, bool isMS, bool xAxisIsChan, PlotMSCacheBase* parent): build 10-Jul-2019 13:16:42 + filename_(filename), build 10-Jul-2019 13:16:42 tableName_(""), build 10-Jul-2019 13:16:42 telescopeName_(""), build 10-Jul-2019 13:16:42 + showatm_(showatm), build 10-Jul-2019 13:16:42 + isMS_(isMS), build 10-Jul-2019 13:16:42 + xIsChan_(xAxisIsChan), build 10-Jul-2019 13:16:42 + canCalculatePwv_(false), build 10-Jul-2019 13:16:42 + canCalculateWeather_(false), build 10-Jul-2019 13:16:42 + parent_(parent), build 10-Jul-2019 13:16:42 + selection_(userSel), build 10-Jul-2019 13:16:42 + ms_(nullptr), build 10-Jul-2019 13:16:42 + caltable_(nullptr), build 10-Jul-2019 13:16:42 + selectedSpw_(-1), build 10-Jul-2019 13:16:42 + selectedScan_(-1), build 10-Jul-2019 13:16:42 pwv_(0.0), build 10-Jul-2019 13:16:42 airmass_(0.0), build 10-Jul-2019 13:16:42 MAX_ATM_CALC_CHAN_(512) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // set up table and needed data (times, fields) build 10-Jul-2019 13:16:42 - if (isMS) build 10-Jul-2019 13:16:42 + if (isMS) { // create MS build 10-Jul-2019 13:16:42 setUpMS(filename, userSel); build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 + } else { // create NCT and MS if possible build 10-Jul-2019 13:16:42 setUpCalTable(filename, userSel); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // check and log this once build 10-Jul-2019 13:16:42 + if (!tableName_.empty()) { build 10-Jul-2019 13:16:42 + casacore::Table mstab(tableName_); build 10-Jul-2019 13:16:42 + if (mstab.keywordSet().fieldNumber("ASDM_CALWVR") > -1) { build 10-Jul-2019 13:16:42 + canCalculatePwv_ = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (mstab.keywordSet().fieldNumber("WEATHER") > -1) { build 10-Jul-2019 13:16:42 + canCalculateWeather_ = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (!canCalculatePwv_) { build 10-Jul-2019 13:16:42 + parent_->logmesg("load_cache", build 10-Jul-2019 13:16:42 + "No ASDM_CALWVR or ASDM_CALATMOSPHERE table to calculate pwv."); build 10-Jul-2019 13:16:42 + parent_->logmesg("load_cache", build 10-Jul-2019 13:16:42 + "Using default pwv for telescope " + telescopeName_ + "."); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (!canCalculateWeather_) { build 10-Jul-2019 13:16:42 + parent_->logmesg("load_cache", build 10-Jul-2019 13:16:42 + "No WEATHER table, using default weather values for Atm/Tsky."); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - getMeanWeather(); build 10-Jul-2019 13:16:42 - getMedianPwv(); build 10-Jul-2019 13:16:42 - selms_ = new MeasurementSet(); build 10-Jul-2019 13:16:42 - selct_ = new NewCalTable(); build 10-Jul-2019 13:16:42 + selms_ = new MeasurementSet(); // selected per chunk build 10-Jul-2019 13:16:42 + selct_ = new NewCalTable(); // selected per chunk build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSAtm::~PlotMSAtm() { build 10-Jul-2019 13:16:42 if (caltable_) { build 10-Jul-2019 13:16:42 delete caltable_; build 10-Jul-2019 13:16:42 - caltable_ = NULL; build 10-Jul-2019 13:16:42 + caltable_ = nullptr; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 if (ms_) { build 10-Jul-2019 13:16:42 delete ms_; build 10-Jul-2019 13:16:42 - ms_ = NULL; build 10-Jul-2019 13:16:42 + ms_ = nullptr; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 if (selms_) { build 10-Jul-2019 13:16:42 delete selms_; build 10-Jul-2019 13:16:42 - selms_ = NULL; build 10-Jul-2019 13:16:42 + selms_ = nullptr; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 if (selct_) { build 10-Jul-2019 13:16:42 delete selct_; build 10-Jul-2019 13:16:42 - selct_ = NULL; build 10-Jul-2019 13:16:42 + selct_ = nullptr; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAtm::setUpMS(casacore::String filename, PlotMSSelection& userSel) { build 10-Jul-2019 13:16:42 + // create MeasurementSet, apply user selection, get telescope name build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 ms_ = new MeasurementSet(filename); build 10-Jul-2019 13:16:42 } catch (AipsError& err) { build 10-Jul-2019 13:16:42 throw(AipsError("MeasurementSet setup failed.\n" + err.getMesg())); build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 tableName_ = ms_->tableName(); build 10-Jul-2019 13:16:42 - if (!userSel.isEmpty()) build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // apply user-selection to ms_ build 10-Jul-2019 13:16:42 + if (!userSel.isEmpty()) { build 10-Jul-2019 13:16:42 applyMSSelection(userSel, *ms_); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // get telescope for defaults build 10-Jul-2019 13:16:42 ROMSColumns msCol(*ms_); build 10-Jul-2019 13:16:42 telescopeName_ = msCol.observation().telescopeName().get(0); build 10-Jul-2019 13:16:42 - getMSTimes(); // for weather and pwv build 10-Jul-2019 13:16:42 + //getMSTimes(*ms_); // for weather and pwv build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAtm::setUpCalTable(casacore::String filename, build 10-Jul-2019 13:16:42 PlotMSSelection& userSel) { build 10-Jul-2019 13:16:42 + // create NewCalTable, apply user selection, get telescope name, build 10-Jul-2019 13:16:42 caltable_ = new NewCalTable(filename); // original table build 10-Jul-2019 13:16:42 - getCalMS(); build 10-Jul-2019 13:16:42 - if (!userSel.isEmpty()) build 10-Jul-2019 13:16:42 - applyCalSelection(userSel, *caltable_); // now user-selected table build 10-Jul-2019 13:16:42 + getCalMS(); // ms_ associated with cal table build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // get all times in cal table build 10-Jul-2019 13:16:42 + getCalTimes(*caltable_); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // apply user-selection to caltable_ and ms_ build 10-Jul-2019 13:16:42 + if (!userSel.isEmpty()) { build 10-Jul-2019 13:16:42 + applyCalSelection(userSel, *caltable_); build 10-Jul-2019 13:16:42 + if (ms_ != nullptr) { build 10-Jul-2019 13:16:42 + applyMSSelection(userSel, *ms_); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // get telescope for defaults build 10-Jul-2019 13:16:42 ROCTColumns ctCol(*caltable_); build 10-Jul-2019 13:16:42 telescopeName_ = ctCol.observation().telescopeName().get(0); build 10-Jul-2019 13:16:42 - getCalTimes(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSAtm::getMSTimes() { build 10-Jul-2019 13:16:42 +void PlotMSAtm::getMSTimes(MeasurementSet& ms) { build 10-Jul-2019 13:16:42 // unique times in TIME column of ms build 10-Jul-2019 13:16:42 - // ms could be original or selected ms build 10-Jul-2019 13:16:42 - ROMSMainColumns msmc(*ms_); build 10-Jul-2019 13:16:42 + ROMSMainColumns msmc(ms); build 10-Jul-2019 13:16:42 casacore::Vector times = msmc.time().getColumn(); build 10-Jul-2019 13:16:42 - getUniqueTimes(times); build 10-Jul-2019 13:16:42 + getUniqueTimes(times, mstimes_); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSAtm::getCalTimes() { build 10-Jul-2019 13:16:42 +void PlotMSAtm::getCalTimes(NewCalTable& ct) { build 10-Jul-2019 13:16:42 // unique times in TIME column of cal table; build 10-Jul-2019 13:16:42 - // nct could be original or selected cal table build 10-Jul-2019 13:16:42 - ROCTMainColumns ctmc(*caltable_); build 10-Jul-2019 13:16:42 + ROCTMainColumns ctmc(ct); build 10-Jul-2019 13:16:42 casacore::Vector times = ctmc.time().getColumn(); build 10-Jul-2019 13:16:42 - getUniqueTimes(times); build 10-Jul-2019 13:16:42 + getUniqueTimes(times, caltimes_); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSAtm::getUniqueTimes(casacore::Vector alltimes) { build 10-Jul-2019 13:16:42 - // find unique times_ build 10-Jul-2019 13:16:42 +void PlotMSAtm::getUniqueTimes(casacore::Vector inputTimes, build 10-Jul-2019 13:16:42 + casacore::Vector& uniqueTimes) { build 10-Jul-2019 13:16:42 + // find unique times in input times vector build 10-Jul-2019 13:16:42 Sort sorter; build 10-Jul-2019 13:16:42 casacore::Vector indexVector, uniqueVector; build 10-Jul-2019 13:16:42 uInt nUnique; build 10-Jul-2019 13:16:42 - sorter.sortKey(alltimes.data(), TpDouble); build 10-Jul-2019 13:16:42 - sorter.sort(indexVector, alltimes.size()); build 10-Jul-2019 13:16:42 + sorter.sortKey(inputTimes.data(), TpDouble); build 10-Jul-2019 13:16:42 + sorter.sort(indexVector, inputTimes.size()); build 10-Jul-2019 13:16:42 nUnique = sorter.unique(uniqueVector, indexVector); build 10-Jul-2019 13:16:42 - times_.resize(nUnique); build 10-Jul-2019 13:16:42 + uniqueTimes.resize(nUnique); build 10-Jul-2019 13:16:42 for (uInt i=0; i fields = ctmc.fieldId().getColumn(); build 10-Jul-2019 13:16:42 getUniqueFields(fields); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSAtm::getCalFields() { build 10-Jul-2019 13:16:42 +void PlotMSAtm::getCalFields(NewCalTable& ct) { build 10-Jul-2019 13:16:42 // unique fields in FIELD_ID column of cal table build 10-Jul-2019 13:16:42 // needed later for elevation calculation for airmass build 10-Jul-2019 13:16:42 - ROCTMainColumns ctmc(*selct_); build 10-Jul-2019 13:16:42 + ROCTMainColumns ctmc(ct); build 10-Jul-2019 13:16:42 casacore::Vector fields = ctmc.fieldId().getColumn(); build 10-Jul-2019 13:16:42 getUniqueFields(fields); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -172,10 +229,11 @@ void PlotMSAtm::getUniqueFields(casacore::Vector allfields) { build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAtm::getCalMS() { build 10-Jul-2019 13:16:42 - // if caltable has keyword for ms name, sets ms_ build 10-Jul-2019 13:16:42 + // if caltable has keyword for ms name, sets ms_ and tableName_ build 10-Jul-2019 13:16:42 String msname(""); build 10-Jul-2019 13:16:42 - if (caltable_->keywordSet().fieldNumber("MSName") > -1) build 10-Jul-2019 13:16:42 + if (caltable_->keywordSet().fieldNumber("MSName") > -1) { build 10-Jul-2019 13:16:42 msname = caltable_->keywordSet().asString("MSName"); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 if (!msname.empty()) { build 10-Jul-2019 13:16:42 casacore::Path path(caltable_->tableName()); build 10-Jul-2019 13:16:42 casacore::String fullpath = path.dirName() + "/" + msname; build 10-Jul-2019 13:16:42 @@ -207,43 +265,113 @@ void PlotMSAtm::applyCalSelection(PlotMSSelection& selection, build 10-Jul-2019 13:16:42 selection.apply(*caltable_, selct, chansel, corrsel); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 +void PlotMSAtm::calcAtmTskyCurve(casacore::Vector& curve, build 10-Jul-2019 13:16:42 + casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 + const casacore::Vector& chanFreqs) { build 10-Jul-2019 13:16:42 + // calculate atm transmission or tsky for given spw and scan build 10-Jul-2019 13:16:42 + unsigned int numChan(chanFreqs.nelements()); build 10-Jul-2019 13:16:42 + curve.resize(numChan); build 10-Jul-2019 13:16:42 + curve.set(0.0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // cannot calculate curve for single channel build 10-Jul-2019 13:16:42 + if (numChan == 1) { build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + curve = calcOverlayCurve(spw, scan, chanFreqs); build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +void PlotMSAtm::calcImageCurve(casacore::Vector& curve, build 10-Jul-2019 13:16:42 + casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 + const casacore::Vector& chanFreqs) { build 10-Jul-2019 13:16:42 + // calculate image sideband transmission (atm or tsky) for given spw and scan build 10-Jul-2019 13:16:42 + unsigned int numChan(chanFreqs.nelements()); build 10-Jul-2019 13:16:42 + curve.resize(numChan); build 10-Jul-2019 13:16:42 + curve.set(0.0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // cannot calculate curve for single channel build 10-Jul-2019 13:16:42 + if (numChan == 1) { build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // must have ASDM_RECEIVER table and not split MS build 10-Jul-2019 13:16:42 + if (!canShowImageCurve()) { build 10-Jul-2019 13:16:42 + curve.set(doubleNaN()); // NaN will not be plotted build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + casacore::Vector imageFreqs; build 10-Jul-2019 13:16:42 + bool imageFreqsReversed = calcImageFrequencies(imageFreqs, spw, chanFreqs); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (allTrue(isNaN(imageFreqs))) { // get LO1 failed build 10-Jul-2019 13:16:42 + curve.set(doubleNaN()); // NaN will not be plotted build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // calculate curve with image frequencies build 10-Jul-2019 13:16:42 + curve = calcOverlayCurve(spw, scan, imageFreqs); build 10-Jul-2019 13:16:42 + if (imageFreqsReversed) { build 10-Jul-2019 13:16:42 + casacore::reverseArray(curve, 0); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 casacore::Vector PlotMSAtm::calcOverlayCurve( build 10-Jul-2019 13:16:42 casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 - const casacore::Vector& chanFreqs, build 10-Jul-2019 13:16:42 - bool atm) { build 10-Jul-2019 13:16:42 + const casacore::Vector& chanFreqs) { build 10-Jul-2019 13:16:42 // Implements algorithm in CAS-9053 to get overlay curves build 10-Jul-2019 13:16:42 - // (atm or tsky) per spw + scan build 10-Jul-2019 13:16:42 - unsigned int numChan(chanFreqs.nelements()); build 10-Jul-2019 13:16:42 - casacore::Vector curve(numChan, 0.0); build 10-Jul-2019 13:16:42 - if (numChan==1) build 10-Jul-2019 13:16:42 - return curve; build 10-Jul-2019 13:16:42 + // (atm, tsky, image sideband) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSSelection pmsSel; build 10-Jul-2019 13:16:42 pmsSel.setSpw(String::toString(spw)); build 10-Jul-2019 13:16:42 pmsSel.setScan(String::toString(scan)); build 10-Jul-2019 13:16:42 if (isMS_) { build 10-Jul-2019 13:16:42 + // apply selection to create selected ms build 10-Jul-2019 13:16:42 applyMSSelection(pmsSel, *selms_); build 10-Jul-2019 13:16:42 - getMSFields(); // update fields for airmass calc build 10-Jul-2019 13:16:42 + getMSTimes(*selms_); // update times_ for airmass calc build 10-Jul-2019 13:16:42 + getMSFields(*selms_); // update fields_ for airmass calc build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 + // apply selection to create selected ct build 10-Jul-2019 13:16:42 applyCalSelection(pmsSel, *selct_); build 10-Jul-2019 13:16:42 - getCalFields(); // update fields for airmass calc build 10-Jul-2019 13:16:42 + getCalTimes(*selct_); // update times_ for airmass calc build 10-Jul-2019 13:16:42 + getCalFields(*selct_); // update fields_ for airmass calc build 10-Jul-2019 13:16:42 + if (ms_ != nullptr) { build 10-Jul-2019 13:16:42 + applyMSSelection(pmsSel, *selms_); build 10-Jul-2019 13:16:42 + getMSTimes(*selms_); // update times_ for airmass calc build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - unsigned int numCalcChan(numChan); build 10-Jul-2019 13:16:42 - unsigned int midChan(numCalcChan/2); build 10-Jul-2019 13:16:42 + if ((spw != selectedSpw_) || (scan != selectedScan_)) { build 10-Jul-2019 13:16:42 + // save new selection and recalculate build 10-Jul-2019 13:16:42 + selectedSpw_ = spw; build 10-Jul-2019 13:16:42 + selectedScan_ = scan; build 10-Jul-2019 13:16:42 + getMedianPwv(); build 10-Jul-2019 13:16:42 + getMeanWeather(); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + unsigned int numChan(chanFreqs.nelements()); build 10-Jul-2019 13:16:42 + casacore::Vector curve(numChan); build 10-Jul-2019 13:16:42 + curve.set(doubleNaN()); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + unsigned int midChan(numChan / 2); build 10-Jul-2019 13:16:42 // Set the reference freq to be the middle of the middle two channels build 10-Jul-2019 13:16:42 - casacore::Double refFreq = 0.5 * (chanFreqs(IPosition(2, midChan-1, 0)) build 10-Jul-2019 13:16:42 - + chanFreqs(IPosition(2, midChan, 0))); build 10-Jul-2019 13:16:42 - // reduce number of channels to shorten calc time build 10-Jul-2019 13:16:42 + casacore::Double refFreq = 0.5 * (chanFreqs(midChan-1) + chanFreqs(midChan)); build 10-Jul-2019 13:16:42 + // reduce number of channels to shorten calculation time build 10-Jul-2019 13:16:42 + unsigned int numCalcChan(numChan); build 10-Jul-2019 13:16:42 if (numChan > MAX_ATM_CALC_CHAN_) { build 10-Jul-2019 13:16:42 while (numCalcChan > MAX_ATM_CALC_CHAN_) build 10-Jul-2019 13:16:42 numCalcChan /= 2; build 10-Jul-2019 13:16:42 - midChan = numCalcChan/2; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 unsigned int refChan((numCalcChan - 1) / 2); build 10-Jul-2019 13:16:42 - casacore::Double chanSep = (chanFreqs(IPosition(2, numChan-1, 0)) build 10-Jul-2019 13:16:42 - - chanFreqs(IPosition(2, 0, 0))) / (numCalcChan - 1); build 10-Jul-2019 13:16:42 - if (numCalcChan % 2 == 0) refFreq -= chanSep*0.5; build 10-Jul-2019 13:16:42 + casacore::Double chanSep = (chanFreqs(numChan-1) - chanFreqs(0)) / (numCalcChan - 1); build 10-Jul-2019 13:16:42 + if (!isfinite(refFreq) || !isfinite(chanSep)) { // if ms has nan frequencies build 10-Jul-2019 13:16:42 + return curve; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (numCalcChan % 2 == 0) { build 10-Jul-2019 13:16:42 + // if even number of channels, the band center becomes channel boundary build 10-Jul-2019 13:16:42 + refFreq -= chanSep * 0.5; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // set atm parameters build 10-Jul-2019 13:16:42 atm::SpectralGrid* specGrid = new atm::SpectralGrid(numCalcChan, refChan, build 10-Jul-2019 13:16:42 @@ -263,16 +391,19 @@ casacore::Vector PlotMSAtm::calcOverlayCurve( build 10-Jul-2019 13:16:42 wetOpacity(chan) = skyStatus->getWetOpacity(0, chan).get("mm-1"); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 airmass_ = computeMeanAirmass(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // calculate atm/tsky build 10-Jul-2019 13:16:42 atmTransmission = exp(-airmass_ * (wetOpacity + dryOpacity)); build 10-Jul-2019 13:16:42 - if (!atm) { build 10-Jul-2019 13:16:42 + if (!showatm_) { build 10-Jul-2019 13:16:42 TebbSky.resize(numCalcChan); build 10-Jul-2019 13:16:42 for (uInt chan=0; changetTebbSky(0, chan).get("K"); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - // final calculations build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // final calculations for atm/tsky build 10-Jul-2019 13:16:42 casacore::Vector calcCurve(numCalcChan); build 10-Jul-2019 13:16:42 - if (atm) { build 10-Jul-2019 13:16:42 + if (showatm_) { build 10-Jul-2019 13:16:42 calcCurve = atmTransmission * 100.0; // percent build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 calcCurve = TebbSky * build 10-Jul-2019 13:16:42 @@ -318,62 +449,65 @@ void PlotMSAtm::getMedianPwv() { build 10-Jul-2019 13:16:42 // Get pwv (precipitable water vapor) from MS subtable in mm build 10-Jul-2019 13:16:42 casacore::Double pwv(0.0); build 10-Jul-2019 13:16:42 // values from ASDM_CAL subtables if they exist build 10-Jul-2019 13:16:42 - if (!tableName_.empty()) { build 10-Jul-2019 13:16:42 - casacore::String subname; build 10-Jul-2019 13:16:42 + if (canCalculatePwv_) { build 10-Jul-2019 13:16:42 + casacore::String subtableName; build 10-Jul-2019 13:16:42 casacore::Table mstab(tableName_), subtable; build 10-Jul-2019 13:16:42 casacore::Vector waterCol, timesCol; build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 if (mstab.keywordSet().fieldNumber("ASDM_CALWVR") > -1) { build 10-Jul-2019 13:16:42 - subname = tableName_ + "::ASDM_CALWVR"; build 10-Jul-2019 13:16:42 - subtable = Table::openTable(subname); build 10-Jul-2019 13:16:42 + subtableName = tableName_ + "::ASDM_CALWVR"; build 10-Jul-2019 13:16:42 + subtable = Table::openTable(subtableName); build 10-Jul-2019 13:16:42 if (subtable.nrow() > 0) { build 10-Jul-2019 13:16:42 waterCol = ScalarColumn(subtable, "water").getColumn(); build 10-Jul-2019 13:16:42 timesCol = ScalarColumn(subtable, "startValidTime").getColumn(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 if (waterCol.empty() && mstab.keywordSet().fieldNumber("ASDM_CALATMOSPHERE") > -1) { build 10-Jul-2019 13:16:42 - subname = tableName_ + "::ASDM_CALATMOSPHERE"; build 10-Jul-2019 13:16:42 - subtable = Table::openTable(subname); build 10-Jul-2019 13:16:42 - if (subtable.nrow() > 0) { build 10-Jul-2019 13:16:42 - Array waterColArray = ArrayColumn(subtable, "water").getColumn(); build 10-Jul-2019 13:16:42 - waterCol = waterColArray(Slicer(Slice(0), Slice())); build 10-Jul-2019 13:16:42 - timesCol = ScalarColumn(subtable, "startValidTime").getColumn(); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + subtableName = tableName_ + "::ASDM_CALATMOSPHERE"; build 10-Jul-2019 13:16:42 + subtable = Table::openTable(subtableName); build 10-Jul-2019 13:16:42 + if (subtable.nrow() > 0) { build 10-Jul-2019 13:16:42 + Array waterColArray = ArrayColumn(subtable, "water").getColumn(); build 10-Jul-2019 13:16:42 + waterCol = waterColArray(Slicer(Slice(0), Slice())); build 10-Jul-2019 13:16:42 + timesCol = ScalarColumn(subtable, "startValidTime").getColumn(); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 mstab.closeSubTables(); build 10-Jul-2019 13:16:42 - if (waterCol.empty()) { build 10-Jul-2019 13:16:42 - parent_->logmesg("load_cache", build 10-Jul-2019 13:16:42 - "ASDM_CALWVR and ASDM_CALATMOSPHERE tables could not be opened or have zero rows"); build 10-Jul-2019 13:16:42 - } else { build 10-Jul-2019 13:16:42 - casacore::Vector water = build 10-Jul-2019 13:16:42 - getValuesNearTimes(waterCol, timesCol); build 10-Jul-2019 13:16:42 - if (!water.empty()) pwv = median(water) * 1000.0; // in mm build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (!waterCol.empty()) { build 10-Jul-2019 13:16:42 + casacore::Double mintime(0.0), maxtime(0.0); build 10-Jul-2019 13:16:42 + getTimeRange(mintime, maxtime); // min/max times for selected ms/ct build 10-Jul-2019 13:16:42 + // find values in time range build 10-Jul-2019 13:16:42 + casacore::Vector water = build 10-Jul-2019 13:16:42 + getValuesInTimeRange(waterCol, timesCol, mintime, maxtime); build 10-Jul-2019 13:16:42 + if (!water.empty()) { build 10-Jul-2019 13:16:42 + pwv = median(water) * 1000.0; // in mm build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } catch (AipsError & err) { build 10-Jul-2019 13:16:42 // openTable failed, use default pwv build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - // else use default value in mm build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 if (pwv == 0.0) { build 10-Jul-2019 13:16:42 - if (telescopeName_=="ALMA") pwv = 1.0; build 10-Jul-2019 13:16:42 - else pwv = 5.0; build 10-Jul-2019 13:16:42 - parent_->logmesg("load_cache", build 10-Jul-2019 13:16:42 - "Using default pwv " + casacore::String::toString(pwv) + " for telescope " + telescopeName_); build 10-Jul-2019 13:16:42 + // use default value in mm build 10-Jul-2019 13:16:42 + if (telescopeName_=="ALMA") { build 10-Jul-2019 13:16:42 + pwv = 1.0; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + pwv = 5.0; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 pwv_ = pwv; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAtm::getMeanWeather() { build 10-Jul-2019 13:16:42 - // Fill weather_ Record with mean values from MS WEATHER table build 10-Jul-2019 13:16:42 + // Fill weather_ Record with mean values from MS WEATHER table per scan times build 10-Jul-2019 13:16:42 // Set defaults; CAS-9053 default pressure depends on telescope build 10-Jul-2019 13:16:42 casacore::Float humidity(20.0), temperature(273.15); build 10-Jul-2019 13:16:42 casacore::Float pressure = (telescopeName_=="ALMA" ? 563.0 : 786.0); // mb build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Use values from WEATHER table if it exists build 10-Jul-2019 13:16:42 - bool noWeather(true); build 10-Jul-2019 13:16:42 - if (!tableName_.empty()) { build 10-Jul-2019 13:16:42 + if (canCalculateWeather_) { build 10-Jul-2019 13:16:42 try { build 10-Jul-2019 13:16:42 - // openTable throws exception if table doesn't exist build 10-Jul-2019 13:16:42 casacore::Table wtable = Table::openTable(tableName_ + "::WEATHER"); build 10-Jul-2019 13:16:42 TableColumn tempCol = TableColumn(wtable, "TEMPERATURE"); build 10-Jul-2019 13:16:42 String tempUnits = tempCol.keywordSet().asArrayString("QuantumUnits").tovector()[0]; build 10-Jul-2019 13:16:42 @@ -382,7 +516,7 @@ void PlotMSAtm::getMeanWeather() { build 10-Jul-2019 13:16:42 // select valid stations and values in range build 10-Jul-2019 13:16:42 casacore::Table selwtable = selectWeatherTable(wtable, tempUnits, pressUnits); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // get columns build 10-Jul-2019 13:16:42 + // get columns from *selected* weather table build 10-Jul-2019 13:16:42 casacore::Vector build 10-Jul-2019 13:16:42 pressureCol(ScalarColumn(selwtable, "PRESSURE").getColumn()), build 10-Jul-2019 13:16:42 humidityCol(ScalarColumn(selwtable, "REL_HUMIDITY").getColumn()), build 10-Jul-2019 13:16:42 @@ -393,56 +527,50 @@ void PlotMSAtm::getMeanWeather() { build 10-Jul-2019 13:16:42 // select values based on cal times build 10-Jul-2019 13:16:42 casacore::Vector selpressure, selhumidity, seltemperature; build 10-Jul-2019 13:16:42 casacore::Float meanP(0.0), meanH(0.0), meanT(0.0); build 10-Jul-2019 13:16:42 + casacore::Double mintime(min(mstimes_)), maxtime(max(mstimes_)); build 10-Jul-2019 13:16:42 // pressure build 10-Jul-2019 13:16:42 if (!pressureCol.empty()) { build 10-Jul-2019 13:16:42 - selpressure = getValuesNearTimes(pressureCol, timeCol); build 10-Jul-2019 13:16:42 - if (!selpressure.empty()) build 10-Jul-2019 13:16:42 + selpressure = getValuesInTimeRange(pressureCol, timeCol, mintime, maxtime); build 10-Jul-2019 13:16:42 + if (!selpressure.empty()) { build 10-Jul-2019 13:16:42 meanP = mean(selpressure); build 10-Jul-2019 13:16:42 - if (meanP==0.0) { build 10-Jul-2019 13:16:42 - parent_->logmesg("load_cache", "WEATHER pressure is zero, using default value instead."); build 10-Jul-2019 13:16:42 - } else { build 10-Jul-2019 13:16:42 - if (pressUnits=="Pa" && meanP>1013.25) build 10-Jul-2019 13:16:42 - meanP /= (float)100.0; // Pa to hPa build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ((pressUnits == "Pa") && (meanP > 1013.25)) { build 10-Jul-2019 13:16:42 + meanP /= (float)100.0; // Pa to hPa build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (meanP != 0.0) { build 10-Jul-2019 13:16:42 pressure = meanP; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // humidity build 10-Jul-2019 13:16:42 if (!humidityCol.empty()) { build 10-Jul-2019 13:16:42 - selhumidity = getValuesNearTimes(humidityCol, timeCol); build 10-Jul-2019 13:16:42 - if (!selhumidity.empty()) build 10-Jul-2019 13:16:42 + selhumidity = getValuesInTimeRange(humidityCol, timeCol, mintime, maxtime); build 10-Jul-2019 13:16:42 + if (!selhumidity.empty()) { build 10-Jul-2019 13:16:42 meanH = mean(selhumidity); build 10-Jul-2019 13:16:42 - if (meanH==0.0) build 10-Jul-2019 13:16:42 - parent_->logmesg("load_cache", "WEATHER humidity is zero, using default value instead."); build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (meanH != 0.0) { build 10-Jul-2019 13:16:42 humidity = meanH; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // temperature build 10-Jul-2019 13:16:42 if (!temperatureCol.empty()) { build 10-Jul-2019 13:16:42 - seltemperature = getValuesNearTimes(temperatureCol, timeCol); build 10-Jul-2019 13:16:42 - if (!seltemperature.empty()) build 10-Jul-2019 13:16:42 + seltemperature = getValuesInTimeRange(temperatureCol, timeCol, mintime, maxtime); build 10-Jul-2019 13:16:42 + if (!seltemperature.empty()) { build 10-Jul-2019 13:16:42 meanT = mean(seltemperature); build 10-Jul-2019 13:16:42 - if (meanT==0.0) { build 10-Jul-2019 13:16:42 - parent_->logmesg("load_cache", "WEATHER temperature is zero, using default value instead."); build 10-Jul-2019 13:16:42 - } else { build 10-Jul-2019 13:16:42 - if (tempUnits=="C") meanT += (float)273.15; // convert C to K build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ((meanT > 0.0) && (tempUnits == "C")) { build 10-Jul-2019 13:16:42 + meanT += (float)273.15; // convert C to K build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (meanT != 0.0) { build 10-Jul-2019 13:16:42 temperature = meanT; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - noWeather = false; build 10-Jul-2019 13:16:42 } catch (AipsError & err) { build 10-Jul-2019 13:16:42 - cout << err.getMesg() << endl; build 10-Jul-2019 13:16:42 + std::cout << "Failed to read WEATHER table:" << err.getMesg() << std::endl; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - String msg = "Using"; build 10-Jul-2019 13:16:42 - msg += (noWeather ? " default " : " "); build 10-Jul-2019 13:16:42 - msg += "weather values for Atm/Tsky:\n"; build 10-Jul-2019 13:16:42 - msg += " humidity " + casacore::String::toString(humidity) + build 10-Jul-2019 13:16:42 - ", pressure " + casacore::String::toString(pressure) + build 10-Jul-2019 13:16:42 - ", temperature " + casacore::String::toString(temperature); build 10-Jul-2019 13:16:42 - parent_->logmesg("load_cache", msg); build 10-Jul-2019 13:16:42 - // to use in atmosphere.initAtmProfile (tool) build 10-Jul-2019 13:16:42 + // to use in atm::AtmProfile build 10-Jul-2019 13:16:42 weather_.define("humidity", humidity); // % build 10-Jul-2019 13:16:42 weather_.define("pressure", pressure); // mb build 10-Jul-2019 13:16:42 weather_.define("temperature", temperature); // K build 10-Jul-2019 13:16:42 @@ -491,20 +619,63 @@ Table PlotMSAtm::selectWeatherTable(Table& wtable, String tempUnits, String pres build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 casacore::Double PlotMSAtm::computeMeanAirmass() { build 10-Jul-2019 13:16:42 // Calculate airmass from elevation build 10-Jul-2019 13:16:42 - casacore::Vector airmasses; build 10-Jul-2019 13:16:42 - airmasses.resize(fields_.size()); build 10-Jul-2019 13:16:42 - casacore::Double elevation; build 10-Jul-2019 13:16:42 - for (uInt i=0; i airmasses(fields_.size()); build 10-Jul-2019 13:16:42 + for (uInt i=0; i pointingAzEl = msCol->pointing().direction().getColumn(); build 10-Jul-2019 13:16:42 + Vector pointingTime = msCol->pointing().time().getColumn(); build 10-Jul-2019 13:16:42 + Vector pointingAntennaId = msCol->pointing().antennaId().getColumn(); build 10-Jul-2019 13:16:42 + delete msCol; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // find elevation measurements for the selected ms times and antenna 0 build 10-Jul-2019 13:16:42 + casacore::Double mintime(min(mstimes_)), maxtime(max(mstimes_)); build 10-Jul-2019 13:16:42 + Vector elevations; build 10-Jul-2019 13:16:42 + for (size_t i=0; i < pointingTime.size(); ++i) { build 10-Jul-2019 13:16:42 + if ((pointingAntennaId(i) == 0) && (pointingTime(i) >= mintime) && build 10-Jul-2019 13:16:42 + (pointingTime(i) <= maxtime)) { build 10-Jul-2019 13:16:42 + Double dirElevationRad = pointingAzEl(IPosition(3, 1, 0, i)); build 10-Jul-2019 13:16:42 + size_t elSize = elevations.size(); build 10-Jul-2019 13:16:42 + elevations.resize(elSize + 1, true); build 10-Jul-2019 13:16:42 + elevations(elSize) = dirElevationRad * 180.0 / C::pi; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (!elevations.empty()) { build 10-Jul-2019 13:16:42 + elevation = mean(elevations); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + return elevation; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +casacore::Double PlotMSAtm::getFieldElevation(casacore::Int fieldId) { build 10-Jul-2019 13:16:42 + // Determine elevation from FIELD table for selected fieldId build 10-Jul-2019 13:16:42 casacore::Array raDec; build 10-Jul-2019 13:16:42 if (isMS_) { build 10-Jul-2019 13:16:42 ROMSColumns msCol(*ms_); build 10-Jul-2019 13:16:42 @@ -525,13 +696,13 @@ casacore::Double PlotMSAtm::getElevation(casacore::Int fieldId) { build 10-Jul-2019 13:16:42 casacore::MeasFrame frame(obspos, ts); build 10-Jul-2019 13:16:42 casacore::MDirection::Ref inputRef(casacore::MDirection::J2000); build 10-Jul-2019 13:16:42 casacore::MDirection inputDir(casacore::Quantity(ra, "rad"), build 10-Jul-2019 13:16:42 - casacore::Quantity(dec, "rad"), inputRef); build 10-Jul-2019 13:16:42 + casacore::Quantity(dec, "rad"), inputRef); build 10-Jul-2019 13:16:42 casacore::MDirection::Ref outputRef(casacore::MDirection::AZEL, frame); build 10-Jul-2019 13:16:42 // do conversion build 10-Jul-2019 13:16:42 casacore::MDirection::Convert j2toAzel(inputDir, outputRef); build 10-Jul-2019 13:16:42 casacore::Vector azel = j2toAzel().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 - casacore::Double el = azel(IPosition(2,1,0)); build 10-Jul-2019 13:16:42 - return el; build 10-Jul-2019 13:16:42 + casacore::Double elevation = azel(1); build 10-Jul-2019 13:16:42 + return elevation; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 casacore::Double PlotMSAtm::getMeanScantime() { build 10-Jul-2019 13:16:42 @@ -549,42 +720,199 @@ casacore::Double PlotMSAtm::getMeanScantime() { build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 -casacore::Vector PlotMSAtm::getValuesNearTimes( build 10-Jul-2019 13:16:42 - casacore::Vector inputCol, build 10-Jul-2019 13:16:42 - casacore::Vector timesCol) { build 10-Jul-2019 13:16:42 - // Use values with timestamps close to times_ from selected table build 10-Jul-2019 13:16:42 - // First, find time difference in closest match build 10-Jul-2019 13:16:42 +casacore::Vector PlotMSAtm::getValuesInTimeRange(casacore::Vector inputData, build 10-Jul-2019 13:16:42 + casacore::Vector times, casacore::Double mintime, build 10-Jul-2019 13:16:42 + casacore::Double maxtime) { build 10-Jul-2019 13:16:42 + // Use values with timestamps in times_ range build 10-Jul-2019 13:16:42 + casacore::Vector outputData; build 10-Jul-2019 13:16:42 + casacore::uInt outsize(0); build 10-Jul-2019 13:16:42 + for (size_t j = 0; j < times.size(); ++j) { build 10-Jul-2019 13:16:42 + if ((times(j) >= mintime) && (times(j) <= maxtime)) { build 10-Jul-2019 13:16:42 + outputData.resize(outsize+1, True); build 10-Jul-2019 13:16:42 + outputData(outsize++) = inputData(j); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (outputData.empty()) { build 10-Jul-2019 13:16:42 + getClosestValues(outputData, times, inputData, mintime, maxtime); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + return outputData; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +template build 10-Jul-2019 13:16:42 +void PlotMSAtm::getClosestValues(casacore::Vector& values, build 10-Jul-2019 13:16:42 + casacore::Vector& times, casacore::Vector& data, build 10-Jul-2019 13:16:42 + double mintime, double maxtime) { build 10-Jul-2019 13:16:42 + // return value(s) with the closest time outside range mintime~maxtime build 10-Jul-2019 13:16:42 casacore::Double mintimediff(1.0e12); build 10-Jul-2019 13:16:42 - for (uInt i=0; i -1); build 10-Jul-2019 13:16:42 + return hasTable; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +bool PlotMSAtm::canGetLOsForSpw() { build 10-Jul-2019 13:16:42 + // spw IDs must be consistent between ASDM_RECEIVER table and SPECTRAL_WINDOW table build 10-Jul-2019 13:16:42 + // (if ms was split, spws were reindexed) build 10-Jul-2019 13:16:42 + if (tableName_.empty()) { build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + // spws from ASDM_RECEIVER table build 10-Jul-2019 13:16:42 + casacore::Table receiverTable = Table::openTable(tableName_ + "::ASDM_RECEIVER"); build 10-Jul-2019 13:16:42 + casacore::Vector receiverSpws = build 10-Jul-2019 13:16:42 + ScalarColumn(receiverTable, "spectralWindowId").getColumn(); build 10-Jul-2019 13:16:42 + int maxReceiverSpw(0); build 10-Jul-2019 13:16:42 + for (auto spwId : receiverSpws) { build 10-Jul-2019 13:16:42 + casacore::String spwIdNumber = spwId.after(spwId.rfind("_")); // e.g. "SpectralWindow_11" -> "11" build 10-Jul-2019 13:16:42 + try { build 10-Jul-2019 13:16:42 + int spw = std::stoi(spwIdNumber); build 10-Jul-2019 13:16:42 + maxReceiverSpw = std::max(maxReceiverSpw, spw); build 10-Jul-2019 13:16:42 + } catch (std::invalid_argument& error) { build 10-Jul-2019 13:16:42 + // ignore: cannot convert spwIdNumber to int build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 + // spws from SPECTRAL_WINDOW table build 10-Jul-2019 13:16:42 + casacore::Table spwTable = Table::openTable(tableName_ + "::SPECTRAL_WINDOW"); build 10-Jul-2019 13:16:42 + int nSpwSpws = ScalarColumn(spwTable, "NAME").getColumn().size(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + return (maxReceiverSpw == nSpwSpws-1); build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +bool PlotMSAtm::calcImageFrequencies( build 10-Jul-2019 13:16:42 + casacore::Vector& imageFreqs, build 10-Jul-2019 13:16:42 + casacore::Int spw, const casacore::Vector& chanFreqs) { build 10-Jul-2019 13:16:42 + // Get LO1 for spw and calculate image frequencies for signal frequencies; build 10-Jul-2019 13:16:42 + // returns whether frequencies are reversed in image sideband build 10-Jul-2019 13:16:42 + unsigned int numChan(chanFreqs.nelements()); build 10-Jul-2019 13:16:42 + imageFreqs.resize(numChan); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + double freqLO1(0.0); build 10-Jul-2019 13:16:42 + if (!getLO1FreqForSpw(freqLO1, spw)) { // spw not found build 10-Jul-2019 13:16:42 + imageFreqs.set(doubleNaN()); build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // use image frequencies based on LO1 frequency build 10-Jul-2019 13:16:42 + casacore::Vector lo1Freqs(numChan, (2.0 * freqLO1)); build 10-Jul-2019 13:16:42 + imageFreqs = lo1Freqs - chanFreqs; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // calculate number of chans to use for calculation, reference channel, build 10-Jul-2019 13:16:42 + // reference frequency, and channel separation for atm::SpectralGrid build 10-Jul-2019 13:16:42 + unsigned int midChan(numChan/2); build 10-Jul-2019 13:16:42 + // Set the reference freq to be the middle of the middle two channels build 10-Jul-2019 13:16:42 + casacore::Double refFreq = 0.5 * (imageFreqs(IPosition(2, midChan-1, 0)) + build 10-Jul-2019 13:16:42 + imageFreqs(IPosition(2, midChan, 0))); build 10-Jul-2019 13:16:42 + unsigned int refChan((numChan - 1) / 2); build 10-Jul-2019 13:16:42 + casacore::Double chanSep = (imageFreqs(IPosition(2, numChan-1, 0)) - build 10-Jul-2019 13:16:42 + imageFreqs(IPosition(2, 0, 0))) / (numChan - 1); build 10-Jul-2019 13:16:42 + if (!isfinite(refFreq) || !isfinite(chanSep)) { build 10-Jul-2019 13:16:42 + imageFreqs.set(doubleNaN()); build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (numChan % 2 == 0) { build 10-Jul-2019 13:16:42 + refFreq -= chanSep*0.5; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Set up SpectralGrid and get frequencies build 10-Jul-2019 13:16:42 + atm::SpectralGrid* specGrid = new atm::SpectralGrid(numChan, refChan, build 10-Jul-2019 13:16:42 + atm::Frequency(refFreq, "GHz"), atm::Frequency(chanSep, "GHz")); build 10-Jul-2019 13:16:42 + for (unsigned int chan=0; changetChanFreq(0, static_cast(chan)).get("GHz"); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // now get index of values within 1 sec of minimum timediff build 10-Jul-2019 13:16:42 - casacore::Vector values; build 10-Jul-2019 13:16:42 - casacore::uInt vsize(0); build 10-Jul-2019 13:16:42 - for (casacore::uInt i=0; i adjustedImageFreqs = lo1Freqs - imageFreqs; build 10-Jul-2019 13:16:42 + return !(allNearAbs(adjustedImageFreqs, chanFreqs, 1e-7)); build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +bool PlotMSAtm::getLO1FreqForSpw(double& freqGHz, int spw) { build 10-Jul-2019 13:16:42 + // For showimage, get the freqLO[0] column value from ASDM_RECEIVER table. build 10-Jul-2019 13:16:42 + // Assigns freqGHz argument, returns whether spw was found build 10-Jul-2019 13:16:42 + bool foundSpw(false); build 10-Jul-2019 13:16:42 + if (!hasReceiverTable()) { build 10-Jul-2019 13:16:42 + return foundSpw; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (loFreqForSpw_.count(spw)) { build 10-Jul-2019 13:16:42 + freqGHz = loFreqForSpw_[spw]; build 10-Jul-2019 13:16:42 + foundSpw = true; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + // get names and freqLOs from ASDM_RECEIVER table, only keep first "WVR" freq build 10-Jul-2019 13:16:42 + casacore::Table receiverTable = Table::openTable(tableName_ + "::ASDM_RECEIVER"); build 10-Jul-2019 13:16:42 + casacore::Vector spwNames = build 10-Jul-2019 13:16:42 + ScalarColumn(receiverTable, "spectralWindowId").getColumn(); build 10-Jul-2019 13:16:42 + casacore::Vector receiverNames = build 10-Jul-2019 13:16:42 + ScalarColumn(receiverTable, "name").getColumn(); build 10-Jul-2019 13:16:42 + ArrayColumn freqLOCol(receiverTable, "freqLO"); build 10-Jul-2019 13:16:42 + casacore::Vector freqLOs; build 10-Jul-2019 13:16:42 + casacore::Vector spwIds; build 10-Jul-2019 13:16:42 + bool gotWvr(false); build 10-Jul-2019 13:16:42 + for (size_t i = 0; i < receiverNames.size(); ++i) { build 10-Jul-2019 13:16:42 + // only use first value for spw id build 10-Jul-2019 13:16:42 + casacore::String spwIdStr = spwNames(i).after("SpectralWindow_"); build 10-Jul-2019 13:16:42 + bool foundSpwId(false); build 10-Jul-2019 13:16:42 + for (size_t j=0; j < spwIds.size(); ++j) { build 10-Jul-2019 13:16:42 + if (spwIds(j) == spwIdStr) { build 10-Jul-2019 13:16:42 + foundSpwId = True; build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 + if (foundSpwId) { build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + size_t idsSize = spwIds.size(); build 10-Jul-2019 13:16:42 + spwIds.resize(idsSize + 1, true); build 10-Jul-2019 13:16:42 + spwIds(idsSize) = spwIdStr; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // only use first value for WVR build 10-Jul-2019 13:16:42 + if (receiverNames(i).contains("WVR")) { build 10-Jul-2019 13:16:42 + if (gotWvr) { build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + gotWvr = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // get freqLO[0] and convert to GHz build 10-Jul-2019 13:16:42 + double freqLO = *(freqLOCol.get(i).data()); // first element of array build 10-Jul-2019 13:16:42 + freqLO *= 1e-9; build 10-Jul-2019 13:16:42 + // add this freqLO value build 10-Jul-2019 13:16:42 + size_t loSize(freqLOs.size()); build 10-Jul-2019 13:16:42 + freqLOs.resize(loSize + 1, true); build 10-Jul-2019 13:16:42 + freqLOs(loSize) = freqLO; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + int freqsize = freqLOs.size(); build 10-Jul-2019 13:16:42 + if (freqsize > spw) { build 10-Jul-2019 13:16:42 + freqGHz = freqLOs(spw); build 10-Jul-2019 13:16:42 + // only log this when calculated for this spw build 10-Jul-2019 13:16:42 + parent_->logmesg("load_cache", build 10-Jul-2019 13:16:42 + "Image sideband LO1=" + String::toString(freqGHz) + " for spw " + String::toString(spw)); build 10-Jul-2019 13:16:42 + // cache this for later chunks build 10-Jul-2019 13:16:42 + loFreqForSpw_[spw] = freqGHz; build 10-Jul-2019 13:16:42 + foundSpw = true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - // unique values build 10-Jul-2019 13:16:42 - Sort sorter; build 10-Jul-2019 13:16:42 - casacore::Vector indexVector, uniqueVector; build 10-Jul-2019 13:16:42 - sorter.sortKey(values.data(), TpUInt); build 10-Jul-2019 13:16:42 - sorter.sort(indexVector, values.size()); build 10-Jul-2019 13:16:42 - uInt nUnique = sorter.unique(uniqueVector, indexVector); build 10-Jul-2019 13:16:42 - casacore::Vector outputCol(nUnique); build 10-Jul-2019 13:16:42 - uInt index; build 10-Jul-2019 13:16:42 - for (casacore::uInt i=0; i calcOverlayCurve( build 10-Jul-2019 13:16:42 - casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 - const casacore::Vector& chanFreqs, build 10-Jul-2019 13:16:42 - bool atm); build 10-Jul-2019 13:16:42 + // accessors build 10-Jul-2019 13:16:42 + inline casacore::String filename() { return filename_; } build 10-Jul-2019 13:16:42 + inline PlotMSSelection selection() { return selection_; } build 10-Jul-2019 13:16:42 + inline bool showatm() { return showatm_; } // false is tsky build 10-Jul-2019 13:16:42 + inline bool xAxisIsChan() { return xIsChan_; } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + inline void setShowAtm(bool showatm) { showatm_ = showatm; } build 10-Jul-2019 13:16:42 + inline void setXAxisIsChan(bool isChan) { xIsChan_ = isChan; } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // passes arguments through to calcOverlayCurve build 10-Jul-2019 13:16:42 + void calcAtmTskyCurve(casacore::Vector& curve, build 10-Jul-2019 13:16:42 + casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 + const casacore::Vector& chanFreqs); build 10-Jul-2019 13:16:42 + // calculates image frequencies then calls calcOverlayCurve build 10-Jul-2019 13:16:42 + void calcImageCurve(casacore::Vector& curve, build 10-Jul-2019 13:16:42 + casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 + const casacore::Vector& chanFreqs); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 inline casacore::Double getPwv() { return pwv_; } build 10-Jul-2019 13:16:42 inline casacore::Double getAirmass() { return airmass_; } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + // image sideband curve helpers build 10-Jul-2019 13:16:42 + inline bool canShowImageCurve() { return (hasReceiverTable() && canGetLOsForSpw()); } build 10-Jul-2019 13:16:42 + bool hasReceiverTable(); build 10-Jul-2019 13:16:42 + bool canGetLOsForSpw(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSAtm(const PlotMSAtm& other); build 10-Jul-2019 13:16:42 @@ -97,14 +112,20 @@ private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // info from MS build 10-Jul-2019 13:16:42 void setUpMS(casacore::String filename, PlotMSSelection& userSel); build 10-Jul-2019 13:16:42 - void getMSTimes(); build 10-Jul-2019 13:16:42 - void getMSFields(); build 10-Jul-2019 13:16:42 + void getMSTimes(MeasurementSet& ms); build 10-Jul-2019 13:16:42 + void getMSFields(MeasurementSet& ms); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // info from cal tables build 10-Jul-2019 13:16:42 void setUpCalTable(casacore::String filename, PlotMSSelection& userSel); build 10-Jul-2019 13:16:42 - void getCalTimes(); build 10-Jul-2019 13:16:42 - void getCalFields(); build 10-Jul-2019 13:16:42 - void getCalMS(); build 10-Jul-2019 13:16:42 + void getCalTimes(NewCalTable& ct); build 10-Jul-2019 13:16:42 + void getCalFields(NewCalTable& ct); build 10-Jul-2019 13:16:42 + void getCalMS(); // uses original caltable_ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // common function for plotbandpass CalcAtmTransmission algorithm build 10-Jul-2019 13:16:42 + // Returns curve vector (atm, tsky, image sideband); build 10-Jul-2019 13:16:42 + casacore::Vector calcOverlayCurve( build 10-Jul-2019 13:16:42 + casacore::Int spw, casacore::Int scan, build 10-Jul-2019 13:16:42 + const casacore::Vector& chanFreqs); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // for user selection then each chunk's spw and scan build 10-Jul-2019 13:16:42 void applyMSSelection(PlotMSSelection& selection, build 10-Jul-2019 13:16:42 @@ -114,36 +135,58 @@ private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // calculated values build 10-Jul-2019 13:16:42 void getMeanWeather(); // stored in weather_ Record build 10-Jul-2019 13:16:42 - casacore::Table selectWeatherTable(casacore::Table& intable, build 10-Jul-2019 13:16:42 + casacore::Table selectWeatherTable(casacore::Table& intable, build 10-Jul-2019 13:16:42 casacore::String tempUnits, casacore::String pressureUnits); build 10-Jul-2019 13:16:42 void getMedianPwv(); // stored in pwv_ build 10-Jul-2019 13:16:42 casacore::Double computeMeanAirmass(); build 10-Jul-2019 13:16:42 - casacore::Double getElevation(casacore::Int fieldId); build 10-Jul-2019 13:16:42 + casacore::Double getPointingElevation(); build 10-Jul-2019 13:16:42 + casacore::Double getFieldElevation(casacore::Int fieldId); // no pointing table build 10-Jul-2019 13:16:42 casacore::Double getMeanScantime(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // atmosphere tool build 10-Jul-2019 13:16:42 atm::AtmProfile* getAtmProfile(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + // image sideband curve build 10-Jul-2019 13:16:42 + bool getLO1FreqForSpw(double& freq, int spw); build 10-Jul-2019 13:16:42 + bool calcImageFrequencies(casacore::Vector& imageFreqs, build 10-Jul-2019 13:16:42 + casacore::Int spw, const casacore::Vector& chanFreqs); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 // utility functions build 10-Jul-2019 13:16:42 - // Sets times_ = unique values in TIME column build 10-Jul-2019 13:16:42 - void getUniqueTimes(casacore::Vector alltimes); build 10-Jul-2019 13:16:42 + // Determine unique time values in input vector build 10-Jul-2019 13:16:42 + void getUniqueTimes(casacore::Vector inputTimes, build 10-Jul-2019 13:16:42 + casacore::Vector& uniqueTimes); build 10-Jul-2019 13:16:42 // Sets fields_ = unique values in FIELD column build 10-Jul-2019 13:16:42 void getUniqueFields(casacore::Vector allfields); build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 - casacore::Vector getValuesNearTimes( build 10-Jul-2019 13:16:42 - casacore::Vector inputCol, build 10-Jul-2019 13:16:42 - casacore::Vector timesCol); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - bool isMS_; build 10-Jul-2019 13:16:42 + casacore::Vector getValuesInTimeRange(casacore::Vector inputCol, build 10-Jul-2019 13:16:42 + casacore::Vector timesCol, casacore::Double mintime, build 10-Jul-2019 13:16:42 + casacore::Double maxtime); build 10-Jul-2019 13:16:42 + template build 10-Jul-2019 13:16:42 + void getClosestValues(casacore::Vector& values, build 10-Jul-2019 13:16:42 + casacore::Vector& times, casacore::Vector& data, build 10-Jul-2019 13:16:42 + double mintime, double maxtime); build 10-Jul-2019 13:16:42 + // use cal table times if available, else ms times build 10-Jul-2019 13:16:42 + void getTimeRange(casacore::Double& mintime, casacore::Double& maxtime); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + casacore::String filename_, tableName_, telescopeName_; build 10-Jul-2019 13:16:42 + bool showatm_; // true=showatm, false=showtsky build 10-Jul-2019 13:16:42 + bool isMS_; // true=MS, false=CalTable build 10-Jul-2019 13:16:42 + bool xIsChan_; // image curve changes for chan/freq x-axis build 10-Jul-2019 13:16:42 + bool canCalculatePwv_; // has CALWVR or CALATMOSPHERE subtable build 10-Jul-2019 13:16:42 + bool canCalculateWeather_; // has WEATHER subtable build 10-Jul-2019 13:16:42 PlotMSCacheBase* parent_; // for log messages build 10-Jul-2019 13:16:42 + PlotMSSelection selection_; build 10-Jul-2019 13:16:42 casacore::MeasurementSet *ms_, *selms_; // selected MS for each spw/scan build 10-Jul-2019 13:16:42 - NewCalTable *caltable_, *selct_; // selected CT for each spw/scan build 10-Jul-2019 13:16:42 - casacore::String tableName_, telescopeName_; build 10-Jul-2019 13:16:42 + NewCalTable *caltable_, *selct_; // selected CT for each spw/scan build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // updated for every spw/scan selection: build 10-Jul-2019 13:16:42 + int selectedSpw_, selectedScan_; build 10-Jul-2019 13:16:42 casacore::Double pwv_, airmass_; build 10-Jul-2019 13:16:42 - casacore::Vector times_; build 10-Jul-2019 13:16:42 + casacore::Vector mstimes_, caltimes_; build 10-Jul-2019 13:16:42 casacore::Vector fields_; build 10-Jul-2019 13:16:42 casacore::Record weather_; build 10-Jul-2019 13:16:42 - const unsigned int MAX_ATM_CALC_CHAN_; build 10-Jul-2019 13:16:42 + std::map loFreqForSpw_; build 10-Jul-2019 13:16:42 + const unsigned int MAX_ATM_CALC_CHAN_; build 10-Jul-2019 13:16:42 }; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/PlotMSCacheBase.cc b/code/plotms/Data/PlotMSCacheBase.cc build 10-Jul-2019 13:16:42 index 08f8a30..b6c0ff8 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/PlotMSCacheBase.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/PlotMSCacheBase.cc build 10-Jul-2019 13:16:42 @@ -88,7 +88,7 @@ const unsigned int PlotMSCacheBase::THREAD_SEGMENT = 10; build 10-Jul-2019 13:16:42 PlotMSCacheBase::PlotMSCacheBase(PlotMSApp* parent, PlotMSPlot* plot): build 10-Jul-2019 13:16:42 plotms_(parent), build 10-Jul-2019 13:16:42 itsPlot_(plot), build 10-Jul-2019 13:16:42 - indexer0_(NULL), build 10-Jul-2019 13:16:42 + indexer0_(nullptr), build 10-Jul-2019 13:16:42 indexer_(0), build 10-Jul-2019 13:16:42 nChunk_(0), build 10-Jul-2019 13:16:42 refTime_p(0.0), build 10-Jul-2019 13:16:42 @@ -106,7 +106,7 @@ PlotMSCacheBase::PlotMSCacheBase(PlotMSApp* parent, PlotMSPlot* plot): build 10-Jul-2019 13:16:42 userCanceled_(false), build 10-Jul-2019 13:16:42 calType_(""), build 10-Jul-2019 13:16:42 polnRatio_(false), build 10-Jul-2019 13:16:42 - plotmsAtm_(NULL) build 10-Jul-2019 13:16:42 + plotmsAtm_(nullptr) build 10-Jul-2019 13:16:42 { build 10-Jul-2019 13:16:42 // Make the empty indexer0 object so we have and empty PlotData object build 10-Jul-2019 13:16:42 int dataCount = 1; build 10-Jul-2019 13:16:42 @@ -124,8 +124,8 @@ PlotMSCacheBase::PlotMSCacheBase(PlotMSApp* parent, PlotMSPlot* plot): build 10-Jul-2019 13:16:42 plmask_.resize( dataCount ); build 10-Jul-2019 13:16:42 for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 netAxesMask_[i].resize(4,false); build 10-Jul-2019 13:16:42 - indexer_[i].set( NULL ); build 10-Jul-2019 13:16:42 - plmask_[i].set( NULL ); build 10-Jul-2019 13:16:42 + indexer_[i].set( nullptr ); build 10-Jul-2019 13:16:42 + plmask_[i].set( nullptr ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 xminG_.resize(dataCount); build 10-Jul-2019 13:16:42 xminG_.set(0); build 10-Jul-2019 13:16:42 @@ -158,7 +158,6 @@ PlotMSCacheBase::PlotMSCacheBase(PlotMSApp* parent, PlotMSPlot* plot): build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSCacheBase::~PlotMSCacheBase() { build 10-Jul-2019 13:16:42 - // cout << "PMSCB::~PMSCB" << endl; build 10-Jul-2019 13:16:42 delete indexer0_; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Deflate everything build 10-Jul-2019 13:16:42 @@ -237,7 +236,7 @@ PMS::Axis PlotMSCacheBase::getIterAxis() const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotLogMessage* PlotMSCacheBase::locateRange( int plotIterIndex, const Vector & regions, build 10-Jul-2019 13:16:42 bool showUnflagged, bool showFlagged){ build 10-Jul-2019 13:16:42 - PlotLogMessage* mesg = NULL; build 10-Jul-2019 13:16:42 + PlotLogMessage* mesg = nullptr; build 10-Jul-2019 13:16:42 String mesgContents; build 10-Jul-2019 13:16:42 int dataCount = indexer_.size(); build 10-Jul-2019 13:16:42 if ( dataCount == 1 ){ build 10-Jul-2019 13:16:42 @@ -248,7 +247,7 @@ PlotLogMessage* PlotMSCacheBase::locateRange( int plotIterIndex, const Vector& regions, bool showFlagged){ build 10-Jul-2019 13:16:42 - PlotLogMessage* mesg = NULL; build 10-Jul-2019 13:16:42 + PlotLogMessage* mesg = nullptr; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // not allowed for solvable cal tables! build 10-Jul-2019 13:16:42 String type(calType()); build 10-Jul-2019 13:16:42 @@ -285,7 +284,7 @@ PlotLogMessage* PlotMSCacheBase::flagRange( int plotIterIndex, casa::PlotMSFlagg build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 else { build 10-Jul-2019 13:16:42 String contents; build 10-Jul-2019 13:16:42 - PlotLogMessage* subMesg = NULL; build 10-Jul-2019 13:16:42 + PlotLogMessage* subMesg = nullptr; build 10-Jul-2019 13:16:42 for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 int indexCount = indexer_[i].size(); build 10-Jul-2019 13:16:42 if ( 0 <= plotIterIndex && plotIterIndex < indexCount){ build 10-Jul-2019 13:16:42 @@ -326,13 +325,47 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 // need a way to keep track of whether: build 10-Jul-2019 13:16:42 // 1) we already have the metadata loaded build 10-Jul-2019 13:16:42 // 2) the underlying MS has changed, requiring a reloading of metadata build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 userCanceled_ = false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Trap ratio plots, only for cal tables build 10-Jul-2019 13:16:42 - if ((selection.corr()=='/') && (cacheType()==PlotMSCacheBase::MS)) build 10-Jul-2019 13:16:42 + if ((selection.corr()=='/') && (cacheType()==PlotMSCacheBase::MS)) { build 10-Jul-2019 13:16:42 throw(AipsError("Polarization ratio plots not supported for measurement sets.")); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Remember the axes that we will load for plotting: build 10-Jul-2019 13:16:42 + // Maintain access to this msname, selection, & averager, because we'll build 10-Jul-2019 13:16:42 + // use it if/when we flag, etc. build 10-Jul-2019 13:16:42 + if ( filename_ != filename ){ build 10-Jul-2019 13:16:42 + setFilename(filename); // sets filename_ and calType_ for cal table build 10-Jul-2019 13:16:42 + ephemerisInitialized = false; build 10-Jul-2019 13:16:42 + // no axes loaded for new dataset build 10-Jul-2019 13:16:42 + const vector& axes = PMS::axes(); build 10-Jul-2019 13:16:42 + for(unsigned int i = 0; i < axes.size(); i++) build 10-Jul-2019 13:16:42 + loadedAxes_[axes[i]] = false; build 10-Jul-2019 13:16:42 + loadedAxesData_.clear(); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + selection_ = selection; build 10-Jul-2019 13:16:42 + averaging_ = averaging; build 10-Jul-2019 13:16:42 + transformations_ = transformations; build 10-Jul-2019 13:16:42 + calibration_ = calibration; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + //log settings build 10-Jul-2019 13:16:42 + casacore::Path fullpath(filename); build 10-Jul-2019 13:16:42 + logLoad("Plotting table " + fullpath.baseName()); // filename only build 10-Jul-2019 13:16:42 + if (!selection.isEmpty()) { build 10-Jul-2019 13:16:42 + logLoad(selection_.toStringShort()); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (transformations.anyTransform()) { build 10-Jul-2019 13:16:42 + logLoad(transformations_.summary()); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (averaging.anyAveraging()) { build 10-Jul-2019 13:16:42 + logLoad(averaging_.summary()); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (calibration.useCallib()) { build 10-Jul-2019 13:16:42 + logLoad(calibration_.summary()); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // clear stored x and y axes build 10-Jul-2019 13:16:42 currentX_.clear(); build 10-Jul-2019 13:16:42 currentY_.clear(); build 10-Jul-2019 13:16:42 currentXData_.clear(); build 10-Jul-2019 13:16:42 @@ -342,18 +375,63 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 currentYFrame_.clear(); build 10-Jul-2019 13:16:42 currentXInterp_.clear(); build 10-Jul-2019 13:16:42 currentYInterp_.clear(); build 10-Jul-2019 13:16:42 - int dataCount = axes.size() / 2; build 10-Jul-2019 13:16:42 - bool doAtm(false); build 10-Jul-2019 13:16:42 - for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 + size_t dataCount = axes.size() / 2; build 10-Jul-2019 13:16:42 + // whether to plot/recalculate image sideband build 10-Jul-2019 13:16:42 + bool canPlotImageSideband(true); build 10-Jul-2019 13:16:42 + bool changedImageSbAxis(true); build 10-Jul-2019 13:16:42 + bool changedImageSbXAxis(true); build 10-Jul-2019 13:16:42 + // Remember the axes that we will load for plotting: build 10-Jul-2019 13:16:42 + for (size_t i = 0; i < dataCount; i++) { build 10-Jul-2019 13:16:42 + // set up atmospheric overlays build 10-Jul-2019 13:16:42 + size_t yIndex = dataCount + i; build 10-Jul-2019 13:16:42 + if ((axes[yIndex] == PMS::ATM) || (axes[yIndex] == PMS::TSKY)) { build 10-Jul-2019 13:16:42 + bool showatm = (axes[yIndex] == PMS::ATM); build 10-Jul-2019 13:16:42 + bool isMS = (cacheType() == PlotMSCacheBase::MS); build 10-Jul-2019 13:16:42 + bool xIsChan = (axes[i] == PMS::CHANNEL); build 10-Jul-2019 13:16:42 + if (plotmsAtm_ == nullptr) { build 10-Jul-2019 13:16:42 + plotmsAtm_ = new PlotMSAtm(filename_, selection_, showatm, isMS, xIsChan, this); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + changedImageSbAxis = (showatm != plotmsAtm_->showatm()); // changed atm/tsky build 10-Jul-2019 13:16:42 + changedImageSbXAxis = (xIsChan != plotmsAtm_->xAxisIsChan()); // changed chan/freq build 10-Jul-2019 13:16:42 + plotmsAtm_->setShowAtm(showatm); build 10-Jul-2019 13:16:42 + plotmsAtm_->setXAxisIsChan(xIsChan); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } else if (axes[yIndex] == PMS::IMAGESB) { build 10-Jul-2019 13:16:42 + // if already loaded, check if need to recalculate build 10-Jul-2019 13:16:42 + bool needToCalculateSideband(true); build 10-Jul-2019 13:16:42 + if (loadedAxes_[PMS::IMAGESB] && !changedImageSbAxis) { build 10-Jul-2019 13:16:42 + needToCalculateSideband = false; // imagesb loaded for correct atm/tsky build 10-Jul-2019 13:16:42 + if (changedImageSbXAxis) { build 10-Jul-2019 13:16:42 + // reverse vectors when switch between chan/freq build 10-Jul-2019 13:16:42 + for (size_t i=0; i < imageSideband_.size(); ++i) { build 10-Jul-2019 13:16:42 + reverseArray(*imageSideband_[i], 0); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (needToCalculateSideband) { build 10-Jul-2019 13:16:42 + loadedAxes_[PMS::IMAGESB] = false; // (re)calculate for atm/tsky build 10-Jul-2019 13:16:42 + // warn if not possible build 10-Jul-2019 13:16:42 + if (!plotmsAtm_->hasReceiverTable()) { build 10-Jul-2019 13:16:42 + logWarn("load_cache", build 10-Jul-2019 13:16:42 + "Cannot plot image sideband curve: no MeasurementSet ASDM_RECEIVER table for LO1 frequencies."); build 10-Jul-2019 13:16:42 + canPlotImageSideband = false; build 10-Jul-2019 13:16:42 + } else if (!plotmsAtm_->canGetLOsForSpw()) { build 10-Jul-2019 13:16:42 + logWarn("load_cache", build 10-Jul-2019 13:16:42 + "Cannot plot image sideband curve: MeasurementSet split, cannot get LO1 frequencies for reindexed spws."); build 10-Jul-2019 13:16:42 + canPlotImageSideband = false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // separate x and y axes build 10-Jul-2019 13:16:42 currentX_.push_back(axes[i]); build 10-Jul-2019 13:16:42 currentXData_.push_back(data[i]); build 10-Jul-2019 13:16:42 - currentY_.push_back(axes[dataCount+i]); build 10-Jul-2019 13:16:42 - currentYData_.push_back(data[dataCount+i]); build 10-Jul-2019 13:16:42 - if (axes[dataCount+i]==PMS::ATM || axes[dataCount+i]==PMS::TSKY) build 10-Jul-2019 13:16:42 - doAtm=true; build 10-Jul-2019 13:16:42 + currentY_.push_back(axes[yIndex]); build 10-Jul-2019 13:16:42 + currentYData_.push_back(data[yIndex]); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 // Copy RA/DEC axes params from plot's parameters, build 10-Jul-2019 13:16:42 - if (itsPlot_ != nullptr){ build 10-Jul-2019 13:16:42 + if (itsPlot_ != nullptr) { build 10-Jul-2019 13:16:42 auto * cacheParams = itsPlot_->parameters().typedGroup(); build 10-Jul-2019 13:16:42 if (cacheParams == nullptr) build 10-Jul-2019 13:16:42 throw(AipsError("PlotMSCacheBase::load(): plot has no Cache parameter group")); build 10-Jul-2019 13:16:42 @@ -361,60 +439,34 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 currentYFrame_ = cacheParams->yFrames(); build 10-Jul-2019 13:16:42 currentXInterp_ = cacheParams->xInterps(); build 10-Jul-2019 13:16:42 currentYInterp_ = cacheParams->yInterps(); build 10-Jul-2019 13:16:42 - auto dataCount = axes.size()/2; build 10-Jul-2019 13:16:42 auto sizeOk = true; build 10-Jul-2019 13:16:42 - sizeOk &= currentXFrame_.size() == dataCount; build 10-Jul-2019 13:16:42 - sizeOk &= currentYFrame_.size() == dataCount; build 10-Jul-2019 13:16:42 - sizeOk &= currentXInterp_.size() == dataCount; build 10-Jul-2019 13:16:42 - sizeOk &= currentYInterp_.size() == dataCount; build 10-Jul-2019 13:16:42 + sizeOk &= (currentXFrame_.size() == dataCount); build 10-Jul-2019 13:16:42 + sizeOk &= (currentYFrame_.size() == dataCount); build 10-Jul-2019 13:16:42 + sizeOk &= (currentXInterp_.size() == dataCount); build 10-Jul-2019 13:16:42 + sizeOk &= (currentYInterp_.size() == dataCount); build 10-Jul-2019 13:16:42 if (not sizeOk ) build 10-Jul-2019 13:16:42 throw(AipsError("PlotMSCacheBase::load(): Cache parameters: size mismatch")); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 - currentXFrame_ = vector(dataCount,PMS::DEFAULT_COORDSYSTEM); build 10-Jul-2019 13:16:42 - currentYFrame_ = vector(dataCount,PMS::DEFAULT_COORDSYSTEM); build 10-Jul-2019 13:16:42 - currentXInterp_ = vector(dataCount,PMS::DEFAULT_INTERPMETHOD); build 10-Jul-2019 13:16:42 - currentYInterp_ = vector(dataCount,PMS::DEFAULT_INTERPMETHOD); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + currentXFrame_ = vector(dataCount, PMS::DEFAULT_COORDSYSTEM); build 10-Jul-2019 13:16:42 + currentYFrame_ = vector(dataCount, PMS::DEFAULT_COORDSYSTEM); build 10-Jul-2019 13:16:42 + currentXInterp_ = vector(dataCount, PMS::DEFAULT_INTERPMETHOD); build 10-Jul-2019 13:16:42 + currentYInterp_ = vector(dataCount, PMS::DEFAULT_INTERPMETHOD); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // Compute the missing stacked parameters for RA/DEC axis parameters build 10-Jul-2019 13:16:42 xyFrame_.resize(axes.size()); build 10-Jul-2019 13:16:42 std::copy(currentXFrame_.begin(),currentXFrame_.end(),xyFrame_.begin()); build 10-Jul-2019 13:16:42 std::copy(currentYFrame_.begin(),currentYFrame_.end(),xyFrame_.begin()+currentXFrame_.size()); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 xyInterp_.resize(axes.size()); build 10-Jul-2019 13:16:42 std::copy(currentXInterp_.begin(),currentXInterp_.end(),xyInterp_.begin()); build 10-Jul-2019 13:16:42 std::copy(currentYInterp_.begin(),currentYInterp_.end(),xyInterp_.begin()+currentXInterp_.size()); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Maintain access to this msname, selection, & averager, because we'll build 10-Jul-2019 13:16:42 - // use it if/when we flag, etc. build 10-Jul-2019 13:16:42 - if ( filename_ != filename ){ build 10-Jul-2019 13:16:42 - setFilename(filename); // sets filename_ and calType_ for cal table build 10-Jul-2019 13:16:42 - ephemerisInitialized = false; build 10-Jul-2019 13:16:42 - const vector& axes = PMS::axes(); build 10-Jul-2019 13:16:42 - for(unsigned int i = 0; i < axes.size(); i++) build 10-Jul-2019 13:16:42 - loadedAxes_[axes[i]] = false; build 10-Jul-2019 13:16:42 - loadedAxesData_.clear(); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - selection_ = selection; build 10-Jul-2019 13:16:42 - averaging_ = averaging; build 10-Jul-2019 13:16:42 - transformations_ = transformations; build 10-Jul-2019 13:16:42 - calibration_ = calibration; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if (doAtm) build 10-Jul-2019 13:16:42 - plotmsAtm_ = new PlotMSAtm(filename_, selection_, cacheType()==PlotMSCacheBase::MS, this); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - //logLoad(selection_.summary()); build 10-Jul-2019 13:16:42 - logLoad(transformations_.summary()); build 10-Jul-2019 13:16:42 - logLoad(averaging_.summary()); build 10-Jul-2019 13:16:42 - logLoad(calibration_.summary()); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 // Trap (currently) unsupported modes build 10-Jul-2019 13:16:42 - for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 + for (size_t i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 // Forbid antenna-based/baseline-based combination plots, for now build 10-Jul-2019 13:16:42 - Vector nAM=netAxesMask(currentX_[i],currentY_[i]); build 10-Jul-2019 13:16:42 - if (nAM(2)&&nAM(3)){ build 10-Jul-2019 13:16:42 - throw(AipsError("Plots of antenna-based vs. baseline-based axes not supported ("+ build 10-Jul-2019 13:16:42 - PMS::axis(currentX_[i])+" and "+PMS::axis(currentY_[i])+")")); build 10-Jul-2019 13:16:42 + Vector nAM = netAxesMask(currentX_[i], currentY_[i]); build 10-Jul-2019 13:16:42 + if (nAM(2) && nAM(3)) { build 10-Jul-2019 13:16:42 + throw(AipsError("Plots of antenna-based vs. baseline-based axes not supported (" + build 10-Jul-2019 13:16:42 + PMS::axis(currentX_[i]) + " and " + PMS::axis(currentY_[i]) + ")")); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Check averaging validity build 10-Jul-2019 13:16:42 @@ -438,14 +490,14 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 if ( averaging_.anyAveraging() ) { build 10-Jul-2019 13:16:42 - auto loadAntDir = std::find_if(axes.begin(),axes.end(),PMS::axisIsRaDec) != axes.end(); build 10-Jul-2019 13:16:42 + auto loadAntDir = std::find_if(axes.begin(), axes.end(), PMS::axisIsRaDec) != axes.end(); build 10-Jul-2019 13:16:42 if ( loadAntDir ) { build 10-Jul-2019 13:16:42 String warnMessage("Averaging not supported for axes: "); build 10-Jul-2019 13:16:42 warnMessage += PMS::axis(PMS::RA) + " and " + PMS::axis(PMS::DEC); build 10-Jul-2019 13:16:42 logWarn("load", warnMessage); build 10-Jul-2019 13:16:42 logWarn("load", "Ignoring any averaging"); build 10-Jul-2019 13:16:42 averaging_ = PlotMSAveraging(); build 10-Jul-2019 13:16:42 - if ( thread != NULL ){ build 10-Jul-2019 13:16:42 + if ( thread != nullptr ){ build 10-Jul-2019 13:16:42 thread->setError( "Averaging was ignored" ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -470,23 +522,26 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 String errorMessage( "Not loading axis "+axisName+ build 10-Jul-2019 13:16:42 " because ephemeris data is not available for this ms."); build 10-Jul-2019 13:16:42 logWarn( "load", errorMessage); build 10-Jul-2019 13:16:42 - if ( thread != NULL ){ build 10-Jul-2019 13:16:42 + if ( thread != nullptr ){ build 10-Jul-2019 13:16:42 thread->setError( errorMessage ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 throw AipsError(errorMessage ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 stringstream ss; build 10-Jul-2019 13:16:42 ss << "Caching for the new plot: "; build 10-Jul-2019 13:16:42 - if (dataCount > 1 ) ss << std::endl; build 10-Jul-2019 13:16:42 - for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 - ss << PMS::axis(currentY_[i]) << "(" << currentY_[i] << ")"; build 10-Jul-2019 13:16:42 - if (PMS::axisIsData(currentY_[i])) build 10-Jul-2019 13:16:42 + if (currentX_.size() > 1 ) ss << std::endl; build 10-Jul-2019 13:16:42 + for ( size_t i = 0; i < currentX_.size(); i++ ) { build 10-Jul-2019 13:16:42 + PMS::Axis yaxis = currentY_[i]; build 10-Jul-2019 13:16:42 + if ((yaxis == PMS::IMAGESB) && !canPlotImageSideband) { build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + ss << PMS::axis(yaxis) << "(" << yaxis << ")"; build 10-Jul-2019 13:16:42 + if (PMS::axisIsData(yaxis)) build 10-Jul-2019 13:16:42 ss << ":" << PMS::dataColumn(currentYData_[i]); build 10-Jul-2019 13:16:42 - if (PMS::axisIsRaDec(currentY_[i]) ) build 10-Jul-2019 13:16:42 + if (PMS::axisIsRaDec(yaxis) ) build 10-Jul-2019 13:16:42 ss << "[" << "ref=" << PMS::coordSystem(currentYFrame_[i]) << ", " build 10-Jul-2019 13:16:42 << "interp=" << PMS::interpMethod(currentYInterp_[i]) << "]"; build 10-Jul-2019 13:16:42 ss << " vs. " << PMS::axis(currentX_[i]) << "(" << currentX_[i] << ")"; build 10-Jul-2019 13:16:42 @@ -537,8 +592,10 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Ensure all _already-loaded_ axes are in the pending list build 10-Jul-2019 13:16:42 - for (Int i= 0;i& axes, build 10-Jul-2019 13:16:42 auto interp = xyInterp_[i]; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // 1) already in the load list? (loadAxes) build 10-Jul-2019 13:16:42 - if (not PMS::axisIsRaDec(axis)) { build 10-Jul-2019 13:16:42 - for(unsigned int j = 0; !found && j < loadAxes.size(); j++) build 10-Jul-2019 13:16:42 - if(loadAxes[j]==axis && loadData[j]==dc) found = true; build 10-Jul-2019 13:16:42 - if(found) continue; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 - for(unsigned int j = 0; !found && j < loadAxes.size(); j++) build 10-Jul-2019 13:16:42 - if (loadAxes[j]==axis && loadXYFrame_[j]==frame && loadXYInterp_[j]==interp) build 10-Jul-2019 13:16:42 + if (not PMS::axisIsRaDec(axis)) { // check same datacolumn build 10-Jul-2019 13:16:42 + for(unsigned int j = 0; !found && j < loadAxes.size(); j++) { build 10-Jul-2019 13:16:42 + if(loadAxes[j]==axis && loadData[j]==dc) build 10-Jul-2019 13:16:42 found = true; build 10-Jul-2019 13:16:42 - if(found) continue; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (found) build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 + } else { // check same frame, interp for Ra and Dec build 10-Jul-2019 13:16:42 + for(unsigned int j = 0; !found && j < loadAxes.size(); j++) { build 10-Jul-2019 13:16:42 + if (loadAxes[j]==axis && loadXYFrame_[j]==frame && loadXYInterp_[j]==interp) build 10-Jul-2019 13:16:42 + found = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if(found) build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //If ephemeris data is not available we should not load axes build 10-Jul-2019 13:16:42 - //associated with ephemeris data. build 10-Jul-2019 13:16:42 + // If ephemeris data is not available we should not load axes build 10-Jul-2019 13:16:42 + // associated with ephemeris data. build 10-Jul-2019 13:16:42 bool ephemerisAvailable = isEphemeris(); build 10-Jul-2019 13:16:42 - if ( !ephemerisAvailable ){ build 10-Jul-2019 13:16:42 - if ( axis == PMS::RADIAL_VELOCITY || axis == PMS::RHO ){ build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + if (!ephemerisAvailable && (axis == PMS::RADIAL_VELOCITY || axis == PMS::RHO)) { build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // 2) not already loaded? (loadedAxes) build 10-Jul-2019 13:16:42 - if(!loadedAxes_[axis]) { build 10-Jul-2019 13:16:42 + if (!loadedAxes_[axis]) { build 10-Jul-2019 13:16:42 loadAxes.push_back(axis); build 10-Jul-2019 13:16:42 loadData.push_back(dc); build 10-Jul-2019 13:16:42 loadXYFrame_.push_back(frame); build 10-Jul-2019 13:16:42 @@ -628,9 +687,8 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Now Load data if the user doesn't cancel. build 10-Jul-2019 13:16:42 - if(loadAxes.size() > 0) { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 + // Now load data if the user doesn't cancel. build 10-Jul-2019 13:16:42 + if (loadAxes.size() > 0) { build 10-Jul-2019 13:16:42 // Call method that actually does the loading (MS- or Cal-specific) build 10-Jul-2019 13:16:42 loadIt(loadAxes,loadData,thread); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -643,26 +701,11 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 axis = loadAxes[i]; build 10-Jul-2019 13:16:42 loadedAxes_[axis] = true; build 10-Jul-2019 13:16:42 String datacol = PMS::dataColumn(loadData[i]); build 10-Jul-2019 13:16:42 - if(PMS::axisIsData(axis)) build 10-Jul-2019 13:16:42 - loadedAxesData_[axis].defineRecord(datacol, build 10-Jul-2019 13:16:42 - averaging.toRecord()); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if (false) { build 10-Jul-2019 13:16:42 - { build 10-Jul-2019 13:16:42 - cout << "Finally loaded axes: " << flush; build 10-Jul-2019 13:16:42 - Int nload(0); build 10-Jul-2019 13:16:42 - for (Int i= 0;i& axes, build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Setup/revis masks that we use to realize axes relationships build 10-Jul-2019 13:16:42 netAxesMask_.resize( dataCount ); build 10-Jul-2019 13:16:42 - for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 + for ( size_t i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 Vector xmask(4,false); build 10-Jul-2019 13:16:42 Vector ymask(4,false); build 10-Jul-2019 13:16:42 setAxesMask(currentX_[i],xmask); build 10-Jul-2019 13:16:42 @@ -682,7 +725,7 @@ void PlotMSCacheBase::load(const vector& axes, build 10-Jul-2019 13:16:42 // Generate the plot mask from scratch build 10-Jul-2019 13:16:42 deletePlotMask(); build 10-Jul-2019 13:16:42 plmask_.resize( dataCount ); build 10-Jul-2019 13:16:42 - for ( int i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 + for ( size_t i = 0; i < dataCount; i++ ){ build 10-Jul-2019 13:16:42 setPlotMask( i ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -921,6 +964,8 @@ void PlotMSCacheBase::release(const vector& axes) { build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 case PMS::TSKY: PMSC_DELETE(tsky_) build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: PMSC_DELETE(imageSideband_) build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 case PMS::NONE: build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -1065,7 +1110,7 @@ bool PlotMSCacheBase::isIndexerInitialized( PMS::Axis iteraxis, Bool globalXRang build 10-Jul-2019 13:16:42 if ( indexer_[dataIndex].empty()){ build 10-Jul-2019 13:16:42 initialized = false; build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - if ( indexer_[dataIndex][0] == NULL || build 10-Jul-2019 13:16:42 + if ( indexer_[dataIndex][0] == nullptr || build 10-Jul-2019 13:16:42 indexer_[dataIndex][0]->isGlobalXRange() != globalXRange || build 10-Jul-2019 13:16:42 indexer_[dataIndex][0]->isGlobalYRange() != globalYRange ) { build 10-Jul-2019 13:16:42 initialized = false; build 10-Jul-2019 13:16:42 @@ -1253,7 +1298,7 @@ void PlotMSCacheBase::setUpIndexer(PMS::Axis iteraxis, Bool globalXRange, build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 indexer_[dataIndex].resize(nIter); build 10-Jul-2019 13:16:42 - indexer_[dataIndex].set( NULL ); build 10-Jul-2019 13:16:42 + indexer_[dataIndex].set( nullptr ); build 10-Jul-2019 13:16:42 auto useRaDecIndexer = ( build 10-Jul-2019 13:16:42 PMS::axisIsRaDec(currentX_[dataIndex]) or build 10-Jul-2019 13:16:42 PMS::axisIsRaDec(currentY_[dataIndex]) ); build 10-Jul-2019 13:16:42 @@ -1741,6 +1786,9 @@ void PlotMSCacheBase::setCache(Int newnChunk, build 10-Jul-2019 13:16:42 case PMS::TSKY: build 10-Jul-2019 13:16:42 addVectors(tsky_, increaseCache); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: build 10-Jul-2019 13:16:42 + addVectors(imageSideband_, increaseCache); build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 case PMS::NONE: build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -1752,9 +1800,9 @@ void PlotMSCacheBase::addArrays(PtrBlock*>& input, bool increaseCache) build 10-Jul-2019 13:16:42 Int startIdx(0); build 10-Jul-2019 13:16:42 if (increaseCache) { build 10-Jul-2019 13:16:42 startIdx = input.size(); build 10-Jul-2019 13:16:42 - input.resize(nChunk_, false, true); build 10-Jul-2019 13:16:42 + input.resize(nChunk_, /*forceSmaller*/ false, /*copyElements*/ true); build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - input.resize(nChunk_, true, false); build 10-Jul-2019 13:16:42 + input.resize(nChunk_, /*forceSmaller*/ true, /*copyElements*/ false); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // Construct (empty) pointed-to Vectors build 10-Jul-2019 13:16:42 for (Int ic=startIdx; ic*>& input, bool increaseCach build 10-Jul-2019 13:16:42 Int startIdx(0); build 10-Jul-2019 13:16:42 if (increaseCache) { build 10-Jul-2019 13:16:42 startIdx = input.size(); build 10-Jul-2019 13:16:42 - input.resize(nChunk_, false, true); build 10-Jul-2019 13:16:42 + input.resize(nChunk_, /*forceSmaller*/ false, /*copyElements*/ true); build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - input.resize(nChunk_, true, false); build 10-Jul-2019 13:16:42 + input.resize(nChunk_, /*forceSmaller*/ true, /*copyElements*/ false); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // Construct (empty) pointed-to Vectors build 10-Jul-2019 13:16:42 for (Int ic=startIdx; ic*>& input, bool increaseCache build 10-Jul-2019 13:16:42 Int startIdx(0); build 10-Jul-2019 13:16:42 if (increaseCache) { build 10-Jul-2019 13:16:42 startIdx = input.size(); build 10-Jul-2019 13:16:42 - input.resize(nChunk_, false, true); build 10-Jul-2019 13:16:42 + input.resize(nChunk_, /*forceSmaller*/ false, /*copyElements*/ true); build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 - input.resize(nChunk_, true, false); build 10-Jul-2019 13:16:42 + input.resize(nChunk_, /*forceSmaller*/ true, /*copyElements*/ false); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // Construct (empty) pointed-to Vectors build 10-Jul-2019 13:16:42 for (Int ic=startIdx; ic& axismask) { build 10-Jul-2019 13:16:42 case PMS::FEED2: build 10-Jul-2019 13:16:42 case PMS::ATM: build 10-Jul-2019 13:16:42 case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: build 10-Jul-2019 13:16:42 case PMS::NONE: build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -1917,7 +1966,7 @@ void PlotMSCacheBase::setPlotMask( int dataIndex ) { build 10-Jul-2019 13:16:42 // Generate the plot mask build 10-Jul-2019 13:16:42 //deletePlotMask(); build 10-Jul-2019 13:16:42 plmask_[dataIndex].resize(nChunk()); build 10-Jul-2019 13:16:42 - plmask_[dataIndex].set(NULL); build 10-Jul-2019 13:16:42 + plmask_[dataIndex].set(nullptr); build 10-Jul-2019 13:16:42 for (Int ichk=0; ichk(); build 10-Jul-2019 13:16:42 // create a collapsed version of the flags for this chunk build 10-Jul-2019 13:16:42 @@ -2008,42 +2057,34 @@ int PlotMSCacheBase::findColorIndex( int chunk, bool initialize ){ build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSCacheBase::deleteAtm() { build 10-Jul-2019 13:16:42 - if (plotmsAtm_) { build 10-Jul-2019 13:16:42 - delete plotmsAtm_; build 10-Jul-2019 13:16:42 - plotmsAtm_ = NULL; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + delete plotmsAtm_; build 10-Jul-2019 13:16:42 + plotmsAtm_ = nullptr; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSCacheBase::printAtmStats(casacore::Int scan) { build 10-Jul-2019 13:16:42 - if (plotmsAtm_) { build 10-Jul-2019 13:16:42 - stringstream ss; build 10-Jul-2019 13:16:42 - ss << "Atmospheric curve stats for scan " << scan; build 10-Jul-2019 13:16:42 - ss.precision(2); build 10-Jul-2019 13:16:42 - ss << ": PWV " << fixed << plotmsAtm_->getPwv() << " mm, airmass "; build 10-Jul-2019 13:16:42 - ss.precision(3); build 10-Jul-2019 13:16:42 - ss << fixed << plotmsAtm_->getAirmass(); build 10-Jul-2019 13:16:42 - logLoad(ss.str()); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + // print pwv and airmass build 10-Jul-2019 13:16:42 + if (plotmsAtm_) { build 10-Jul-2019 13:16:42 + stringstream ss; build 10-Jul-2019 13:16:42 + ss << "Atmospheric curve stats for scan " << scan; build 10-Jul-2019 13:16:42 + ss.precision(2); build 10-Jul-2019 13:16:42 + ss << ": PWV " << fixed << plotmsAtm_->getPwv() << " mm, airmass "; build 10-Jul-2019 13:16:42 + ss.precision(3); build 10-Jul-2019 13:16:42 + ss << fixed << plotmsAtm_->getAirmass(); build 10-Jul-2019 13:16:42 + logLoad(ss.str()); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -bool PlotMSCacheBase::hasOverlay() { build 10-Jul-2019 13:16:42 - // check loaded axes for overlays build 10-Jul-2019 13:16:42 - bool overlay(false); build 10-Jul-2019 13:16:42 - std::vector axes(loadedAxes()); build 10-Jul-2019 13:16:42 - for (uInt i=0; icanShowImageCurve()); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 template build 10-Jul-2019 13:16:42 T PlotMSCacheBase::checkIndex(int index, const std::vector& v, const std::string &vname) const { build 10-Jul-2019 13:16:42 if (index >= 0 && static_cast(index) < v.size()) return v[index]; build 10-Jul-2019 13:16:42 stringstream ss; build 10-Jul-2019 13:16:42 - ss << __FILE__ << ":" << __FUNCTION__ << "():" << __LINE__ << ": " build 10-Jul-2019 13:16:42 + ss << __FILE__ << ":" << __FUNCTION__ << "():" << __LINE__ << ": " build 10-Jul-2019 13:16:42 << "Illegal access to vector: " << vname << " of size: " << v.size() build 10-Jul-2019 13:16:42 << " with index: " << index ; build 10-Jul-2019 13:16:42 throw AipsError(ss.str()); build 10-Jul-2019 13:16:42 @@ -2054,7 +2095,7 @@ const PlotMSCacheBase::RaDecData & PlotMSCacheBase::getRaDataX(int index) const build 10-Jul-2019 13:16:42 auto axis = checkIndex(index,currentX_,"currentX_"); build 10-Jul-2019 13:16:42 if ( axis != PMS::RA ) { build 10-Jul-2019 13:16:42 stringstream ss; build 10-Jul-2019 13:16:42 - ss << __FILE__ << ":" << __FUNCTION__ << "():" << __LINE__ << ": " build 10-Jul-2019 13:16:42 + ss << __FILE__ << ":" << __FUNCTION__ << "():" << __LINE__ << ": " build 10-Jul-2019 13:16:42 << "Illegal call. Argument index= " << index build 10-Jul-2019 13:16:42 << " but currentX_[" << index << "]=" << PMS::axis(axis); build 10-Jul-2019 13:16:42 throw AipsError(ss.str()); build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/PlotMSCacheBase.h b/code/plotms/Data/PlotMSCacheBase.h build 10-Jul-2019 13:16:42 index f603bab..145c2b0 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/PlotMSCacheBase.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/PlotMSCacheBase.h build 10-Jul-2019 13:16:42 @@ -82,8 +82,7 @@ public: build 10-Jul-2019 13:16:42 // Destructor build 10-Jul-2019 13:16:42 virtual ~PlotMSCacheBase(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Identify myself build 10-Jul-2019 13:16:42 - // (MS or CAL) build 10-Jul-2019 13:16:42 + // Identify myself (MS or CAL) build 10-Jul-2019 13:16:42 virtual PlotMSCacheBase::Type cacheType() const = 0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Access to pol names build 10-Jul-2019 13:16:42 @@ -98,8 +97,10 @@ public: build 10-Jul-2019 13:16:42 int nmetadata() const {return N_METADATA;}; build 10-Jul-2019 13:16:42 PMS::Axis metadata(int i) {return METADATA[i];}; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // loaded ATM or TSKY build 10-Jul-2019 13:16:42 - bool hasOverlay(); build 10-Jul-2019 13:16:42 + // ATM or TSKY axis; for adjusting plot ranges build 10-Jul-2019 13:16:42 + inline bool hasOverlay() { return (plotmsAtm_ != nullptr); } build 10-Jul-2019 13:16:42 + // IMAGESB axis; for axis labels/title (image curve axis not always loaded) build 10-Jul-2019 13:16:42 + bool canShowImageCurve(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Reference an indexer; returns -1 if there is no indexer build 10-Jul-2019 13:16:42 // for the given dataIndex. build 10-Jul-2019 13:16:42 @@ -177,7 +178,7 @@ public: build 10-Jul-2019 13:16:42 /*PlotMSCacheThread**/ThreadCommunication* thread = NULL); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Clears the cache of all stored values. This should be called when the build 10-Jul-2019 13:16:42 - // underlying casacore::MS or casacore::MS selection is changed, thus invalidating stored data. build 10-Jul-2019 13:16:42 + // underlying MS/CalTable or selection is changed, thus invalidating stored data. build 10-Jul-2019 13:16:42 void clear(); build 10-Jul-2019 13:16:42 void clearRanges(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -325,6 +326,7 @@ public: build 10-Jul-2019 13:16:42 // Curve overlays build 10-Jul-2019 13:16:42 inline casacore::Double getAtm(casacore::Int chnk,casacore::Int irel) { return *(atm_[chnk]->data()+irel); }; build 10-Jul-2019 13:16:42 inline casacore::Double getTsky(casacore::Int chnk,casacore::Int irel) { return *(tsky_[chnk]->data()+irel); }; build 10-Jul-2019 13:16:42 + inline casacore::Double getImageSideband(casacore::Int chnk,casacore::Int irel) { return *(imageSideband_[chnk]->data()+irel); }; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 /* -----------------------------------------------------------------------*/ build 10-Jul-2019 13:16:42 /*** Axis-specific generic gets, per chunk (for unit tests) ***/ build 10-Jul-2019 13:16:42 @@ -444,6 +446,7 @@ public: build 10-Jul-2019 13:16:42 // curve overlay axes build 10-Jul-2019 13:16:42 inline casacore::Vector& atm(casacore::Int chnk) { return *(atm_[chnk]); }; build 10-Jul-2019 13:16:42 inline casacore::Vector& tsky(casacore::Int chnk) { return *(tsky_[chnk]); }; build 10-Jul-2019 13:16:42 + inline casacore::Vector& imageSideband(casacore::Int chnk) { return *(imageSideband_[chnk]); }; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 /* -----------------------------------------------------------------------*/ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -663,7 +666,7 @@ protected: build 10-Jul-2019 13:16:42 casacore::Vector radialVelocity_, rho_; build 10-Jul-2019 13:16:42 casacore::Vector az0_,el0_,ha0_,pa0_; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - casacore::PtrBlock*> atm_, tsky_; build 10-Jul-2019 13:16:42 + casacore::PtrBlock*> atm_, tsky_, imageSideband_; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // for cal tables build 10-Jul-2019 13:16:42 casacore::PtrBlock*> par_, snr_; build 10-Jul-2019 13:16:42 @@ -731,7 +734,6 @@ protected: build 10-Jul-2019 13:16:42 // For atm/tsky overlays build 10-Jul-2019 13:16:42 PlotMSAtm* plotmsAtm_; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 private: build 10-Jul-2019 13:16:42 void _updateAntennaMask( casacore::Int a, casacore::Vector& antMask, const casacore::Vector selectedAntennas ); build 10-Jul-2019 13:16:42 bool axisIsValid(PMS::Axis axis, const PlotMSAveraging& averaging); build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/PlotMSIndexer.cc b/code/plotms/Data/PlotMSIndexer.cc build 10-Jul-2019 13:16:42 index 8561f66..41613b4 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/PlotMSIndexer.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/PlotMSIndexer.cc build 10-Jul-2019 13:16:42 @@ -157,8 +157,8 @@ PlotMSIndexer::PlotMSIndexer(PlotMSCacheBase* parent, build 10-Jul-2019 13:16:42 nSegPoints_(),nCumulPoints_(),cacheChunk_(),cacheOffset_(), build 10-Jul-2019 13:16:42 currentX_(xAxis), build 10-Jul-2019 13:16:42 currentY_(yAxis), build 10-Jul-2019 13:16:42 - currentXdata_(xDataColumn), build 10-Jul-2019 13:16:42 - currentYdata_(yDataColumn), build 10-Jul-2019 13:16:42 + currentXdata_(xDataColumn), build 10-Jul-2019 13:16:42 + currentYdata_(yDataColumn), build 10-Jul-2019 13:16:42 indexerReady_(false), build 10-Jul-2019 13:16:42 connectReady_(false), build 10-Jul-2019 13:16:42 icorrmax_(), build 10-Jul-2019 13:16:42 @@ -221,7 +221,8 @@ void PlotMSIndexer::xAndYAt(unsigned int index, double& x, double& y) const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PlotMSIndexer::minsMaxes(double& xMin, double& xMax, double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if (this->size()<1) return false; build 10-Jul-2019 13:16:42 + if (this->size()<1) build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // return the collective (flagged/unflagged) min/max build 10-Jul-2019 13:16:42 // X: build 10-Jul-2019 13:16:42 @@ -245,8 +246,9 @@ bool PlotMSIndexer::minsMaxes(double& xMin, double& xMax, double& yMin, double& build 10-Jul-2019 13:16:42 yMin = min(ymin_, yflmin_); build 10-Jul-2019 13:16:42 yMax = max(ymax_, yflmax_); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - if (plotmscache_->hasOverlay()) build 10-Jul-2019 13:16:42 - adjustYRange(yMin, yMax); build 10-Jul-2019 13:16:42 + if (plotmscache_->hasOverlay()) { build 10-Jul-2019 13:16:42 + adjustYRangeForOverlay(yMin, yMax); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -265,7 +267,8 @@ void PlotMSIndexer::xyAndMaskAt(unsigned int index, double& x, double& y, bool& build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PlotMSIndexer::maskedMinsMaxes(double& xMin, double& xMax, double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if (this->size()<1) return false; build 10-Jul-2019 13:16:42 + if (this->size()<1) build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // return the collective (flagged) min/max build 10-Jul-2019 13:16:42 // X: build 10-Jul-2019 13:16:42 @@ -273,8 +276,7 @@ bool PlotMSIndexer::maskedMinsMaxes(double& xMin, double& xMax, double& yMin, do build 10-Jul-2019 13:16:42 // Use globals from the cache build 10-Jul-2019 13:16:42 xMin = plotmscache_->xflminG_[dataIndex_]; build 10-Jul-2019 13:16:42 xMax = plotmscache_->xflmaxG_[dataIndex_]; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 // get local ones build 10-Jul-2019 13:16:42 xMin = xflmin_; build 10-Jul-2019 13:16:42 xMax = xflmax_; build 10-Jul-2019 13:16:42 @@ -284,14 +286,13 @@ bool PlotMSIndexer::maskedMinsMaxes(double& xMin, double& xMax, double& yMin, do build 10-Jul-2019 13:16:42 // Use globals from the cache build 10-Jul-2019 13:16:42 yMin = plotmscache_->yflminG_[dataIndex_]; build 10-Jul-2019 13:16:42 yMax = plotmscache_->yflmaxG_[dataIndex_]; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 // use local ones build 10-Jul-2019 13:16:42 yMin = yflmin_; build 10-Jul-2019 13:16:42 yMax = yflmax_; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 if (plotmscache_->hasOverlay()) build 10-Jul-2019 13:16:42 - adjustYRange(yMin, yMax); build 10-Jul-2019 13:16:42 + adjustYRangeForOverlay(yMin, yMax); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -300,18 +301,25 @@ bool PlotMSIndexer::maskedMinsMaxes(double& xMin, double& xMax, double& yMin, do build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PlotMSIndexer::maskedMinsMaxesRaw(double& xMin, double& xMax, build 10-Jul-2019 13:16:42 double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 - if (this->size()<1) return false; build 10-Jul-2019 13:16:42 + if (this->size()<1) build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 xMin=xflmin_; build 10-Jul-2019 13:16:42 xMax=xflmax_; build 10-Jul-2019 13:16:42 yMin=yflmin_; build 10-Jul-2019 13:16:42 yMax=yflmax_; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (plotmscache_->hasOverlay()) { build 10-Jul-2019 13:16:42 + adjustYRangeForOverlay(yMin, yMax); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PlotMSIndexer::unmaskedMinsMaxes(double& xMin, double& xMax, build 10-Jul-2019 13:16:42 double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - if (this->size()<1) return false; build 10-Jul-2019 13:16:42 + if (this->size()<1) build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // return the collective (unflagged) min/max build 10-Jul-2019 13:16:42 // X: build 10-Jul-2019 13:16:42 @@ -319,8 +327,7 @@ bool PlotMSIndexer::unmaskedMinsMaxes(double& xMin, double& xMax, build 10-Jul-2019 13:16:42 // Use globals from the cache build 10-Jul-2019 13:16:42 xMin = plotmscache_->xminG_[dataIndex_]; build 10-Jul-2019 13:16:42 xMax = plotmscache_->xmaxG_[dataIndex_]; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 // get local ones build 10-Jul-2019 13:16:42 xMin = xmin_; build 10-Jul-2019 13:16:42 xMax = xmax_; build 10-Jul-2019 13:16:42 @@ -331,38 +338,41 @@ bool PlotMSIndexer::unmaskedMinsMaxes(double& xMin, double& xMax, build 10-Jul-2019 13:16:42 // Use globals from the cache build 10-Jul-2019 13:16:42 yMin = plotmscache_->yminG_[dataIndex_]; build 10-Jul-2019 13:16:42 yMax = plotmscache_->ymaxG_[dataIndex_]; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 // get local ones build 10-Jul-2019 13:16:42 yMin = ymin_; build 10-Jul-2019 13:16:42 yMax = ymax_; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - if (plotmscache_->hasOverlay()) build 10-Jul-2019 13:16:42 - adjustYRange(yMin, yMax); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (plotmscache_->hasOverlay()) { build 10-Jul-2019 13:16:42 + adjustYRangeForOverlay(yMin, yMax); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSIndexer::adjustYRange(double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 - double range = yMax-yMin; build 10-Jul-2019 13:16:42 +void PlotMSIndexer::adjustYRangeForOverlay(double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 + // add margin to top of non-overlay axis build 10-Jul-2019 13:16:42 if (!PMS::axisIsOverlay(currentY_)) { build 10-Jul-2019 13:16:42 - // add margin to top of non-overlay axis build 10-Jul-2019 13:16:42 - yMax += range * 0.25; build 10-Jul-2019 13:16:42 - } else { build 10-Jul-2019 13:16:42 - // add margin to bottom of overlay axis build 10-Jul-2019 13:16:42 - if (range < 5.0) range = 5.0; build 10-Jul-2019 13:16:42 - yMin -= range*2.0; build 10-Jul-2019 13:16:42 - if (yMin < 0.0) yMin = 0.0; build 10-Jul-2019 13:16:42 + double yrange = yMax - yMin; build 10-Jul-2019 13:16:42 + yMax += yrange * 0.25; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PlotMSIndexer::unmaskedMinsMaxesRaw(double& xMin, double& xMax, build 10-Jul-2019 13:16:42 - double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 - if (this->size()<1) return false; build 10-Jul-2019 13:16:42 + double& yMin, double& yMax) { build 10-Jul-2019 13:16:42 + if (this->size()<1) build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 xMin=xmin_; build 10-Jul-2019 13:16:42 xMax=xmax_; build 10-Jul-2019 13:16:42 yMin=ymin_; build 10-Jul-2019 13:16:42 yMax=ymax_; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (plotmscache_->hasOverlay()) { build 10-Jul-2019 13:16:42 + adjustYRangeForOverlay(yMin, yMax); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -401,7 +411,7 @@ unsigned int PlotMSIndexer::binAt(unsigned int i) const { build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 binValue = connectBinAt(i); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 return binValue; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -474,12 +484,15 @@ void PlotMSIndexer::setUpIndexing() { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 nperchan_.resize(nChunk()); build 10-Jul-2019 13:16:42 nperchan_.set(1); build 10-Jul-2019 13:16:42 - if (plotmscache_->netAxesMask_[dataIndex_](0)) nperchan_ *= chsh.row(0); build 10-Jul-2019 13:16:42 + if (plotmscache_->netAxesMask_[dataIndex_](0)) build 10-Jul-2019 13:16:42 + nperchan_ *= chsh.row(0); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 nperbsln_.resize(nChunk()); build 10-Jul-2019 13:16:42 nperbsln_.set(1); build 10-Jul-2019 13:16:42 - if (plotmscache_->netAxesMask_[dataIndex_](0)) nperbsln_ *= chsh.row(0); build 10-Jul-2019 13:16:42 - if (plotmscache_->netAxesMask_[dataIndex_](1)) nperbsln_ *= chsh.row(1); build 10-Jul-2019 13:16:42 + if (plotmscache_->netAxesMask_[dataIndex_](0)) build 10-Jul-2019 13:16:42 + nperbsln_ *= chsh.row(0); build 10-Jul-2019 13:16:42 + if (plotmscache_->netAxesMask_[dataIndex_](1)) build 10-Jul-2019 13:16:42 + nperbsln_ *= chsh.row(1); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 nperant_.reference(nperbsln_); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1289,6 +1302,9 @@ void PlotMSIndexer::setMethod(CacheMemPtr& getmethod,PMS::Axis axis, build 10-Jul-2019 13:16:42 case PMS::TSKY: build 10-Jul-2019 13:16:42 getmethod = &PlotMSCacheBase::getTsky; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: build 10-Jul-2019 13:16:42 + getmethod = &PlotMSCacheBase::getImageSideband; build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 default: build 10-Jul-2019 13:16:42 throw(AipsError("Can't find get method for "+PMS::axis(axis)+".")); build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 @@ -1354,6 +1370,7 @@ void PlotMSIndexer::setIndexer(IndexerMethPtr& indexmethod,PMS::Axis axis) { build 10-Jul-2019 13:16:42 case PMS::CHANNEL: build 10-Jul-2019 13:16:42 case PMS::ATM: build 10-Jul-2019 13:16:42 case PMS::TSKY: build 10-Jul-2019 13:16:42 + case PMS::IMAGESB: build 10-Jul-2019 13:16:42 indexmethod = &PlotMSIndexer::getIndex0100; build 10-Jul-2019 13:16:42 break; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Data/PlotMSIndexer.h b/code/plotms/Data/PlotMSIndexer.h build 10-Jul-2019 13:16:42 index 31de300..92aa1da 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Data/PlotMSIndexer.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/Data/PlotMSIndexer.h build 10-Jul-2019 13:16:42 @@ -226,7 +226,7 @@ private: build 10-Jul-2019 13:16:42 void computeRanges(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Adjust the Y range for overlays to make room at top of plot build 10-Jul-2019 13:16:42 - void adjustYRange(double& yMin, double& yMax); build 10-Jul-2019 13:16:42 + void adjustYRangeForOverlay(double& yMin, double& yMax); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Compute baseline's length in meters between ant1 and ant2 build 10-Jul-2019 13:16:42 casacore::Double computeBaselineLength(casacore::Int ant1, casacore::Int ant2); build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Gui/PlotMSAxisWidget.cc b/code/plotms/Gui/PlotMSAxisWidget.cc build 10-Jul-2019 13:16:42 index 482c852..611e254 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Gui/PlotMSAxisWidget.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Gui/PlotMSAxisWidget.cc build 10-Jul-2019 13:16:42 @@ -50,8 +50,8 @@ PlotMSAxisWidget::PlotMSAxisWidget(PMS::Axis defaultAxis, int attachAxes, build 10-Jul-2019 13:16:42 // Setup axes choices build 10-Jul-2019 13:16:42 const vector& axes = PMS::axesStrings(); build 10-Jul-2019 13:16:42 String def = PMS::axis(defaultAxis); build 10-Jul-2019 13:16:42 - // Hiding the last two axes (overlays) from the user.... build 10-Jul-2019 13:16:42 - for(unsigned int i = 0; i < axes.size()-3; i++) { build 10-Jul-2019 13:16:42 + // Hide the last axes (overlays) from the user.... build 10-Jul-2019 13:16:42 + for (int i = 0; i < PMS::ATM; i++) { build 10-Jul-2019 13:16:42 chooser->addItem(axes[i].c_str()); build 10-Jul-2019 13:16:42 if(axes[i] == def) chooser->setCurrentIndex(i); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Gui/PlotMSPlotter.cc b/code/plotms/Gui/PlotMSPlotter.cc build 10-Jul-2019 13:16:42 index 3b87ed9..dab1d1d 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Gui/PlotMSPlotter.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Gui/PlotMSPlotter.cc build 10-Jul-2019 13:16:42 @@ -900,5 +900,23 @@ void PlotMSPlotter::gridSizeChanged( int rowCount, int colCount ){ build 10-Jul-2019 13:16:42 itsPlotTab_->setGridSize(rowCount, colCount); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 +void PlotMSPlotter::grpc_handle_op( ) { build 10-Jul-2019 13:16:42 + std::lock_guard exc(grpc_queue_mutex); build 10-Jul-2019 13:16:42 + if ( ! grpc_queue.empty( ) ) { build 10-Jul-2019 13:16:42 + std::function f = grpc_queue.front( ); build 10-Jul-2019 13:16:42 + grpc_queue.pop( ); build 10-Jul-2019 13:16:42 + f( ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +void PlotMSPlotter::grpc_exit_now( ) { build 10-Jul-2019 13:16:42 + close( ); build 10-Jul-2019 13:16:42 + itsParent_->quitApplication( ); build 10-Jul-2019 13:16:42 + QCoreApplication::exit( ); build 10-Jul-2019 13:16:42 + exit(0); build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Gui/PlotMSPlotter.qo.h b/code/plotms/Gui/PlotMSPlotter.qo.h build 10-Jul-2019 13:16:42 index b0bb5ce..dcd7704 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Gui/PlotMSPlotter.qo.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/Gui/PlotMSPlotter.qo.h build 10-Jul-2019 13:16:42 @@ -38,6 +38,11 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 namespace casa { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -215,7 +220,15 @@ public slots: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 virtual bool close(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + void grpc_handle_op( ); build 10-Jul-2019 13:16:42 + void grpc_exit_now( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +public: build 10-Jul-2019 13:16:42 + std::mutex grpc_queue_mutex; build 10-Jul-2019 13:16:42 + std::queue> grpc_queue; build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 protected: build 10-Jul-2019 13:16:42 // Overrides QWidget::closeEvent(), in case we're dealing with a plotter build 10-Jul-2019 13:16:42 // that isn't Qt and thus is in its own window (and possibly its own build 10-Jul-2019 13:16:42 diff --git a/code/plotms/GuiTabs/PlotMSAxesTab.cc b/code/plotms/GuiTabs/PlotMSAxesTab.cc build 10-Jul-2019 13:16:42 index 7d8ed3c..4b58fc1 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/GuiTabs/PlotMSAxesTab.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/GuiTabs/PlotMSAxesTab.cc build 10-Jul-2019 13:16:42 @@ -62,9 +62,10 @@ PlotMSAxesTab::PlotMSAxesTab(PlotMSPlotTab* plotTab, PlotMSPlotter* parent) : build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Connect widgets. build 10-Jul-2019 13:16:42 connect(itsXWidget_, SIGNAL(axisChanged()), SIGNAL(changed())); build 10-Jul-2019 13:16:42 - connect(noneRadio, SIGNAL(toggled(bool)), SIGNAL(changed())); build 10-Jul-2019 13:16:42 - connect(atmRadio, SIGNAL(toggled(bool)), SIGNAL(changed())); build 10-Jul-2019 13:16:42 - connect(tskyRadio, SIGNAL(toggled(bool)), SIGNAL(changed())); build 10-Jul-2019 13:16:42 + connect(noneRadio, SIGNAL(toggled(bool)), SLOT(overlayChanged())); build 10-Jul-2019 13:16:42 + connect(atmRadio, SIGNAL(toggled(bool)), SLOT(overlayChanged())); build 10-Jul-2019 13:16:42 + connect(tskyRadio, SIGNAL(toggled(bool)), SLOT(overlayChanged())); build 10-Jul-2019 13:16:42 + connect(imageSbCheckBox, SIGNAL(toggled(bool)), SLOT(overlayChanged())); build 10-Jul-2019 13:16:42 connect(addYButton, SIGNAL(clicked()), this, SLOT(addYWidget())); build 10-Jul-2019 13:16:42 connect(removeYButton, SIGNAL(clicked()), this, SLOT(removeYWidget())); build 10-Jul-2019 13:16:42 connect(yAxisCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(yAxisSelected(int))); build 10-Jul-2019 13:16:42 @@ -74,127 +75,118 @@ PlotMSAxesTab::PlotMSAxesTab(PlotMSPlotTab* plotTab, PlotMSPlotter* parent) : build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAxesTab::setMultipleAxesYEnabled(){ build 10-Jul-2019 13:16:42 - bool multipleYAxes = false; build 10-Jul-2019 13:16:42 - if ( itsYWidgets_.size() > 1 ){ build 10-Jul-2019 13:16:42 - multipleYAxes = true; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - yAxisLabel->setVisible( multipleYAxes ); build 10-Jul-2019 13:16:42 - yAxisCombo->setVisible( multipleYAxes ); build 10-Jul-2019 13:16:42 - removeYButton->setVisible( multipleYAxes ); build 10-Jul-2019 13:16:42 + bool multipleYAxes = false; build 10-Jul-2019 13:16:42 + if ( itsYWidgets_.size() > 1 ){ build 10-Jul-2019 13:16:42 + multipleYAxes = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + yAxisLabel->setVisible( multipleYAxes ); build 10-Jul-2019 13:16:42 + yAxisCombo->setVisible( multipleYAxes ); build 10-Jul-2019 13:16:42 + removeYButton->setVisible( multipleYAxes ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAxesTab::yAxisSelected( int index ){ build 10-Jul-2019 13:16:42 - //Remove the current y-widget from the display and build 10-Jul-2019 13:16:42 - //put in the newly selected one. build 10-Jul-2019 13:16:42 - QLayout* yAxisLayout = yAxisFrame->layout(); build 10-Jul-2019 13:16:42 - if ( yAxisLayout == NULL ){ build 10-Jul-2019 13:16:42 - yAxisLayout = new QVBoxLayout(); build 10-Jul-2019 13:16:42 - yAxisLayout->setContentsMargins(0, 0, 0, 0); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 - QLayoutItem* layoutItem = yAxisLayout->takeAt( 0 ); build 10-Jul-2019 13:16:42 - if ( layoutItem != NULL ){ build 10-Jul-2019 13:16:42 - QWidget* widget = layoutItem->widget(); build 10-Jul-2019 13:16:42 - if ( widget != NULL ){ build 10-Jul-2019 13:16:42 - widget->setParent( NULL ); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - delete layoutItem; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - yAxisLayout->addWidget( itsYWidgets_[index]); build 10-Jul-2019 13:16:42 - yAxisFrame->setLayout( yAxisLayout ); build 10-Jul-2019 13:16:42 + //Remove the current y-widget from the display and build 10-Jul-2019 13:16:42 + //put in the newly selected one. build 10-Jul-2019 13:16:42 + QLayout* yAxisLayout = yAxisFrame->layout(); build 10-Jul-2019 13:16:42 + if ( yAxisLayout == NULL ){ build 10-Jul-2019 13:16:42 + yAxisLayout = new QVBoxLayout(); build 10-Jul-2019 13:16:42 + yAxisLayout->setContentsMargins(0, 0, 0, 0); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + QLayoutItem* layoutItem = yAxisLayout->takeAt( 0 ); build 10-Jul-2019 13:16:42 + if ( layoutItem != NULL ){ build 10-Jul-2019 13:16:42 + QWidget* widget = layoutItem->widget(); build 10-Jul-2019 13:16:42 + if ( widget != NULL ){ build 10-Jul-2019 13:16:42 + widget->setParent( NULL ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + delete layoutItem; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + yAxisLayout->addWidget( itsYWidgets_[index]); build 10-Jul-2019 13:16:42 + yAxisFrame->setLayout( yAxisLayout ); build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +void PlotMSAxesTab::overlayChanged() { build 10-Jul-2019 13:16:42 + imageSbCheckBox->setEnabled(atmRadio->isChecked() || tskyRadio->isChecked()); build 10-Jul-2019 13:16:42 + emit changed(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAxesTab::removeYWidget(){ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Remove the item from the combo build 10-Jul-2019 13:16:42 - int removeIndex = yAxisCombo->currentIndex(); build 10-Jul-2019 13:16:42 - yAxisCombo->removeItem( removeIndex ); build 10-Jul-2019 13:16:42 + //Remove the item from the combo build 10-Jul-2019 13:16:42 + int removeIndex = yAxisCombo->currentIndex(); build 10-Jul-2019 13:16:42 + yAxisCombo->removeItem( removeIndex ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Remove the widget build 10-Jul-2019 13:16:42 - PlotMSAxisWidget* removeWidget = itsYWidgets_[removeIndex]; build 10-Jul-2019 13:16:42 - itsYWidgets_.removeAt( removeIndex ); build 10-Jul-2019 13:16:42 + //Remove the widget build 10-Jul-2019 13:16:42 + PlotMSAxisWidget* removeWidget = itsYWidgets_[removeIndex]; build 10-Jul-2019 13:16:42 + itsYWidgets_.removeAt( removeIndex ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Reset the selected y-widget. build 10-Jul-2019 13:16:42 - int currentIndex = yAxisCombo->currentIndex(); build 10-Jul-2019 13:16:42 - yAxisSelected( currentIndex ); build 10-Jul-2019 13:16:42 + //Reset the selected y-widget. build 10-Jul-2019 13:16:42 + int currentIndex = yAxisCombo->currentIndex(); build 10-Jul-2019 13:16:42 + yAxisSelected( currentIndex ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - setMultipleAxesYEnabled(); build 10-Jul-2019 13:16:42 - emit yAxisIdentifierRemoved( removeIndex ); build 10-Jul-2019 13:16:42 - delete removeWidget; build 10-Jul-2019 13:16:42 - emit changed(); build 10-Jul-2019 13:16:42 + setMultipleAxesYEnabled(); build 10-Jul-2019 13:16:42 + emit yAxisIdentifierRemoved( removeIndex ); build 10-Jul-2019 13:16:42 + delete removeWidget; build 10-Jul-2019 13:16:42 + emit changed(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSAxesTab::setYAxisLabel( PlotMSAxisWidget* yWidget, build 10-Jul-2019 13:16:42 - int /*index*/ ){ build 10-Jul-2019 13:16:42 - /*QString numberStr = ""; build 10-Jul-2019 13:16:42 - if ( index > 0 ){ build 10-Jul-2019 13:16:42 - numberStr = QString::number( index+1 ); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - QString axisLabel = "Y Axis "+ numberStr; build 10-Jul-2019 13:16:42 - yWidget->axisLabel()->setText( axisLabel + ":" );*/ build 10-Jul-2019 13:16:42 - QString identifier = yWidget->getIdentifier(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - yAxisCombo->addItem( identifier ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +void PlotMSAxesTab::setYAxisLabel( PlotMSAxisWidget* yWidget, int /*index*/ ){ build 10-Jul-2019 13:16:42 + QString identifier = yWidget->getIdentifier(); build 10-Jul-2019 13:16:42 + yAxisCombo->addItem( identifier ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAxesTab::addYWidget(){ build 10-Jul-2019 13:16:42 - PlotMSAxisWidget* yWidget = new PlotMSAxisWidget(PMS::DEFAULT_YAXIS, Y_LEFT | Y_RIGHT ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - int index = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - yWidget->insertLabelDefaults( itsLabelDefaults_ ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - itsYWidgets_.append( yWidget ); build 10-Jul-2019 13:16:42 - setYAxisLabel( yWidget, index); build 10-Jul-2019 13:16:42 - yAxisCombo->setCurrentIndex( index ); build 10-Jul-2019 13:16:42 + PlotMSAxisWidget* yWidget = new PlotMSAxisWidget(PMS::DEFAULT_YAXIS, Y_LEFT | Y_RIGHT ); build 10-Jul-2019 13:16:42 + int index = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 + yWidget->insertLabelDefaults( itsLabelDefaults_ ); build 10-Jul-2019 13:16:42 + itsYWidgets_.append( yWidget ); build 10-Jul-2019 13:16:42 + setYAxisLabel( yWidget, index); build 10-Jul-2019 13:16:42 + yAxisCombo->setCurrentIndex( index ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - setMultipleAxesYEnabled(); build 10-Jul-2019 13:16:42 + setMultipleAxesYEnabled(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - connect(yWidget, SIGNAL(axisChanged()), SIGNAL(changed())); build 10-Jul-2019 13:16:42 - connect(yWidget, SIGNAL(axisIdentifierChanged(PlotMSAxisWidget*)), build 10-Jul-2019 13:16:42 - this, SLOT(axisIdentifierChanged(PlotMSAxisWidget*))); build 10-Jul-2019 13:16:42 - //Because we may not have been able to connect to listeners when we build 10-Jul-2019 13:16:42 - //had just one y-axis, let them know the first one exists, too. build 10-Jul-2019 13:16:42 - if ( index <= 1 ){ build 10-Jul-2019 13:16:42 - emit yAxisIdentifierChanged( 0, itsYWidgets_[0]->getIdentifier()); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - emit yAxisIdentifierChanged( index, yWidget->getIdentifier()); build 10-Jul-2019 13:16:42 - emit changed(); build 10-Jul-2019 13:16:42 + connect(yWidget, SIGNAL(axisChanged()), SIGNAL(changed())); build 10-Jul-2019 13:16:42 + connect(yWidget, SIGNAL(axisIdentifierChanged(PlotMSAxisWidget*)), build 10-Jul-2019 13:16:42 + this, SLOT(axisIdentifierChanged(PlotMSAxisWidget*))); build 10-Jul-2019 13:16:42 + //Because we may not have been able to connect to listeners when we build 10-Jul-2019 13:16:42 + //had just one y-axis, let them know the first one exists, too. build 10-Jul-2019 13:16:42 + if ( index <= 1 ){ build 10-Jul-2019 13:16:42 + emit yAxisIdentifierChanged( 0, itsYWidgets_[0]->getIdentifier()); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + emit yAxisIdentifierChanged( index, yWidget->getIdentifier()); build 10-Jul-2019 13:16:42 + emit changed(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSAxesTab::~PlotMSAxesTab() { build 10-Jul-2019 13:16:42 - while( ! itsYWidgets_.isEmpty() ){ build 10-Jul-2019 13:16:42 - PlotMSAxisWidget* widget = itsYWidgets_.takeAt(0 ); build 10-Jul-2019 13:16:42 - widget->setParent( NULL ); build 10-Jul-2019 13:16:42 - delete widget; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + while( ! itsYWidgets_.isEmpty() ){ build 10-Jul-2019 13:16:42 + PlotMSAxisWidget* widget = itsYWidgets_.takeAt(0 ); build 10-Jul-2019 13:16:42 + widget->setParent( NULL ); build 10-Jul-2019 13:16:42 + delete widget; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PlotMSAxesTab::isAxesValid() const { build 10-Jul-2019 13:16:42 - bool axesValid = true; build 10-Jul-2019 13:16:42 - QList uniqueYWidgets; build 10-Jul-2019 13:16:42 - bool found = false; build 10-Jul-2019 13:16:42 - for ( int i = 0; i < itsYWidgets_.size(); i++ ){ build 10-Jul-2019 13:16:42 - found = false; build 10-Jul-2019 13:16:42 - for ( int j = 0; j < uniqueYWidgets.size(); j++ ){ build 10-Jul-2019 13:16:42 - if ( uniqueYWidgets[j]->matchesData( itsYWidgets_[i])){ build 10-Jul-2019 13:16:42 - found = true; build 10-Jul-2019 13:16:42 - break; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - if ( found ){ build 10-Jul-2019 13:16:42 - break; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 - uniqueYWidgets.append( itsYWidgets_[i]); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - if ( found ){ build 10-Jul-2019 13:16:42 - axesValid = false; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - return axesValid; build 10-Jul-2019 13:16:42 + bool axesValid = true; build 10-Jul-2019 13:16:42 + QList uniqueYWidgets; build 10-Jul-2019 13:16:42 + bool found = false; build 10-Jul-2019 13:16:42 + for ( int i = 0; i < itsYWidgets_.size(); i++ ){ build 10-Jul-2019 13:16:42 + found = false; build 10-Jul-2019 13:16:42 + for ( int j = 0; j < uniqueYWidgets.size(); j++ ){ build 10-Jul-2019 13:16:42 + if ( uniqueYWidgets[j]->matchesData( itsYWidgets_[i])){ build 10-Jul-2019 13:16:42 + found = true; build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ( found ){ build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + uniqueYWidgets.append( itsYWidgets_[i]); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ( found ){ build 10-Jul-2019 13:16:42 + axesValid = false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + return axesValid; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -203,226 +195,247 @@ void PlotMSAxesTab::getValue(PlotMSPlotParameters& params) const { build 10-Jul-2019 13:16:42 PMS_PP_Axes* a = params.typedGroup(); build 10-Jul-2019 13:16:42 PMS_PP_MSData* d = params.typedGroup(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if(c == NULL) { build 10-Jul-2019 13:16:42 + if (c == NULL) { build 10-Jul-2019 13:16:42 params.setGroup(); build 10-Jul-2019 13:16:42 c = params.typedGroup(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - if(a == NULL) { build 10-Jul-2019 13:16:42 + if (a == NULL) { build 10-Jul-2019 13:16:42 params.setGroup(); build 10-Jul-2019 13:16:42 a = params.typedGroup(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - if(d == NULL) { build 10-Jul-2019 13:16:42 + if (d == NULL) { build 10-Jul-2019 13:16:42 params.setGroup(); build 10-Jul-2019 13:16:42 d = params.typedGroup(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 //The cache must have exactly as many x-axes as y-axes so we duplicate build 10-Jul-2019 13:16:42 //the x-axis properties here. build 10-Jul-2019 13:16:42 int yAxisCount = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - PMS::Axis xAxis = itsXWidget_->axis(); build 10-Jul-2019 13:16:42 - c->resize( yAxisCount ); build 10-Jul-2019 13:16:42 - a->resize( yAxisCount ); build 10-Jul-2019 13:16:42 - for ( int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 - c->setXAxis(xAxis, itsXWidget_->data(), i); build 10-Jul-2019 13:16:42 - c->setXInterp(itsXWidget_->interpMethod(),i); build 10-Jul-2019 13:16:42 - c->setXFrame(itsXWidget_->refFrame(),i); build 10-Jul-2019 13:16:42 - a->setXAxis(itsXWidget_->attachAxis(), i); build 10-Jul-2019 13:16:42 - a->setXRange(itsXWidget_->rangeCustom(), itsXWidget_->range(), i); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + PMS::Axis xAxis = itsXWidget_->axis(); build 10-Jul-2019 13:16:42 + c->resize( yAxisCount ); build 10-Jul-2019 13:16:42 + a->resize( yAxisCount ); build 10-Jul-2019 13:16:42 + for ( int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 + c->setXAxis(xAxis, itsXWidget_->data(), i); build 10-Jul-2019 13:16:42 + c->setXInterp(itsXWidget_->interpMethod(),i); build 10-Jul-2019 13:16:42 + c->setXFrame(itsXWidget_->refFrame(),i); build 10-Jul-2019 13:16:42 + a->setXAxis(itsXWidget_->attachAxis(), i); build 10-Jul-2019 13:16:42 + a->setXRange(itsXWidget_->rangeCustom(), itsXWidget_->range(), i); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for ( int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 - c->setYAxis(itsYWidgets_[i]->axis(), itsYWidgets_[i]->data(), i); build 10-Jul-2019 13:16:42 - c->setYInterp(itsYWidgets_[i]->interpMethod(),i); build 10-Jul-2019 13:16:42 - c->setYFrame(itsYWidgets_[i]->refFrame(),i); build 10-Jul-2019 13:16:42 - a->setYAxis(itsYWidgets_[i]->attachAxis(), i); build 10-Jul-2019 13:16:42 - a->setYRange(itsYWidgets_[i]->rangeCustom(), itsYWidgets_[i]->range(), i); build 10-Jul-2019 13:16:42 + c->setYAxis(itsYWidgets_[i]->axis(), itsYWidgets_[i]->data(), i); build 10-Jul-2019 13:16:42 + c->setYInterp(itsYWidgets_[i]->interpMethod(),i); build 10-Jul-2019 13:16:42 + c->setYFrame(itsYWidgets_[i]->refFrame(),i); build 10-Jul-2019 13:16:42 + a->setYAxis(itsYWidgets_[i]->attachAxis(), i); build 10-Jul-2019 13:16:42 + a->setYRange(itsYWidgets_[i]->rangeCustom(), itsYWidgets_[i]->range(), i); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool showatm(atmRadio->isChecked()); build 10-Jul-2019 13:16:42 bool showtsky(tskyRadio->isChecked()); build 10-Jul-2019 13:16:42 + bool overlay(showatm || showtsky); build 10-Jul-2019 13:16:42 + bool showimage(imageSbCheckBox->isChecked() && overlay); build 10-Jul-2019 13:16:42 c->setShowAtm(showatm); build 10-Jul-2019 13:16:42 c->setShowTsky(showtsky); build 10-Jul-2019 13:16:42 - if (showatm || showtsky) { build 10-Jul-2019 13:16:42 - // add ATM yaxis "under the hood" for GUI client build 10-Jul-2019 13:16:42 + c->setShowImage(showimage); build 10-Jul-2019 13:16:42 + if (overlay) { build 10-Jul-2019 13:16:42 + // add ATM/TSKY/IMAGESB yaxis "under the hood" for GUI client build 10-Jul-2019 13:16:42 if (xAxis==PMS::CHANNEL || build 10-Jul-2019 13:16:42 xAxis==PMS::FREQUENCY) { build 10-Jul-2019 13:16:42 - PMS::Axis atmAxis = (showatm ? PMS::ATM : PMS::TSKY); build 10-Jul-2019 13:16:42 - bool found(false); build 10-Jul-2019 13:16:42 + PMS::Axis overlayAxis = (showatm ? PMS::ATM : PMS::TSKY); build 10-Jul-2019 13:16:42 + bool foundOverlayAxis(false), foundImageAxis(false); build 10-Jul-2019 13:16:42 const vector yAxes = c->yAxes(); build 10-Jul-2019 13:16:42 for (uInt i=0; inumXAxes(); build 10-Jul-2019 13:16:42 - c->setAxes(xAxis, atmAxis, c->xDataColumn(0), PMS::DEFAULT_DATACOLUMN, index); build 10-Jul-2019 13:16:42 + c->setAxes(xAxis, overlayAxis, c->xDataColumn(0), PMS::DEFAULT_DATACOLUMN, index); build 10-Jul-2019 13:16:42 // set Axes positions build 10-Jul-2019 13:16:42 a->resize(index+1, true); // copy values for index 0 build 10-Jul-2019 13:16:42 a->setAxes(a->xAxis(index-1), Y_RIGHT, index); build 10-Jul-2019 13:16:42 - // keep same xaxis range build 10-Jul-2019 13:16:42 - a->setXRange(itsXWidget_->rangeCustom(), itsXWidget_->range(), index); build 10-Jul-2019 13:16:42 + // keep same xaxis range build 10-Jul-2019 13:16:42 + a->setXRange(itsXWidget_->rangeCustom(), itsXWidget_->range(), index); build 10-Jul-2019 13:16:42 // set Display symbol color build 10-Jul-2019 13:16:42 PMS_PP_Display* disp = params.typedGroup(); build 10-Jul-2019 13:16:42 - PlotSymbolPtr atmSymbol = disp->unflaggedSymbol(index); build 10-Jul-2019 13:16:42 - atmSymbol->setSymbol("circle"); build 10-Jul-2019 13:16:42 - atmSymbol->setColor("#FF00FF"); build 10-Jul-2019 13:16:42 - disp->setUnflaggedSymbol(atmSymbol, index); build 10-Jul-2019 13:16:42 + PlotSymbolPtr overlaySymbol = disp->unflaggedSymbol(index); build 10-Jul-2019 13:16:42 + overlaySymbol->setSymbol("circle"); build 10-Jul-2019 13:16:42 + overlaySymbol->setColor("#FF00FF"); // magenta build 10-Jul-2019 13:16:42 + disp->setUnflaggedSymbol(overlaySymbol, index); build 10-Jul-2019 13:16:42 PlotSymbolPtr flaggedSymbol = disp->flaggedSymbol(); build 10-Jul-2019 13:16:42 disp->setFlaggedSymbol(flaggedSymbol, index); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + if (showimage && !foundImageAxis) { build 10-Jul-2019 13:16:42 + // add axis to Cache axes build 10-Jul-2019 13:16:42 + int index = c->numXAxes(); build 10-Jul-2019 13:16:42 + c->setAxes(xAxis, PMS::IMAGESB, c->xDataColumn(0), PMS::DEFAULT_DATACOLUMN, index); build 10-Jul-2019 13:16:42 + // set Axes positions build 10-Jul-2019 13:16:42 + a->resize(index+1, true); // copy values for index 0 build 10-Jul-2019 13:16:42 + a->setAxes(a->xAxis(index-1), Y_RIGHT, index); build 10-Jul-2019 13:16:42 + // keep same xaxis range build 10-Jul-2019 13:16:42 + a->setXRange(itsXWidget_->rangeCustom(), itsXWidget_->range(), index); build 10-Jul-2019 13:16:42 + // set Display symbol color build 10-Jul-2019 13:16:42 + PMS_PP_Display* disp = params.typedGroup(); build 10-Jul-2019 13:16:42 + PlotSymbolPtr imageSymbol = disp->unflaggedSymbol(index); build 10-Jul-2019 13:16:42 + imageSymbol->setSymbol("circle"); build 10-Jul-2019 13:16:42 + imageSymbol->setColor("#000000"); // black build 10-Jul-2019 13:16:42 + disp->setUnflaggedSymbol(imageSymbol, index); build 10-Jul-2019 13:16:42 + PlotSymbolPtr flaggedSymbol = disp->flaggedSymbol(); build 10-Jul-2019 13:16:42 + disp->setFlaggedSymbol(flaggedSymbol, index); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAxesTab::setValue(const PlotMSPlotParameters& params) { build 10-Jul-2019 13:16:42 - const PMS_PP_Cache* c = params.typedGroup(); build 10-Jul-2019 13:16:42 - const PMS_PP_Axes* a = params.typedGroup(); build 10-Jul-2019 13:16:42 - if(c == NULL || a == NULL) return; // shouldn't happen build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // X Widget build 10-Jul-2019 13:16:42 - PMS::Axis cacheAxis = c->xAxis(); build 10-Jul-2019 13:16:42 - PMS::DataColumn cacheColumn = c->xDataColumn(); build 10-Jul-2019 13:16:42 - PlotAxis axesAxis = a->xAxis(); build 10-Jul-2019 13:16:42 - bool axesXRangeSet = a->xRangeSet(); build 10-Jul-2019 13:16:42 - std::pair axesXRange = a->xRange(); build 10-Jul-2019 13:16:42 - itsXWidget_->setValue(cacheAxis, cacheColumn, axesAxis, build 10-Jul-2019 13:16:42 - axesXRangeSet, axesXRange); build 10-Jul-2019 13:16:42 - const auto & xFrames = c->xFrames(); build 10-Jul-2019 13:16:42 - const auto & xInterps = c->xInterps(); build 10-Jul-2019 13:16:42 - itsXWidget_->setDirParams(xInterps[0],xFrames[0]); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Radio Buttons build 10-Jul-2019 13:16:42 - bool atm(c->showAtm()), tsky(c->showTsky()), overlay(atm || tsky); build 10-Jul-2019 13:16:42 - atmRadio->setChecked(atm); build 10-Jul-2019 13:16:42 - tskyRadio->setChecked(tsky); build 10-Jul-2019 13:16:42 - noneRadio->setChecked(!overlay); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Y Widgets build 10-Jul-2019 13:16:42 - int yAxisCount = a->numYAxes(); build 10-Jul-2019 13:16:42 - int yWidgetSize = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 - int minValue = qMin( yAxisCount, yWidgetSize ); build 10-Jul-2019 13:16:42 - const auto & yFrames = c->yFrames(); build 10-Jul-2019 13:16:42 - int nFramesY = yFrames.size(); build 10-Jul-2019 13:16:42 - const auto & yInterps = c->yInterps(); build 10-Jul-2019 13:16:42 - int nInterpsY = yInterps.size(); build 10-Jul-2019 13:16:42 - for ( int i = 0; i < minValue; i++ ){ build 10-Jul-2019 13:16:42 - itsYWidgets_[i]->setValue(c->yAxis(i), c->yDataColumn(i), a->yAxis(i), build 10-Jul-2019 13:16:42 - a->yRangeSet(i), a->yRange(i)); build 10-Jul-2019 13:16:42 - if (i < nInterpsY and i < nFramesY ) build 10-Jul-2019 13:16:42 - itsYWidgets_[i]->setDirParams(yInterps[i],yFrames[i]); build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 - throw AipsError("PlotMS internal error.",AipsError::BOUNDARY); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + const PMS_PP_Cache* c = params.typedGroup(); build 10-Jul-2019 13:16:42 + const PMS_PP_Axes* a = params.typedGroup(); build 10-Jul-2019 13:16:42 + if(c == NULL || a == NULL) build 10-Jul-2019 13:16:42 + return; // shouldn't happen build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // X Widget build 10-Jul-2019 13:16:42 + PMS::Axis cacheAxis = c->xAxis(); build 10-Jul-2019 13:16:42 + PMS::DataColumn cacheColumn = c->xDataColumn(); build 10-Jul-2019 13:16:42 + PlotAxis axesAxis = a->xAxis(); build 10-Jul-2019 13:16:42 + bool axesXRangeSet = a->xRangeSet(); build 10-Jul-2019 13:16:42 + std::pair axesXRange = a->xRange(); build 10-Jul-2019 13:16:42 + itsXWidget_->setValue(cacheAxis, cacheColumn, axesAxis, axesXRangeSet, axesXRange); build 10-Jul-2019 13:16:42 + const auto & xFrames = c->xFrames(); build 10-Jul-2019 13:16:42 + const auto & xInterps = c->xInterps(); build 10-Jul-2019 13:16:42 + itsXWidget_->setDirParams(xInterps[0],xFrames[0]); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Radio Buttons build 10-Jul-2019 13:16:42 + bool atm(c->showAtm()), tsky(c->showTsky()), overlay(atm || tsky); build 10-Jul-2019 13:16:42 + atmRadio->setChecked(atm); build 10-Jul-2019 13:16:42 + tskyRadio->setChecked(tsky); build 10-Jul-2019 13:16:42 + noneRadio->setChecked(!overlay); build 10-Jul-2019 13:16:42 + imageSbCheckBox->setEnabled(overlay); build 10-Jul-2019 13:16:42 + imageSbCheckBox->setChecked(c->showImage()); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Y Widgets build 10-Jul-2019 13:16:42 + int yAxisCount = a->numYAxes(); build 10-Jul-2019 13:16:42 + int yWidgetSize = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 + int minValue = qMin( yAxisCount, yWidgetSize ); build 10-Jul-2019 13:16:42 + const auto & yFrames = c->yFrames(); build 10-Jul-2019 13:16:42 + int nFramesY = yFrames.size(); build 10-Jul-2019 13:16:42 + const auto & yInterps = c->yInterps(); build 10-Jul-2019 13:16:42 + int nInterpsY = yInterps.size(); build 10-Jul-2019 13:16:42 + for ( int i = 0; i < minValue; i++ ){ build 10-Jul-2019 13:16:42 + itsYWidgets_[i]->setValue(c->yAxis(i), c->yDataColumn(i), a->yAxis(i), build 10-Jul-2019 13:16:42 + a->yRangeSet(i), a->yRange(i)); build 10-Jul-2019 13:16:42 + if (i < nInterpsY and i < nFramesY ) { build 10-Jul-2019 13:16:42 + itsYWidgets_[i]->setDirParams(yInterps[i],yFrames[i]); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + throw AipsError("PlotMS internal error.",AipsError::BOUNDARY); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSAxesTab::axisIdentifierChanged(PlotMSAxisWidget* axisWidget){ build 10-Jul-2019 13:16:42 +void PlotMSAxesTab::axisIdentifierChanged(PlotMSAxisWidget* axisWidget) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - int yIndex = itsYWidgets_.indexOf( axisWidget ); build 10-Jul-2019 13:16:42 - if ( yIndex >= 0 ){ build 10-Jul-2019 13:16:42 - QString newIdentifier = axisWidget->getIdentifier(); build 10-Jul-2019 13:16:42 - yAxisCombo->setItemText(yIndex, newIdentifier ); build 10-Jul-2019 13:16:42 - emit yAxisIdentifierChanged( yIndex, newIdentifier ); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + int yIndex = itsYWidgets_.indexOf( axisWidget ); build 10-Jul-2019 13:16:42 + if ( yIndex >= 0 ){ build 10-Jul-2019 13:16:42 + QString newIdentifier = axisWidget->getIdentifier(); build 10-Jul-2019 13:16:42 + yAxisCombo->setItemText(yIndex, newIdentifier ); build 10-Jul-2019 13:16:42 + emit yAxisIdentifierChanged( yIndex, newIdentifier ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PlotMSAxesTab::update(const PlotMSPlot& plot) { build 10-Jul-2019 13:16:42 - const PlotMSPlotParameters& params = plot.parameters(); build 10-Jul-2019 13:16:42 - PlotMSPlotParameters newParams(params); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Deal somehow with data structures inconsistencies build 10-Jul-2019 13:16:42 - // between the Cache and the GUI build 10-Jul-2019 13:16:42 - getValue(newParams); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Shortcuts build 10-Jul-2019 13:16:42 - const PMS_PP_MSData* data = params.typedGroup(); build 10-Jul-2019 13:16:42 - const PMS_PP_Cache* c = params.typedGroup(), build 10-Jul-2019 13:16:42 - *cNew = newParams.typedGroup(); build 10-Jul-2019 13:16:42 - const PMS_PP_Axes* a = params.typedGroup(), build 10-Jul-2019 13:16:42 - *aNew = newParams.typedGroup(); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Shouldn't happen build 10-Jul-2019 13:16:42 - if(data == NULL || c == NULL || cNew == NULL || a == NULL || aNew == NULL) build 10-Jul-2019 13:16:42 - throw(AipsError("PlotMSAxesTab::update(): internal error")); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Update XWidget's "in cache" checkbox build 10-Jul-2019 13:16:42 - auto loadedAxes = plot.cache().loadedAxes(); build 10-Jul-2019 13:16:42 - auto newXAxis = cNew->xAxis(0); build 10-Jul-2019 13:16:42 - auto newXAxisIsLoaded = std::find(loadedAxes.begin(),loadedAxes.end(), build 10-Jul-2019 13:16:42 - newXAxis) != loadedAxes.end(); build 10-Jul-2019 13:16:42 - if (PMS::axisIsRaDec(newXAxis)) { build 10-Jul-2019 13:16:42 - auto newXDirParams = cNew->xDirectionParams(0); build 10-Jul-2019 13:16:42 - newXAxisIsLoaded = plot.cache().areRaDecAxesLoaded(newXDirParams); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - itsXWidget_->setInCache(newXAxisIsLoaded); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Update YWidgets "in cache" checkbox build 10-Jul-2019 13:16:42 - int yAxisCount = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 - for ( int j = 0; j < yAxisCount; j++ ){ build 10-Jul-2019 13:16:42 - auto newYAxis = cNew->yAxis(j); build 10-Jul-2019 13:16:42 - auto newYAxisIsLoaded = std::find(loadedAxes.begin(),loadedAxes.end(), build 10-Jul-2019 13:16:42 - newYAxis) != loadedAxes.end(); build 10-Jul-2019 13:16:42 - if (PMS::axisIsRaDec(newYAxis)) { build 10-Jul-2019 13:16:42 - auto newYDirParams = cNew->yDirectionParams(j); build 10-Jul-2019 13:16:42 - newYAxisIsLoaded = plot.cache().areRaDecAxesLoaded(newYDirParams); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - itsYWidgets_[j]->setInCache(newYAxisIsLoaded); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Highlight XWidget changes build 10-Jul-2019 13:16:42 - if (data->isSet()){ build 10-Jul-2019 13:16:42 - auto xAxisChanged = cNew->xAxis(0) != c->xAxis(0); build 10-Jul-2019 13:16:42 - auto xDataAxisParamsChanged = cNew->xDataColumn(0) != c->xDataColumn(0); build 10-Jul-2019 13:16:42 - auto xDirectionAxisParamsChanged = cNew->xDirectionParams(0) != build 10-Jul-2019 13:16:42 - c->xDirectionParams(0); build 10-Jul-2019 13:16:42 - auto xAxisParamsChanged = xDataAxisParamsChanged || build 10-Jul-2019 13:16:42 - xDirectionAxisParamsChanged; build 10-Jul-2019 13:16:42 - auto xInterpChanged = cNew->xInterp(0) != c->xInterp(0); build 10-Jul-2019 13:16:42 - auto xRefFrameChanged = cNew->xFrame(0) != c->xFrame(0); build 10-Jul-2019 13:16:42 - auto xAxisLocationChanged = aNew->xAxis(0) != a->xAxis(0); build 10-Jul-2019 13:16:42 - auto xRangeModeChanged = aNew->xRangeSet(0) != a->xRangeSet(0); build 10-Jul-2019 13:16:42 - auto xRangeChanged = aNew->xRange(0) != a->xRange(0); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsXWidget_->axisLabel(), build 10-Jul-2019 13:16:42 - xAxisChanged || xAxisParamsChanged); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsXWidget_->dataLabel(), xDataAxisParamsChanged); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsXWidget_->interpLabel(), xInterpChanged); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsXWidget_->refFrameLabel(), xRefFrameChanged); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsXWidget_->attachLabel(), xAxisLocationChanged); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsXWidget_->rangeLabel(), build 10-Jul-2019 13:16:42 - xRangeModeChanged || xRangeChanged ); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - // Highlight overlay changes build 10-Jul-2019 13:16:42 - bool overlayChanged = (c->showAtm() != atmRadio->isChecked()) || (c->showTsky() != tskyRadio->isChecked()); build 10-Jul-2019 13:16:42 - highlightWidgetText(overlayLabel, overlayChanged); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - // Highlight YWidgets changes build 10-Jul-2019 13:16:42 - if (data->isSet()){ build 10-Jul-2019 13:16:42 - for ( int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 - QLabel* axisLabel = itsYWidgets_[i]->axisLabel(); build 10-Jul-2019 13:16:42 - auto yAxisChanged = c->yAxis(i) != cNew->yAxis(i); build 10-Jul-2019 13:16:42 - auto yDataAxisParamsChanged = PMS::axisIsData(c->yAxis(i)) && build 10-Jul-2019 13:16:42 - (c->yDataColumn(i) != cNew->yDataColumn(i)); build 10-Jul-2019 13:16:42 - auto yDirectionAxisParamsChanged = PMS::axisIsRaDec(c->yAxis(i)) && build 10-Jul-2019 13:16:42 - (c->yDirectionParams(i) != cNew->yDirectionParams(i)); build 10-Jul-2019 13:16:42 - auto yAxisParamsChanged = yDataAxisParamsChanged || yDirectionAxisParamsChanged; build 10-Jul-2019 13:16:42 - highlightWidgetText(axisLabel, yAxisChanged || yAxisParamsChanged); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsYWidgets_[i]->dataLabel(), build 10-Jul-2019 13:16:42 - c->yDataColumn(i) != cNew->yDataColumn(i)); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsYWidgets_[i]->interpLabel(), build 10-Jul-2019 13:16:42 - c->yInterp(i) != cNew->yInterp(i)); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsYWidgets_[i]->refFrameLabel(), build 10-Jul-2019 13:16:42 - c->yFrame(i) != cNew->yFrame(i)); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsYWidgets_[i]->attachLabel(), build 10-Jul-2019 13:16:42 - a->yAxis() != aNew->yAxis()); build 10-Jul-2019 13:16:42 - highlightWidgetText(itsYWidgets_[i]->rangeLabel(), build 10-Jul-2019 13:16:42 - (a->yRangeSet(i) != aNew->yRangeSet(i)) || build 10-Jul-2019 13:16:42 - (a->yRangeSet(i) && (a->yRange(i) != aNew->yRange(i)))); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + const PlotMSPlotParameters& params = plot.parameters(); build 10-Jul-2019 13:16:42 + PlotMSPlotParameters newParams(params); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Deal somehow with data structures inconsistencies build 10-Jul-2019 13:16:42 + // between the Cache and the GUI build 10-Jul-2019 13:16:42 + getValue(newParams); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Shortcuts build 10-Jul-2019 13:16:42 + const PMS_PP_MSData* data = params.typedGroup(); build 10-Jul-2019 13:16:42 + const PMS_PP_Cache* c = params.typedGroup(), build 10-Jul-2019 13:16:42 + *cNew = newParams.typedGroup(); build 10-Jul-2019 13:16:42 + const PMS_PP_Axes* a = params.typedGroup(), build 10-Jul-2019 13:16:42 + *aNew = newParams.typedGroup(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Shouldn't happen build 10-Jul-2019 13:16:42 + if(data == NULL || c == NULL || cNew == NULL || a == NULL || aNew == NULL) build 10-Jul-2019 13:16:42 + throw(AipsError("PlotMSAxesTab::update(): internal error")); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Update XWidget's "in cache" checkbox build 10-Jul-2019 13:16:42 + auto loadedAxes = plot.cache().loadedAxes(); build 10-Jul-2019 13:16:42 + auto newXAxis = cNew->xAxis(0); build 10-Jul-2019 13:16:42 + auto newXAxisIsLoaded = std::find(loadedAxes.begin(),loadedAxes.end(), build 10-Jul-2019 13:16:42 + newXAxis) != loadedAxes.end(); build 10-Jul-2019 13:16:42 + if (PMS::axisIsRaDec(newXAxis)) { build 10-Jul-2019 13:16:42 + auto newXDirParams = cNew->xDirectionParams(0); build 10-Jul-2019 13:16:42 + newXAxisIsLoaded = plot.cache().areRaDecAxesLoaded(newXDirParams); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + itsXWidget_->setInCache(newXAxisIsLoaded); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Update YWidgets "in cache" checkbox build 10-Jul-2019 13:16:42 + int yAxisCount = itsYWidgets_.size(); build 10-Jul-2019 13:16:42 + for ( int j = 0; j < yAxisCount; j++ ){ build 10-Jul-2019 13:16:42 + auto newYAxis = cNew->yAxis(j); build 10-Jul-2019 13:16:42 + auto newYAxisIsLoaded = std::find(loadedAxes.begin(),loadedAxes.end(), build 10-Jul-2019 13:16:42 + newYAxis) != loadedAxes.end(); build 10-Jul-2019 13:16:42 + if (PMS::axisIsRaDec(newYAxis)) { build 10-Jul-2019 13:16:42 + auto newYDirParams = cNew->yDirectionParams(j); build 10-Jul-2019 13:16:42 + newYAxisIsLoaded = plot.cache().areRaDecAxesLoaded(newYDirParams); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + itsYWidgets_[j]->setInCache(newYAxisIsLoaded); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Highlight XWidget changes build 10-Jul-2019 13:16:42 + if (data->isSet()){ build 10-Jul-2019 13:16:42 + auto xAxisChanged = cNew->xAxis(0) != c->xAxis(0); build 10-Jul-2019 13:16:42 + auto xDataAxisParamsChanged = cNew->xDataColumn(0) != c->xDataColumn(0); build 10-Jul-2019 13:16:42 + auto xDirectionAxisParamsChanged = cNew->xDirectionParams(0) != c->xDirectionParams(0); build 10-Jul-2019 13:16:42 + auto xAxisParamsChanged = xDataAxisParamsChanged || xDirectionAxisParamsChanged; build 10-Jul-2019 13:16:42 + auto xInterpChanged = cNew->xInterp(0) != c->xInterp(0); build 10-Jul-2019 13:16:42 + auto xRefFrameChanged = cNew->xFrame(0) != c->xFrame(0); build 10-Jul-2019 13:16:42 + auto xAxisLocationChanged = aNew->xAxis(0) != a->xAxis(0); build 10-Jul-2019 13:16:42 + auto xRangeModeChanged = aNew->xRangeSet(0) != a->xRangeSet(0); build 10-Jul-2019 13:16:42 + auto xRangeChanged = aNew->xRange(0) != a->xRange(0); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsXWidget_->axisLabel(), xAxisChanged || xAxisParamsChanged); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsXWidget_->dataLabel(), xDataAxisParamsChanged); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsXWidget_->interpLabel(), xInterpChanged); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsXWidget_->refFrameLabel(), xRefFrameChanged); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsXWidget_->attachLabel(), xAxisLocationChanged); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsXWidget_->rangeLabel(), xRangeModeChanged || xRangeChanged ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + // Highlight overlay changes build 10-Jul-2019 13:16:42 + bool atmRequested(atmRadio->isChecked()), tskyRequested(tskyRadio->isChecked()); build 10-Jul-2019 13:16:42 + bool overlayChanged = (c->showAtm() != atmRequested) || (c->showTsky() != tskyRequested); build 10-Jul-2019 13:16:42 + bool sidebandChanged = ((atmRequested || tskyRequested) && (c->showImage() != imageSbCheckBox->isChecked())); build 10-Jul-2019 13:16:42 + highlightWidgetText(overlayLabel, overlayChanged || sidebandChanged); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Highlight YWidgets changes build 10-Jul-2019 13:16:42 + if (data->isSet()){ build 10-Jul-2019 13:16:42 + for ( int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 + QLabel* axisLabel = itsYWidgets_[i]->axisLabel(); build 10-Jul-2019 13:16:42 + auto yAxisChanged = c->yAxis(i) != cNew->yAxis(i); build 10-Jul-2019 13:16:42 + auto yDataAxisParamsChanged = PMS::axisIsData(c->yAxis(i)) && build 10-Jul-2019 13:16:42 + (c->yDataColumn(i) != cNew->yDataColumn(i)); build 10-Jul-2019 13:16:42 + auto yDirectionAxisParamsChanged = PMS::axisIsRaDec(c->yAxis(i)) && build 10-Jul-2019 13:16:42 + (c->yDirectionParams(i) != cNew->yDirectionParams(i)); build 10-Jul-2019 13:16:42 + auto yAxisParamsChanged = yDataAxisParamsChanged || yDirectionAxisParamsChanged; build 10-Jul-2019 13:16:42 + highlightWidgetText(axisLabel, yAxisChanged || yAxisParamsChanged); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsYWidgets_[i]->dataLabel(), build 10-Jul-2019 13:16:42 + c->yDataColumn(i) != cNew->yDataColumn(i)); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsYWidgets_[i]->interpLabel(), build 10-Jul-2019 13:16:42 + c->yInterp(i) != cNew->yInterp(i)); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsYWidgets_[i]->refFrameLabel(), build 10-Jul-2019 13:16:42 + c->yFrame(i) != cNew->yFrame(i)); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsYWidgets_[i]->attachLabel(), build 10-Jul-2019 13:16:42 + a->yAxis() != aNew->yAxis()); build 10-Jul-2019 13:16:42 + highlightWidgetText(itsYWidgets_[i]->rangeLabel(), build 10-Jul-2019 13:16:42 + (a->yRangeSet(i) != aNew->yRangeSet(i)) || build 10-Jul-2019 13:16:42 + (a->yRangeSet(i) && (a->yRange(i) != aNew->yRange(i)))); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // If the user hasn't set a custom range, set defaults for time axis. build 10-Jul-2019 13:16:42 // For time axis, get bounds from cache; else use 0 for other axes types build 10-Jul-2019 13:16:42 @@ -430,29 +443,27 @@ void PlotMSAxesTab::update(const PlotMSPlot& plot) { build 10-Jul-2019 13:16:42 bool isDate; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if (!itsXWidget_->rangeCustom()) { build 10-Jul-2019 13:16:42 - isDate = (cNew->xAxis() == PMS::TIME); build 10-Jul-2019 13:16:42 - if (isDate) { build 10-Jul-2019 13:16:42 - timebounds = plot.cache().getTimeBounds(); build 10-Jul-2019 13:16:42 - itsXWidget_->setRange(isDate, timebounds.first, timebounds.second); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 - itsXWidget_->setRange(isDate, 0.0, 0.0); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + isDate = (cNew->xAxis() == PMS::TIME); build 10-Jul-2019 13:16:42 + if (isDate) { build 10-Jul-2019 13:16:42 + timebounds = plot.cache().getTimeBounds(); build 10-Jul-2019 13:16:42 + itsXWidget_->setRange(isDate, timebounds.first, timebounds.second); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + itsXWidget_->setRange(isDate, 0.0, 0.0); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for (int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 - if (!itsYWidgets_[i]->rangeCustom()) { build 10-Jul-2019 13:16:42 - PMS::Axis yData = cNew->yAxis(i); build 10-Jul-2019 13:16:42 - isDate = (yData == PMS::TIME); build 10-Jul-2019 13:16:42 - if (isDate) { build 10-Jul-2019 13:16:42 - timebounds = plot.cache().getTimeBounds(); build 10-Jul-2019 13:16:42 - itsYWidgets_[i]->setRange(isDate, timebounds.first, timebounds.second); build 10-Jul-2019 13:16:42 - break; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - else { build 10-Jul-2019 13:16:42 - itsYWidgets_[i]->setRange(isDate, 0.0, 0.0); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + if (!itsYWidgets_[i]->rangeCustom()) { build 10-Jul-2019 13:16:42 + PMS::Axis yData = cNew->yAxis(i); build 10-Jul-2019 13:16:42 + isDate = (yData == PMS::TIME); build 10-Jul-2019 13:16:42 + if (isDate) { build 10-Jul-2019 13:16:42 + timebounds = plot.cache().getTimeBounds(); build 10-Jul-2019 13:16:42 + itsYWidgets_[i]->setRange(isDate, timebounds.first, timebounds.second); build 10-Jul-2019 13:16:42 + break; build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + itsYWidgets_[i]->setRange(isDate, 0.0, 0.0); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/plotms/GuiTabs/PlotMSAxesTab.qo.h b/code/plotms/GuiTabs/PlotMSAxesTab.qo.h build 10-Jul-2019 13:16:42 index 14da701..535172e 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/GuiTabs/PlotMSAxesTab.qo.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/GuiTabs/PlotMSAxesTab.qo.h build 10-Jul-2019 13:16:42 @@ -68,35 +68,38 @@ public: build 10-Jul-2019 13:16:42 bool isAxesValid() const; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 signals: build 10-Jul-2019 13:16:42 - //Identifier for a y-axis has changed. build 10-Jul-2019 13:16:42 - void yAxisIdentifierChanged( int index, QString id ); build 10-Jul-2019 13:16:42 + //Identifier for a y-axis has changed. build 10-Jul-2019 13:16:42 + void yAxisIdentifierChanged( int index, QString id ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //A y-axis has been removed. build 10-Jul-2019 13:16:42 - void yAxisIdentifierRemoved( int index ); build 10-Jul-2019 13:16:42 + //A y-axis has been removed. build 10-Jul-2019 13:16:42 + void yAxisIdentifierRemoved( int index ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 private slots: build 10-Jul-2019 13:16:42 - //Add a new y-axis. build 10-Jul-2019 13:16:42 - void addYWidget(); build 10-Jul-2019 13:16:42 + //Add a new y-axis. build 10-Jul-2019 13:16:42 + void addYWidget(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Remove a y-axis. build 10-Jul-2019 13:16:42 - void removeYWidget(); build 10-Jul-2019 13:16:42 + //Remove a y-axis. build 10-Jul-2019 13:16:42 + void removeYWidget(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Selected data for a y-axis has changed. build 10-Jul-2019 13:16:42 - void axisIdentifierChanged(PlotMSAxisWidget* axisWidget); build 10-Jul-2019 13:16:42 + //Selected data for a y-axis has changed. build 10-Jul-2019 13:16:42 + void axisIdentifierChanged(PlotMSAxisWidget* axisWidget); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Display the settings for a new y-axis. build 10-Jul-2019 13:16:42 - void yAxisSelected( int index ); build 10-Jul-2019 13:16:42 + //Display the settings for a new y-axis. build 10-Jul-2019 13:16:42 + void yAxisSelected( int index ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // atm/tsky/sideband enabled/changed build 10-Jul-2019 13:16:42 + void overlayChanged(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Hide/show features associated with multipleYAxes. build 10-Jul-2019 13:16:42 - void setMultipleAxesYEnabled(); build 10-Jul-2019 13:16:42 + //Hide/show features associated with multipleYAxes. build 10-Jul-2019 13:16:42 + void setMultipleAxesYEnabled(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //Relabel based on the new y-axis index. build 10-Jul-2019 13:16:42 - void setYAxisLabel( PlotMSAxisWidget* yWidget, int index ); build 10-Jul-2019 13:16:42 + //Relabel based on the new y-axis index. build 10-Jul-2019 13:16:42 + void setYAxisLabel( PlotMSAxisWidget* yWidget, int index ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // Get cache data for manual range build 10-Jul-2019 13:16:42 - void setRangeFromCache(bool foundInCache, bool isDate); build 10-Jul-2019 13:16:42 + // Get cache data for manual range build 10-Jul-2019 13:16:42 + void setRangeFromCache(bool foundInCache, bool isDate); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Widgets for the x axis and y axis, respectively. build 10-Jul-2019 13:16:42 PlotMSAxisWidget* itsXWidget_; build 10-Jul-2019 13:16:42 diff --git a/code/plotms/GuiTabs/PlotMSAxesTab.ui b/code/plotms/GuiTabs/PlotMSAxesTab.ui build 10-Jul-2019 13:16:42 index 86a1ac8..519873b 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/GuiTabs/PlotMSAxesTab.ui build 10-Jul-2019 13:16:42 +++ b/code/plotms/GuiTabs/PlotMSAxesTab.ui build 10-Jul-2019 13:16:42 @@ -86,16 +86,7 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 true build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - 3 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - QLayout::SetMaximumSize build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - 1 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -192,10 +183,7 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 - true build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Qt::Horizontal build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -247,6 +235,16 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + true build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Qt::Horizontal build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Tsky build 10-Jul-2019 13:16:42 @@ -270,6 +268,73 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + 0 build 10-Jul-2019 13:16:42 + 0 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + true build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + 3 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + QLayout::SetMinimumSize build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + 0 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Qt::Horizontal build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + 20 build 10-Jul-2019 13:16:42 + 20 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Qt::RightToLeft build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Image Sideband Curve: build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Qt::Horizontal build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + 40 build 10-Jul-2019 13:16:42 + 20 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Qt::Horizontal build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -431,7 +496,7 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -515,6 +580,15 @@ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + xFrame build 10-Jul-2019 13:16:42 + overlayFrame build 10-Jul-2019 13:16:42 + yAxisChooserFrame build 10-Jul-2019 13:16:42 + yAxisFrame build 10-Jul-2019 13:16:42 + buttonsFrame build 10-Jul-2019 13:16:42 + overlayFrame_2 build 10-Jul-2019 13:16:42 + tskyRadio build 10-Jul-2019 13:16:42 + line_2 build 10-Jul-2019 13:16:42 + line_3 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMS.cc b/code/plotms/PlotMS/PlotMS.cc build 10-Jul-2019 13:16:42 index eb49746..257c595 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMS.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMS.cc build 10-Jul-2019 13:16:42 @@ -27,7 +27,17 @@ build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +using casatools::rpc::Registrar; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 @@ -62,23 +72,47 @@ namespace casa { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Constructors/Destructors // build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -PlotMSApp::PlotMSApp(bool connectToDBus, bool userGui) : build 10-Jul-2019 13:16:42 +PlotMSApp::PlotMSApp(bool connectToDBus, bool userGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , const casacore::String &casapy_address build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ) : build 10-Jul-2019 13:16:42 itsLastPlotter_(NULL), isGUI_(userGui), allow_popups(true), build 10-Jul-2019 13:16:42 - itsExportFormat( PlotExportFormat::JPG, ""), build 10-Jul-2019 13:16:42 - itsDBus_(NULL) { build 10-Jul-2019 13:16:42 - initialize(connectToDBus, userGui); build 10-Jul-2019 13:16:42 -} build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 -PlotMSApp::PlotMSApp(const PlotMSParameters& params, bool connectToDBus, build 10-Jul-2019 13:16:42 - bool userGui) : build 10-Jul-2019 13:16:42 + itsExportFormat( PlotExportFormat::JPG, "") build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , itsDBus_(NULL) build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 +{ build 10-Jul-2019 13:16:42 + initialize(connectToDBus, userGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , casapy_address build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ); build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +PlotMSApp::PlotMSApp(const PlotMSParameters& params, bool connectToDBus, bool userGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , const casacore::String &casapy_address build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ) : build 10-Jul-2019 13:16:42 itsPlotter_(NULL), itsLastPlotter_(NULL), isGUI_(userGui), build 10-Jul-2019 13:16:42 allow_popups(true), itsParameters_(params), build 10-Jul-2019 13:16:42 - itsExportFormat( PlotExportFormat::JPG, ""), itsDBus_(NULL) { build 10-Jul-2019 13:16:42 - initialize(connectToDBus, userGui); build 10-Jul-2019 13:16:42 + itsExportFormat( PlotExportFormat::JPG, "") build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , itsDBus_(NULL) build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 +{ build 10-Jul-2019 13:16:42 + initialize(connectToDBus, userGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , casapy_address build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotMSApp::~PlotMSApp() { build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 if(itsDBus_ != NULL) delete itsDBus_; build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -327,7 +361,11 @@ vector PlotMSApp::getFiles() const { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Private Methods // build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 -void PlotMSApp::initialize(bool connectToDBus, bool userGui) { build 10-Jul-2019 13:16:42 +void PlotMSApp::initialize(bool connectToDBus, bool userGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , const casacore::String &casapy_address build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 operationCompleted = true; build 10-Jul-2019 13:16:42 itsParameters_.addWatcher(this); build 10-Jul-2019 13:16:42 @@ -353,12 +391,142 @@ void PlotMSApp::initialize(bool connectToDBus, bool userGui) { build 10-Jul-2019 13:16:42 // Update internal state to reflect parameters. build 10-Jul-2019 13:16:42 parametersHaveChanged(itsParameters_, build 10-Jul-2019 13:16:42 PlotMSWatchedParameters::ALL_UPDATE_FLAGS()); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 if(connectToDBus) { build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 itsDBus_ = new PlotMSDBusApp(*this); build 10-Jul-2019 13:16:42 itsDBus_->connectToDBus(); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 + auto qplotobj = dynamic_cast(itsPlotter_); build 10-Jul-2019 13:16:42 + if ( ! qplotobj ) { build 10-Jul-2019 13:16:42 + fprintf(stderr, "cannot start plot server because no Qt plotter is available"); build 10-Jul-2019 13:16:42 + exit(1); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + static const auto debug = getenv("GRPC_DEBUG"); build 10-Jul-2019 13:16:42 + grpcPlotMSState *state = new grpcPlotMSState(this); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + //*** build 10-Jul-2019 13:16:42 + //*** set up a default address (grpc picks port) and address buffers build 10-Jul-2019 13:16:42 + //*** build 10-Jul-2019 13:16:42 + char address_buf[100]; build 10-Jul-2019 13:16:42 + constexpr char address_template[] = "0.0.0.0:%d"; build 10-Jul-2019 13:16:42 + snprintf(address_buf,sizeof(address_buf),address_template,0); build 10-Jul-2019 13:16:42 + std::string server_address(address_buf); build 10-Jul-2019 13:16:42 + int selected_port = 0; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + //*** build 10-Jul-2019 13:16:42 + //*** build grpc service build 10-Jul-2019 13:16:42 + //*** build 10-Jul-2019 13:16:42 + grpc::ServerBuilder builder; build 10-Jul-2019 13:16:42 + // Listen on the given address without any authentication mechanism. build 10-Jul-2019 13:16:42 + builder.AddListeningPort(server_address, grpc::InsecureServerCredentials(), &selected_port); build 10-Jul-2019 13:16:42 + // Register "service" as the instance through which we'll communicate with build 10-Jul-2019 13:16:42 + // clients. In this case it corresponds to an *synchronous* service. build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // plotms service (and currently interactive clean service though this needs build 10-Jul-2019 13:16:42 + // to eventually move to a seperate grpc service description which could e.g. be build 10-Jul-2019 13:16:42 + // shared with carta build 10-Jul-2019 13:16:42 + auto plotms_svc = state->plotms_service.get( ); build 10-Jul-2019 13:16:42 + builder.RegisterService(plotms_svc); build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // shutdown service is used by casatools etc. to notify gui services build 10-Jul-2019 13:16:42 + // when the system is shutting down... build 10-Jul-2019 13:16:42 + auto shutdown_svc = state->shutdown_service.get( ); build 10-Jul-2019 13:16:42 + builder.RegisterService(shutdown_svc); build 10-Jul-2019 13:16:42 + QObject::connect( shutdown_svc, SIGNAL(exit_now( )), build 10-Jul-2019 13:16:42 + qplotobj, SLOT(grpc_exit_now( )) ); build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // all gui operations must happen in the "gui thread" because Qt is not build 10-Jul-2019 13:16:42 + // thread-safe... connect qt events from services to PlotMSPlotter so that build 10-Jul-2019 13:16:42 + // grpc events/commands can be executed in the Qt GUI thread... build 10-Jul-2019 13:16:42 + plotms_svc->set_plotter(qplotobj); build 10-Jul-2019 13:16:42 + QObject::connect( plotms_svc, SIGNAL(new_op( )), build 10-Jul-2019 13:16:42 + qplotobj, SLOT(grpc_handle_op( )) ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // Launch server... build 10-Jul-2019 13:16:42 + state->server = builder.BuildAndStart( ); build 10-Jul-2019 13:16:42 + if ( selected_port > 0 ) { build 10-Jul-2019 13:16:42 + // if an available port can be found, selected_port is set to a value greater than zero build 10-Jul-2019 13:16:42 + snprintf(address_buf,sizeof(address_buf),address_template,selected_port); build 10-Jul-2019 13:16:42 + state->uri = address_buf; build 10-Jul-2019 13:16:42 + if ( debug ) { build 10-Jul-2019 13:16:42 + std::cout << "plotms service available at " << state->uri << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + char *server_string = casapy_address.size( ) > 0 ? strdup(casapy_address.c_str( )) : 0; build 10-Jul-2019 13:16:42 + if ( server_string ) { build 10-Jul-2019 13:16:42 + if ( access( server_string, F_OK ) == -1 ) { build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // create the connection to the registrar for service registration using the uri build 10-Jul-2019 13:16:42 + // provided on the command line... build 10-Jul-2019 13:16:42 + std::unique_ptr proxy = build 10-Jul-2019 13:16:42 + Registrar::NewStub(grpc::CreateChannel(server_string, grpc::InsecureChannelCredentials( ))); build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // register our "shutdown, "image-view" and "interactive-clean" services with build 10-Jul-2019 13:16:42 + // the registrar... build 10-Jul-2019 13:16:42 + casatools::rpc::ServiceId sid; build 10-Jul-2019 13:16:42 + sid.set_id("casaplotms"); build 10-Jul-2019 13:16:42 + sid.set_uri(state->uri); build 10-Jul-2019 13:16:42 + sid.add_types("shutdown"); build 10-Jul-2019 13:16:42 + sid.add_types("plotms"); build 10-Jul-2019 13:16:42 + grpc::ClientContext context; build 10-Jul-2019 13:16:42 + casatools::rpc::ServiceId accepted_sid; build 10-Jul-2019 13:16:42 + if ( debug ) { build 10-Jul-2019 13:16:42 + std::cout << "registering services with registrar (at " << server_string << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + ::grpc::Status status = proxy->add(&context,sid,&accepted_sid); build 10-Jul-2019 13:16:42 + if ( ! status.ok( ) ) { build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // if registration was not successful, we exit... build 10-Jul-2019 13:16:42 + std::cerr << "registration failed, exiting..." << std::endl; build 10-Jul-2019 13:16:42 + fflush(stderr); build 10-Jul-2019 13:16:42 + state->server->Shutdown( ); build 10-Jul-2019 13:16:42 + QCoreApplication::exit(1); build 10-Jul-2019 13:16:42 + exit(1); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ( debug ) { build 10-Jul-2019 13:16:42 + std::cout << "accepted service id: ( " << accepted_sid.id( ) << ", " << accepted_sid.uri( ) << ", "; build 10-Jul-2019 13:16:42 + for ( auto i=accepted_sid.types( ).begin( ); i != accepted_sid.types( ).end( ); ++i ) build 10-Jul-2019 13:16:42 + std::cout << "'" << (*i) << "' "; build 10-Jul-2019 13:16:42 + std::cout << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + int fd; build 10-Jul-2019 13:16:42 + if ( (fd = open(server_string, O_WRONLY)) != -1 ) { build 10-Jul-2019 13:16:42 + char uri[strlen(state->uri.c_str( ))+2]; build 10-Jul-2019 13:16:42 + sprintf(uri,"%s\n",state->uri.c_str( )); build 10-Jul-2019 13:16:42 + if ( (size_t) write( fd, uri, strlen(uri)) != strlen(uri) ) { build 10-Jul-2019 13:16:42 + qWarning("server failed to write gRPC URI to named pipe..."); build 10-Jul-2019 13:16:42 + qFatal("exiting..."); build 10-Jul-2019 13:16:42 + exit(1); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + ::close(fd); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + qWarning("server failed to open gRPC URI named pipe..."); build 10-Jul-2019 13:16:42 + qFatal("exiting..."); build 10-Jul-2019 13:16:42 + exit(1); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // complete startup build 10-Jul-2019 13:16:42 + grpc_.reset(state); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + grpc_.reset( ); build 10-Jul-2019 13:16:42 + if ( debug ) { build 10-Jul-2019 13:16:42 + std::cout << "no registrar provided... skipped registering." << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + free(server_string); build 10-Jul-2019 13:16:42 + } else grpc_.reset( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 showGUI( userGui ); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMS.h b/code/plotms/PlotMS/PlotMS.h build 10-Jul-2019 13:16:42 index 32288cf..3c2149f 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMS.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMS.h build 10-Jul-2019 13:16:42 @@ -33,6 +33,9 @@ build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 namespace casa { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -54,12 +57,20 @@ public: build 10-Jul-2019 13:16:42 // Default constructor that uses default options. If connectToDBus is build 10-Jul-2019 13:16:42 // true, then the application registers itself with CASA's DBus server build 10-Jul-2019 13:16:42 // using the PlotMSDBusApp::dbusName() with the current process ID. build 10-Jul-2019 13:16:42 - PlotMSApp(bool connectToDBus = false, bool userGui = true); build 10-Jul-2019 13:16:42 + PlotMSApp(bool connectToDBus = false, bool userGui = true build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , const casacore::String &casapy_address = "" build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Constructor which takes the given parameters. If connectToDBus is true, build 10-Jul-2019 13:16:42 // then the application registers itself with CASA's DBus server using the build 10-Jul-2019 13:16:42 // PlotMSDBusApp::dbusName() with the current process ID. build 10-Jul-2019 13:16:42 - PlotMSApp(const PlotMSParameters& params, bool connectToDBus = false, bool userGui = true); build 10-Jul-2019 13:16:42 + PlotMSApp(const PlotMSParameters& params, bool connectToDBus = false, bool userGui = true build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , const casacore::String &casapy_address = "" build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Destructor build 10-Jul-2019 13:16:42 ~PlotMSApp(); build 10-Jul-2019 13:16:42 @@ -202,9 +213,12 @@ private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Plot manager. build 10-Jul-2019 13:16:42 PlotMSPlotManager itsPlotManager_; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 // DBus application, or NULL if one is not needed. build 10-Jul-2019 13:16:42 PlotMSDBusApp* itsDBus_; build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 + std::shared_ptr grpc_; build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 //Whether the most recent plot updated was successfully build 10-Jul-2019 13:16:42 //completed. A null selection, for example, could result build 10-Jul-2019 13:16:42 @@ -212,7 +226,11 @@ private: build 10-Jul-2019 13:16:42 bool operationCompleted; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Initializes a new PlotMS object, to be called from constructor. build 10-Jul-2019 13:16:42 - void initialize(bool connectToDBus, bool userGui ); build 10-Jul-2019 13:16:42 + void initialize(bool connectToDBus, bool userGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , const casacore::String &casapy_address="" build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Disable copy constructor and operator for now. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMSConstants.cc b/code/plotms/PlotMS/PlotMSConstants.cc build 10-Jul-2019 13:16:42 index 98bc832..6a45570 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMSConstants.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMSConstants.cc build 10-Jul-2019 13:16:42 @@ -53,7 +53,7 @@ PlotAxisScale PMS::axisScale(Axis axis) { build 10-Jul-2019 13:16:42 bool PMS::axisIsData(Axis axis) { build 10-Jul-2019 13:16:42 switch(axis) { build 10-Jul-2019 13:16:42 case AMP: case PHASE: case REAL: case IMAG: case WTxAMP: build 10-Jul-2019 13:16:42 - case GAMP: case GPHASE: case GREAL: case GIMAG: return true; build 10-Jul-2019 13:16:42 + case GAMP: case GPHASE: case GREAL: case GIMAG: return true; build 10-Jul-2019 13:16:42 default: return false; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -63,7 +63,7 @@ bool PMS::axisNeedsCalSlice(Axis axis) { build 10-Jul-2019 13:16:42 case AMP: case PHASE: case REAL: case IMAG: build 10-Jul-2019 13:16:42 case GAMP: case GPHASE: case GREAL: case GIMAG: build 10-Jul-2019 13:16:42 case DELAY: case SWP: case TSYS: case OPAC: case SNR: case TEC: build 10-Jul-2019 13:16:42 - case ANTPOS: case FLAG: build 10-Jul-2019 13:16:42 + case ANTPOS: case FLAG: build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 default: return false; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -85,7 +85,7 @@ bool PMS::axisIsUV(Axis axis) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool PMS::axisIsOverlay(Axis axis) { build 10-Jul-2019 13:16:42 switch(axis) { build 10-Jul-2019 13:16:42 - case ATM: case TSKY: return true; build 10-Jul-2019 13:16:42 + case ATM: case TSKY: case IMAGESB: return true; build 10-Jul-2019 13:16:42 default: return false; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -122,25 +122,25 @@ PMS::AxisUnit PMS::axisUnit(Axis axis) { build 10-Jul-2019 13:16:42 switch(axis) { build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 case TIME: build 10-Jul-2019 13:16:42 - return UDATETIME; build 10-Jul-2019 13:16:42 + return UDATETIME; build 10-Jul-2019 13:16:42 case TIME_INTERVAL: build 10-Jul-2019 13:16:42 return SECONDS; build 10-Jul-2019 13:16:42 case FREQUENCY: build 10-Jul-2019 13:16:42 - return GHERTZ; build 10-Jul-2019 13:16:42 + return GHERTZ; build 10-Jul-2019 13:16:42 case VELOCITY: build 10-Jul-2019 13:16:42 - return KILOMETERS_PER_SECOND; build 10-Jul-2019 13:16:42 + return KILOMETERS_PER_SECOND; build 10-Jul-2019 13:16:42 case UVDIST: build 10-Jul-2019 13:16:42 case U: build 10-Jul-2019 13:16:42 case V: build 10-Jul-2019 13:16:42 case W: build 10-Jul-2019 13:16:42 case ANTPOS: build 10-Jul-2019 13:16:42 - return METERS; build 10-Jul-2019 13:16:42 + return METERS; build 10-Jul-2019 13:16:42 case UVDIST_L: build 10-Jul-2019 13:16:42 case UWAVE: build 10-Jul-2019 13:16:42 case VWAVE: build 10-Jul-2019 13:16:42 case WWAVE: build 10-Jul-2019 13:16:42 - //Should be lambda build 10-Jul-2019 13:16:42 - return WAVELENGTHS; build 10-Jul-2019 13:16:42 + //Should be lambda build 10-Jul-2019 13:16:42 + return WAVELENGTHS; build 10-Jul-2019 13:16:42 case PHASE: build 10-Jul-2019 13:16:42 case GPHASE: build 10-Jul-2019 13:16:42 case ELEVATION: build 10-Jul-2019 13:16:42 @@ -151,20 +151,20 @@ PMS::AxisUnit PMS::axisUnit(Axis axis) { build 10-Jul-2019 13:16:42 case AZ0: build 10-Jul-2019 13:16:42 case EL0: build 10-Jul-2019 13:16:42 case PA0: build 10-Jul-2019 13:16:42 - return DEGREES; build 10-Jul-2019 13:16:42 + return DEGREES; build 10-Jul-2019 13:16:42 case HA0: build 10-Jul-2019 13:16:42 - return HOURS; build 10-Jul-2019 13:16:42 + return HOURS; build 10-Jul-2019 13:16:42 case RADIAL_VELOCITY: build 10-Jul-2019 13:16:42 - return KILOMETERS_PER_SECOND; build 10-Jul-2019 13:16:42 + return KILOMETERS_PER_SECOND; build 10-Jul-2019 13:16:42 case DELAY: build 10-Jul-2019 13:16:42 - return NANOSECONDS; build 10-Jul-2019 13:16:42 + return NANOSECONDS; build 10-Jul-2019 13:16:42 case TSYS: build 10-Jul-2019 13:16:42 case TSKY: build 10-Jul-2019 13:16:42 - return KELVIN; build 10-Jul-2019 13:16:42 + return KELVIN; build 10-Jul-2019 13:16:42 case OPAC: build 10-Jul-2019 13:16:42 - return NEPERS; build 10-Jul-2019 13:16:42 + return NEPERS; build 10-Jul-2019 13:16:42 case RHO: build 10-Jul-2019 13:16:42 - return KILOMETERS; build 10-Jul-2019 13:16:42 + return KILOMETERS; build 10-Jul-2019 13:16:42 case ATM: build 10-Jul-2019 13:16:42 return PERCENT; build 10-Jul-2019 13:16:42 default: return UNONE; build 10-Jul-2019 13:16:42 @@ -276,19 +276,19 @@ const vector& PMS::COLORS_LIST() { build 10-Jul-2019 13:16:42 static vector colors; build 10-Jul-2019 13:16:42 if(colors.size() == 0) { build 10-Jul-2019 13:16:42 colors.resize(10); build 10-Jul-2019 13:16:42 - colors[0] = "#202020"; build 10-Jul-2019 13:16:42 - colors[1] = "#E00066"; build 10-Jul-2019 13:16:42 - colors[2] = "#E07600"; build 10-Jul-2019 13:16:42 - colors[3] = "#66D000"; build 10-Jul-2019 13:16:42 - colors[4] = "#AC6600"; build 10-Jul-2019 13:16:42 - colors[5] = "#0091A0"; build 10-Jul-2019 13:16:42 - colors[6] = "#10E050"; build 10-Jul-2019 13:16:42 - colors[7] = "#6600E0"; build 10-Jul-2019 13:16:42 - colors[8] = "#0066F0"; build 10-Jul-2019 13:16:42 - colors[9] = "#A868D8"; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + colors[0] = "#202020"; build 10-Jul-2019 13:16:42 + colors[1] = "#E00066"; build 10-Jul-2019 13:16:42 + colors[2] = "#E07600"; build 10-Jul-2019 13:16:42 + colors[3] = "#66D000"; build 10-Jul-2019 13:16:42 + colors[4] = "#AC6600"; build 10-Jul-2019 13:16:42 + colors[5] = "#0091A0"; build 10-Jul-2019 13:16:42 + colors[6] = "#10E050"; build 10-Jul-2019 13:16:42 + colors[7] = "#6600E0"; build 10-Jul-2019 13:16:42 + colors[8] = "#0066F0"; build 10-Jul-2019 13:16:42 + colors[9] = "#A868D8"; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - return colors; build 10-Jul-2019 13:16:42 + return colors; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMSConstants.h b/code/plotms/PlotMS/PlotMSConstants.h build 10-Jul-2019 13:16:42 index 31b7438..54e1813 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMSConstants.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMSConstants.h build 10-Jul-2019 13:16:42 @@ -128,7 +128,7 @@ public: build 10-Jul-2019 13:16:42 // Ephemeris build 10-Jul-2019 13:16:42 RADIAL_VELOCITY, RHO, build 10-Jul-2019 13:16:42 // Overlays build 10-Jul-2019 13:16:42 - ATM, TSKY, NONE) build 10-Jul-2019 13:16:42 + ATM, TSKY, IMAGESB, NONE) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PMS_ENUM2(Axis, axes, axesStrings, axis, build 10-Jul-2019 13:16:42 // Metadata build 10-Jul-2019 13:16:42 @@ -150,7 +150,7 @@ public: build 10-Jul-2019 13:16:42 "Antenna Positions", build 10-Jul-2019 13:16:42 // Ephemeris build 10-Jul-2019 13:16:42 "Radial Velocity", "Distance (rho)", build 10-Jul-2019 13:16:42 - "Atm Transmission", "Tsky", "None") build 10-Jul-2019 13:16:42 + "Atm Transmission", "Tsky", "Image Sideband", "None") build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Returns the axes scale for the given axis. Currently NORMAL unless the build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMSDBusApp.cc b/code/plotms/PlotMS/PlotMSDBusApp.cc build 10-Jul-2019 13:16:42 index 8a9a955..10883bd 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMSDBusApp.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMSDBusApp.cc build 10-Jul-2019 13:16:42 @@ -57,6 +57,7 @@ const String PlotMSDBusApp::PARAM_AXIS_Y = "yAxis"; build 10-Jul-2019 13:16:42 const String PlotMSDBusApp::PARAM_AXIS_Y_LOCATION = "yAxisLocation"; build 10-Jul-2019 13:16:42 const String PlotMSDBusApp::PARAM_SHOWATM = "showatm"; build 10-Jul-2019 13:16:42 const String PlotMSDBusApp::PARAM_SHOWTSKY = "showtsky"; build 10-Jul-2019 13:16:42 +const String PlotMSDBusApp::PARAM_SHOWIMAGE = "showimage"; build 10-Jul-2019 13:16:42 const String PlotMSDBusApp::PARAM_GRIDROWS = "gridRows"; build 10-Jul-2019 13:16:42 const String PlotMSDBusApp::PARAM_GRIDCOLS = "gridCols"; build 10-Jul-2019 13:16:42 const String PlotMSDBusApp::PARAM_SHOWLEGEND = "showLegend"; build 10-Jul-2019 13:16:42 @@ -411,6 +412,7 @@ void PlotMSDBusApp::dbusRunXmlMethod( build 10-Jul-2019 13:16:42 PMS::dataColumn(c->yDataColumn())); build 10-Jul-2019 13:16:42 ret.define(PARAM_SHOWATM, c->showAtm()); build 10-Jul-2019 13:16:42 ret.define(PARAM_SHOWTSKY, c->showTsky()); build 10-Jul-2019 13:16:42 + ret.define(PARAM_SHOWIMAGE, c->showImage()); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if (disp!=NULL) { build 10-Jul-2019 13:16:42 @@ -628,6 +630,11 @@ void PlotMSDBusApp::dbusRunXmlMethod( build 10-Jul-2019 13:16:42 bool show = parameters.asBool(PARAM_SHOWTSKY); build 10-Jul-2019 13:16:42 ppcache->setShowTsky(show); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 + if(parameters.isDefined(PARAM_SHOWIMAGE) && build 10-Jul-2019 13:16:42 + parameters.dataType(PARAM_SHOWIMAGE) == TpBool) { build 10-Jul-2019 13:16:42 + bool show = parameters.asBool(PARAM_SHOWIMAGE); build 10-Jul-2019 13:16:42 + ppcache->setShowImage(show); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if(parameters.isDefined(PARAM_CANVASTITLE) && build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMSDBusApp.h b/code/plotms/PlotMS/PlotMSDBusApp.h build 10-Jul-2019 13:16:42 index 1cd8cc6..312f9e0 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMSDBusApp.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMSDBusApp.h build 10-Jul-2019 13:16:42 @@ -71,6 +71,7 @@ public: build 10-Jul-2019 13:16:42 static const casacore::String PARAM_AXIS_Y_LOCATION; build 10-Jul-2019 13:16:42 static const casacore::String PARAM_SHOWATM; // bool build 10-Jul-2019 13:16:42 static const casacore::String PARAM_SHOWTSKY; // bool build 10-Jul-2019 13:16:42 + static const casacore::String PARAM_SHOWIMAGE; // bool build 10-Jul-2019 13:16:42 static const casacore::String PARAM_GRIDROWS; //int build 10-Jul-2019 13:16:42 static const casacore::String PARAM_GRIDCOLS; //int build 10-Jul-2019 13:16:42 static const casacore::String PARAM_CLEARSELECTIONS; // bool build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/PlotMSSelection.cc b/code/plotms/PlotMS/PlotMSSelection.cc build 10-Jul-2019 13:16:42 index adddfe1..3b52a52 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/PlotMS/PlotMSSelection.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/PlotMSSelection.cc build 10-Jul-2019 13:16:42 @@ -94,7 +94,7 @@ String PlotMSSelection::toStringShort() const { build 10-Jul-2019 13:16:42 stringstream ss; build 10-Jul-2019 13:16:42 ss.precision(6); build 10-Jul-2019 13:16:42 if ( !isEmpty() ){ build 10-Jul-2019 13:16:42 - ss << " Sel: "; build 10-Jul-2019 13:16:42 + ss << " Selection: "; build 10-Jul-2019 13:16:42 const vector& f = fields(); build 10-Jul-2019 13:16:42 bool valueWritten = false; build 10-Jul-2019 13:16:42 for(unsigned int i = 0; i < f.size(); i++){ build 10-Jul-2019 13:16:42 @@ -105,7 +105,7 @@ String PlotMSSelection::toStringShort() const { build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 valueWritten = true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 - ss << f[i] << ": "< build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +namespace casa { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + constexpr char grpcPlotMS::APP_SERVER_SWITCH[]; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPMSShutdown::now(::grpc::ServerContext*, const ::google::protobuf::Empty*, ::google::protobuf::Empty*) { build 10-Jul-2019 13:16:42 + if (getenv("GRPC_DEBUG")) { build 10-Jul-2019 13:16:42 + std::cout << "received shutdown notification..." << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ( itsPlotms_ ) { build 10-Jul-2019 13:16:42 + itsPlotms_ = NULL; build 10-Jul-2019 13:16:42 + static auto bye_bye = std::async( std::launch::async, [=]( ) { sleep(2); emit exit_now( ); } ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + grpcPlotMS::grpcPlotMS( PlotEngine *pe ) : itsPlotms_(pe), plotter_(0) { } build 10-Jul-2019 13:16:42 + void grpcPlotMS::set_plotter( PlotMSPlotter *plt ) { plotter_ = plt; } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 +#define DO_ONE_UPDATE \ build 10-Jul-2019 13:16:42 + switch ( iter->first.second ) { \ build 10-Jul-2019 13:16:42 + case T_MSDATA: \ build 10-Jul-2019 13:16:42 + *sys_ppdata(sp) = *((PMS_PP_MSData*)iter->second); break; \ build 10-Jul-2019 13:16:42 + case T_CACHE: \ build 10-Jul-2019 13:16:42 + *sys_ppcache(sp) = *((PMS_PP_Cache*)iter->second); break; \ build 10-Jul-2019 13:16:42 + case T_AXES: \ build 10-Jul-2019 13:16:42 + *sys_ppaxes(sp) = *((PMS_PP_Axes*)iter->second); break; \ build 10-Jul-2019 13:16:42 + case T_ITER: \ build 10-Jul-2019 13:16:42 + *sys_ppiter(sp) = *((PMS_PP_Iteration*)iter->second); break; \ build 10-Jul-2019 13:16:42 + case T_DISP: \ build 10-Jul-2019 13:16:42 + *sys_ppdisp(sp) = *((PMS_PP_Display*)iter->second); break; \ build 10-Jul-2019 13:16:42 + case T_CAN: \ build 10-Jul-2019 13:16:42 + *sys_ppcan(sp) = *((PMS_PP_Canvas*)iter->second); break; \ build 10-Jul-2019 13:16:42 + case T_HEAD: \ build 10-Jul-2019 13:16:42 + *sys_pphead(sp) = *((PMS_PP_PageHeader*)iter->second); break; \ build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + void grpcPlotMS::update_parameters( int index ) { build 10-Jul-2019 13:16:42 + PlotMSPlotParameters* sp = itsPlotms_->getPlotManager().plotParameters(index); build 10-Jul-2019 13:16:42 + if ( sp == NULL ) { build 10-Jul-2019 13:16:42 + fprintf(stderr, "internal inconsistency, plot parameter %d not available\n", index); build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + sp->holdNotification( ); build 10-Jul-2019 13:16:42 + for ( auto iter = param_groups.begin( ); iter != param_groups.end( ); ++iter ) { build 10-Jul-2019 13:16:42 + if ( iter->first.first != index ) continue; build 10-Jul-2019 13:16:42 + DO_ONE_UPDATE build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ( sp != NULL) sp->releaseNotification(); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + void grpcPlotMS::update_parameters( ) { build 10-Jul-2019 13:16:42 + auto mgr = itsPlotms_->getPlotManager(); build 10-Jul-2019 13:16:42 + // ----- hold all notifications build 10-Jul-2019 13:16:42 + for ( int index = 0; index < mgr.numPlots( ); ++index ) { build 10-Jul-2019 13:16:42 + PlotMSPlotParameters* sp = mgr.plotParameters(index); build 10-Jul-2019 13:16:42 + if ( sp == NULL ) continue; build 10-Jul-2019 13:16:42 + sp->holdNotification( ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- update parameters build 10-Jul-2019 13:16:42 + for ( auto iter = param_groups.begin( ); iter != param_groups.end( ); ++iter ) { build 10-Jul-2019 13:16:42 + PlotMSPlotParameters* sp = mgr.plotParameters(iter->first.first); build 10-Jul-2019 13:16:42 + if ( sp == NULL ) continue; build 10-Jul-2019 13:16:42 + DO_ONE_UPDATE build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- release all notifications build 10-Jul-2019 13:16:42 + for ( int index = 0; index < mgr.numPlots( ); ++index ) { build 10-Jul-2019 13:16:42 + PlotMSPlotParameters* sp = mgr.plotParameters(index); build 10-Jul-2019 13:16:42 + if ( sp == NULL ) continue; build 10-Jul-2019 13:16:42 + sp->releaseNotification(); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 +#define PLOT_PARAM(NAME,TYPE) \ build 10-Jul-2019 13:16:42 + TYPE *grpcPlotMS::sys_ ## NAME(PlotMSPlotParameters* sp) { \ build 10-Jul-2019 13:16:42 + TYPE *plotdata = sp->typedGroup( ); \ build 10-Jul-2019 13:16:42 + if ( plotdata == NULL) { \ build 10-Jul-2019 13:16:42 + sp->setGroup( ); \ build 10-Jul-2019 13:16:42 + plotdata = sp->typedGroup( ); \ build 10-Jul-2019 13:16:42 + } \ build 10-Jul-2019 13:16:42 + return plotdata; \ build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + PLOT_PARAM(ppdata,PMS_PP_MSData) build 10-Jul-2019 13:16:42 + PLOT_PARAM(ppcache,PMS_PP_Cache) build 10-Jul-2019 13:16:42 + PLOT_PARAM(ppaxes,PMS_PP_Axes) build 10-Jul-2019 13:16:42 + PLOT_PARAM(ppiter,PMS_PP_Iteration) build 10-Jul-2019 13:16:42 + PLOT_PARAM(ppdisp,PMS_PP_Display) build 10-Jul-2019 13:16:42 + PLOT_PARAM(ppcan,PMS_PP_Canvas) build 10-Jul-2019 13:16:42 + PLOT_PARAM(pphead,PMS_PP_PageHeader) build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 +#define GRPC_PARAM(NAME, TAG,TYPE) \ build 10-Jul-2019 13:16:42 + TYPE *grpcPlotMS::NAME(int index) { \ build 10-Jul-2019 13:16:42 + std::pair idx(index,TAG); \ build 10-Jul-2019 13:16:42 + auto ptr = (TYPE*) param_groups[idx]; \ build 10-Jul-2019 13:16:42 + if ( ptr == NULL ) { \ build 10-Jul-2019 13:16:42 + param_groups[idx] = ptr = new TYPE(itsPlotms_->getPlotFactory( )); \ build 10-Jul-2019 13:16:42 + PlotMSPlotParameters *sp = itsPlotms_->getPlotManager().plotParameters(index); \ build 10-Jul-2019 13:16:42 + sp->holdNotification( ); \ build 10-Jul-2019 13:16:42 + *ptr = *sys_ ## NAME(sp); \ build 10-Jul-2019 13:16:42 + sp->releaseNotification(); \ build 10-Jul-2019 13:16:42 + } \ build 10-Jul-2019 13:16:42 + return ptr; \ build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + GRPC_PARAM(ppdata,T_MSDATA,PMS_PP_MSData) build 10-Jul-2019 13:16:42 + GRPC_PARAM(ppcache,T_CACHE,PMS_PP_Cache) build 10-Jul-2019 13:16:42 + GRPC_PARAM(ppaxes,T_AXES,PMS_PP_Axes) build 10-Jul-2019 13:16:42 + GRPC_PARAM(ppiter,T_ITER,PMS_PP_Iteration) build 10-Jul-2019 13:16:42 + GRPC_PARAM(ppdisp,T_DISP,PMS_PP_Display) build 10-Jul-2019 13:16:42 + GRPC_PARAM(ppcan,T_CAN,PMS_PP_Canvas) build 10-Jul-2019 13:16:42 + GRPC_PARAM(pphead,T_HEAD,PMS_PP_PageHeader) build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + void grpcPlotMS::qtGO( std::function func ) { build 10-Jul-2019 13:16:42 + std::lock_guard exc(plotter_->grpc_queue_mutex); build 10-Jul-2019 13:16:42 + plotter_->grpc_queue.push(func); build 10-Jul-2019 13:16:42 + emit new_op( ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::getPlotMSPid( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty*, build 10-Jul-2019 13:16:42 + ::rpc::plotms::Pid *reply ) { build 10-Jul-2019 13:16:42 + static const auto debug = getenv("GRPC_DEBUG"); build 10-Jul-2019 13:16:42 + if (debug) { build 10-Jul-2019 13:16:42 + std::cout << "received getPlotMSPid( ) event... (thread " << build 10-Jul-2019 13:16:42 + std::this_thread::get_id() << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + // build 10-Jul-2019 13:16:42 + // the DBus version of plotms does some dance with getting and *setting* the pid... build 10-Jul-2019 13:16:42 + // I doubt that's necessary with grpc... build 10-Jul-2019 13:16:42 + reply->set_id(getpid( )); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setShowGui( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::Toggle *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + static const auto debug = getenv("GRPC_DEBUG"); build 10-Jul-2019 13:16:42 + if (debug) { build 10-Jul-2019 13:16:42 + std::cout << "received setShowGui( " << req->state( ) << " ) event... (thread " << build 10-Jul-2019 13:16:42 + std::this_thread::get_id() << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + qtGO( [=]( ){ itsPlotms_->showGUI(req->state( )); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setGridSize( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::GridSize *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + static const auto debug = getenv("GRPC_DEBUG"); build 10-Jul-2019 13:16:42 + if (debug) { build 10-Jul-2019 13:16:42 + std::cout << "received setGridSize( " << req->rows( ) << ", " << req->cols( ) << " ) event... (thread " << build 10-Jul-2019 13:16:42 + std::this_thread::get_id() << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + auto rows = req->rows( ); build 10-Jul-2019 13:16:42 + auto cols = req->cols( ); build 10-Jul-2019 13:16:42 + qtGO( [=]( ){ itsPlotms_->getParameters().setGridSize( rows, cols ); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::isDrawing( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty*, build 10-Jul-2019 13:16:42 + ::rpc::plotms::Toggle *reply ) { build 10-Jul-2019 13:16:42 + static const auto debug = getenv("GRPC_DEBUG"); build 10-Jul-2019 13:16:42 + if (debug) { build 10-Jul-2019 13:16:42 + std::cout << "received isDrawing( ) event... (thread " << build 10-Jul-2019 13:16:42 + std::this_thread::get_id() << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + // build 10-Jul-2019 13:16:42 + // the DBus version of plotms does some dance with getting and *setting* the pid... build 10-Jul-2019 13:16:42 + // I doubt that's necessary with grpc... build 10-Jul-2019 13:16:42 + bool isdrawing = itsPlotms_->isDrawing( ); build 10-Jul-2019 13:16:42 + if (debug) { build 10-Jul-2019 13:16:42 + std::cout << "\t\tresult: " << isdrawing << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + reply->set_state(isdrawing); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::clearPlots( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty*, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + static const auto debug = getenv("GRPC_DEBUG"); build 10-Jul-2019 13:16:42 + if (debug) { build 10-Jul-2019 13:16:42 + std::cout << "received clearPlots( ) event... (thread " << build 10-Jul-2019 13:16:42 + std::this_thread::get_id() << ")" << std::endl; build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + qtGO( [=]( ){ itsPlotms_->clearPlots( ); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSFilename( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetVis *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + std::string name = req->name( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ppdata(index)->setFilename(name); build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotAxes( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetAxes *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + std::string x = req->x( ); build 10-Jul-2019 13:16:42 + std::string y = req->y( ); build 10-Jul-2019 13:16:42 + std::string xdata = req->xdata( ); build 10-Jul-2019 13:16:42 + std::string ydata = req->ydata( ); build 10-Jul-2019 13:16:42 + std::string xframe = req->xframe( ); build 10-Jul-2019 13:16:42 + std::string yframe = req->yframe( ); build 10-Jul-2019 13:16:42 + std::string xinterp = req->xinterp( ); build 10-Jul-2019 13:16:42 + std::string yinterp = req->yinterp( ); build 10-Jul-2019 13:16:42 + std::string yaxisloc = req->yaxisloc( ); build 10-Jul-2019 13:16:42 + int dataindex = req->dataindex( ); build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto cache = ppcache(index); build 10-Jul-2019 13:16:42 + if (x.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto a = PMS::axis(x, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setXAxis(a,dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (y.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto a = PMS::axis(x, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setYAxis(a,dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (xdata.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto dc = PMS::dataColumn(xdata, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setXDataColumn(dc,dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (ydata.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto dc = PMS::dataColumn(ydata, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setYDataColumn(dc,dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (xframe.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + PMS::CoordSystem cs = PMS::coordSystem(xframe, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setXFrame(cs, dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (yframe.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + PMS::CoordSystem cs = PMS::coordSystem(yframe, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setYFrame(cs, dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (xinterp.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto im = PMS::interpMethod(xinterp, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setXInterp(im,dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (yinterp.size( ) > 0) { build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto im = PMS::interpMethod(yinterp, &ok); build 10-Jul-2019 13:16:42 + if (ok) cache->setYInterp(im,dataindex); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (yaxisloc.size( ) > 0) ppaxes(index)->setYAxis(yaxisloc == "right" ? Y_RIGHT : Y_LEFT,dataindex); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setShowAtm( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetToggle *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool show = req->state( ); build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + ppcache(index)->setShowAtm(show); build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setShowTsky( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetToggle *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool show = req->state( ); build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + ppcache(index)->setShowTsky(show); build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + void grpcPlotMS::populate_selection( const ::rpc::plotms::SetSelection &req, PlotMSSelection &sel ) { build 10-Jul-2019 13:16:42 + sel.setField(req.field( )); build 10-Jul-2019 13:16:42 + sel.setSpw(req.spw( )); build 10-Jul-2019 13:16:42 + sel.setTimerange(req.timerange( )); build 10-Jul-2019 13:16:42 + sel.setUvrange(req.uvrange( )); build 10-Jul-2019 13:16:42 + sel.setAntenna(req.antenna( )); build 10-Jul-2019 13:16:42 + sel.setScan(req.scan( )); build 10-Jul-2019 13:16:42 + sel.setCorr(req.corr( )); build 10-Jul-2019 13:16:42 + sel.setArray(req.array( )); build 10-Jul-2019 13:16:42 + sel.setObservation(req.observation( )); build 10-Jul-2019 13:16:42 + sel.setIntent(req.intent( )); build 10-Jul-2019 13:16:42 + sel.setFeed(req.feed( )); build 10-Jul-2019 13:16:42 + sel.setMsselect(req.msselect( )); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSSelection( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetSelection *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto data = ppdata(index); build 10-Jul-2019 13:16:42 + PlotMSSelection sel = data->selection( ); build 10-Jul-2019 13:16:42 + populate_selection( *req, sel ); build 10-Jul-2019 13:16:42 + data->setSelection(sel); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSAveraging( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetAveraging *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto data = ppdata(index); build 10-Jul-2019 13:16:42 + PlotMSAveraging avg(data->averaging( )); build 10-Jul-2019 13:16:42 + avg.setChannel(req->channel( )); build 10-Jul-2019 13:16:42 + avg.setTime(req->time( )); build 10-Jul-2019 13:16:42 + avg.setScan(req->scan( )); build 10-Jul-2019 13:16:42 + avg.setField(req->field( )); build 10-Jul-2019 13:16:42 + avg.setBaseline(req->baseline( )); build 10-Jul-2019 13:16:42 + avg.setAntenna(req->antenna( )); build 10-Jul-2019 13:16:42 + avg.setSpw(req->spw( )); build 10-Jul-2019 13:16:42 + avg.setScalarAve(req->scalar( )); build 10-Jul-2019 13:16:42 + data->setAveraging(avg); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSTransformations( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetTransform *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto data = ppdata(index); build 10-Jul-2019 13:16:42 + PlotMSTransformations trans(data->transformations( )); build 10-Jul-2019 13:16:42 + trans.setFrame(req->freqframe( )); build 10-Jul-2019 13:16:42 + trans.setVelDef(req->veldef( )); build 10-Jul-2019 13:16:42 + casacore::String err; build 10-Jul-2019 13:16:42 + casacore::QuantumHolder qh; build 10-Jul-2019 13:16:42 + if (qh.fromString(err, req->restfreq( ))) trans.setRestFreq(qh.asQuantity( )); build 10-Jul-2019 13:16:42 + trans.setXpcOffset(req->xshift( )); build 10-Jul-2019 13:16:42 + trans.setYpcOffset(req->yshift( )); build 10-Jul-2019 13:16:42 + data->setTransformations(trans); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSCalibration( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetCalibration *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto data = ppdata(index); build 10-Jul-2019 13:16:42 + PlotMSCalibration cal(data->calibration( )); build 10-Jul-2019 13:16:42 + cal.setUseCallib(req->uselib( )); build 10-Jul-2019 13:16:42 + cal.setCalLibrary(req->callib( )); build 10-Jul-2019 13:16:42 + data->setCalibration(cal); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setFlagExtension( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetFlagExtension *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + PlotMSFlagging flag; build 10-Jul-2019 13:16:42 + flag.setExtend(req->extend( )); build 10-Jul-2019 13:16:42 + flag.setCorr(req->correlation( )); build 10-Jul-2019 13:16:42 + flag.setChannel(req->channel( )); build 10-Jul-2019 13:16:42 + flag.setSpw(req->spw( )); build 10-Jul-2019 13:16:42 + flag.setAntenna(req->antenna( )); build 10-Jul-2019 13:16:42 + flag.setTime(req->time( )); build 10-Jul-2019 13:16:42 + flag.setScans(req->scans( )); build 10-Jul-2019 13:16:42 + flag.setField(req->field( )); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if (req->use_alternative( )) { build 10-Jul-2019 13:16:42 + PlotMSSelection sel; build 10-Jul-2019 13:16:42 + populate_selection(req->alternative_selection( ),sel); build 10-Jul-2019 13:16:42 + flag.setSelectionAlternate(true); build 10-Jul-2019 13:16:42 + flag.setSelectionAlternateSelection(sel); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + flag.setSelectionSelected(true); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + qtGO( [=]( ) { itsPlotms_->setFlagging( flag ); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setExportRange( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::ExportRange *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + PlotMSExportParam& exportParams = itsPlotms_->getExportParameters(); build 10-Jul-2019 13:16:42 + exportParams.setExportRange(req->value( )); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSIterate( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetIterate *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + auto param = ppiter(index); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + PlotMSIterParam iter(param->iterParam( )); build 10-Jul-2019 13:16:42 + iter.setIterAxis(req->iteraxis( )); build 10-Jul-2019 13:16:42 + iter.setGridRow(req->rowindex( )); build 10-Jul-2019 13:16:42 + iter.setGridCol(req->colindex( ) ); build 10-Jul-2019 13:16:42 + if (req->iteraxis( ) == "") { build 10-Jul-2019 13:16:42 + iter.setGlobalScaleX(false); build 10-Jul-2019 13:16:42 + iter.setGlobalScaleY(false); build 10-Jul-2019 13:16:42 + iter.setCommonAxisX(false); build 10-Jul-2019 13:16:42 + iter.setCommonAxisY(false); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + iter.setGlobalScaleX(req->xselfscale( )); build 10-Jul-2019 13:16:42 + iter.setGlobalScaleY(req->yselfscale( )); build 10-Jul-2019 13:16:42 + iter.setCommonAxisX(req->commonaxisx( )); build 10-Jul-2019 13:16:42 + iter.setCommonAxisY(req->commonaxisy( )); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + param->setIterParam(iter); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setColorAxis( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto a = PMS::axis(req->value( ), &ok); build 10-Jul-2019 13:16:42 + if (ok) ppdisp(index)->setColorize(true,a); build 10-Jul-2019 13:16:42 + else ppdisp(index)->setColorize(false); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setSymbol( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetSymbol *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + PlotSymbolPtr ps = itsPlotms_->createSymbol( req->shape( ), req->size( ), req->color( ), req->fill( ), req->outline( ) ); build 10-Jul-2019 13:16:42 + ppdisp(index)->setUnflaggedSymbol(ps, req->dataindex( )); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setFlaggedSymbol( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetSymbol *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + PlotSymbolPtr ps = itsPlotms_->createSymbol( req->shape( ), req->size( ), req->color( ), req->fill( ), req->outline( ) ); build 10-Jul-2019 13:16:42 + ppdisp(index)->setFlaggedSymbol(ps, req->dataindex( )); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setConnect( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetConnect *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ppdisp(index)->setXConnect(req->xconnector( )); build 10-Jul-2019 13:16:42 + ppdisp(index)->setTimeConnect(req->timeconnector( )); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setLegend( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetLegend *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + string pos = req->position( ); build 10-Jul-2019 13:16:42 + bool show = req->show( ); build 10-Jul-2019 13:16:42 + if ( show && pos == "" ) pos = "upperright"; build 10-Jul-2019 13:16:42 + ppcan(index)->showLegend( show, pos, 0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setTitle( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto canvas = ppcan(index); build 10-Jul-2019 13:16:42 + auto title = req->value( ); build 10-Jul-2019 13:16:42 + PlotMSLabelFormat f = canvas->titleFormat(); build 10-Jul-2019 13:16:42 + if ( title.size( ) == 0 ) f = PlotMSLabelFormat(PMS::DEFAULT_TITLE_FORMAT); build 10-Jul-2019 13:16:42 + else f.format = title; build 10-Jul-2019 13:16:42 + canvas->setTitleFormat(f); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 +#define SET_FONT(NAME,SETNAME) \ build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::set ## NAME ## Font( ::grpc::ServerContext *context, \ build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetInt *req, \ build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { \ build 10-Jul-2019 13:16:42 + int index = req->index( ); \ build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + bool update = req->update( ); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + auto canvas = ppcan(index); \ build 10-Jul-2019 13:16:42 + int size = req->value( ); \ build 10-Jul-2019 13:16:42 + canvas->set ## SETNAME ## FontSet(size > 0); \ build 10-Jul-2019 13:16:42 + canvas->set ## NAME ## Font(size); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); \ build 10-Jul-2019 13:16:42 + return grpc::Status::OK; \ build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + SET_FONT(Title,Title) build 10-Jul-2019 13:16:42 + SET_FONT(XAxis,X) build 10-Jul-2019 13:16:42 + SET_FONT(YAxis,Y) build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 +#define SETAXISLABEL(TUP,TLO) \ build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::set ## TUP ## AxisLabel( ::grpc::ServerContext *context, \ build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, \ build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { \ build 10-Jul-2019 13:16:42 + int index = req->index( ); \ build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + bool update = req->update( ); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + auto canvas = ppcan(index); \ build 10-Jul-2019 13:16:42 + auto fmt = req->value( ); \ build 10-Jul-2019 13:16:42 + PlotMSLabelFormat f = canvas->TLO ## LabelFormat(); \ build 10-Jul-2019 13:16:42 + if ( fmt.length()==0 ) f = PlotMSLabelFormat(PMS::DEFAULT_CANVAS_AXIS_LABEL_FORMAT); \ build 10-Jul-2019 13:16:42 + else f.format = fmt; \ build 10-Jul-2019 13:16:42 + canvas->set ## TUP ## LabelFormat(f); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); \ build 10-Jul-2019 13:16:42 + return grpc::Status::OK; \ build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + SETAXISLABEL(X,x) build 10-Jul-2019 13:16:42 + SETAXISLABEL(Y,y) build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + /* build 10-Jul-2019 13:16:42 + Determine line style enum from a given string. build 10-Jul-2019 13:16:42 + In other parts of CASA, in the , this is done - somewhere....? build 10-Jul-2019 13:16:42 + The reverse function, giving a string from the enum, is in casaqt/implement/QwtPlotter/QPOptions.h build 10-Jul-2019 13:16:42 + */ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + static PlotLine::Style StyleFromString(String s) { build 10-Jul-2019 13:16:42 + PlotLine::Style style = PlotLine::SOLID; // default, if we can't decipher the given string build 10-Jul-2019 13:16:42 + if (PMS::strEq(s, "dot", true)) style=PlotLine::DOTTED; build 10-Jul-2019 13:16:42 + else if (PMS::strEq(s, "dash", true)) style=PlotLine::DASHED; build 10-Jul-2019 13:16:42 + else if (PMS::strEq(s, "noline", true)) style=PlotLine::NOLINE; build 10-Jul-2019 13:16:42 + return style; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setGridParams( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetGrid *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + auto canvas = ppcan(index); build 10-Jul-2019 13:16:42 + canvas->showGridMajor(req->showmajor( )); build 10-Jul-2019 13:16:42 + canvas->showGridMinor(req->showminor( )); build 10-Jul-2019 13:16:42 + { PlotLinePtr plp = canvas->gridMajorLine(); build 10-Jul-2019 13:16:42 + plp->setColor(req->majorcolor( )); build 10-Jul-2019 13:16:42 + PlotLine::Style style = StyleFromString(req->majorstyle( )); build 10-Jul-2019 13:16:42 + plp->setStyle(style); build 10-Jul-2019 13:16:42 + plp->setWidth(req->majorwidth( )); build 10-Jul-2019 13:16:42 + canvas->setGridMajorLine(plp); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + { PlotLinePtr plp = canvas->gridMinorLine() ; build 10-Jul-2019 13:16:42 + plp->setColor(req->minorcolor( )); build 10-Jul-2019 13:16:42 + PlotLine::Style style = StyleFromString(req->minorstyle( )); build 10-Jul-2019 13:16:42 + plp->setStyle(style); build 10-Jul-2019 13:16:42 + plp->setWidth(req->minorwidth( )); build 10-Jul-2019 13:16:42 + canvas->setGridMinorLine(plp); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 +#define SET_RANGE(TYPE) \ build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::set ## TYPE ## Range( ::grpc::ServerContext *context, \ build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetRange *req, \ build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { \ build 10-Jul-2019 13:16:42 + int index = req->index( ); \ build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + bool update = req->update( ); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + prange_t minmax = prange_t(0.0, 0.0); /* this signals auto-ranging */ \ build 10-Jul-2019 13:16:42 + /* Override default with specific numbers only if manual ranging requested, */ \ build 10-Jul-2019 13:16:42 + /* and given max is greater than the min. */ \ build 10-Jul-2019 13:16:42 + if ( ! req->automatic( ) ) { \ build 10-Jul-2019 13:16:42 + double min = req->min( ); \ build 10-Jul-2019 13:16:42 + double max = req->max( ); \ build 10-Jul-2019 13:16:42 + if (max>min) minmax = prange_t(min, max); \ build 10-Jul-2019 13:16:42 + } \ build 10-Jul-2019 13:16:42 + ppaxes(index)->set ## TYPE ## Range( false , minmax ); \ build 10-Jul-2019 13:16:42 + \ build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); \ build 10-Jul-2019 13:16:42 + return grpc::Status::OK; \ build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + SET_RANGE(X) build 10-Jul-2019 13:16:42 + SET_RANGE(Y) build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::setPlotMSPageHeaderItems( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + int index = req->index( ); build 10-Jul-2019 13:16:42 + if ( invalid_index(index) ) return grpc::Status(grpc::StatusCode::OUT_OF_RANGE, "index out of range"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + bool update = req->update( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + PageHeaderItems items; build 10-Jul-2019 13:16:42 + items.setItems(req->value( )); build 10-Jul-2019 13:16:42 + pphead(index)->setPageHeaderItems(items); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( update ) qtGO( [=]( ) { update_parameters(index); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::save( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::Save *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + auto path = req->path( ); build 10-Jul-2019 13:16:42 + if ( path.size( ) == 0 ) return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "path must be provided"); build 10-Jul-2019 13:16:42 + bool ok = false; build 10-Jul-2019 13:16:42 + auto fmt = req->format( ); build 10-Jul-2019 13:16:42 + auto type = fmt.size( ) == 0 ? PlotExportFormat::typeForExtension(path, &ok) : build 10-Jul-2019 13:16:42 + PlotExportFormat::exportFormat(fmt, &ok); build 10-Jul-2019 13:16:42 + if ( ! ok ) return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "problem with format (or filename)"); build 10-Jul-2019 13:16:42 + PlotExportFormat format(type, path); build 10-Jul-2019 13:16:42 + format.verbose = req->verbose( ); build 10-Jul-2019 13:16:42 + format.resolution = req->highres( ) ? PlotExportFormat::HIGH : PlotExportFormat::SCREEN; build 10-Jul-2019 13:16:42 + format.dpi = req->dpi( ); build 10-Jul-2019 13:16:42 + format.width = req->width( ); build 10-Jul-2019 13:16:42 + format.height = req->height( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + std::promise prom; build 10-Jul-2019 13:16:42 + qtGO( [&]( ){ build 10-Jul-2019 13:16:42 + bool ok = itsPlotms_->save(format); build 10-Jul-2019 13:16:42 + prom.set_value(ok); build 10-Jul-2019 13:16:42 + } ); build 10-Jul-2019 13:16:42 + auto fut = prom.get_future( ); build 10-Jul-2019 13:16:42 + if ( ! fut.get( ) ) return grpc::Status(grpc::StatusCode::UNKNOWN, "export failed"); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + ::grpc::Status grpcPlotMS::update( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ) { build 10-Jul-2019 13:16:42 + qtGO( [=]( ) { update_parameters( ); } ); build 10-Jul-2019 13:16:42 + return grpc::Status::OK; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- build 10-Jul-2019 13:16:42 + bool grpcPlotMS::invalid_index(int index) { build 10-Jul-2019 13:16:42 + return index < 0 || index >= itsPlotms_->getPlotManager().numPlots( ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 diff --git a/code/plotms/PlotMS/grpcPlotMSAdaptor.qo.h b/code/plotms/PlotMS/grpcPlotMSAdaptor.qo.h build 10-Jul-2019 13:16:42 new file mode 100644 build 10-Jul-2019 13:16:42 index 0000000..b2a8cb5 build 10-Jul-2019 13:16:42 --- /dev/null build 10-Jul-2019 13:16:42 +++ b/code/plotms/PlotMS/grpcPlotMSAdaptor.qo.h build 10-Jul-2019 13:16:42 @@ -0,0 +1,219 @@ build 10-Jul-2019 13:16:42 +//# grpcPlotMSAdaptor.h.h: provides viewer services via grpc build 10-Jul-2019 13:16:42 +//# Copyright (C) 2019 build 10-Jul-2019 13:16:42 +//# Associated Universities, Inc. Washington DC, USA. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# This library is free software; you can redistribute it and/or modify it build 10-Jul-2019 13:16:42 +//# under the terms of the GNU Library General Public License as published by build 10-Jul-2019 13:16:42 +//# the Free Software Foundation; either version 2 of the License, or (at your build 10-Jul-2019 13:16:42 +//# option) any later version. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# This library is distributed in the hope that it will be useful, but WITHOUT build 10-Jul-2019 13:16:42 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 10-Jul-2019 13:16:42 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public build 10-Jul-2019 13:16:42 +//# License for more details. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# You should have received a copy of the GNU Library General Public License build 10-Jul-2019 13:16:42 +//# along with this library; if not, write to the Free Software Foundation, build 10-Jul-2019 13:16:42 +//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# Correspondence concerning AIPS++ should be addressed as follows: build 10-Jul-2019 13:16:42 +//# Internet email: aips2-request@nrao.edu. build 10-Jul-2019 13:16:42 +//# Postal address: AIPS++ Project Office build 10-Jul-2019 13:16:42 +//# National Radio Astronomy Observatory build 10-Jul-2019 13:16:42 +//# 520 Edgemont Road build 10-Jul-2019 13:16:42 +//# Charlottesville, VA 22903-2475 USA build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# $Id$ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#ifndef GRPCPLOTMSADAPTOR_H_ build 10-Jul-2019 13:16:42 +#define GRPCPLOTMSADAPTOR_H_ build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + class grpcPMSShutdown : public QObject, public ::casatools::rpc::Shutdown::Service { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Q_OBJECT //# Allows slot/signal definition. Must only occur in build 10-Jul-2019 13:16:42 + //# implement/.../*.h files build 10-Jul-2019 13:16:42 + public: build 10-Jul-2019 13:16:42 + grpcPMSShutdown( PlotEngine *qtv ) : itsPlotms_(qtv) { } build 10-Jul-2019 13:16:42 + ::grpc::Status now(::grpc::ServerContext*, const ::google::protobuf::Empty*, ::google::protobuf::Empty*); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + signals: build 10-Jul-2019 13:16:42 + void exit_now( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + private: build 10-Jul-2019 13:16:42 + PlotEngine *itsPlotms_; build 10-Jul-2019 13:16:42 + }; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + class grpcPlotMS : public QObject, public ::rpc::plotms::app::Service { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Q_OBJECT //# Allows slot/signal definition. Must only occur in build 10-Jul-2019 13:16:42 + //# implement/.../*.h files build 10-Jul-2019 13:16:42 + public: build 10-Jul-2019 13:16:42 + constexpr static char APP_SERVER_SWITCH[] = "--server"; build 10-Jul-2019 13:16:42 + grpcPlotMS( PlotEngine *pe ); build 10-Jul-2019 13:16:42 + void set_plotter( PlotMSPlotter *plt ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ::grpc::Status getPlotMSPid( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty*, build 10-Jul-2019 13:16:42 + ::rpc::plotms::Pid *reply ); build 10-Jul-2019 13:16:42 + ::grpc::Status setShowGui( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::Toggle *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setGridSize( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::GridSize *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status isDrawing( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty*, build 10-Jul-2019 13:16:42 + ::rpc::plotms::Toggle *reply ); build 10-Jul-2019 13:16:42 + ::grpc::Status clearPlots( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty*, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSFilename( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetVis *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotAxes( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetAxes *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setShowAtm( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetToggle *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setShowTsky( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetToggle *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSSelection( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetSelection *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSAveraging( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetAveraging *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSTransformations( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetTransform *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSCalibration( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetCalibration *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setFlagExtension( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetFlagExtension *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setExportRange( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::ExportRange *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSIterate( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetIterate *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setColorAxis( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setSymbol( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetSymbol *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setFlaggedSymbol( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetSymbol *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setConnect( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetConnect *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setLegend( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetLegend *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setTitle( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setTitleFont( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetInt *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setXAxisFont( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetInt *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setYAxisFont( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetInt *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setXAxisLabel( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setYAxisLabel( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setGridParams( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetGrid *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setXRange( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetRange *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setYRange( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetRange *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status setPlotMSPageHeaderItems( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::SetString *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status save( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::rpc::plotms::Save *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + ::grpc::Status update( ::grpc::ServerContext *context, build 10-Jul-2019 13:16:42 + const ::google::protobuf::Empty *req, build 10-Jul-2019 13:16:42 + ::google::protobuf::Empty* ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + protected: build 10-Jul-2019 13:16:42 + // update parameters build 10-Jul-2019 13:16:42 + void update_parameters( ); build 10-Jul-2019 13:16:42 + void update_parameters(int index); build 10-Jul-2019 13:16:42 + void populate_selection( const ::rpc::plotms::SetSelection &req, PlotMSSelection &sel ); build 10-Jul-2019 13:16:42 + enum group_tags { T_MSDATA, T_CACHE, T_AXES, T_ITER, T_DISP, T_CAN, T_HEAD }; build 10-Jul-2019 13:16:42 + std::map,PlotMSPlotParameters::Group*> param_groups; build 10-Jul-2019 13:16:42 + PMS_PP_MSData *sys_ppdata(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_Cache *sys_ppcache(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_Axes *sys_ppaxes(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_Iteration *sys_ppiter(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_Display *sys_ppdisp(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_Canvas *sys_ppcan(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_PageHeader *sys_pphead(PlotMSPlotParameters* sp); build 10-Jul-2019 13:16:42 + PMS_PP_MSData *ppdata(int index); build 10-Jul-2019 13:16:42 + PMS_PP_Cache *ppcache(int index); build 10-Jul-2019 13:16:42 + PMS_PP_Axes *ppaxes(int index); build 10-Jul-2019 13:16:42 + PMS_PP_Iteration *ppiter(int index); build 10-Jul-2019 13:16:42 + PMS_PP_Display *ppdisp(int index); build 10-Jul-2019 13:16:42 + PMS_PP_Canvas *ppcan(int index); build 10-Jul-2019 13:16:42 + PMS_PP_PageHeader *pphead(int index); build 10-Jul-2019 13:16:42 + void qtGO( std::function ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + signals: build 10-Jul-2019 13:16:42 + void new_op( ); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + private: build 10-Jul-2019 13:16:42 + bool invalid_index( int ); build 10-Jul-2019 13:16:42 + PlotEngine *itsPlotms_; build 10-Jul-2019 13:16:42 + PlotMSPlotter *plotter_; build 10-Jul-2019 13:16:42 + }; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + class grpcPlotMSState { build 10-Jul-2019 13:16:42 + public: build 10-Jul-2019 13:16:42 + grpcPlotMSState(PlotEngine *v) : build 10-Jul-2019 13:16:42 + plotms_service(new grpcPlotMS(v)), build 10-Jul-2019 13:16:42 + shutdown_service(new grpcPMSShutdown(v)) { } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + std::string uri; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + std::unique_ptr server; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + std::unique_ptr plotms_service; build 10-Jul-2019 13:16:42 + std::unique_ptr shutdown_service; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ~grpcPlotMSState( ) { build 10-Jul-2019 13:16:42 + if (getenv("GRPC_DEBUG")) { build 10-Jul-2019 13:16:42 + fprintf(stdout, "stopping grpc server...\n"); build 10-Jul-2019 13:16:42 + fflush(stdout); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if ( server ) server->Shutdown( ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + }; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Plots/PlotMSPlot.cc b/code/plotms/Plots/PlotMSPlot.cc build 10-Jul-2019 13:16:42 index 780e4d1..fbaf64e 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Plots/PlotMSPlot.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Plots/PlotMSPlot.cc build 10-Jul-2019 13:16:42 @@ -311,67 +311,88 @@ vector PlotMSPlot::getCachedData(){ build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 vector PlotMSPlot::getCachedAxes() { build 10-Jul-2019 13:16:42 - PMS_PP_Cache* c = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 - // get default axes if not given by user build 10-Jul-2019 13:16:42 - for(uInt i=0; inumXAxes(); i++){ build 10-Jul-2019 13:16:42 - if (c->xAxis(i) == PMS::NONE) build 10-Jul-2019 13:16:42 - c->setXAxis(getDefaultXAxis(), i); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - for(uInt i=0; inumYAxes(); i++){ build 10-Jul-2019 13:16:42 - if (c->yAxis(i) == PMS::NONE) { build 10-Jul-2019 13:16:42 - if (itsCache_->calType().startsWith("Xf")) { build 10-Jul-2019 13:16:42 + PMS_PP_Cache* c = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 + // get default axes if not given by user build 10-Jul-2019 13:16:42 + for (uInt i=0; i < c->numXAxes(); i++){ build 10-Jul-2019 13:16:42 + if (c->xAxis(i) == PMS::NONE) build 10-Jul-2019 13:16:42 + c->setXAxis(getDefaultXAxis(), i); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + for (uInt i=0; i < c->numYAxes(); i++){ build 10-Jul-2019 13:16:42 + if (c->yAxis(i) == PMS::NONE) { build 10-Jul-2019 13:16:42 + if (itsCache_->calType().startsWith("Xf")) { build 10-Jul-2019 13:16:42 c->setYAxis(PMS::GPHASE, i); build 10-Jul-2019 13:16:42 - } else if (itsCache_->calType() == "GSPLINE") { build 10-Jul-2019 13:16:42 + } else if (itsCache_->calType() == "GSPLINE") { build 10-Jul-2019 13:16:42 PMS_PP_MSData* d = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 c->setYAxis(getGsplineAxis(d->filename()), i); build 10-Jul-2019 13:16:42 - } else { build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 c->setYAxis(PMS::DEFAULT_YAXIS, i); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // add ATM/TSKY yaxis "under the hood" if valid xaxis build 10-Jul-2019 13:16:42 - if (c->showAtm() || c->showTsky()) { build 10-Jul-2019 13:16:42 - PMS::Axis xaxis = c->xAxis(); build 10-Jul-2019 13:16:42 - bool validXAxis = (xaxis==PMS::CHANNEL || xaxis==PMS::FREQUENCY ); build 10-Jul-2019 13:16:42 - if (!validXAxis) { build 10-Jul-2019 13:16:42 - c->setShowAtm(false); build 10-Jul-2019 13:16:42 - c->setShowTsky(false); build 10-Jul-2019 13:16:42 - itsParent_->showWarning("Overlays are valid only when xaxis is Channel or Frequency"); build 10-Jul-2019 13:16:42 - } else { build 10-Jul-2019 13:16:42 - // add here for script client build 10-Jul-2019 13:16:42 - bool found(false); build 10-Jul-2019 13:16:42 - const vector yAxes = c->yAxes(); build 10-Jul-2019 13:16:42 - PMS::Axis atmAxis = (c->showAtm() ? PMS::ATM : PMS::TSKY); build 10-Jul-2019 13:16:42 - for (uInt i=0; inumXAxes(); build 10-Jul-2019 13:16:42 - c->setAxes(xaxis, atmAxis, c->xDataColumn(0), build 10-Jul-2019 13:16:42 - PMS::DEFAULT_DATACOLUMN, index); build 10-Jul-2019 13:16:42 - // set Axes positions build 10-Jul-2019 13:16:42 - PMS_PP_Axes* a = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 - a->resize(index+1, true); // copy values build 10-Jul-2019 13:16:42 - a->setAxes(a->xAxis(index-1), Y_RIGHT, index); build 10-Jul-2019 13:16:42 - // keep same xaxis range build 10-Jul-2019 13:16:42 - a->setXRange(a->xRangeSet(index-1), a->xRange(index-1), index); build 10-Jul-2019 13:16:42 - // set Display symbol color build 10-Jul-2019 13:16:42 - PMS_PP_Display* disp = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 - PlotSymbolPtr atmSymbol = disp->unflaggedSymbol(index); build 10-Jul-2019 13:16:42 - atmSymbol->setSymbol("circle"); build 10-Jul-2019 13:16:42 - atmSymbol->setSize(2,2); build 10-Jul-2019 13:16:42 - atmSymbol->setColor("#FF00FF"); build 10-Jul-2019 13:16:42 - disp->setUnflaggedSymbol(atmSymbol, index); build 10-Jul-2019 13:16:42 - PlotSymbolPtr flaggedSymbol = disp->flaggedSymbol(); build 10-Jul-2019 13:16:42 - disp->setFlaggedSymbol(flaggedSymbol, index); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + // add ATM/TSKY yaxis "under the hood" if valid xaxis build 10-Jul-2019 13:16:42 + if (c->showAtm() || c->showTsky()) { build 10-Jul-2019 13:16:42 + PMS::Axis xaxis = c->xAxis(); build 10-Jul-2019 13:16:42 + bool validXAxis = (xaxis==PMS::CHANNEL || xaxis==PMS::FREQUENCY ); build 10-Jul-2019 13:16:42 + if (!validXAxis) { build 10-Jul-2019 13:16:42 + c->setShowAtm(false); build 10-Jul-2019 13:16:42 + c->setShowTsky(false); build 10-Jul-2019 13:16:42 + c->setShowImage(false); build 10-Jul-2019 13:16:42 + itsParent_->showWarning("Overlays are valid only when xaxis is Channel or Frequency"); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + // add here for script client build 10-Jul-2019 13:16:42 + bool foundOverlayAxis(false), foundImageAxis(false); build 10-Jul-2019 13:16:42 + const vector yAxes = c->yAxes(); build 10-Jul-2019 13:16:42 + PMS::Axis overlayAxis = (c->showAtm() ? PMS::ATM : PMS::TSKY); build 10-Jul-2019 13:16:42 + for (uInt i=0; inumXAxes(); build 10-Jul-2019 13:16:42 + c->setAxes(xaxis, overlayAxis, c->xDataColumn(0), PMS::DEFAULT_DATACOLUMN, index); build 10-Jul-2019 13:16:42 + // set Axes positions build 10-Jul-2019 13:16:42 + PMS_PP_Axes* a = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 + a->resize(index+1, true); // copy values build 10-Jul-2019 13:16:42 + a->setAxes(a->xAxis(index-1), Y_RIGHT, index); build 10-Jul-2019 13:16:42 + // keep same xaxis range build 10-Jul-2019 13:16:42 + a->setXRange(a->xRangeSet(index-1), a->xRange(index-1), index); build 10-Jul-2019 13:16:42 + // set Display symbol color build 10-Jul-2019 13:16:42 + PMS_PP_Display* disp = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 + PlotSymbolPtr overlaySymbol = disp->unflaggedSymbol(index); build 10-Jul-2019 13:16:42 + overlaySymbol->setSymbol("circle"); build 10-Jul-2019 13:16:42 + overlaySymbol->setSize(2,2); build 10-Jul-2019 13:16:42 + overlaySymbol->setColor("#FF00FF"); // magenta build 10-Jul-2019 13:16:42 + disp->setUnflaggedSymbol(overlaySymbol, index); build 10-Jul-2019 13:16:42 + PlotSymbolPtr flaggedSymbol = disp->flaggedSymbol(); build 10-Jul-2019 13:16:42 + disp->setFlaggedSymbol(flaggedSymbol, index); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + if (c->showImage() && !foundImageAxis) { build 10-Jul-2019 13:16:42 + // add IMAGESB (image sideband) to Cache axes build 10-Jul-2019 13:16:42 + int index = c->numXAxes(); build 10-Jul-2019 13:16:42 + c->setAxes(xaxis, PMS::IMAGESB, c->xDataColumn(0), PMS::DEFAULT_DATACOLUMN, index); build 10-Jul-2019 13:16:42 + // set Axes positions build 10-Jul-2019 13:16:42 + PMS_PP_Axes* a = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 + a->resize(index+1, true); // copy values build 10-Jul-2019 13:16:42 + a->setAxes(a->xAxis(index-1), Y_RIGHT, index); build 10-Jul-2019 13:16:42 + // keep same xaxis range build 10-Jul-2019 13:16:42 + a->setXRange(a->xRangeSet(index-1), a->xRange(index-1), index); build 10-Jul-2019 13:16:42 + // set Display symbol color build 10-Jul-2019 13:16:42 + PMS_PP_Display* disp = itsParams_.typedGroup(); build 10-Jul-2019 13:16:42 + PlotSymbolPtr imageSymbol = disp->unflaggedSymbol(index); build 10-Jul-2019 13:16:42 + imageSymbol->setSymbol("circle"); build 10-Jul-2019 13:16:42 + imageSymbol->setSize(2,2); build 10-Jul-2019 13:16:42 + imageSymbol->setColor("#000000"); // black build 10-Jul-2019 13:16:42 + disp->setUnflaggedSymbol(imageSymbol, index); build 10-Jul-2019 13:16:42 + PlotSymbolPtr flaggedSymbol = disp->flaggedSymbol(); build 10-Jul-2019 13:16:42 + disp->setFlaggedSymbol(flaggedSymbol, index); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 vector axes; build 10-Jul-2019 13:16:42 for(uInt i=0; inumXAxes(); i++) build 10-Jul-2019 13:16:42 axes.push_back(c->xAxis(i)); build 10-Jul-2019 13:16:42 @@ -634,10 +655,11 @@ bool PlotMSPlot::updateDisplay() { build 10-Jul-2019 13:16:42 PlotSymbolPtr unflaggedSym = display->unflaggedSymbol(row); build 10-Jul-2019 13:16:42 PlotSymbolPtr symbolUnmasked = itsParent_->createSymbol(unflaggedSym); build 10-Jul-2019 13:16:42 uInt dataSize = itsCache_->indexer(row,col).sizeUnmasked(); build 10-Jul-2019 13:16:42 - if (y==PMS::ATM || y==PMS::TSKY) build 10-Jul-2019 13:16:42 + if (PMS::axisIsOverlay(y)) { build 10-Jul-2019 13:16:42 customizeOverlaySymbol( symbolUnmasked, dataSize ); build 10-Jul-2019 13:16:42 - else build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 customizeAutoSymbol( symbolUnmasked, dataSize ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PlotSymbolPtr flaggedSym = display->flaggedSymbol(row); build 10-Jul-2019 13:16:42 PlotSymbolPtr symbolMasked = itsParent_->createSymbol(flaggedSym); build 10-Jul-2019 13:16:42 @@ -1812,6 +1834,7 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // y range build 10-Jul-2019 13:16:42 + bool hasAtmOverlay(false); build 10-Jul-2019 13:16:42 for ( int i = 0; i < yAxisCount; i++ ){ build 10-Jul-2019 13:16:42 PlotAxis cy = axesParams->yAxis( i ); build 10-Jul-2019 13:16:42 if ( axesParams->yRangeSet(i) ){ build 10-Jul-2019 13:16:42 @@ -1835,15 +1858,44 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 10-Jul-2019 13:16:42 canvas->setAxisRange(cx, xybounds); build 10-Jul-2019 13:16:42 canvas->setAxisRange(cy, xybounds); build 10-Jul-2019 13:16:42 makeSquare = true; build 10-Jul-2019 13:16:42 - if (xIsUVwave && (y==PMS::UWAVE || y==PMS::VWAVE)) build 10-Jul-2019 13:16:42 + if (xIsUVwave && (y==PMS::UWAVE || y==PMS::VWAVE)) { build 10-Jul-2019 13:16:42 waveplot=true; build 10-Jul-2019 13:16:42 - } else if (y==PMS::ATM || y==PMS::TSKY) { build 10-Jul-2019 13:16:42 - itsCache_->indexer(1,iteration).minsMaxes(xmin, xmax, ymin, ymax); build 10-Jul-2019 13:16:42 - pair atmrange; build 10-Jul-2019 13:16:42 - if (y==PMS::ATM) atmrange = make_pair(0, min(ymax+1.0, 100.0)); build 10-Jul-2019 13:16:42 - else atmrange = make_pair(0, ymax+0.1); build 10-Jul-2019 13:16:42 - canvas->setAxisRange(cy, atmrange); build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } else if (PMS::axisIsOverlay(y)) { build 10-Jul-2019 13:16:42 + // This assumes that the user is plotting a single y-axis; build 10-Jul-2019 13:16:42 + // yaxis 0 is user-set, yaxis 1 is atm/tsky, build 10-Jul-2019 13:16:42 + // and yaxis 2 is image sideband build 10-Jul-2019 13:16:42 + itsCache_->indexer(i,iteration).minsMaxes(xmin, xmax, ymin, ymax); build 10-Jul-2019 13:16:42 + pair atmrange; build 10-Jul-2019 13:16:42 + // in all cases, do not allow ymin < 0 build 10-Jul-2019 13:16:42 + if (y == PMS::ATM) { // range in 0 - 100 build 10-Jul-2019 13:16:42 + hasAtmOverlay = true; build 10-Jul-2019 13:16:42 + double overlayRange(ymax - ymin); build 10-Jul-2019 13:16:42 + double lowerMargin(overlayRange * 3.0); build 10-Jul-2019 13:16:42 + double upperMargin(overlayRange > 2.0 ? 2.0 : overlayRange); build 10-Jul-2019 13:16:42 + atmrange = make_pair(max((ymin-lowerMargin), 0.0), min(ymax+upperMargin, 100.0)); build 10-Jul-2019 13:16:42 + } else if (y == PMS::TSKY) { // range above 0 build 10-Jul-2019 13:16:42 + double overlayRange(ymax - ymin); build 10-Jul-2019 13:16:42 + double lowerMargin(overlayRange * 3.0); build 10-Jul-2019 13:16:42 + double upperMargin(overlayRange > 2.0 ? 2.0 : overlayRange); build 10-Jul-2019 13:16:42 + atmrange = make_pair(max((ymin-lowerMargin), 0.0), (ymax+upperMargin)); build 10-Jul-2019 13:16:42 + } else { // range above 0 build 10-Jul-2019 13:16:42 + // get combined range of image sideband and atm/tsky overlay build 10-Jul-2019 13:16:42 + double yminAtm, ymaxAtm; build 10-Jul-2019 13:16:42 + itsCache_->indexer(i-1,iteration).minsMaxes(xmin, xmax, yminAtm, ymaxAtm); build 10-Jul-2019 13:16:42 + ymin = min(ymin, yminAtm); build 10-Jul-2019 13:16:42 + ymax = max(ymax, ymaxAtm); build 10-Jul-2019 13:16:42 + double overlayRange(ymax - ymin); build 10-Jul-2019 13:16:42 + double lowerMargin(overlayRange * 3.0); build 10-Jul-2019 13:16:42 + double upperMargin(overlayRange > 2.0 ? 2.0 : overlayRange); build 10-Jul-2019 13:16:42 + if (hasAtmOverlay) { build 10-Jul-2019 13:16:42 + atmrange = make_pair(max((ymin-lowerMargin), 0.0), min((ymax+upperMargin), 100.0)); build 10-Jul-2019 13:16:42 + } else { build 10-Jul-2019 13:16:42 + atmrange = make_pair(max((ymin-lowerMargin), 0.0), (ymax+upperMargin)); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + canvas->setAxisRange(cy, atmrange); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -1915,6 +1967,10 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 10-Jul-2019 13:16:42 int plotYAxisCount = plotAxisParams->numYAxes(); build 10-Jul-2019 13:16:42 for ( int j=0; jyAxis( j ); build 10-Jul-2019 13:16:42 + // skip if image sideband axis could not be loaded build 10-Jul-2019 13:16:42 + if ((y == PMS::IMAGESB) && !itsCache_->canShowImageCurve()) { build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 if (isCalTable && PMS::axisIsData(y)) build 10-Jul-2019 13:16:42 y = getCalAxis(calTypes(i), y); build 10-Jul-2019 13:16:42 yAxes.push_back(y); // save for title build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Plots/PlotMSPlotParameterGroups.cc b/code/plotms/Plots/PlotMSPlotParameterGroups.cc build 10-Jul-2019 13:16:42 index 71d2634..1e119d5 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Plots/PlotMSPlotParameterGroups.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/Plots/PlotMSPlotParameterGroups.cc build 10-Jul-2019 13:16:42 @@ -251,6 +251,7 @@ const String PMS_PP_Cache::REC_XDATACOLS = "xdatacolumns"; build 10-Jul-2019 13:16:42 const String PMS_PP_Cache::REC_YDATACOLS = "ydatacolumns"; build 10-Jul-2019 13:16:42 const String PMS_PP_Cache::REC_SHOWATM = "showatm"; build 10-Jul-2019 13:16:42 const String PMS_PP_Cache::REC_SHOWTSKY = "showtsky"; build 10-Jul-2019 13:16:42 +const String PMS_PP_Cache::REC_SHOWIMAGE = "showimage"; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 PMS_PP_Cache::PMS_PP_Cache(PlotFactoryPtr factory) build 10-Jul-2019 13:16:42 @@ -273,6 +274,7 @@ Record PMS_PP_Cache::toRecord() const build 10-Jul-2019 13:16:42 rec.define(REC_YDATACOLS, PMS::toIntVector(itsYData_)); build 10-Jul-2019 13:16:42 rec.define(REC_SHOWATM, itsShowAtm_); build 10-Jul-2019 13:16:42 rec.define(REC_SHOWTSKY, itsShowTsky_); build 10-Jul-2019 13:16:42 + rec.define(REC_SHOWIMAGE, itsShowImage_); build 10-Jul-2019 13:16:42 return rec; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -334,6 +336,15 @@ void PMS_PP_Cache::fromRecord(const Record& record) build 10-Jul-2019 13:16:42 valuesChanged = true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 + if (record.isDefined(REC_SHOWIMAGE) && record.dataType(REC_SHOWIMAGE) == TpBool) build 10-Jul-2019 13:16:42 + { build 10-Jul-2019 13:16:42 + bool tmp = record.asBool(REC_SHOWIMAGE); build 10-Jul-2019 13:16:42 + if (itsShowImage_ != tmp) build 10-Jul-2019 13:16:42 + { build 10-Jul-2019 13:16:42 + itsShowImage_ = tmp; build 10-Jul-2019 13:16:42 + valuesChanged = true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if (valuesChanged) updated(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -361,6 +372,7 @@ PMS_PP_Cache& PMS_PP_Cache::assign(const PMS_PP_Cache* o){ build 10-Jul-2019 13:16:42 itsYInterp_ = o->itsYInterp_; build 10-Jul-2019 13:16:42 itsShowAtm_ = o->itsShowAtm_; build 10-Jul-2019 13:16:42 itsShowTsky_ = o->itsShowTsky_; build 10-Jul-2019 13:16:42 + itsShowImage_ = o->itsShowImage_; build 10-Jul-2019 13:16:42 updated(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 return *this; build 10-Jul-2019 13:16:42 @@ -381,6 +393,7 @@ bool PMS_PP_Cache::operator==(const Group& other) const build 10-Jul-2019 13:16:42 if (itsYInterp_ != o->itsYInterp_) return false; build 10-Jul-2019 13:16:42 if (itsShowAtm_ != o->itsShowAtm_) return false; build 10-Jul-2019 13:16:42 if (itsShowTsky_ != o->itsShowTsky_) return false; build 10-Jul-2019 13:16:42 + if (itsShowImage_ != o->itsShowImage_) return false; build 10-Jul-2019 13:16:42 return true; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -399,6 +412,7 @@ void PMS_PP_Cache::setDefaults(){ build 10-Jul-2019 13:16:42 itsYInterp_ = vector(1, PMS::DEFAULT_INTERPMETHOD); build 10-Jul-2019 13:16:42 itsShowAtm_ = false; build 10-Jul-2019 13:16:42 itsShowTsky_ = false; build 10-Jul-2019 13:16:42 + itsShowImage_ = false; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void PMS_PP_Cache::resize( int count ){ build 10-Jul-2019 13:16:42 diff --git a/code/plotms/Plots/PlotMSPlotParameterGroups.h b/code/plotms/Plots/PlotMSPlotParameterGroups.h build 10-Jul-2019 13:16:42 index c3aa6f6..0f05802 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/Plots/PlotMSPlotParameterGroups.h build 10-Jul-2019 13:16:42 +++ b/code/plotms/Plots/PlotMSPlotParameterGroups.h build 10-Jul-2019 13:16:42 @@ -543,7 +543,7 @@ public: build 10-Jul-2019 13:16:42 return itsShowAtm_; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 void setShowAtm (const bool & value) { build 10-Jul-2019 13:16:42 - if (itsShowAtm_!= value) { build 10-Jul-2019 13:16:42 + if (itsShowAtm_ != value) { build 10-Jul-2019 13:16:42 itsShowAtm_ = value; build 10-Jul-2019 13:16:42 updated(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 @@ -553,12 +553,21 @@ public: build 10-Jul-2019 13:16:42 return itsShowTsky_; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 void setShowTsky (const bool & value) { build 10-Jul-2019 13:16:42 - if (itsShowTsky_!= value) { build 10-Jul-2019 13:16:42 + if (itsShowTsky_ != value) { build 10-Jul-2019 13:16:42 itsShowTsky_ = value; build 10-Jul-2019 13:16:42 updated(); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + bool showImage() const { build 10-Jul-2019 13:16:42 + return itsShowImage_; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + void setShowImage (const bool & value) { build 10-Jul-2019 13:16:42 + if (itsShowImage_ != value) { build 10-Jul-2019 13:16:42 + itsShowImage_ = value; build 10-Jul-2019 13:16:42 + updated(); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 void resize( int count ); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 private: build 10-Jul-2019 13:16:42 @@ -577,6 +586,7 @@ private: build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 bool itsShowAtm_; build 10-Jul-2019 13:16:42 bool itsShowTsky_; build 10-Jul-2019 13:16:42 + bool itsShowImage_; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 /* Key strings for casacore::Record */ build 10-Jul-2019 13:16:42 @@ -590,6 +600,7 @@ private: build 10-Jul-2019 13:16:42 static const casacore::String REC_YINTERPS; build 10-Jul-2019 13:16:42 static const casacore::String REC_SHOWATM; build 10-Jul-2019 13:16:42 static const casacore::String REC_SHOWTSKY; build 10-Jul-2019 13:16:42 + static const casacore::String REC_SHOWIMAGE; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 void setDefaults(); build 10-Jul-2019 13:16:42 }; build 10-Jul-2019 13:16:42 diff --git a/code/plotms/apps/casaplotms/casaplotms.cc b/code/plotms/apps/casaplotms/casaplotms.cc build 10-Jul-2019 13:16:42 index 0705489..7517a6e 100644 build 10-Jul-2019 13:16:42 --- a/code/plotms/apps/casaplotms/casaplotms.cc build 10-Jul-2019 13:16:42 +++ b/code/plotms/apps/casaplotms/casaplotms.cc build 10-Jul-2019 13:16:42 @@ -28,10 +28,19 @@ build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 #ifndef NO_CRASH_REPORTER build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #endif build 10-Jul-2019 13:16:42 @@ -40,9 +49,77 @@ build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 +#if defined(__APPLE__) build 10-Jul-2019 13:16:42 +// for executable_path( ) build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 +// for executable_path( ) build 10-Jul-2019 13:16:42 +std::string read_link( const std::string &path ) { build 10-Jul-2019 13:16:42 + int buffer_size = 128; build 10-Jul-2019 13:16:42 + char *buffer = new char[buffer_size+1]; build 10-Jul-2019 13:16:42 + int nchars = readlink( path.c_str( ), buffer, buffer_size ); build 10-Jul-2019 13:16:42 + while ( nchars == buffer_size ) { build 10-Jul-2019 13:16:42 + buffer_size *= 2; build 10-Jul-2019 13:16:42 + delete [] buffer; build 10-Jul-2019 13:16:42 + buffer = new char[buffer_size+1]; build 10-Jul-2019 13:16:42 + nchars = readlink( path.c_str( ), buffer, buffer_size ); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + std::string result; build 10-Jul-2019 13:16:42 + if ( nchars > 0 ) { build 10-Jul-2019 13:16:42 + buffer[nchars] = '\0'; build 10-Jul-2019 13:16:42 + char *exe = realpath(buffer,NULL); build 10-Jul-2019 13:16:42 + result = exe; build 10-Jul-2019 13:16:42 + free(exe); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + delete [] buffer; build 10-Jul-2019 13:16:42 + return result; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +static std::string executable_path( ) { build 10-Jul-2019 13:16:42 +#if defined(__APPLE__) build 10-Jul-2019 13:16:42 + uint32_t size = PATH_MAX; build 10-Jul-2019 13:16:42 + char *buffer = (char *) malloc(sizeof(char)*size); build 10-Jul-2019 13:16:42 + if ( _NSGetExecutablePath(buffer, &size) == -1 ) { build 10-Jul-2019 13:16:42 + ++size; build 10-Jul-2019 13:16:42 + buffer = (char *) realloc(buffer,sizeof(char)*size); build 10-Jul-2019 13:16:42 + if ( _NSGetExecutablePath(buffer, &size) != 0 ) { build 10-Jul-2019 13:16:42 + free(buffer); build 10-Jul-2019 13:16:42 + fprintf( stderr, "cannot discover path to executable...\n" ); build 10-Jul-2019 13:16:42 + return ""; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + char *exepath = realpath(buffer,NULL); build 10-Jul-2019 13:16:42 + std::string result(exepath); build 10-Jul-2019 13:16:42 + free(buffer); build 10-Jul-2019 13:16:42 + free(exepath); build 10-Jul-2019 13:16:42 + return result; build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 + char buffer[256]; build 10-Jul-2019 13:16:42 + sprintf( buffer, "/proc/%d/exe", getpid( ) ); build 10-Jul-2019 13:16:42 + struct stat statbuf; build 10-Jul-2019 13:16:42 + if ( lstat( buffer, &statbuf ) == 0 && S_ISLNK(statbuf.st_mode) ) { build 10-Jul-2019 13:16:42 + return read_link(buffer); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + return ""; build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 using namespace casa; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 +class PlotmsDataState: public casacore::AppState { build 10-Jul-2019 13:16:42 +public: build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + PlotmsDataState(const std::list &path ) : data_path(path) { } build 10-Jul-2019 13:16:42 + virtual bool initialized( ) const { return true; } build 10-Jul-2019 13:16:42 + virtual std::list dataPath( ) const { return data_path; } build 10-Jul-2019 13:16:42 +private: build 10-Jul-2019 13:16:42 + std::list data_path; build 10-Jul-2019 13:16:42 +}; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 int main(int argc, char* argv[]) { build 10-Jul-2019 13:16:42 + std::string exepath(executable_path( )); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 #if (0) build 10-Jul-2019 13:16:42 setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediately always */ build 10-Jul-2019 13:16:42 @@ -54,10 +131,10 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 cerr << "*** Warning during crash reporter initialization: " << s << endl; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 #endif build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 // log arguments if CASA_DIAGNOSTIC_FILE environment variable is set... build 10-Jul-2019 13:16:42 casa::dbus::diagnostic.argv( argc, argv ); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 // Parameter defaults. build 10-Jul-2019 13:16:42 String ms = "", build 10-Jul-2019 13:16:42 xaxis = PMS::axis(PMS::DEFAULT_XAXIS), build 10-Jul-2019 13:16:42 @@ -82,18 +159,87 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 ARG_CISTSR2 = "--cachedimagesizetoscreenresolution", build 10-Jul-2019 13:16:42 ARG_PIXELS1 = "-p", build 10-Jul-2019 13:16:42 ARG_PIXELS2 = "--pixels", build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 ARG_CASAPY = PlotMSDBusApp::APP_CASAPY_SWITCH, build 10-Jul-2019 13:16:42 - ARG_DEBUG1 = "-d", build 10-Jul-2019 13:16:42 - ARG_DEBUG2 = "--debug", build 10-Jul-2019 13:16:42 ARG_LOGFILE = PlotMSDBusApp::APP_LOGFILENAME_SWITCH, build 10-Jul-2019 13:16:42 ARG_LOGFILTER = PlotMSDBusApp::APP_LOGFILTER_SWITCH, build 10-Jul-2019 13:16:42 +#else build 10-Jul-2019 13:16:42 + casapy_address = "", build 10-Jul-2019 13:16:42 + ARG_SERVER = grpcPlotMS::APP_SERVER_SWITCH, build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ARG_DEBUG1 = "-d", build 10-Jul-2019 13:16:42 + ARG_DEBUG2 = "--debug", build 10-Jul-2019 13:16:42 ARG_NOPOPUPS = "--nopopups", build 10-Jul-2019 13:16:42 ARG_SHOWGUI = "--nogui"; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 + // build 10-Jul-2019 13:16:42 + // configure datapath for casacore and colormaps... build 10-Jul-2019 13:16:42 + // build 10-Jul-2019 13:16:42 + auto ends_with = []( const std::string& str, const std::string& ending ) { build 10-Jul-2019 13:16:42 + return ( str.size( ) >= ending.size( ) ) && equal( ending.rbegin( ), ending.rend( ), str.rbegin( ) ); build 10-Jul-2019 13:16:42 + }; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if ( ends_with(exepath, "Contents/MacOS/CASAplotms") || build 10-Jul-2019 13:16:42 + ends_with(exepath, "Contents/MacOS/casaplotms") ) { build 10-Jul-2019 13:16:42 + // initialize CASAviewer app data... build 10-Jul-2019 13:16:42 + if ( ! casacore::AppStateSource::fetch( ).initialized( ) ) { build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // Mac OSX -- path is specific to package format build 10-Jul-2019 13:16:42 + // - - - - - - - - - - - - - - - - - - - - - - - - - build 10-Jul-2019 13:16:42 + // initialize CASAviewer app data... build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // generate path to data... build 10-Jul-2019 13:16:42 + std::string datapath(exepath); build 10-Jul-2019 13:16:42 + datapath.erase( datapath.end( ) - 16, datapath.end( ) ); build 10-Jul-2019 13:16:42 + std::string pluginpath = datapath; // save for later... build 10-Jul-2019 13:16:42 + datapath += "Resources/casa-data"; build 10-Jul-2019 13:16:42 + // initialize casacore... build 10-Jul-2019 13:16:42 + std::list datadirs; build 10-Jul-2019 13:16:42 + datadirs.push_back(datapath); build 10-Jul-2019 13:16:42 + casacore::AppStateSource::initialize(new PlotmsDataState(datadirs)); build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // set up Qt Plugin Path build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + pluginpath += "Plugins"; build 10-Jul-2019 13:16:42 + QCoreApplication::addLibraryPath(QString(pluginpath.c_str( ))); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } else if ( ends_with(exepath, "/AppRun") || build 10-Jul-2019 13:16:42 + ends_with(exepath, "/CASAplotms.app/usr/bin/CASAplotms") || build 10-Jul-2019 13:16:42 + ends_with(exepath, "/casaplotms.app/usr/bin/casaplotms") ) { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // linux -- path is specific to package format build 10-Jul-2019 13:16:42 + // build 10-Jul-2019 13:16:42 + // .../AppRun implies AppImage bash script startup, e.g. from an unpacked AppImage build 10-Jul-2019 13:16:42 + // .../CASAplotms.app/usr/bin/CASAplotms implies debugging or running from the build 10-Jul-2019 13:16:42 + // build tree before it has been packaged build 10-Jul-2019 13:16:42 + // build 10-Jul-2019 13:16:42 + // - - - - - - - - - - - - - - - - - - - - - - - - - build 10-Jul-2019 13:16:42 + // initialize CASAplotms app data... build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // generate path to data... build 10-Jul-2019 13:16:42 + bool packed_app = ends_with(exepath, "/AppRun"); build 10-Jul-2019 13:16:42 + std::string datapath(exepath); build 10-Jul-2019 13:16:42 + // packed_app -> .../AppRun build 10-Jul-2019 13:16:42 + // not packed_app -> .../CASAplotms.app/usr/bin/CASAplotms build 10-Jul-2019 13:16:42 + datapath.erase( datapath.end( ) - (packed_app ? 6 : 18), datapath.end( ) ); build 10-Jul-2019 13:16:42 + std::string pluginpath = datapath; // save for later... build 10-Jul-2019 13:16:42 + datapath += "data"; build 10-Jul-2019 13:16:42 + // initialize casacore... build 10-Jul-2019 13:16:42 + std::list datadirs; build 10-Jul-2019 13:16:42 + datadirs.push_back(datapath); build 10-Jul-2019 13:16:42 + casacore::AppStateSource::initialize(new PlotmsDataState(datadirs)); build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + // set up Qt Plugin Path build 10-Jul-2019 13:16:42 + // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- build 10-Jul-2019 13:16:42 + pluginpath += "usr/lib/plugins"; build 10-Jul-2019 13:16:42 + QCoreApplication::addLibraryPath(QString(pluginpath.c_str( ))); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 const vector& selectFields = PlotMSSelection::fieldStrings(), build 10-Jul-2019 13:16:42 averagingFields = PlotMSAveraging::fieldStrings(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 for(int i = 1; i < argc; i++) { build 10-Jul-2019 13:16:42 arg = arg2 = argv[i]; build 10-Jul-2019 13:16:42 @@ -146,7 +292,7 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 << "\n* " << ARG_CISTSR << " or " << ARG_CISTSR2 << "\n " build 10-Jul-2019 13:16:42 << "Toggles setting the cached image size to screen " build 10-Jul-2019 13:16:42 << "resolution." build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 /* build 10-Jul-2019 13:16:42 // Don't advertise this switch... build 10-Jul-2019 13:16:42 << "\n* " << ARG_CASAPY << "\n " build 10-Jul-2019 13:16:42 @@ -158,7 +304,7 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 << "\n* " << ARG_LOGFILTER << "=[priority]\n " build 10-Jul-2019 13:16:42 << "Sets the log minimum priority filter." build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 << "\n* " << ARG_DEBUG1 << " or " << ARG_DEBUG2 << "\n " build 10-Jul-2019 13:16:42 << "Turn on debugging log messages." build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -172,34 +318,40 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 if((index = arg.find("=")) < arg.size() - 1) { build 10-Jul-2019 13:16:42 arg2 = arg.before(index); arg2.downcase(); build 10-Jul-2019 13:16:42 arg3 = arg.after(index); build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + if (arg2 == ARG_SERVER) { build 10-Jul-2019 13:16:42 + casapy = true; build 10-Jul-2019 13:16:42 + casapy_address = arg3; build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 } else if(arg2 == ARG_CISTSR || arg2 == ARG_CISTSR2) { build 10-Jul-2019 13:16:42 cachedImageSizeToScreenResolution = true; build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 } else if(arg2 == ARG_PIXELS1 || arg2 == ARG_PIXELS2) { build 10-Jul-2019 13:16:42 usePixels = true; build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 } else if(arg2 == ARG_NOPOPUPS) { build 10-Jul-2019 13:16:42 nopopups = true; build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 } else if(arg2 == ARG_CASAPY) { build 10-Jul-2019 13:16:42 casapy = true; build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 } else if (arg2 == ARG_SHOWGUI){ build 10-Jul-2019 13:16:42 showGui = false; build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 else if(arg2 == ARG_DEBUG1 || arg2 == ARG_DEBUG2) { build 10-Jul-2019 13:16:42 debug = true; build 10-Jul-2019 13:16:42 - continue; build 10-Jul-2019 13:16:42 + continue; build 10-Jul-2019 13:16:42 } else if(i < argc - 1) { build 10-Jul-2019 13:16:42 arg3 = argv[++i]; build 10-Jul-2019 13:16:42 if(arg3.size() == 0) continue; build 10-Jul-2019 13:16:42 if(arg3[0] == '=' && arg3.size() > 1) arg3 = arg3.after(0); build 10-Jul-2019 13:16:42 else if(arg3 == "=" && i < argc - 1) arg3 = argv[++i]; build 10-Jul-2019 13:16:42 else if(index != arg.size() - 1) continue; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 } else { build 10-Jul-2019 13:16:42 arg3 = ""; build 10-Jul-2019 13:16:42 bool found = false; build 10-Jul-2019 13:16:42 @@ -207,10 +359,10 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 if(PMS::strEq(arg2, "avg" + averagingFields[i], true)) build 10-Jul-2019 13:16:42 found = true; build 10-Jul-2019 13:16:42 if(!found) { build 10-Jul-2019 13:16:42 - cout << "Unrecognized argument: " << arg2 << endl; build 10-Jul-2019 13:16:42 - cout << "Please type 'casaplotms --help' for more info" << endl; build 10-Jul-2019 13:16:42 - return 0; build 10-Jul-2019 13:16:42 - } build 10-Jul-2019 13:16:42 + cout << "Unrecognized argument: " << arg2 << endl; build 10-Jul-2019 13:16:42 + cout << "Please type 'casaplotms --help' for more info" << endl; build 10-Jul-2019 13:16:42 + return 0; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if(arg2[arg2.size() - 1] == '=') arg2.erase(arg2.size() - 1); build 10-Jul-2019 13:16:42 @@ -218,8 +370,10 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 if(arg2 == ARG_VIS) ms = arg3; build 10-Jul-2019 13:16:42 else if(arg2 == ARG_XAXIS) xaxis = arg3; build 10-Jul-2019 13:16:42 else if(arg2 == ARG_YAXIS) yaxis = arg3; build 10-Jul-2019 13:16:42 +#if ! defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 else if(arg2 == ARG_LOGFILE) logfile = arg3; build 10-Jul-2019 13:16:42 else if(arg2 == ARG_LOGFILTER) logfilter = arg3; build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 else { build 10-Jul-2019 13:16:42 bool found = false; build 10-Jul-2019 13:16:42 for(unsigned int i = 0; !found && i < selectFields.size(); i++) { build 10-Jul-2019 13:16:42 @@ -272,7 +426,11 @@ setbuf(stdout, NULL); /* for debugging - forces all printf() to flush immediatel build 10-Jul-2019 13:16:42 params.setCachedImageSizeToResolution(); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Set up plotms object. build 10-Jul-2019 13:16:42 - PlotMSApp plotmsapp(params, casapy, showGui ); build 10-Jul-2019 13:16:42 + PlotMSApp plotmsapp(params, casapy, showGui build 10-Jul-2019 13:16:42 +#if defined(WITHOUT_DBUS) build 10-Jul-2019 13:16:42 + , casapy_address build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 + ); build 10-Jul-2019 13:16:42 /* if(!casapy){ build 10-Jul-2019 13:16:42 plotmsapp.showGUI(showGui); // don't automatically show for casapy build 10-Jul-2019 13:16:42 }*/ build 10-Jul-2019 13:16:42 diff --git a/code/plotms/protos/plotms.proto b/code/plotms/protos/plotms.proto build 10-Jul-2019 13:16:42 new file mode 100644 build 10-Jul-2019 13:16:42 index 0000000..018cc48 build 10-Jul-2019 13:16:42 --- /dev/null build 10-Jul-2019 13:16:42 +++ b/code/plotms/protos/plotms.proto build 10-Jul-2019 13:16:42 @@ -0,0 +1,226 @@ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +syntax = "proto3"; build 10-Jul-2019 13:16:42 +import "google/protobuf/empty.proto"; build 10-Jul-2019 13:16:42 +import "google/protobuf/wrappers.proto"; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +package rpc.plotms; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +service app { build 10-Jul-2019 13:16:42 + rpc getPlotMSPid(google.protobuf.Empty) returns (Pid); build 10-Jul-2019 13:16:42 + rpc setShowGui(Toggle) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setGridSize(GridSize) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc isDrawing(google.protobuf.Empty) returns (Toggle); build 10-Jul-2019 13:16:42 + rpc clearPlots(google.protobuf.Empty) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSFilename(SetVis) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotAxes(SetAxes) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setShowAtm(SetToggle) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setShowTsky(SetToggle) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSSelection(SetSelection) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSAveraging(SetAveraging) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSTransformations(SetTransform) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSCalibration(SetCalibration) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setFlagExtension(SetFlagExtension) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setExportRange(ExportRange) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSIterate(SetIterate) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setColorAxis(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setSymbol(SetSymbol) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setFlaggedSymbol(SetSymbol) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setConnect(SetConnect) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setLegend(SetLegend) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setTitle(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setXAxisLabel(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setYAxisLabel(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setTitleFont(SetInt) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setXAxisFont(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setYAxisFont(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setGridParams(SetGrid) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc SetXRange(SetRange) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc SetYRange(SetRange) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc setPlotMSPageHeaderItems(SetString) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc save(Save) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 + rpc update(google.protobuf.Empty) returns (google.protobuf.Empty); build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message Pid { build 10-Jul-2019 13:16:42 + int32 id = 1; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message Toggle { build 10-Jul-2019 13:16:42 + bool state = 1; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message GridSize { build 10-Jul-2019 13:16:42 + int32 rows = 1; build 10-Jul-2019 13:16:42 + int32 cols = 2; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetVis { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string name = 3; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetAxes { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + int32 dataindex = 2; build 10-Jul-2019 13:16:42 + bool update = 3; build 10-Jul-2019 13:16:42 + string x = 4; build 10-Jul-2019 13:16:42 + string y = 5; build 10-Jul-2019 13:16:42 + string xdata = 6; build 10-Jul-2019 13:16:42 + string ydata = 7; build 10-Jul-2019 13:16:42 + string xframe = 8; build 10-Jul-2019 13:16:42 + string yframe = 9; build 10-Jul-2019 13:16:42 + string xinterp = 10; build 10-Jul-2019 13:16:42 + string yinterp = 11; build 10-Jul-2019 13:16:42 + string yaxisloc = 12; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetToggle { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + bool state = 3; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetSelection { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string field = 3; build 10-Jul-2019 13:16:42 + string spw = 4; build 10-Jul-2019 13:16:42 + string timerange = 5; build 10-Jul-2019 13:16:42 + string uvrange = 6; build 10-Jul-2019 13:16:42 + string antenna = 7; build 10-Jul-2019 13:16:42 + string scan = 8; build 10-Jul-2019 13:16:42 + string corr = 9; build 10-Jul-2019 13:16:42 + string array = 10; build 10-Jul-2019 13:16:42 + string observation = 11; build 10-Jul-2019 13:16:42 + string intent = 12; build 10-Jul-2019 13:16:42 + string feed = 13; build 10-Jul-2019 13:16:42 + string msselect = 14; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetAveraging { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string channel = 3; build 10-Jul-2019 13:16:42 + string time = 4; build 10-Jul-2019 13:16:42 + bool scan = 5; build 10-Jul-2019 13:16:42 + bool field = 6; build 10-Jul-2019 13:16:42 + bool baseline = 7; build 10-Jul-2019 13:16:42 + bool antenna = 8; build 10-Jul-2019 13:16:42 + bool spw = 9; build 10-Jul-2019 13:16:42 + bool scalar = 10; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetTransform { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string freqframe = 3; build 10-Jul-2019 13:16:42 + string veldef = 4; build 10-Jul-2019 13:16:42 + string restfreq = 5; // this was a variant in CASA 5 build 10-Jul-2019 13:16:42 + double xshift = 6; build 10-Jul-2019 13:16:42 + double yshift = 7; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetCalibration { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + bool uselib = 3; build 10-Jul-2019 13:16:42 + string callib = 4; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetFlagExtension { build 10-Jul-2019 13:16:42 + bool extend = 1; build 10-Jul-2019 13:16:42 + string correlation = 2; build 10-Jul-2019 13:16:42 + bool channel = 3; build 10-Jul-2019 13:16:42 + bool spw = 4; build 10-Jul-2019 13:16:42 + string antenna = 5; build 10-Jul-2019 13:16:42 + bool time = 6; build 10-Jul-2019 13:16:42 + bool scans = 7; build 10-Jul-2019 13:16:42 + bool field = 8; build 10-Jul-2019 13:16:42 + bool use_alternative = 9; build 10-Jul-2019 13:16:42 + SetSelection alternative_selection = 10; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message ExportRange { build 10-Jul-2019 13:16:42 + string value = 1; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetIterate { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string iteraxis = 3; build 10-Jul-2019 13:16:42 + int32 rowindex = 4; build 10-Jul-2019 13:16:42 + int32 colindex = 5; build 10-Jul-2019 13:16:42 + bool xselfscale = 6; build 10-Jul-2019 13:16:42 + bool yselfscale = 7; build 10-Jul-2019 13:16:42 + bool commonaxisx = 8; build 10-Jul-2019 13:16:42 + bool commonaxisy = 9; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetString { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string value = 3; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetInt { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + int32 value = 3; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetSymbol { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + int32 dataindex = 2; build 10-Jul-2019 13:16:42 + bool update = 3; build 10-Jul-2019 13:16:42 + string shape = 4; build 10-Jul-2019 13:16:42 + int32 size = 5; build 10-Jul-2019 13:16:42 + string color = 6; build 10-Jul-2019 13:16:42 + string fill = 7; build 10-Jul-2019 13:16:42 + bool outline = 8; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetConnect { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + string xconnector = 3; build 10-Jul-2019 13:16:42 + bool timeconnector = 4; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetLegend { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + bool show = 3; build 10-Jul-2019 13:16:42 + string position = 4; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetGrid { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + bool showmajor = 3; build 10-Jul-2019 13:16:42 + int32 majorwidth = 4; build 10-Jul-2019 13:16:42 + string majorstyle = 5; build 10-Jul-2019 13:16:42 + string majorcolor = 6; build 10-Jul-2019 13:16:42 + bool showminor = 7; build 10-Jul-2019 13:16:42 + int32 minorwidth = 8; build 10-Jul-2019 13:16:42 + string minorstyle = 9; build 10-Jul-2019 13:16:42 + string minorcolor = 10; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message SetRange { build 10-Jul-2019 13:16:42 + int32 index = 1; build 10-Jul-2019 13:16:42 + bool update = 2; build 10-Jul-2019 13:16:42 + bool automatic = 3; build 10-Jul-2019 13:16:42 + double min = 4; build 10-Jul-2019 13:16:42 + double max = 5; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +message Save { build 10-Jul-2019 13:16:42 + string path = 1; build 10-Jul-2019 13:16:42 + string format = 2; build 10-Jul-2019 13:16:42 + bool highres = 3; build 10-Jul-2019 13:16:42 + int32 dpi = 4; build 10-Jul-2019 13:16:42 + int32 width = 5; build 10-Jul-2019 13:16:42 + int32 height = 6; build 10-Jul-2019 13:16:42 + bool verbose = 7; build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/CMakeLists.txt b/code/synthesis/CMakeLists.txt build 10-Jul-2019 13:16:42 index 3db7ae0..9c7bf5f 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/CMakeLists.txt build 10-Jul-2019 13:16:42 +++ b/code/synthesis/CMakeLists.txt build 10-Jul-2019 13:16:42 @@ -305,6 +305,7 @@ casa_add_library( synthesis build 10-Jul-2019 13:16:42 MeasurementComponents/WFCleanImageSkyModel.cc build 10-Jul-2019 13:16:42 TransformMachines/WOnlyConvFunc.cc build 10-Jul-2019 13:16:42 TransformMachines/WTerm.cc build 10-Jul-2019 13:16:42 + MeasurementEquations/AntennaResponses.cc build 10-Jul-2019 13:16:42 MeasurementEquations/CCList.cc build 10-Jul-2019 13:16:42 MeasurementEquations/CEMemModel.cc build 10-Jul-2019 13:16:42 MeasurementEquations/CEMemProgress.cc build 10-Jul-2019 13:16:42 @@ -581,6 +582,7 @@ install (FILES build 10-Jul-2019 13:16:42 DESTINATION include/casacode/synthesis/MeasurementComponents build 10-Jul-2019 13:16:42 ) build 10-Jul-2019 13:16:42 install (FILES build 10-Jul-2019 13:16:42 + MeasurementEquations/AntennaResponses.h build 10-Jul-2019 13:16:42 MeasurementEquations/ArrayModel.h build 10-Jul-2019 13:16:42 MeasurementEquations/CCList.h build 10-Jul-2019 13:16:42 MeasurementEquations/CEMemModel.h build 10-Jul-2019 13:16:42 @@ -874,6 +876,7 @@ casa_add_assay( synthesis CalTables/test/tCTGenericFill.cc ) build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 casa_add_test( synthesis CalLibrary/test/tCalLibraryParse.cc ) build 10-Jul-2019 13:16:42 +casa_add_unit_test( MODULES synthesis SOURCES MeasurementEquations/test/tAntennaResponses.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test( MODULES synthesis SOURCES MeasurementEquations/test/tPredictComp.cc TransformMachines2/test/MakeMS.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test( MODULES synthesis SOURCES TransformMachines2/test/tAWPFTM.cc TransformMachines2/test/MakeMS.cc ) build 10-Jul-2019 13:16:42 casa_add_unit_test( MODULES synthesis SOURCES TransformMachines2/test/tFTMachine.cc TransformMachines2/test/MakeMS.cc ) build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects/SynthesisImager.cc b/code/synthesis/ImagerObjects/SynthesisImager.cc build 10-Jul-2019 13:16:42 index ee76161..c291ecb 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects/SynthesisImager.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects/SynthesisImager.cc build 10-Jul-2019 13:16:42 @@ -625,7 +625,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 const Bool mTermOn,// = false, build 10-Jul-2019 13:16:42 const Bool wbAWP,// = true, build 10-Jul-2019 13:16:42 const String cfCache,// = "", build 10-Jul-2019 13:16:42 - const Bool doPointing,// = false, build 10-Jul-2019 13:16:42 + const Bool usePointing,// = false, build 10-Jul-2019 13:16:42 const Bool doPBCorr,// = true, build 10-Jul-2019 13:16:42 const Bool conjBeams,// = true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -677,7 +677,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 gridpars.mTermOn=mTermOn; build 10-Jul-2019 13:16:42 gridpars.wbAWP=wbAWP; build 10-Jul-2019 13:16:42 gridpars.cfCache=cfCache; build 10-Jul-2019 13:16:42 - gridpars.doPointing=doPointing; build 10-Jul-2019 13:16:42 + gridpars.usePointing=usePointing; build 10-Jul-2019 13:16:42 gridpars.doPBCorr=doPBCorr; build 10-Jul-2019 13:16:42 gridpars.conjBeams=conjBeams; build 10-Jul-2019 13:16:42 gridpars.computePAStep=computePAStep; build 10-Jul-2019 13:16:42 @@ -754,7 +754,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 gridpars.padding,gridpars.useAutoCorr,gridpars.useDoublePrec, build 10-Jul-2019 13:16:42 gridpars.convFunc, build 10-Jul-2019 13:16:42 gridpars.aTermOn,gridpars.psTermOn, gridpars.mTermOn, build 10-Jul-2019 13:16:42 - gridpars.wbAWP,gridpars.cfCache,gridpars.doPointing, build 10-Jul-2019 13:16:42 + gridpars.wbAWP,gridpars.cfCache,gridpars.usePointing, build 10-Jul-2019 13:16:42 gridpars.doPBCorr,gridpars.conjBeams, build 10-Jul-2019 13:16:42 gridpars.computePAStep,gridpars.rotatePAStep, build 10-Jul-2019 13:16:42 gridpars.interpolation, impars.freqFrameValid, 1000000000, 16, impars.stokes, build 10-Jul-2019 13:16:42 @@ -1663,7 +1663,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 const Bool mTermOn, //= false, build 10-Jul-2019 13:16:42 const Bool wbAWP, //= true, build 10-Jul-2019 13:16:42 const String cfCache, //= "", build 10-Jul-2019 13:16:42 - const Bool doPointing, //= false, build 10-Jul-2019 13:16:42 + const Bool usePointing, //= false, build 10-Jul-2019 13:16:42 const Bool doPBCorr, //= true, build 10-Jul-2019 13:16:42 const Bool conjBeams, //= true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -1716,7 +1716,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 createAWPFTMachine(theFT, theIFT, ftname, facets, wprojplane, build 10-Jul-2019 13:16:42 padding, useAutocorr, useDoublePrec, gridFunction, build 10-Jul-2019 13:16:42 aTermOn, psTermOn, mTermOn, wbAWP, cfCache, build 10-Jul-2019 13:16:42 - doPointing, doPBCorr, conjBeams, computePAStep, build 10-Jul-2019 13:16:42 + usePointing, doPBCorr, conjBeams, computePAStep, build 10-Jul-2019 13:16:42 rotatePAStep, cache,tile,imageNamePrefix); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 else if ( ftname == "mosaic" || ftname== "mosft" || ftname == "mosaicft" || ftname== "MosaicFT"){ build 10-Jul-2019 13:16:42 @@ -1800,7 +1800,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 const Bool mTermOn, //= false, build 10-Jul-2019 13:16:42 const Bool wbAWP, //= true, build 10-Jul-2019 13:16:42 const String cfCache, //= "", build 10-Jul-2019 13:16:42 - const Bool doPointing, //= false, build 10-Jul-2019 13:16:42 + const Bool usePointing, //= false, build 10-Jul-2019 13:16:42 const Bool doPBCorr, //= true, build 10-Jul-2019 13:16:42 const Bool conjBeams, //= true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -1887,7 +1887,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 theFT = new AWProjectWBFTNew(wprojPlane, cache/2, build 10-Jul-2019 13:16:42 cfCacheObj, awConvFunc, build 10-Jul-2019 13:16:42 visResampler, build 10-Jul-2019 13:16:42 - /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 tile, computePAStep, pbLimit_l, true,conjBeams, build 10-Jul-2019 13:16:42 useDoublePrec); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1915,7 +1915,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // theIFT = new AWProjectWBFT(wprojPlane, cache/2, build 10-Jul-2019 13:16:42 // cfCacheObj, awConvFunc, build 10-Jul-2019 13:16:42 // visResampler, build 10-Jul-2019 13:16:42 - // /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + // /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 // tile, computePAStep, pbLimit_l, true,conjBeams, build 10-Jul-2019 13:16:42 // useDoublePrec); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects/SynthesisImager.h b/code/synthesis/ImagerObjects/SynthesisImager.h build 10-Jul-2019 13:16:42 index dd03442..9daf1f2 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects/SynthesisImager.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects/SynthesisImager.h build 10-Jul-2019 13:16:42 @@ -126,7 +126,7 @@ class SynthesisImager build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn = false, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP = true, build 10-Jul-2019 13:16:42 const casacore::String cfCache = "", build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing = false, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing = false, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr = true, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams = true, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep=360.0, build 10-Jul-2019 13:16:42 @@ -239,7 +239,7 @@ protected: build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn = false, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP = true, build 10-Jul-2019 13:16:42 const casacore::String cfCache = "", build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing = false, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing = false, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr = true, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams = true, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep = 360.0, build 10-Jul-2019 13:16:42 @@ -308,7 +308,7 @@ protected: build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP, build 10-Jul-2019 13:16:42 const casacore::String cfCache, build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc b/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc build 10-Jul-2019 13:16:42 index 668aeb1..5fafb64 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc build 10-Jul-2019 13:16:42 @@ -619,7 +619,7 @@ Bool SynthesisImagerVi2::defineImage(SynthesisParamsImage& impars, build 10-Jul-2019 13:16:42 gridpars.padding,gridpars.useAutoCorr,gridpars.useDoublePrec, build 10-Jul-2019 13:16:42 gridpars.convFunc, build 10-Jul-2019 13:16:42 gridpars.aTermOn,gridpars.psTermOn, gridpars.mTermOn, build 10-Jul-2019 13:16:42 - gridpars.wbAWP,gridpars.cfCache,gridpars.doPointing, build 10-Jul-2019 13:16:42 + gridpars.wbAWP,gridpars.cfCache,gridpars.usePointing, build 10-Jul-2019 13:16:42 gridpars.doPBCorr,gridpars.conjBeams, build 10-Jul-2019 13:16:42 gridpars.computePAStep,gridpars.rotatePAStep, build 10-Jul-2019 13:16:42 gridpars.interpolation, impars.freqFrameValid, 1000000000, 16, impars.stokes, build 10-Jul-2019 13:16:42 @@ -1539,7 +1539,7 @@ void SynthesisImagerVi2::unlockMSs() build 10-Jul-2019 13:16:42 const Bool mTermOn, //= false, build 10-Jul-2019 13:16:42 const Bool wbAWP, //= true, build 10-Jul-2019 13:16:42 const String cfCache, //= "", build 10-Jul-2019 13:16:42 - const Bool doPointing, //= false, build 10-Jul-2019 13:16:42 + const Bool usePointing, //= false, build 10-Jul-2019 13:16:42 const Bool doPBCorr, //= true, build 10-Jul-2019 13:16:42 const Bool conjBeams, //= true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -1602,7 +1602,7 @@ void SynthesisImagerVi2::unlockMSs() build 10-Jul-2019 13:16:42 createAWPFTMachine(theFT, theIFT, ftname, facets, wprojplane, build 10-Jul-2019 13:16:42 padding, useAutocorr, useDoublePrec, gridFunction, build 10-Jul-2019 13:16:42 aTermOn, psTermOn, mTermOn, wbAWP, cfCache, build 10-Jul-2019 13:16:42 - doPointing, doPBCorr, conjBeams, computePAStep, build 10-Jul-2019 13:16:42 + usePointing, doPBCorr, conjBeams, computePAStep, build 10-Jul-2019 13:16:42 rotatePAStep, cache,tile,imageNamePrefix); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 else if ( ftname == "mosaic" || ftname== "mosft" || ftname == "mosaicft" || ftname== "MosaicFT"){ build 10-Jul-2019 13:16:42 @@ -1704,7 +1704,7 @@ void SynthesisImagerVi2::unlockMSs() build 10-Jul-2019 13:16:42 const Bool mTermOn, //= false, build 10-Jul-2019 13:16:42 const Bool wbAWP, //= true, build 10-Jul-2019 13:16:42 const String cfCache, //= "", build 10-Jul-2019 13:16:42 - const Bool doPointing, //= false, build 10-Jul-2019 13:16:42 + const Bool usePointing, //= false, build 10-Jul-2019 13:16:42 const Bool doPBCorr, //= true, build 10-Jul-2019 13:16:42 const Bool conjBeams, //= true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -1795,7 +1795,7 @@ void SynthesisImagerVi2::unlockMSs() build 10-Jul-2019 13:16:42 theFT = new refim::AWProjectWBFTNew(wprojPlane, cache/2, build 10-Jul-2019 13:16:42 cfCacheObj, awConvFunc, build 10-Jul-2019 13:16:42 visResampler, build 10-Jul-2019 13:16:42 - /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 tile, computePAStep, pbLimit_l, true,conjBeams, build 10-Jul-2019 13:16:42 useDoublePrec); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1822,7 +1822,7 @@ void SynthesisImagerVi2::unlockMSs() build 10-Jul-2019 13:16:42 // theIFT = new AWProjectWBFT(wprojPlane, cache/2, build 10-Jul-2019 13:16:42 // cfCacheObj, awConvFunc, build 10-Jul-2019 13:16:42 // visResampler, build 10-Jul-2019 13:16:42 - // /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + // /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 // tile, computePAStep, pbLimit_l, true,conjBeams, build 10-Jul-2019 13:16:42 // useDoublePrec); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1897,7 +1897,7 @@ void SynthesisImagerVi2::unlockMSs() build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 theFT = new refim::MosaicFTNew(vps, mLocation_p, stokes, 1000000000, 16, useAutoCorr, build 10-Jul-2019 13:16:42 - useDoublePrec, doConjBeams, gridpars_p.doPointing); build 10-Jul-2019 13:16:42 + useDoublePrec, doConjBeams, gridpars_p.usePointing); build 10-Jul-2019 13:16:42 PBMathInterface::PBClass pbtype=((kpb==PBMath::EVLA) || multiTel)? PBMathInterface::COMMONPB: PBMathInterface::AIRY; build 10-Jul-2019 13:16:42 if(rec.asString("name")=="IMAGE") build 10-Jul-2019 13:16:42 pbtype=PBMathInterface::IMAGE; build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects/SynthesisImagerVi2.h b/code/synthesis/ImagerObjects/SynthesisImagerVi2.h build 10-Jul-2019 13:16:42 index 3cbf467..c481bac 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects/SynthesisImagerVi2.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects/SynthesisImagerVi2.h build 10-Jul-2019 13:16:42 @@ -120,7 +120,7 @@ public: build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn = false, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP = true, build 10-Jul-2019 13:16:42 const casacore::String cfCache = "", build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing = false, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing = false, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr = true, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams = true, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep = 360.0, build 10-Jul-2019 13:16:42 @@ -156,7 +156,7 @@ public: build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP, build 10-Jul-2019 13:16:42 const casacore::String cfCache, build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc b/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc build 10-Jul-2019 13:16:42 index 2d8c4a1..d6cc9a3 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc build 10-Jul-2019 13:16:42 @@ -3190,7 +3190,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 err += readVal( inrec, String("mterm"), mTermOn ); build 10-Jul-2019 13:16:42 err += readVal( inrec, String("wbawp"), wbAWP ); build 10-Jul-2019 13:16:42 err += readVal( inrec, String("cfcache"), cfCache ); build 10-Jul-2019 13:16:42 - err += readVal( inrec, String("dopointing"), doPointing ); build 10-Jul-2019 13:16:42 + err += readVal( inrec, String("usepointing"), usePointing ); build 10-Jul-2019 13:16:42 err += readVal( inrec, String("dopbcorr"), doPBCorr ); build 10-Jul-2019 13:16:42 err += readVal( inrec, String("conjbeams"), conjBeams ); build 10-Jul-2019 13:16:42 err += readVal( inrec, String("computepastep"), computePAStep ); build 10-Jul-2019 13:16:42 @@ -3298,7 +3298,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 interpolation=String("nearest"); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 //mosaic use pointing build 10-Jul-2019 13:16:42 - doPointing=false; build 10-Jul-2019 13:16:42 + usePointing=false; build 10-Jul-2019 13:16:42 // Moving phase center ? build 10-Jul-2019 13:16:42 distance=Quantity(0,"m"); build 10-Jul-2019 13:16:42 trackSource=false; build 10-Jul-2019 13:16:42 @@ -3310,7 +3310,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 mTermOn = false; build 10-Jul-2019 13:16:42 wbAWP = true; build 10-Jul-2019 13:16:42 cfCache = ""; build 10-Jul-2019 13:16:42 - doPointing = false; build 10-Jul-2019 13:16:42 + usePointing = false; build 10-Jul-2019 13:16:42 doPBCorr = true; build 10-Jul-2019 13:16:42 conjBeams = true; build 10-Jul-2019 13:16:42 computePAStep=360.0; build 10-Jul-2019 13:16:42 @@ -3357,7 +3357,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 gridpar.define("mterm",mTermOn ); build 10-Jul-2019 13:16:42 gridpar.define("wbawp", wbAWP); build 10-Jul-2019 13:16:42 gridpar.define("cfcache", cfCache); build 10-Jul-2019 13:16:42 - gridpar.define("dopointing",doPointing ); build 10-Jul-2019 13:16:42 + gridpar.define("usepointing",usePointing ); build 10-Jul-2019 13:16:42 gridpar.define("dopbcorr", doPBCorr); build 10-Jul-2019 13:16:42 gridpar.define("conjbeams",conjBeams ); build 10-Jul-2019 13:16:42 gridpar.define("computepastep", computePAStep); build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects/SynthesisUtilMethods.h b/code/synthesis/ImagerObjects/SynthesisUtilMethods.h build 10-Jul-2019 13:16:42 index d2bcace..4a824aa 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects/SynthesisUtilMethods.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects/SynthesisUtilMethods.h build 10-Jul-2019 13:16:42 @@ -331,9 +331,6 @@ public: build 10-Jul-2019 13:16:42 // Spectral axis interpolation build 10-Jul-2019 13:16:42 casacore::String interpolation; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - //mosaic use pointing table build 10-Jul-2019 13:16:42 - casacore::Bool usePointing; build 10-Jul-2019 13:16:42 - build 10-Jul-2019 13:16:42 // Moving phase center ? build 10-Jul-2019 13:16:42 casacore::Quantity distance; build 10-Jul-2019 13:16:42 casacore::MDirection trackDir; build 10-Jul-2019 13:16:42 @@ -341,7 +338,7 @@ public: build 10-Jul-2019 13:16:42 casacore::String movingSource; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // For wb-aprojection ftm. build 10-Jul-2019 13:16:42 - casacore::Bool aTermOn, psTermOn,mTermOn,wbAWP,doPointing, doPBCorr, conjBeams; build 10-Jul-2019 13:16:42 + casacore::Bool aTermOn, psTermOn,mTermOn,wbAWP,usePointing, doPBCorr, conjBeams; build 10-Jul-2019 13:16:42 casacore::String cfCache; build 10-Jul-2019 13:16:42 casacore::Float computePAStep, rotatePAStep; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects2/SynthesisImager.cc b/code/synthesis/ImagerObjects2/SynthesisImager.cc build 10-Jul-2019 13:16:42 index c0da2d6..1cab6f8 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects2/SynthesisImager.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects2/SynthesisImager.cc build 10-Jul-2019 13:16:42 @@ -351,7 +351,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 const Bool mTermOn,// = false, build 10-Jul-2019 13:16:42 const Bool wbAWP,// = true, build 10-Jul-2019 13:16:42 const String cfCache,// = "", build 10-Jul-2019 13:16:42 - const Bool doPointing,// = false, build 10-Jul-2019 13:16:42 + const Bool usePointing,// = false, build 10-Jul-2019 13:16:42 const Bool doPBCorr,// = true, build 10-Jul-2019 13:16:42 const Bool conjBeams,// = true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -397,7 +397,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 gridpars.mTermOn=mTermOn; build 10-Jul-2019 13:16:42 gridpars.wbAWP=wbAWP; build 10-Jul-2019 13:16:42 gridpars.cfCache=cfCache; build 10-Jul-2019 13:16:42 - gridpars.doPointing=doPointing; build 10-Jul-2019 13:16:42 + gridpars.usePointing=usePointing; build 10-Jul-2019 13:16:42 gridpars.doPBCorr=doPBCorr; build 10-Jul-2019 13:16:42 gridpars.conjBeams=conjBeams; build 10-Jul-2019 13:16:42 gridpars.computePAStep=computePAStep; build 10-Jul-2019 13:16:42 @@ -461,7 +461,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 gridpars.padding,gridpars.useAutoCorr,gridpars.useDoublePrec, build 10-Jul-2019 13:16:42 gridpars.convFunc, build 10-Jul-2019 13:16:42 gridpars.aTermOn,gridpars.psTermOn, gridpars.mTermOn, build 10-Jul-2019 13:16:42 - gridpars.wbAWP,gridpars.cfCache,gridpars.doPointing, build 10-Jul-2019 13:16:42 + gridpars.wbAWP,gridpars.cfCache,gridpars.usePointing, build 10-Jul-2019 13:16:42 gridpars.doPBCorr,gridpars.conjBeams, build 10-Jul-2019 13:16:42 gridpars.computePAStep,gridpars.rotatePAStep, build 10-Jul-2019 13:16:42 gridpars.interpolation, impars.freqFrameValid); build 10-Jul-2019 13:16:42 @@ -1061,7 +1061,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 const Bool mTermOn, //= false, build 10-Jul-2019 13:16:42 const Bool wbAWP, //= true, build 10-Jul-2019 13:16:42 const String cfCache, //= "", build 10-Jul-2019 13:16:42 - const Bool doPointing, //= false, build 10-Jul-2019 13:16:42 + const Bool usePointing, //= false, build 10-Jul-2019 13:16:42 const Bool doPBCorr, //= true, build 10-Jul-2019 13:16:42 const Bool conjBeams, //= true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -1099,7 +1099,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 createAWPFTMachine(theFT, theIFT, ftname, facets, wprojplane, build 10-Jul-2019 13:16:42 padding, useAutocorr, useDoublePrec, gridFunction, build 10-Jul-2019 13:16:42 aTermOn, psTermOn, mTermOn, wbAWP, cfCache, build 10-Jul-2019 13:16:42 - doPointing, doPBCorr, conjBeams, computePAStep, build 10-Jul-2019 13:16:42 + usePointing, doPBCorr, conjBeams, computePAStep, build 10-Jul-2019 13:16:42 rotatePAStep, cache,tile); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 else build 10-Jul-2019 13:16:42 @@ -1172,7 +1172,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 const Bool mTermOn, //= false, build 10-Jul-2019 13:16:42 const Bool wbAWP, //= true, build 10-Jul-2019 13:16:42 const String cfCache, //= "", build 10-Jul-2019 13:16:42 - const Bool doPointing, //= false, build 10-Jul-2019 13:16:42 + const Bool usePointing, //= false, build 10-Jul-2019 13:16:42 const Bool doPBCorr, //= true, build 10-Jul-2019 13:16:42 const Bool conjBeams, //= true, build 10-Jul-2019 13:16:42 const Float computePAStep, //=360.0 build 10-Jul-2019 13:16:42 @@ -1243,7 +1243,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 theFT = new refim::AWProjectWBFTNew(wprojPlane, cache/2, build 10-Jul-2019 13:16:42 cfCacheObj, awConvFunc, build 10-Jul-2019 13:16:42 visResampler, build 10-Jul-2019 13:16:42 - /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 tile, computePAStep, pbLimit_l, true,conjBeams, build 10-Jul-2019 13:16:42 useDoublePrec); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -1254,7 +1254,7 @@ using namespace casa::vi; build 10-Jul-2019 13:16:42 // theIFT = new AWProjectWBFT(wprojPlane, cache/2, build 10-Jul-2019 13:16:42 // cfCacheObj, awConvFunc, build 10-Jul-2019 13:16:42 // visResampler, build 10-Jul-2019 13:16:42 - // /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + // /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 // tile, computePAStep, pbLimit_l, true,conjBeams, build 10-Jul-2019 13:16:42 // useDoublePrec); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/ImagerObjects2/SynthesisImager.h b/code/synthesis/ImagerObjects2/SynthesisImager.h build 10-Jul-2019 13:16:42 index 577b356..7dd0cb0 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/ImagerObjects2/SynthesisImager.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/ImagerObjects2/SynthesisImager.h build 10-Jul-2019 13:16:42 @@ -124,7 +124,7 @@ class SynthesisImager build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn = false, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP = true, build 10-Jul-2019 13:16:42 const casacore::String cfCache = "", build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing = false, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing = false, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr = true, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams = true, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep=360.0, build 10-Jul-2019 13:16:42 @@ -190,7 +190,7 @@ protected: build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn = false, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP = true, build 10-Jul-2019 13:16:42 const casacore::String cfCache = "", build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing = false, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing = false, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr = true, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams = true, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep = 360.0, build 10-Jul-2019 13:16:42 @@ -242,7 +242,7 @@ protected: build 10-Jul-2019 13:16:42 const casacore::Bool mTermOn, build 10-Jul-2019 13:16:42 const casacore::Bool wbAWP, build 10-Jul-2019 13:16:42 const casacore::String cfCache, build 10-Jul-2019 13:16:42 - const casacore::Bool doPointing, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointing, build 10-Jul-2019 13:16:42 const casacore::Bool doPBCorr, build 10-Jul-2019 13:16:42 const casacore::Bool conjBeams, build 10-Jul-2019 13:16:42 const casacore::Float computePAStep, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementComponents/PBMosaicFT.cc b/code/synthesis/MeasurementComponents/PBMosaicFT.cc build 10-Jul-2019 13:16:42 index ff6f127..37808ed 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementComponents/PBMosaicFT.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementComponents/PBMosaicFT.cc build 10-Jul-2019 13:16:42 @@ -129,7 +129,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 //bandID_p = getVisParams(); build 10-Jul-2019 13:16:42 - if (applyPointingOffset) doPointing=1; else doPointing=0; build 10-Jul-2019 13:16:42 + if (applyPointingOffset) usePointing=1; else usePointing=0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 convFuncCacheReady=false; build 10-Jul-2019 13:16:42 PAIndex = -1; build 10-Jul-2019 13:16:42 @@ -600,7 +600,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *doGrad, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -644,7 +644,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -687,7 +687,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -775,8 +775,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 actualConvSize = convFunc.shape()(0); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:42 - Int alwaysDoPointing=1; build 10-Jul-2019 13:16:42 - alwaysDoPointing=doPointing; build 10-Jul-2019 13:16:42 + Int alwaysUsePointing=1; build 10-Jul-2019 13:16:42 + alwaysUsePointing=usePointing; build 10-Jul-2019 13:16:42 dpbmos(uvw_p, build 10-Jul-2019 13:16:42 dphase_p, build 10-Jul-2019 13:16:42 visdata_p, build 10-Jul-2019 13:16:42 @@ -811,7 +811,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &alwaysDoPointing, build 10-Jul-2019 13:16:42 + &alwaysUsePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -916,8 +916,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 actualConvSize = convFunc.shape()(0); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:42 - Int alwaysDoPointing=1; build 10-Jul-2019 13:16:42 - alwaysDoPointing = doPointing; build 10-Jul-2019 13:16:42 + Int alwaysUsePointing=1; build 10-Jul-2019 13:16:42 + alwaysUsePointing = usePointing; build 10-Jul-2019 13:16:42 dpbmosgrad(uvw_p, build 10-Jul-2019 13:16:42 dphase_p, build 10-Jul-2019 13:16:42 visdata_p, build 10-Jul-2019 13:16:42 @@ -955,7 +955,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &alwaysDoPointing, build 10-Jul-2019 13:16:42 + &alwaysUsePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -1090,8 +1090,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 if (fabs(lastPAUsedForWtImg-actualPA)*57.2956 >= DELTAPA) lastPAUsedForWtImg = actualPA; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:42 - Int alwaysDoPointing=1; build 10-Jul-2019 13:16:42 - alwaysDoPointing = doPointing; build 10-Jul-2019 13:16:42 + Int alwaysUsePointing=1; build 10-Jul-2019 13:16:42 + alwaysUsePointing = usePointing; build 10-Jul-2019 13:16:42 gpbmos(uvw_p, build 10-Jul-2019 13:16:42 dphase_p, build 10-Jul-2019 13:16:42 visdata_p, build 10-Jul-2019 13:16:42 @@ -1131,7 +1131,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &alwaysDoPointing, build 10-Jul-2019 13:16:42 + &alwaysUsePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementComponents/nPBWProjectFT.cc b/code/synthesis/MeasurementComponents/nPBWProjectFT.cc build 10-Jul-2019 13:16:42 index ff27adf..286d79d 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementComponents/nPBWProjectFT.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementComponents/nPBWProjectFT.cc build 10-Jul-2019 13:16:42 @@ -170,7 +170,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 bandID_p=-1; build 10-Jul-2019 13:16:42 - if (applyPointingOffset) doPointing=1; else doPointing=0; build 10-Jul-2019 13:16:42 + if (applyPointingOffset) usePointing=1; else usePointing=0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 convFuncCacheReady=false; build 10-Jul-2019 13:16:42 PAIndex = -1; build 10-Jul-2019 13:16:42 @@ -279,7 +279,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 bandID_p = other.bandID_p; build 10-Jul-2019 13:16:42 - doPointing=other.doPointing; build 10-Jul-2019 13:16:42 + usePointing=other.usePointing; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 convFuncCacheReady=other.convFuncCacheReady; build 10-Jul-2019 13:16:42 PAIndex = other.PAIndex; build 10-Jul-2019 13:16:42 @@ -2309,7 +2309,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *doGrad, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -2349,7 +2349,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -2392,7 +2392,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -2528,7 +2528,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -2677,7 +2677,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -2843,7 +2843,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -2904,7 +2904,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 const casacore::Complex *datStorage=data->getStorage(isCopy); build 10-Jul-2019 13:16:42 Int NAnt = 0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if (doPointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 + if (usePointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // If row is -1 then we pass through all rows build 10-Jul-2019 13:16:42 @@ -3083,7 +3083,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 findConvFunction(*image, vb); build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 if (bandID_p == -1) bandID_p=getVisParams(vb); build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 NAnt = findPointingOffsets(vb,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 l_offsets=l_off; build 10-Jul-2019 13:16:42 @@ -3251,7 +3251,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if (bandID_p == -1) bandID_p=getVisParams(vb); build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 NAnt = findPointingOffsets(vb,pointingOffsets,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Matrix uvw(3, vb.uvw().nelements()); build 10-Jul-2019 13:16:42 @@ -3425,7 +3425,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 if (bandID_p == -1) bandID_p=getVisParams(vb); build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 - if (doPointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 + if (usePointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the uvws in a form that Fortran can use build 10-Jul-2019 13:16:42 Matrix uvw(3, vb.uvw().nelements()); build 10-Jul-2019 13:16:42 @@ -3584,7 +3584,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 NAnt = findPointingOffsets(vb,l_offsets, m_offsets,true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -4198,7 +4198,7 @@ Bool nPBWProjectFT::fromRecord(String&, //error, build 10-Jul-2019 13:16:42 Float peak=0; build 10-Jul-2019 13:16:42 Int NAnt; build 10-Jul-2019 13:16:42 // NAnt=findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 - // if (doPointing) build 10-Jul-2019 13:16:42 + // if (usePointing) build 10-Jul-2019 13:16:42 // NAnt=findPointingOffsets(vb,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:42 // else build 10-Jul-2019 13:16:42 // NAnt = 1; build 10-Jul-2019 13:16:42 @@ -4209,7 +4209,7 @@ Bool nPBWProjectFT::fromRecord(String&, //error, build 10-Jul-2019 13:16:42 // << LogIO::POST; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 noOfPASteps++; build 10-Jul-2019 13:16:42 - if (!doPointing) NAnt=1; build 10-Jul-2019 13:16:42 + if (!usePointing) NAnt=1; build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // For now, disable the "jittering" of the avg. PB by antenna pointing offsets. build 10-Jul-2019 13:16:42 // May not be required even for the very deep imaging - but thinking is a bit build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementComponents/nPBWProjectFT.h b/code/synthesis/MeasurementComponents/nPBWProjectFT.h build 10-Jul-2019 13:16:42 index 36fedb9..1826c55 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementComponents/nPBWProjectFT.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementComponents/nPBWProjectFT.h build 10-Jul-2019 13:16:42 @@ -495,7 +495,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 SolvableVisJones *epJ; build 10-Jul-2019 13:16:42 casacore::Double HPBW, Diameter_p, sigma; build 10-Jul-2019 13:16:42 casacore::Int Nant_p; build 10-Jul-2019 13:16:42 - casacore::Int doPointing; build 10-Jul-2019 13:16:42 + casacore::Int usePointing; build 10-Jul-2019 13:16:42 casacore::Bool doPBCorrection; build 10-Jul-2019 13:16:42 casacore::Bool makingPSF; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/AntennaResponses.cc b/code/synthesis/MeasurementEquations/AntennaResponses.cc build 10-Jul-2019 13:16:42 new file mode 100644 build 10-Jul-2019 13:16:42 index 0000000..fba16aa build 10-Jul-2019 13:16:42 --- /dev/null build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/AntennaResponses.cc build 10-Jul-2019 13:16:42 @@ -0,0 +1,957 @@ build 10-Jul-2019 13:16:42 +//# AntennaResponses.h: AntennaResponses provides access to antenna response data build 10-Jul-2019 13:16:42 +//# Copyright (C) 1995-1999,2000-2004 build 10-Jul-2019 13:16:42 +//# Associated Universities, Inc. Washington DC, USA build 10-Jul-2019 13:16:42 +//# Copyright by ESO (in the framework of the ALMA collaboration) build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# This library is free software; you can redistribute it and/or modify it build 10-Jul-2019 13:16:42 +//# under the terms of the GNU Library General Public License as published by build 10-Jul-2019 13:16:42 +//# the Free Software Foundation; either version 2 of the License, or (at your build 10-Jul-2019 13:16:42 +//# option) any later version. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# This library is distributed in the hope that it will be useful, but WITHOUT build 10-Jul-2019 13:16:42 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 10-Jul-2019 13:16:42 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public build 10-Jul-2019 13:16:42 +//# License for more details. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# You should have received a copy of the GNU Library General Public License build 10-Jul-2019 13:16:42 +//# along with this library; if not, write to the Free Software Foundation, build 10-Jul-2019 13:16:42 +//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# Correspondence concerning CASA should be addressed as follows: build 10-Jul-2019 13:16:42 +//# Internet email: aips2-request@nrao.edu. build 10-Jul-2019 13:16:42 +//# Postal address: CASA Project Office build 10-Jul-2019 13:16:42 +//# National Radio Astronomy Observatory build 10-Jul-2019 13:16:42 +//# 520 Edgemont Road build 10-Jul-2019 13:16:42 +//# Charlottesville, VA 22903-2475 USA build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# $Id: $ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +//# Includes build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +using namespace casacore; build 10-Jul-2019 13:16:42 +namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AntennaResponses::AntennaResponses(const String& path){ build 10-Jul-2019 13:16:42 + init(path); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::init(const String& path){ build 10-Jul-2019 13:16:42 + // reset members to empty build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + paths_p.resize(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + numRows_p = 0; build 10-Jul-2019 13:16:42 + ObsName_p.resize(); build 10-Jul-2019 13:16:42 + StartTime_p.resize(); build 10-Jul-2019 13:16:42 + AntennaType_p.resize(); build 10-Jul-2019 13:16:42 + ReceiverType_p.resize(); build 10-Jul-2019 13:16:42 + BeamId_p.resize(); build 10-Jul-2019 13:16:42 + BeamNumber_p.resize(); build 10-Jul-2019 13:16:42 + ValidCenter_p.resize(); build 10-Jul-2019 13:16:42 + ValidCenterMin_p.resize(); build 10-Jul-2019 13:16:42 + ValidCenterMax_p.resize(); build 10-Jul-2019 13:16:42 + NumSubbands_p.resize(); build 10-Jul-2019 13:16:42 + BandName_p.resize(); build 10-Jul-2019 13:16:42 + SubbandMinFreq_p.resize(); build 10-Jul-2019 13:16:42 + SubbandMaxFreq_p.resize(); build 10-Jul-2019 13:16:42 + FuncType_p.resize(); build 10-Jul-2019 13:16:42 + FuncName_p.resize(); build 10-Jul-2019 13:16:42 + FuncChannel_p.resize(); build 10-Jul-2019 13:16:42 + NomFreq_p.resize(); build 10-Jul-2019 13:16:42 + RotAngOffset_p.resize(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + pathIndex_p.resize(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(path==""){ build 10-Jul-2019 13:16:42 + paths_p.resize(1, ""); build 10-Jul-2019 13:16:42 + return true; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + else{ build 10-Jul-2019 13:16:42 + // fill members from table on disk build 10-Jul-2019 13:16:42 + return append(path); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::append(const String& path){ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(isInit(path)){ build 10-Jul-2019 13:16:42 + // Returns false if the path was already read before. build 10-Jul-2019 13:16:42 + //cout << "Path has been read before." << endl; build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // open table build 10-Jul-2019 13:16:42 + Table tab(path); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // get number of rows build 10-Jul-2019 13:16:42 + uInt numRows = tab.nrow(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + uInt nPaths = paths_p.nelements(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(numRows>0){ build 10-Jul-2019 13:16:42 + // read columns and append to vectors; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ScalarColumn beamIdCol(tab, "BEAM_ID"); build 10-Jul-2019 13:16:42 + ScalarColumn nameCol(tab, "NAME"); build 10-Jul-2019 13:16:42 + ScalarColumn beamNumberCol(tab, "BEAM_NUMBER"); build 10-Jul-2019 13:16:42 + ROScalarMeasColumn startTimeCol(tab, "START_TIME"); build 10-Jul-2019 13:16:42 + ScalarColumn antennaTypeCol(tab, "ANTENNA_TYPE"); build 10-Jul-2019 13:16:42 + ScalarColumn receiverTypeCol(tab, "RECEIVER_TYPE"); build 10-Jul-2019 13:16:42 + ScalarColumn numSubbandsCol(tab, "NUM_SUBBANDS"); build 10-Jul-2019 13:16:42 + ArrayColumn bandNameCol(tab, "BAND_NAME"); build 10-Jul-2019 13:16:42 + ROArrayQuantColumn subbandMinFreqCol(tab, "SUBBAND_MIN_FREQ"); build 10-Jul-2019 13:16:42 + ROArrayQuantColumn subbandMaxFreqCol(tab, "SUBBAND_MAX_FREQ"); build 10-Jul-2019 13:16:42 + ROScalarMeasColumn centerCol(tab, "CENTER"); build 10-Jul-2019 13:16:42 + ROScalarMeasColumn validCenterMinCol(tab, "VALID_CENTER_MIN"); build 10-Jul-2019 13:16:42 + ROScalarMeasColumn validCenterMaxCol(tab, "VALID_CENTER_MAX"); build 10-Jul-2019 13:16:42 + ArrayColumn functionTypeCol(tab, "FUNCTION_TYPE"); build 10-Jul-2019 13:16:42 + ArrayColumn functionNameCol(tab, "FUNCTION_NAME"); build 10-Jul-2019 13:16:42 + ArrayColumn functionChannelCol(tab, "FUNCTION_CHANNEL"); build 10-Jul-2019 13:16:42 + ROArrayQuantColumn nomFreqCol(tab, "NOMINAL_FREQ"); build 10-Jul-2019 13:16:42 + ROArrayQuantColumn rotAngOffsetCol(tab, "RESPONSE_ROTATION_OFFSET"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + numRows_p += numRows; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ObsName_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + StartTime_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + AntennaType_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + ReceiverType_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + BeamId_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + BeamNumber_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + ValidCenter_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + ValidCenterMin_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + ValidCenterMax_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + NumSubbands_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + BandName_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + SubbandMinFreq_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + SubbandMaxFreq_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + FuncType_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + FuncName_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + FuncChannel_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + NomFreq_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + RotAngOffset_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + pathIndex_p.resize(numRows_p,true); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + for(uInt i=0; i tQ; build 10-Jul-2019 13:16:42 + tQ = subbandMinFreqCol(i); build 10-Jul-2019 13:16:42 + uInt nSubB = tQ.nelements(); build 10-Jul-2019 13:16:42 + SubbandMinFreq_p(j).resize(nSubB); build 10-Jul-2019 13:16:42 + for(uInt k=0; k tFType; build 10-Jul-2019 13:16:42 + tFType = functionTypeCol(i); build 10-Jul-2019 13:16:42 + FuncType_p(j).resize(nSubB); build 10-Jul-2019 13:16:42 + for(uInt k=0; k1){ // don't want trailing "/" build 10-Jul-2019 13:16:42 + tempS.erase(tempS.size()-1,1); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + paths_p(nPaths) = path; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + return true; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::isInit(){ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + return (paths_p.nelements()!=0); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::isInit(const String& path){ build 10-Jul-2019 13:16:42 + Bool found = false; build 10-Jul-2019 13:16:42 + for (uInt i=0; i azel = MDirection::Convert(center, build 10-Jul-2019 13:16:42 + MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 + frame) build 10-Jul-2019 13:16:42 + )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Quantity f(0., uHz); build 10-Jul-2019 13:16:42 + if(matchFreq){ build 10-Jul-2019 13:16:42 + f = MFrequency::Convert(freq, MFrequency::TOPO)().get(uHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // loop over rows build 10-Jul-2019 13:16:42 + uInt i,j; build 10-Jul-2019 13:16:42 + vector rowV, subBandV; build 10-Jul-2019 13:16:42 + vector timeV; build 10-Jul-2019 13:16:42 + for(i=0; i azelMin = MDirection::Convert(ValidCenterMin_p(i), build 10-Jul-2019 13:16:42 + MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 + frame) build 10-Jul-2019 13:16:42 + )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 + Vector azelMax = MDirection::Convert(ValidCenterMax_p(i), build 10-Jul-2019 13:16:42 + MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 + frame) build 10-Jul-2019 13:16:42 + )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // need to accomodate the ambiguity of the AZ build 10-Jul-2019 13:16:42 + Double modAz = fmod(azel(0) - azelMin(0),360.); build 10-Jul-2019 13:16:42 + Double modAzMax = fmod(azelMax(0) - azelMin(0), 360.); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +// cout << " i, j, " << i << ", " << j << " az min actual max" << azelMin(0) << " " build 10-Jul-2019 13:16:42 +// << azel(0) << " " << azelMax(0) << endl; build 10-Jul-2019 13:16:42 +// cout << " i, j, " << i << ", " << j << " cannonised az actual max" << modAz << " " << modAzMax << endl; build 10-Jul-2019 13:16:42 +// cout << " i, j, " << i << ", " << j << " el min actual max" << azelMin(1) << " " << azel(1) << " " << azelMax(1) << endl; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if((fabs(azelMin(0)-azelMax(0))<1e-5 // all AZ are valid (accomodate numerical problems at 360 deg) build 10-Jul-2019 13:16:42 + || ( 0. <= modAz && modAz <= modAzMax)) build 10-Jul-2019 13:16:42 + && azelMin(1) <= azel(1) && azel(1) <= azelMax(1)){ build 10-Jul-2019 13:16:42 + // memorize the applicable row, sub band, and time build 10-Jul-2019 13:16:42 + rval = true; build 10-Jul-2019 13:16:42 + rowV.push_back(i); build 10-Jul-2019 13:16:42 + subBandV.push_back(j); build 10-Jul-2019 13:16:42 + timeV.push_back(StartTime_p(i).get(uS)); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } // end for build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(rval){ build 10-Jul-2019 13:16:42 + Vector sortIndex; build 10-Jul-2019 13:16:42 + GenSortIndirect::sort(sortIndex, Vector(timeV)); build 10-Jul-2019 13:16:42 + // take the latest row build 10-Jul-2019 13:16:42 + row = rowV[sortIndex(sortIndex.nelements()-1)]; build 10-Jul-2019 13:16:42 + subBand = subBandV[sortIndex(sortIndex.nelements()-1)]; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + return rval; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::getRowAndIndex(uInt& row, uInt& subBand, build 10-Jul-2019 13:16:42 + const String& obsName, build 10-Jul-2019 13:16:42 + const Int& beamId, build 10-Jul-2019 13:16:42 + const MFrequency& freq){ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool rval = false; build 10-Jul-2019 13:16:42 + Unit uHz("Hz"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // calculate topo frequency build 10-Jul-2019 13:16:42 + Quantity f = MFrequency::Convert(freq, MFrequency::TOPO)().get(uHz); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // loop over rows build 10-Jul-2019 13:16:42 + uInt i,j; build 10-Jul-2019 13:16:42 + for(i=0; i& antTypes, build 10-Jul-2019 13:16:42 + const String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 + const MEpoch& obsTime, build 10-Jul-2019 13:16:42 + const MFrequency& freq, build 10-Jul-2019 13:16:42 + const FuncTypes& requFType, build 10-Jul-2019 13:16:42 + const MDirection& center, build 10-Jul-2019 13:16:42 + const String& receiverType, build 10-Jul-2019 13:16:42 + const Int& beamNumber){ build 10-Jul-2019 13:16:42 + Bool rval = false; build 10-Jul-2019 13:16:42 + Unit uS("s"); build 10-Jul-2019 13:16:42 + Unit uHz("Hz"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + antTypes.resize(0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // for the combination INTERNAL + 0 freq, return the row and index for the first freq found build 10-Jul-2019 13:16:42 + Bool matchFreq = !((freq.get(uHz).getValue() == 0.) && requFType==INTERNAL); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // calculate azimuth, elevation, and topo frequency build 10-Jul-2019 13:16:42 + // first, get the reference frame build 10-Jul-2019 13:16:42 + MPosition mp; build 10-Jul-2019 13:16:42 + if (!MeasTable::Observatory(mp,obsName)) { build 10-Jul-2019 13:16:42 + // unknown observatory build 10-Jul-2019 13:16:42 + LogIO os(LogOrigin("AntennaResponses", build 10-Jul-2019 13:16:42 + String("getAntennaTypes"), build 10-Jul-2019 13:16:42 + WHERE)); build 10-Jul-2019 13:16:42 + os << LogIO::NORMAL << String("Unknown observatory ") << obsName build 10-Jul-2019 13:16:42 + << LogIO::POST; build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + mp=MPosition::Convert(mp, MPosition::ITRF)(); build 10-Jul-2019 13:16:42 + MeasFrame frame(mp, obsTime); build 10-Jul-2019 13:16:42 + Vector azel = MDirection::Convert(center, build 10-Jul-2019 13:16:42 + MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 + frame) build 10-Jul-2019 13:16:42 + )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Quantity f(0., uHz); build 10-Jul-2019 13:16:42 + if(matchFreq){ build 10-Jul-2019 13:16:42 + f = MFrequency::Convert(freq, MFrequency::TOPO)().get(uHz); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // loop over rows build 10-Jul-2019 13:16:42 + uInt i,j; build 10-Jul-2019 13:16:42 + std::map antTypeMap; build 10-Jul-2019 13:16:42 + for(i=0; i azelMin = MDirection::Convert(ValidCenterMin_p(i), build 10-Jul-2019 13:16:42 + MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 + frame) build 10-Jul-2019 13:16:42 + )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 + Vector azelMax = MDirection::Convert(ValidCenterMax_p(i), build 10-Jul-2019 13:16:42 + MDirection::Ref(MDirection::AZEL, build 10-Jul-2019 13:16:42 + frame) build 10-Jul-2019 13:16:42 + )().getAngle("deg").getValue(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // need to accomodate the ambiguity of the AZ build 10-Jul-2019 13:16:42 + Double modAz = fmod(azel(0) - azelMin(0),360.); build 10-Jul-2019 13:16:42 + Double modAzMax = fmod(azelMax(0) - azelMin(0), 360.); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if((fabs(azelMin(0)-azelMax(0))<1e-5 // all AZ are valid (accomodate numerical problems at 360 deg) build 10-Jul-2019 13:16:42 + || ( 0. <= modAz && modAz <= modAzMax)) build 10-Jul-2019 13:16:42 + && azelMin(1) <= azel(1) && azel(1) <= azelMax(1)){ build 10-Jul-2019 13:16:42 + // memorize the antenna type build 10-Jul-2019 13:16:42 + if( antTypeMap.find(AntennaType_p(i)) == antTypeMap.end( ) ){ build 10-Jul-2019 13:16:42 + rval = true; build 10-Jul-2019 13:16:42 + antTypeMap.insert(std::pair(AntennaType_p(i),1)); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } // end for build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(rval){ build 10-Jul-2019 13:16:42 + antTypes.resize(antTypeMap.size( )); build 10-Jul-2019 13:16:42 + uInt count = 0; build 10-Jul-2019 13:16:42 + for( auto iter = antTypeMap.begin( ); iter != antTypeMap.end( ); ++iter, ++count ){ build 10-Jul-2019 13:16:42 + antTypes(count) = iter->first; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + return rval; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::putRow(uInt& row, build 10-Jul-2019 13:16:42 + const String& obsName, build 10-Jul-2019 13:16:42 + const Int& beamId, build 10-Jul-2019 13:16:42 + const Vector& bandName, build 10-Jul-2019 13:16:42 + const Vector& subbandMinFreq, build 10-Jul-2019 13:16:42 + const Vector& subbandMaxFreq, build 10-Jul-2019 13:16:42 + const Vector& funcType, build 10-Jul-2019 13:16:42 + const Vector& funcName, build 10-Jul-2019 13:16:42 + const Vector& funcChannel, build 10-Jul-2019 13:16:42 + const Vector& nomFreq, build 10-Jul-2019 13:16:42 + const Vector& rotAngOffset, build 10-Jul-2019 13:16:42 + const String& antennaType, build 10-Jul-2019 13:16:42 + const MEpoch& startTime, build 10-Jul-2019 13:16:42 + const MDirection& center, build 10-Jul-2019 13:16:42 + const MDirection& validCenterMin, build 10-Jul-2019 13:16:42 + const MDirection& validCenterMax, build 10-Jul-2019 13:16:42 + const String& receiverType, build 10-Jul-2019 13:16:42 + const Int& beamNumber){ build 10-Jul-2019 13:16:42 + // Put the given row into the present antenna reponses table (in memory). build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Returns false, if the table was not initialised or the given data was build 10-Jul-2019 13:16:42 + // not consistent. build 10-Jul-2019 13:16:42 + if(paths_p.nelements()==0){ build 10-Jul-2019 13:16:42 + LogIO os(LogOrigin("AntennaResponses", build 10-Jul-2019 13:16:42 + String("putRow"), build 10-Jul-2019 13:16:42 + WHERE)); build 10-Jul-2019 13:16:42 + os << LogIO::NORMAL << String("Table not initialized.") << obsName build 10-Jul-2019 13:16:42 + << LogIO::POST; build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + // Consistency checks: build 10-Jul-2019 13:16:42 + // - all vectors have same dimension which is then used to set numSubbands build 10-Jul-2019 13:16:42 + uInt tNumSubbands = bandName.nelements(); build 10-Jul-2019 13:16:42 + if(!( build 10-Jul-2019 13:16:42 + tNumSubbands == subbandMinFreq.nelements() && build 10-Jul-2019 13:16:42 + tNumSubbands == subbandMaxFreq.nelements() && build 10-Jul-2019 13:16:42 + tNumSubbands == funcType.nelements() && build 10-Jul-2019 13:16:42 + tNumSubbands == funcName.nelements() && build 10-Jul-2019 13:16:42 + tNumSubbands == funcChannel.nelements() && build 10-Jul-2019 13:16:42 + tNumSubbands == nomFreq.nelements() && build 10-Jul-2019 13:16:42 + tNumSubbands == rotAngOffset.nelements()) build 10-Jul-2019 13:16:42 + ){ build 10-Jul-2019 13:16:42 + LogIO os(LogOrigin("AntennaResponses", String("putRow"), WHERE)); build 10-Jul-2019 13:16:42 + os << LogIO::NORMAL << String("Inconsistent vector dimensions.") << obsName build 10-Jul-2019 13:16:42 + << LogIO::POST; build 10-Jul-2019 13:16:42 + return false; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + // - beamId is unique for the given observatory build 10-Jul-2019 13:16:42 + Bool isUnique = true; build 10-Jul-2019 13:16:42 + for(uInt i=0; i ("BEAM_ID", "unique for the given observatory name")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("NAME", "name of the observatory as in the Observatories table")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("BEAM_NUMBER", "for observataories which support several simultaneous beams, zero-based")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("START_TIME", "the time from which onwards this table row is valid, measure fixed to UTC")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("ANTENNA_TYPE", "for heterogeneous arrays: indication of the antenna type")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("RECEIVER_TYPE", "permits multiple receivers per band")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("NUM_SUBBANDS", "number of elements in the array columns in this table")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("BAND_NAME", "name of the frequency band")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("SUBBAND_MIN_FREQ", "minimum frequency of the subband in the observatory frame")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("SUBBAND_MAX_FREQ", "maximum frequency of the subband in the observatory frame")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("CENTER", "the nominal center sky position where this row is valid")); build 10-Jul-2019 13:16:42 + tD.addColumn(ScalarColumnDesc ("CENTER_REF", ColumnDesc::Direct)); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("VALID_CENTER_MIN", "sky position validity range min values")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("VALID_CENTER_MAX", "sky position validity range max values")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("FUNCTION_TYPE")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("FUNCTION_NAME")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("FUNCTION_CHANNEL")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("NOMINAL_FREQ")); build 10-Jul-2019 13:16:42 + tD.addColumn(ArrayColumnDesc ("RESPONSE_ROTATION_OFFSET")); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Add TableMeasures information for designated Measures/Quanta columns build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + TableMeasValueDesc timeMeasVal(tD, "START_TIME"); build 10-Jul-2019 13:16:42 + TableMeasRefDesc timeMeasRef(MEpoch::DEFAULT); build 10-Jul-2019 13:16:42 + TableMeasDesc timeMeasCol(timeMeasVal, timeMeasRef); build 10-Jul-2019 13:16:42 + timeMeasCol.write(tD); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + TableQuantumDesc timeQuantDesc(tD, "START_TIME", Unit ("s")); build 10-Jul-2019 13:16:42 + timeQuantDesc.write(tD); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + TableQuantumDesc freqQuantDesc(tD, "SUBBAND_MIN_FREQ", Unit ("Hz")); build 10-Jul-2019 13:16:42 + freqQuantDesc.write (tD); build 10-Jul-2019 13:16:42 + TableQuantumDesc freqQuantDesc2(tD, "SUBBAND_MAX_FREQ", Unit ("Hz")); build 10-Jul-2019 13:16:42 + freqQuantDesc2.write (tD); build 10-Jul-2019 13:16:42 + TableQuantumDesc freqQuantDesc3(tD, "NOMINAL_FREQ", Unit ("Hz")); build 10-Jul-2019 13:16:42 + freqQuantDesc3.write (tD); build 10-Jul-2019 13:16:42 + TableQuantumDesc angQuantDesc(tD, "RESPONSE_ROTATION_OFFSET", Unit ("deg")); build 10-Jul-2019 13:16:42 + angQuantDesc.write (tD); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + TableMeasValueDesc refDirMeasVal (tD, "CENTER"); build 10-Jul-2019 13:16:42 + TableMeasRefDesc refDirMeasRef (tD, "CENTER_REF"); build 10-Jul-2019 13:16:42 + TableMeasDesc refDirMeasCol (refDirMeasVal, refDirMeasRef); build 10-Jul-2019 13:16:42 + refDirMeasCol.write(tD); build 10-Jul-2019 13:16:42 + TableMeasValueDesc refDirMeasValMin (tD, "VALID_CENTER_MIN"); build 10-Jul-2019 13:16:42 + TableMeasDesc refDirMeasColMin (refDirMeasValMin, refDirMeasRef); build 10-Jul-2019 13:16:42 + refDirMeasColMin.write(tD); build 10-Jul-2019 13:16:42 + TableMeasValueDesc refDirMeasValMax (tD, "VALID_CENTER_MAX"); build 10-Jul-2019 13:16:42 + TableMeasDesc refDirMeasColMax (refDirMeasValMax, refDirMeasRef); build 10-Jul-2019 13:16:42 + refDirMeasColMax.write(tD); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // create the table build 10-Jul-2019 13:16:42 + SetupNewTable newtab (path, tD, Table::New); build 10-Jul-2019 13:16:42 + Table tab(newtab, numRows_p); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(numRows_p>0){ build 10-Jul-2019 13:16:42 + // fill the table build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ScalarColumn beamIdCol(tab, "BEAM_ID"); build 10-Jul-2019 13:16:42 + ScalarColumn nameCol(tab, "NAME"); build 10-Jul-2019 13:16:42 + ScalarColumn beamNumberCol(tab, "BEAM_NUMBER"); build 10-Jul-2019 13:16:42 + ScalarMeasColumn startTimeCol(tab, "START_TIME"); build 10-Jul-2019 13:16:42 + ScalarColumn antennaTypeCol(tab, "ANTENNA_TYPE"); build 10-Jul-2019 13:16:42 + ScalarColumn receiverTypeCol(tab, "RECEIVER_TYPE"); build 10-Jul-2019 13:16:42 + ScalarColumn numSubbandsCol(tab, "NUM_SUBBANDS"); build 10-Jul-2019 13:16:42 + ArrayColumn bandNameCol(tab, "BAND_NAME"); build 10-Jul-2019 13:16:42 + ArrayQuantColumn subbandMinFreqCol(tab, "SUBBAND_MIN_FREQ"); build 10-Jul-2019 13:16:42 + ArrayQuantColumn subbandMaxFreqCol(tab, "SUBBAND_MAX_FREQ"); build 10-Jul-2019 13:16:42 + ScalarMeasColumn centerCol(tab, "CENTER"); build 10-Jul-2019 13:16:42 + ScalarMeasColumn validCenterMinCol(tab, "VALID_CENTER_MIN"); build 10-Jul-2019 13:16:42 + ScalarMeasColumn validCenterMaxCol(tab, "VALID_CENTER_MAX"); build 10-Jul-2019 13:16:42 + ArrayColumn functionTypeCol(tab, "FUNCTION_TYPE"); build 10-Jul-2019 13:16:42 + ArrayColumn functionNameCol(tab, "FUNCTION_NAME"); build 10-Jul-2019 13:16:42 + ArrayColumn functionChannelCol(tab, "FUNCTION_CHANNEL"); build 10-Jul-2019 13:16:42 + ArrayQuantColumn nomFreqCol(tab, "NOMINAL_FREQ"); build 10-Jul-2019 13:16:42 + ArrayQuantColumn rotAngOffsetCol(tab, "RESPONSE_ROTATION_OFFSET"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + for(uInt i=0; i bMF(SubbandMinFreq_p(i).nelements()); build 10-Jul-2019 13:16:42 + for(uInt k=0; k iFT(FuncType_p(i).nelements()); build 10-Jul-2019 13:16:42 + for(uInt k=0; k(FuncType_p(i)(k)); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + functionTypeCol.put(i, iFT); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + functionNameCol.put(i, FuncName_p(i)); build 10-Jul-2019 13:16:42 + functionChannelCol.put(i, FuncChannel_p(i)); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + return; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AntennaResponses::FuncTypes AntennaResponses::FuncType(Int i){ build 10-Jul-2019 13:16:42 + if(-1 < i && i < static_cast(AntennaResponses::N_FuncTypes) ){ build 10-Jul-2019 13:16:42 + return static_cast(i); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + else{ build 10-Jul-2019 13:16:42 + return AntennaResponses::INVALID; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AntennaResponses::FuncTypes AntennaResponses::FuncType(const String& sftyp){ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + if(sftyp=="NA") return AntennaResponses::NA; build 10-Jul-2019 13:16:42 + if(sftyp=="AIF") return AntennaResponses::AIF; build 10-Jul-2019 13:16:42 + if(sftyp=="EFP") return AntennaResponses::EFP; build 10-Jul-2019 13:16:42 + if(sftyp=="VP") return AntennaResponses::VP; build 10-Jul-2019 13:16:42 + if(sftyp=="VPMAN") return AntennaResponses::VPMAN; build 10-Jul-2019 13:16:42 + if(sftyp=="INTERNAL") return AntennaResponses::INTERNAL; build 10-Jul-2019 13:16:42 + return AntennaResponses::INVALID; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Bool AntennaResponses::getBandName(String& bandName, build 10-Jul-2019 13:16:42 + const String& obsName, build 10-Jul-2019 13:16:42 + const MVFrequency& freq){ build 10-Jul-2019 13:16:42 + // brute force search build 10-Jul-2019 13:16:42 + Quantity f = freq.get(); build 10-Jul-2019 13:16:42 + bandName = ""; build 10-Jul-2019 13:16:42 + Bool rval = false; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + uInt i, j; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + for(i=0; i build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// AntennaResponses provides access to antenna response data build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +//
  • Measure class build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// The location of the AntennaResponses table for a given observatory is set build 10-Jul-2019 13:16:42 +// in the column casacore::String ANTENNA_RESPONSES in the "Observatories" table (accessed build 10-Jul-2019 13:16:42 +// via the casacore::MeasTable class). build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// The detailed rules of how the location and name of the table is derived build 10-Jul-2019 13:16:42 +// from the string found in ANTENNA_RESPONSES is described further down build 10-Jul-2019 13:16:42 +// in the comment to the initAntennaResponses() method. build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// E.g., for ALMA, the location of the table would be build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// data/alma/AntennaResponses build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// and the entry in the Observatories table would be simply "alma/AntennaResponses". build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// "AntennaResponses" is the recommended name of the table but in principle any build 10-Jul-2019 13:16:42 +// name can be used. That name will then have to be given in the Observatories table. build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// Contents of the AntennaResponses table: build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// column 0: casacore::Int BEAM_ID (a unique number in the table for the given observatory name) build 10-Jul-2019 13:16:42 +// column 1: casacore::String NAME (name of the observatory as in the observatory table) build 10-Jul-2019 13:16:42 +// column 2: casacore::Int BEAM_NUMBER (for observataories which support several simultaneous beams, zero-based) build 10-Jul-2019 13:16:42 +// column 3: casacore::Double START_TIME (a casacore::Measure, the time from which onwards this table row is valid) build 10-Jul-2019 13:16:42 +// column 4: casacore::String ANTENNA_TYPE (for ALMA: "DV", "DA", "PM", or "CM") build 10-Jul-2019 13:16:42 +// column 5: casacore::String RECEIVER_TYPE (for ALMA this will not be filled, at least for the moment) build 10-Jul-2019 13:16:42 +// column 6: casacore::Int NUM_SUBBANDS (number of response frequency sub-bands) build 10-Jul-2019 13:16:42 +// column 7: casacore::Array casacore::String (size set by NUM_SUBBANDS) BAND_NAME (for ALMA: "1", "2" etc.) build 10-Jul-2019 13:16:42 +// (if there is more than one sub-band per band, the band name repeats) build 10-Jul-2019 13:16:42 +// column 8: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) SUBBAND_MIN_FREQ build 10-Jul-2019 13:16:42 +// column 9: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) SUBBAND_MAX_FREQ build 10-Jul-2019 13:16:42 +// column 10: casacore::MDirection CENTER (the nominal center sky position where this row is valid, default (0.,90.) AZEL) build 10-Jul-2019 13:16:42 +// column 11: casacore::MDirection VALID_CENTER_MIN (sky position validity range min values, default (0.,0.) AZEL) build 10-Jul-2019 13:16:42 +// column 12: casacore::MDirection VALID_CENTER_MAX (sky position validity range max values, default (360.,90.) AZEL) build 10-Jul-2019 13:16:42 +// column 13: casacore::Array casacore::Int (size set by NUM_SUBBANDS) FUNCTION_TYPE build 10-Jul-2019 13:16:42 +// (uses enum FuncTypes defined below: build 10-Jul-2019 13:16:42 +// EFP = complex electric field pattern image, build 10-Jul-2019 13:16:42 +// VP = voltage pattern image, build 10-Jul-2019 13:16:42 +// AIF = complex aperture illumination function image, build 10-Jul-2019 13:16:42 +// NA = the function is not yet available, build 10-Jul-2019 13:16:42 +// here other codes can be easily added, e.g. build 10-Jul-2019 13:16:42 +// VPMAN = the function is available in casa via the vp manager (details t.b.d.), build 10-Jul-2019 13:16:42 +// INTERNAL = the function is generated on the fly internally build 10-Jul-2019 13:16:42 +// using ray-tracing as for the EVLA) build 10-Jul-2019 13:16:42 +// column 14: casacore::Array casacore::String (size set by NUM_SUBBANDS) FUNCTION_NAME build 10-Jul-2019 13:16:42 +// (names of the images as paths relative to the directory build 10-Jul-2019 13:16:42 +// where this table is located, build 10-Jul-2019 13:16:42 +// empty string if no image is available for the band, e.g. build 10-Jul-2019 13:16:42 +// "ticra_efield_patterns/melco12m_band6_efp.im") build 10-Jul-2019 13:16:42 +// column 15: casacore::Array casacore::uInt (size set by NUM_SUBBANDS) FUNCTION_CHANNEL build 10-Jul-2019 13:16:42 +// (the spectral image channel to use, can be different from 0 in the case build 10-Jul-2019 13:16:42 +// that several antenna responses are stored in one image file) build 10-Jul-2019 13:16:42 +// column 16: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) NOMINAL_FREQ build 10-Jul-2019 13:16:42 +// (the nominal frequency of the channel given by FUNCTION_CHANNEL) build 10-Jul-2019 13:16:42 +// column 17: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) RESPONSE_ROTATION_OFFSET build 10-Jul-2019 13:16:42 +// (the angle of an additional constant rotation of the response image) build 10-Jul-2019 13:16:42 +// project-dependent implementation) build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// It is assured by the table filling code that columns 10, 11, and 12 use the same casacore::MDirection type. build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// Information on receiver bands and corresponding primary beams build 10-Jul-2019 13:16:42 +// (in whatever form) for different antenna types needs to be made build 10-Jul-2019 13:16:42 +// available to the CASA code in a place where imaging code build 10-Jul-2019 13:16:42 +// can pick it up. build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 +//
  • build 10-Jul-2019 13:16:42 +// build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +class AntennaResponses { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +public: build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + enum FuncTypes{ build 10-Jul-2019 13:16:42 + NA, // not available build 10-Jul-2019 13:16:42 + AIF, // complex aperture illumination function build 10-Jul-2019 13:16:42 + EFP, // complex electric field pattern build 10-Jul-2019 13:16:42 + VP, // real voltage pattern build 10-Jul-2019 13:16:42 + VPMAN, // the function is available in casa via the vp manager (details t.b.d.) build 10-Jul-2019 13:16:42 + INTERNAL, // the function is generated on the fly internally build 10-Jul-2019 13:16:42 + N_FuncTypes, build 10-Jul-2019 13:16:42 + ANY, // used in requests build 10-Jul-2019 13:16:42 + INVALID build 10-Jul-2019 13:16:42 + }; build 10-Jul-2019 13:16:42 + // this can of course be extended for additional types if necessary build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Constructor, does not call init() build 10-Jul-2019 13:16:42 + AntennaResponses(){}; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Constructor, calls init() build 10-Jul-2019 13:16:42 + AntennaResponses(const casacore::String& path); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Takes the path (as taken from the new ANTENNA_RESPONSES column of the Observatories table) build 10-Jul-2019 13:16:42 + // and uses it as the name and location of the AntennaResponses table, and then initializes build 10-Jul-2019 13:16:42 + // the member vectors; build 10-Jul-2019 13:16:42 + // can be called repeatedly with different paths; build 10-Jul-2019 13:16:42 + // each call will overwrite the vectors. build 10-Jul-2019 13:16:42 + // If the path is an empty string, the member vectors will be reset to empty, i.e. build 10-Jul-2019 13:16:42 + // this is interpreted to mean that there is no AntennaResponses table on disk. build 10-Jul-2019 13:16:42 + // Returns true unless for some reason the initialisation fails (other than path==""). build 10-Jul-2019 13:16:42 + casacore::Bool init(const casacore::String& path=""); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // As init but does not overwrite the table (member vectors) in memory. build 10-Jul-2019 13:16:42 + // Instead it appends to the vectors. build 10-Jul-2019 13:16:42 + // Returns false if the path was already read before. build 10-Jul-2019 13:16:42 + casacore::Bool append(const casacore::String& path); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // returns true if paths_p has at least one member build 10-Jul-2019 13:16:42 + casacore::Bool isInit(); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // returns true if path is a member element of paths_p, i.e. the contents of path was read build 10-Jul-2019 13:16:42 + casacore::Bool isInit(const casacore::String& path); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // find the row containing the information pertinent to the given parameters build 10-Jul-2019 13:16:42 + // (this is also the index in the member vectors) build 10-Jul-2019 13:16:42 + // and the index (subband) to the frequency channel of the response build 10-Jul-2019 13:16:42 + // return false if no matching row could be found build 10-Jul-2019 13:16:42 + casacore::Bool getRowAndIndex(casacore::uInt& row, casacore::uInt& subBand, build 10-Jul-2019 13:16:42 + const casacore::String& obsName, build 10-Jul-2019 13:16:42 + const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 + const casacore::MFrequency& freq, // if requFType==INTERNAL, a frequency value of 0 (zero) will return the first row and band found build 10-Jul-2019 13:16:42 + const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 + const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 + const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 + casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), // the center to be matched with the CENTER column build 10-Jul-2019 13:16:42 + const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 + const casacore::Int& beamNumber = 0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // overloaded method: as previous method but using beamId build 10-Jul-2019 13:16:42 + // (instead of obs. time, ant. type, rec. type, center, and beam number) build 10-Jul-2019 13:16:42 + casacore::Bool getRowAndIndex(casacore::uInt& row, casacore::uInt& subBand, build 10-Jul-2019 13:16:42 + const casacore::String& obsName, build 10-Jul-2019 13:16:42 + const casacore::Int& beamId, build 10-Jul-2019 13:16:42 + const casacore::MFrequency& freq); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // getRowAndIndex is then used by the following methods build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Access methods for the response images: takes an observatory name, build 10-Jul-2019 13:16:42 + // an observation time, the antenna type (e.g. "DV"), the receiverType, build 10-Jul-2019 13:16:42 + // a frequency, a function type (enum FuncTypes, can be ANY, i.e. take the first available), build 10-Jul-2019 13:16:42 + // a direction, and a beam number and finds the appropriate image in the AntennaResponses table build 10-Jul-2019 13:16:42 + // which contains the image of the requested type and returns build 10-Jul-2019 13:16:42 + // the path, the channel to use, the frequency of that channel, and the FuncType of the image. build 10-Jul-2019 13:16:42 + // The image will contain a spectral axis even if degenerate. build 10-Jul-2019 13:16:42 + // The direction axis pair of the stored images is set as follows: build 10-Jul-2019 13:16:42 + // The axes are parallel to the ones given by the coordinate system type of the CENTER column build 10-Jul-2019 13:16:42 + // of the AntennaReponses table. The center of the image is that given by the CENTER column. build 10-Jul-2019 13:16:42 + // Furthermore, the images contain a casacore::Stokes axis (even if degenerate) to express the build 10-Jul-2019 13:16:42 + // beams for the different polarizations or polarization products. build 10-Jul-2019 13:16:42 + // Returns false if no appropriate image could be found. build 10-Jul-2019 13:16:42 + casacore::Bool getImageName(casacore::String& functionImageName, // the path to the image build 10-Jul-2019 13:16:42 + casacore::uInt& funcChannel, // the channel to use in the image build 10-Jul-2019 13:16:42 + casacore::MFrequency& nomFreq, // nominal frequency of the image (in the given channel) build 10-Jul-2019 13:16:42 + FuncTypes& fType, // the function type of the image build 10-Jul-2019 13:16:42 + casacore::MVAngle& rotAngOffset, // the response rotation angle offset build 10-Jul-2019 13:16:42 + const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 + const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 + const casacore::MFrequency& freq, build 10-Jul-2019 13:16:42 + const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 + const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 + const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 + casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 + const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 + const casacore::Int& beamNumber=0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Overloaded method: returning the validity range build 10-Jul-2019 13:16:42 + casacore::Bool getImageName(casacore::String& functionImageName, // the path to the image build 10-Jul-2019 13:16:42 + casacore::uInt& funcChannel, // the channel to use in the image build 10-Jul-2019 13:16:42 + casacore::MFrequency& nomFreq, // nominal frequency of the image (in the given channel) build 10-Jul-2019 13:16:42 + casacore::MFrequency& loFreq, // lower end of the frequency validity range build 10-Jul-2019 13:16:42 + casacore::MFrequency& hiFreq, // upper end of the frequency validity range build 10-Jul-2019 13:16:42 + FuncTypes& fType, // the function type of the image build 10-Jul-2019 13:16:42 + casacore::MVAngle& rotAngOffset, // the response rotation angle offset build 10-Jul-2019 13:16:42 + const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 + const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 + const casacore::MFrequency& freq, build 10-Jul-2019 13:16:42 + const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 + const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 + const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 + casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 + const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 + const casacore::Int& beamNumber=0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Overloaded method: as previous method but using beamId build 10-Jul-2019 13:16:42 + // (instead of obs. time, ant. type, rec. type, center, and functype) build 10-Jul-2019 13:16:42 + casacore::Bool getImageName(casacore::String& functionImageName, build 10-Jul-2019 13:16:42 + casacore::uInt& funcChannel, // the channel to use in the image build 10-Jul-2019 13:16:42 + casacore::MFrequency& nomFreq, // nominal frequency of the image (at the given channel) build 10-Jul-2019 13:16:42 + FuncTypes& fType, // the function type of the image build 10-Jul-2019 13:16:42 + casacore::MVAngle& rotAngOffset, // the response rotation angle offset build 10-Jul-2019 13:16:42 + const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 + const casacore::Int& beamId, build 10-Jul-2019 13:16:42 + const casacore::MFrequency& freq); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Get a vector containing all unique antenna type strings for the given constraints build 10-Jul-2019 13:16:42 + casacore::Bool getAntennaTypes(casacore::Vector& antTypes, build 10-Jul-2019 13:16:42 + const casacore::String& obsName, // (the observatory name, e.g. "ALMA" or "ACA") build 10-Jul-2019 13:16:42 + const casacore::MEpoch& obsTime, build 10-Jul-2019 13:16:42 + const casacore::MFrequency& freq, build 10-Jul-2019 13:16:42 + const FuncTypes& requFType = ANY, // the requested function type build 10-Jul-2019 13:16:42 + const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 + casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 + const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 + const casacore::Int& beamNumber=0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Put the given row into the present antenna reponses table (in memory). build 10-Jul-2019 13:16:42 + // If the row exists at the position given by casacore::uInt row, it is overwritten. build 10-Jul-2019 13:16:42 + // If it doesn't exist, the table is resized by one in memory and the new build 10-Jul-2019 13:16:42 + // row is added at the last position. The variable "row" then contains the build 10-Jul-2019 13:16:42 + // actual row that was filled. build 10-Jul-2019 13:16:42 + // Returns false, if the table was not initialised or the given data was build 10-Jul-2019 13:16:42 + // not consistent. build 10-Jul-2019 13:16:42 + // Consistency checks: build 10-Jul-2019 13:16:42 + // - all vectors have same dimension which is then used to set numSubbands build 10-Jul-2019 13:16:42 + // - beamId is unique for the given observatory build 10-Jul-2019 13:16:42 + // - center, validCenterMin, and validCenterMax have the same casacore::MDirection type build 10-Jul-2019 13:16:42 + casacore::Bool putRow(casacore::uInt& row, build 10-Jul-2019 13:16:42 + const casacore::String& obsName, build 10-Jul-2019 13:16:42 + const casacore::Int& beamId, build 10-Jul-2019 13:16:42 + const casacore::Vector& bandName, build 10-Jul-2019 13:16:42 + const casacore::Vector& subbandMinFreq, build 10-Jul-2019 13:16:42 + const casacore::Vector& subbandMaxFreq, build 10-Jul-2019 13:16:42 + const casacore::Vector& funcType, build 10-Jul-2019 13:16:42 + const casacore::Vector& funcName, build 10-Jul-2019 13:16:42 + const casacore::Vector& funcChannel, build 10-Jul-2019 13:16:42 + const casacore::Vector& nomFreq, build 10-Jul-2019 13:16:42 + const casacore::Vector& rotAngOffset, build 10-Jul-2019 13:16:42 + const casacore::String& antennaType = "", build 10-Jul-2019 13:16:42 + const casacore::MEpoch& startTime = casacore::MEpoch(casacore::MVEpoch(casacore::Quantity(40588., "d")), casacore::MEpoch::UTC), // beginning of 1970 build 10-Jul-2019 13:16:42 + const casacore::MDirection& center = casacore::MDirection(casacore::Quantity( 0., "deg"), // the center to be matched with the CENTER column, build 10-Jul-2019 13:16:42 + casacore::Quantity(90., "deg"), // default is the Zenith build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 + const casacore::MDirection& validCenterMin = casacore::MDirection(casacore::Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + casacore::Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 + const casacore::MDirection& validCenterMax = casacore::MDirection(casacore::Quantity( 360., "deg"), build 10-Jul-2019 13:16:42 + casacore::Quantity( 90., "deg"), build 10-Jul-2019 13:16:42 + casacore::MDirection::AZEL), build 10-Jul-2019 13:16:42 + const casacore::String& receiverType = "", build 10-Jul-2019 13:16:42 + const casacore::Int& beamNumber = 0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Create an new AntennaReponses table on disk at the given path build 10-Jul-2019 13:16:42 + // and fill it with the table contents presently in memory. build 10-Jul-2019 13:16:42 + // Throw exceptions if there are problems writing the table. build 10-Jul-2019 13:16:42 + void create(const casacore::String& path); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Convert from casacore::Int to FuncType build 10-Jul-2019 13:16:42 + FuncTypes FuncType(casacore::Int i); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // Convert from casacore::String to FuncType build 10-Jul-2019 13:16:42 + static FuncTypes FuncType(const casacore::String& sftyp); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // get the name of the band corresponding to the frequency (in the rest frame of the observatory) build 10-Jul-2019 13:16:42 + casacore::Bool getBandName(casacore::String& bandName, build 10-Jul-2019 13:16:42 + const casacore::String& obsName, build 10-Jul-2019 13:16:42 + const casacore::MVFrequency& freq); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +private: build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // after initialization, this contains the name of the path where the build 10-Jul-2019 13:16:42 + // AntennaResponses table was read from; build 10-Jul-2019 13:16:42 + // if append was used to read additional tables in the memory table, build 10-Jul-2019 13:16:42 + // then this vector has several elements representing the different tables build 10-Jul-2019 13:16:42 + casacore::Vector paths_p; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // here a complete copy of the AntennaResponses table is stored build 10-Jul-2019 13:16:42 + casacore::uInt numRows_p; build 10-Jul-2019 13:16:42 + casacore::Vector ObsName_p; build 10-Jul-2019 13:16:42 + casacore::Vector StartTime_p; build 10-Jul-2019 13:16:42 + casacore::Vector AntennaType_p; build 10-Jul-2019 13:16:42 + casacore::Vector ReceiverType_p; build 10-Jul-2019 13:16:42 + casacore::Vector BeamId_p; build 10-Jul-2019 13:16:42 + casacore::Vector BeamNumber_p; build 10-Jul-2019 13:16:42 + casacore::Vector ValidCenter_p; build 10-Jul-2019 13:16:42 + casacore::Vector ValidCenterMin_p; build 10-Jul-2019 13:16:42 + casacore::Vector ValidCenterMax_p; build 10-Jul-2019 13:16:42 + casacore::Vector NumSubbands_p; build 10-Jul-2019 13:16:42 + casacore::Vector > BandName_p; build 10-Jul-2019 13:16:42 + casacore::Vector > SubbandMinFreq_p; build 10-Jul-2019 13:16:42 + casacore::Vector > SubbandMaxFreq_p; build 10-Jul-2019 13:16:42 + casacore::Vector > FuncType_p; build 10-Jul-2019 13:16:42 + casacore::Vector > FuncName_p; build 10-Jul-2019 13:16:42 + casacore::Vector > FuncChannel_p; build 10-Jul-2019 13:16:42 + casacore::Vector > NomFreq_p; build 10-Jul-2019 13:16:42 + casacore::Vector > RotAngOffset_p; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // not part of the table but same number of elements: build 10-Jul-2019 13:16:42 + // memory of the path from which the row was read (index to paths_p) build 10-Jul-2019 13:16:42 + casacore::Vector pathIndex_p; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +}; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +} //# NAMESPACE CASA - END build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#endif build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/Imager.cc b/code/synthesis/MeasurementEquations/Imager.cc build 10-Jul-2019 13:16:42 index 0479453..45675ab 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementEquations/Imager.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/Imager.cc build 10-Jul-2019 13:16:42 @@ -1872,7 +1872,7 @@ Bool Imager::setoptions(const String& ftmachine, const Long cache, const Int til build 10-Jul-2019 13:16:42 const Int wprojplanes, build 10-Jul-2019 13:16:42 const String& epJTableName, build 10-Jul-2019 13:16:42 const Bool applyPointingOffsets, build 10-Jul-2019 13:16:42 - const Bool doPointingCorrection, build 10-Jul-2019 13:16:42 + const Bool usePointingCorrection, build 10-Jul-2019 13:16:42 const String& cfCacheDirName, build 10-Jul-2019 13:16:42 const Float& rotPAStep, build 10-Jul-2019 13:16:42 const Float& computePAStep, build 10-Jul-2019 13:16:42 @@ -1970,8 +1970,8 @@ Bool Imager::setoptions(const String& ftmachine, const Long cache, const Int til build 10-Jul-2019 13:16:42 traceEvent(1,"Exiting Imager::setoptions",27); build 10-Jul-2019 13:16:42 #endif build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - doPointing = applyPointingOffsets; build 10-Jul-2019 13:16:42 - doPBCorr = doPointingCorrection; build 10-Jul-2019 13:16:42 + usePointing = applyPointingOffsets; build 10-Jul-2019 13:16:42 + doPBCorr = usePointingCorrection; build 10-Jul-2019 13:16:42 ////The set below does not seemed to be remembered later in the process it build 10-Jul-2019 13:16:42 /// under some compiler version so setting a private variable to be used build 10-Jul-2019 13:16:42 /// a negative number means use all that is available build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/Imager.h b/code/synthesis/MeasurementEquations/Imager.h build 10-Jul-2019 13:16:42 index c6ed399..bb59372 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementEquations/Imager.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/Imager.h build 10-Jul-2019 13:16:42 @@ -251,7 +251,7 @@ class Imager build 10-Jul-2019 13:16:42 const casacore::Int wprojplanes=-1, build 10-Jul-2019 13:16:42 const casacore::String& epJTableName="", build 10-Jul-2019 13:16:42 const casacore::Bool applyPointingOffsets=true, build 10-Jul-2019 13:16:42 - const casacore::Bool doPointingCorrection=true, build 10-Jul-2019 13:16:42 + const casacore::Bool usePointingCorrection=true, build 10-Jul-2019 13:16:42 const casacore::String& cfCacheDirName="", build 10-Jul-2019 13:16:42 const casacore::Float& rotpastep=5.0, build 10-Jul-2019 13:16:42 const casacore::Float& computepastep=360.0, build 10-Jul-2019 13:16:42 @@ -1035,7 +1035,7 @@ protected: build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 EPJones *epJ; build 10-Jul-2019 13:16:42 casacore::String epJTableName_p, cfCacheDirName_p; build 10-Jul-2019 13:16:42 - casacore::Bool doPointing, doPBCorr, psTermOn_p, aTermOn_p, mTermOn_p, wbAWP_p, conjBeams_p; build 10-Jul-2019 13:16:42 + casacore::Bool usePointing, doPBCorr, psTermOn_p, aTermOn_p, mTermOn_p, wbAWP_p, conjBeams_p; build 10-Jul-2019 13:16:42 //SimplePlotterPtr plotter_p; build 10-Jul-2019 13:16:42 casacore::Record interactiveState_p; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/Imager2.cc b/code/synthesis/MeasurementEquations/Imager2.cc build 10-Jul-2019 13:16:42 index fdf1eb7..ff3ba56 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementEquations/Imager2.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/Imager2.cc build 10-Jul-2019 13:16:42 @@ -2657,7 +2657,7 @@ Bool Imager::createFTMachine() build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 ft_p = new nPBWProjectFT(//*ms_p, build 10-Jul-2019 13:16:42 wprojPlanes_p, cache_p/2, build 10-Jul-2019 13:16:42 - cfCacheDirName_p, doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + cfCacheDirName_p, usePointing, doPBCorr, build 10-Jul-2019 13:16:42 tile_p, computePAStep_p, pbLimit_p, true); build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // Explicit type casting of ft_p does not look good. It does not build 10-Jul-2019 13:16:42 @@ -2665,7 +2665,7 @@ Bool Imager::createFTMachine() build 10-Jul-2019 13:16:42 // this build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 ((nPBWProjectFT *)ft_p)->setPAIncrement(parAngleInc_p); build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 { build 10-Jul-2019 13:16:42 try build 10-Jul-2019 13:16:42 { build 10-Jul-2019 13:16:42 @@ -2725,7 +2725,7 @@ Bool Imager::createFTMachine() build 10-Jul-2019 13:16:42 skyPosThreshold_p); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 ft_p = new PBMosaicFT(*ms_p, wprojPlanes_p, cache_p/2, build 10-Jul-2019 13:16:42 - cfCacheDirName_p, /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + cfCacheDirName_p, /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 tile_p, computePAStep_p, pbLimit_p, true); build 10-Jul-2019 13:16:42 ((PBMosaicFT *)ft_p)->setObservatoryLocation(mLocation_p); build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 @@ -2736,7 +2736,7 @@ Bool Imager::createFTMachine() build 10-Jul-2019 13:16:42 os << LogIO::NORMAL << "Setting PA increment to " << parAngleInc_p.getValue("deg") << " deg" << endl; build 10-Jul-2019 13:16:42 ((nPBWProjectFT *)ft_p)->setPAIncrement(parAngleInc_p); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 { build 10-Jul-2019 13:16:42 try build 10-Jul-2019 13:16:42 { build 10-Jul-2019 13:16:42 @@ -2919,7 +2919,7 @@ Bool Imager::createFTMachine() build 10-Jul-2019 13:16:42 cfcache, awConvFunc, build 10-Jul-2019 13:16:42 // mthVisResampler, build 10-Jul-2019 13:16:42 visResampler, build 10-Jul-2019 13:16:42 - /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 tile_p, computePAStep_p, pbLimit_p, true,conjBeams_p, build 10-Jul-2019 13:16:42 useDoublePrecGrid); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 @@ -4905,7 +4905,7 @@ Bool Imager::pointingSampling(const String &referenceFrame, build 10-Jul-2019 13:16:42 // cfcache, awConvFunc, build 10-Jul-2019 13:16:42 // // mthVisResampler, build 10-Jul-2019 13:16:42 // visResampler, build 10-Jul-2019 13:16:42 - // /*true */doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + // /*true */usePointing, doPBCorr, build 10-Jul-2019 13:16:42 // tile_p, paStep_p, pbLimit_p, true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // ((AWProjectWBFT *)ft_p)->setObservatoryLocation(mLocation_p); build 10-Jul-2019 13:16:42 @@ -4917,7 +4917,7 @@ Bool Imager::pointingSampling(const String &referenceFrame, build 10-Jul-2019 13:16:42 // // os << LogIO::NORMAL << "Setting PA increment to " << parAngleInc_p.getValue("deg") << " deg" << endl; build 10-Jul-2019 13:16:42 // ((AWProjectFT *)ft_p)->setPAIncrement(parAngleInc_p); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // if (doPointing) build 10-Jul-2019 13:16:42 + // if (usePointing) build 10-Jul-2019 13:16:42 // { build 10-Jul-2019 13:16:42 // try build 10-Jul-2019 13:16:42 // { build 10-Jul-2019 13:16:42 @@ -4995,7 +4995,7 @@ Bool Imager::pointingSampling(const String &referenceFrame, build 10-Jul-2019 13:16:42 // cfcache, awConvFunc, build 10-Jul-2019 13:16:42 // // mthVisResampler, build 10-Jul-2019 13:16:42 // visResampler, build 10-Jul-2019 13:16:42 - // doPointing, doPBCorr, build 10-Jul-2019 13:16:42 + // usePointing, doPBCorr, build 10-Jul-2019 13:16:42 // tile_p, pbLimit_p, true); build 10-Jul-2019 13:16:42 // ((AWProjectFT *)ft_p)->setObservatoryLocation(mLocation_p); build 10-Jul-2019 13:16:42 // // build 10-Jul-2019 13:16:42 @@ -5008,7 +5008,7 @@ Bool Imager::pointingSampling(const String &referenceFrame, build 10-Jul-2019 13:16:42 // // << paInc.getValue("deg") << " deg" << endl; build 10-Jul-2019 13:16:42 // ((AWProjectFT *)ft_p)->setPAIncrement(parAngleInc_p); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - // if (doPointing) build 10-Jul-2019 13:16:42 + // if (usePointing) build 10-Jul-2019 13:16:42 // { build 10-Jul-2019 13:16:42 // try build 10-Jul-2019 13:16:42 // { build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/Simulator.cc b/code/synthesis/MeasurementEquations/Simulator.cc build 10-Jul-2019 13:16:42 index 3ba673a..3e8e2d5 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementEquations/Simulator.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/Simulator.cc build 10-Jul-2019 13:16:42 @@ -2492,7 +2492,7 @@ Bool Simulator::createSkyEquation(const Vector& image, build 10-Jul-2019 13:16:42 gvp_p=new VPSkyJones(*ms_p, true, parAngleInc_p, squintType_p); build 10-Jul-2019 13:16:42 } build 10-Jul-2019 13:16:42 // ft_p = new PBWProjectFT(*ms_p, epJ, gvp_p, facets_p, cache_p/2, build 10-Jul-2019 13:16:42 -// doPointing, tile_p, paStep_p, build 10-Jul-2019 13:16:42 +// usePointing, tile_p, paStep_p, build 10-Jul-2019 13:16:42 // pbLimit_p, true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 String cfCacheDirName = "cache"; build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/VPManager.h b/code/synthesis/MeasurementEquations/VPManager.h build 10-Jul-2019 13:16:42 index 3d37882..4c41332 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/MeasurementEquations/VPManager.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/VPManager.h build 10-Jul-2019 13:16:42 @@ -29,7 +29,7 @@ build 10-Jul-2019 13:16:42 #define SYNTHESIS_VPMANAGER_H build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 namespace casacore{ build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/MeasurementEquations/test/tAntennaResponses.cc b/code/synthesis/MeasurementEquations/test/tAntennaResponses.cc build 10-Jul-2019 13:16:42 new file mode 100644 build 10-Jul-2019 13:16:42 index 0000000..3e07ffa build 10-Jul-2019 13:16:42 --- /dev/null build 10-Jul-2019 13:16:42 +++ b/code/synthesis/MeasurementEquations/test/tAntennaResponses.cc build 10-Jul-2019 13:16:42 @@ -0,0 +1,485 @@ build 10-Jul-2019 13:16:42 +//# tAntennaResponses the AntennaResponses class build 10-Jul-2019 13:16:42 +//# Copyright (C) 2003,2004 build 10-Jul-2019 13:16:42 +//# Associated Universities, Inc. Washington DC, USA. build 10-Jul-2019 13:16:42 +//# Copyright by ESO (in the framework of the ALMA collaboration) build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# This program is free software; you can redistribute it and/or modify it build 10-Jul-2019 13:16:42 +//# under the terms of the GNU General Public License as published by the Free build 10-Jul-2019 13:16:42 +//# Software Foundation; either version 2 of the License, or (at your option) build 10-Jul-2019 13:16:42 +//# any later version. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# This program is distributed in the hope that it will be useful, but WITHOUT build 10-Jul-2019 13:16:42 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 10-Jul-2019 13:16:42 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for build 10-Jul-2019 13:16:42 +//# more details. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# You should have received a copy of the GNU General Public License along build 10-Jul-2019 13:16:42 +//# with this program; if not, write to the Free Software Foundation, Inc., build 10-Jul-2019 13:16:42 +//# 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# Correspondence concerning AIPS++ should be addressed as follows: build 10-Jul-2019 13:16:42 +//# Internet email: aips2-request@nrao.edu. build 10-Jul-2019 13:16:42 +//# Postal address: AIPS++ Project Office build 10-Jul-2019 13:16:42 +//# National Radio Astronomy Observatory build 10-Jul-2019 13:16:42 +//# 520 Edgemont Road build 10-Jul-2019 13:16:42 +//# Charlottesville, VA 22903-2475 USA build 10-Jul-2019 13:16:42 +//# build 10-Jul-2019 13:16:42 +//# $Id: $ build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +using namespace casa; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +int main() { build 10-Jul-2019 13:16:42 + try { build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + { build 10-Jul-2019 13:16:42 + { build 10-Jul-2019 13:16:42 + // not initialised build 10-Jul-2019 13:16:42 + AntennaResponses x; build 10-Jul-2019 13:16:42 + AlwaysAssert(!x.isInit(), AipsError); build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // table creation from scratch build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector bName(3); build 10-Jul-2019 13:16:42 + bName(0) = "band_1"; build 10-Jul-2019 13:16:42 + bName(1) = "band_2"; build 10-Jul-2019 13:16:42 + bName(2) = "band_3"; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector minFreq(3); build 10-Jul-2019 13:16:42 + Vector maxFreq(3); build 10-Jul-2019 13:16:42 + Vector nomFreq(3); build 10-Jul-2019 13:16:42 + Vector rotAngOffset(3); build 10-Jul-2019 13:16:42 + minFreq(0) = MVFrequency( Quantity(10., "GHz")); build 10-Jul-2019 13:16:42 + maxFreq(0) = MVFrequency( Quantity(100., "GHz")); build 10-Jul-2019 13:16:42 + nomFreq(0) = MVFrequency( Quantity(60., "GHz")); build 10-Jul-2019 13:16:42 + rotAngOffset(0) = MVAngle( Quantity(60., "deg")); build 10-Jul-2019 13:16:42 + minFreq(1) = MVFrequency( Quantity(100., "GHz")); build 10-Jul-2019 13:16:42 + maxFreq(1) = MVFrequency( Quantity(200., "GHz")); build 10-Jul-2019 13:16:42 + nomFreq(1) = MVFrequency( Quantity(150., "GHz")); build 10-Jul-2019 13:16:42 + rotAngOffset(1) = MVAngle( Quantity(60., "deg")); build 10-Jul-2019 13:16:42 + minFreq(2) = MVFrequency( Quantity(200., "GHz")); build 10-Jul-2019 13:16:42 + maxFreq(2) = MVFrequency( Quantity(300., "GHz")); build 10-Jul-2019 13:16:42 + nomFreq(2) = MVFrequency( Quantity(250., "GHz")); build 10-Jul-2019 13:16:42 + rotAngOffset(2) = MVAngle( Quantity(60., "deg")); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector fTyp(3, AntennaResponses::EFP); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector funcName(3); build 10-Jul-2019 13:16:42 + funcName(0) = "tAntennaResponses1.in"; build 10-Jul-2019 13:16:42 + funcName(1) = "tAntennaResponses2.in"; build 10-Jul-2019 13:16:42 + funcName(2) = "tAntennaResponses3.in"; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector funcChannel(3,0); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector fTypB(3, AntennaResponses::VP); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector funcNameB(3); build 10-Jul-2019 13:16:42 + funcNameB(0) = "tAntennaResponses1B.in"; build 10-Jul-2019 13:16:42 + funcNameB(1) = "tAntennaResponses2B.in"; build 10-Jul-2019 13:16:42 + funcNameB(2) = "tAntennaResponses3B.in"; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + Vector fTypC(3, AntennaResponses::INTERNAL); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AntennaResponses aR(""); // empty table in memory build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + uInt ui = 0; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.putRow(ui,"ALMA", 0, bName, minFreq, maxFreq, fTyp, funcName, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 + rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(50., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ui = 1; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.putRow(ui,"ALMA", 1, bName, minFreq, maxFreq, fTypB, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 + rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(50., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), AipsError); build 10-Jul-2019 13:16:42 + ui = 2; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.putRow(ui,"ALMA", 2, bName, minFreq, maxFreq, fTypB, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 + rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), // one day later build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 50., "deg"), // now between 50 deg and 90 deg build 10-Jul-2019 13:16:42 + Quantity(90., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + aR.create("testAntennaResponses_tmp.dat"); // write table to disk build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + aR.init(); // reset to empty table build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ui = 0; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.putRow(ui,"ACA", 0, bName, minFreq, maxFreq, fTyp, funcName, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 + rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(50., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + ui = 2; // test setting of row number build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.putRow(ui,"ACA", 1, bName, minFreq, maxFreq, fTypB, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 + rotAngOffset, "DV", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(50., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(ui==1, AipsError); // ui should have been reset to 1 build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.putRow(ui,"ACA", 1, bName, minFreq, maxFreq, fTypC, funcNameB, funcChannel, nomFreq, build 10-Jul-2019 13:16:42 + rotAngOffset, "PM", MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( -10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + MDirection(Quantity( 10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(50., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + aR.create("testAntennaResponsesACA_tmp.dat"); // write second table to disk build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // initialisation build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "init 0" << endl; build 10-Jul-2019 13:16:42 + AntennaResponses aR("testAntennaResponses_tmp.dat"); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "init 1" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.isInit("testAntennaResponses_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + cout << "init 2" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.isInit("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "init 3" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.append("testAntennaResponses_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + cout << "init 4" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.append("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + cout << "init 5" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.isInit("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + cout << "init 6" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.append("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // unsuccessful access build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "init 7" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.init("testAntennaResponses_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + String theImageName; build 10-Jul-2019 13:16:42 + uInt theImageChannel; build 10-Jul-2019 13:16:42 + MFrequency theNomFreq; build 10-Jul-2019 13:16:42 + AntennaResponses::FuncTypes theFType; build 10-Jul-2019 13:16:42 + MVAngle theRotAngOffset; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AntennaResponses::FuncTypes requFType = AntennaResponses::EFP; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 0" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ACA", // wrong obs. build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV"), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 1" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(600., "GHz"), MFrequency::TOPO), // wrong freq build 10-Jul-2019 13:16:42 + requFType, "DV"), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 2" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(49999., "d")), MEpoch::UTC), // wrong time build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV"), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 3" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(80., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL)), // wrong center build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 3b" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), // other time build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(30., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL)), // other wrong center build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 4" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "XY", // wrong antenna type build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL)), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 5" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + "rec typ B"), // wrong receiver type build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 6" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + "", build 10-Jul-2019 13:16:42 + 1), // wrong beam number build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 7" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + 1, // wrong beam id build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO)), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 8" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + AntennaResponses::AIF), // wrong image type build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + String myBandName; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MVFrequency( Quantity(9., "GHz"))), // too low freq build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MVFrequency( Quantity(900., "GHz"))), // too high freq build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 + "ASKAP", // wrong observatory build 10-Jul-2019 13:16:42 + MVFrequency( Quantity(9., "GHz"))), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // successful access build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 9" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(250., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(45., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL), build 10-Jul-2019 13:16:42 + "", build 10-Jul-2019 13:16:42 + 0), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert((theRotAngOffset.degree()-60.)<1E-14, AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 10" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + 0, build 10-Jul-2019 13:16:42 + MFrequency( Quantity(250., "GHz"), MFrequency::TOPO)), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 11" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + AntennaResponses::VP, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity(10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.append("testAntennaResponsesACA_tmp.dat"), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 11b" << endl; build 10-Jul-2019 13:16:42 + MFrequency lofreq, hifreq; build 10-Jul-2019 13:16:42 + Unit uHz("Hz"); build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, build 10-Jul-2019 13:16:42 + lofreq, hifreq, build 10-Jul-2019 13:16:42 + theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50000., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + AntennaResponses::VP, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity(10., "deg"), build 10-Jul-2019 13:16:42 + Quantity(40., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL) build 10-Jul-2019 13:16:42 + ), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(lofreq.get(uHz).getValue() == 100E9, AipsError); build 10-Jul-2019 13:16:42 + AlwaysAssert(hifreq.get(uHz).getValue() == 200E9, AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 12" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ACA", build 10-Jul-2019 13:16:42 + 0, build 10-Jul-2019 13:16:42 + MFrequency( Quantity(250., "GHz"), MFrequency::TOPO)), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 13" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(160., "GHz"), MFrequency::TOPO), build 10-Jul-2019 13:16:42 + requFType, "DV", build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(80., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL)), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "access 13b" << endl; build 10-Jul-2019 13:16:42 + AlwaysAssert(!aR.getImageName(theImageName, theImageChannel, theNomFreq, theFType, build 10-Jul-2019 13:16:42 + theRotAngOffset, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MEpoch(MVEpoch(Quantity(50001., "d")), MEpoch::UTC), build 10-Jul-2019 13:16:42 + MFrequency( Quantity(0., "GHz"), MFrequency::TOPO), // combination 0 freq + INTERNAL build 10-Jul-2019 13:16:42 + AntennaResponses::INTERNAL, "PM", // returns first freq found build 10-Jul-2019 13:16:42 + MDirection(Quantity( 0., "deg"), build 10-Jul-2019 13:16:42 + Quantity(80., "deg"), build 10-Jul-2019 13:16:42 + MDirection::AZEL)), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(aR.getBandName(myBandName, build 10-Jul-2019 13:16:42 + "ALMA", build 10-Jul-2019 13:16:42 + MVFrequency( Quantity(160., "GHz"))), build 10-Jul-2019 13:16:42 + AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + AlwaysAssert(myBandName=="band_2", AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + // getting the AntennaResponses table location from MeasTable build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + String theAntRespPath; build 10-Jul-2019 13:16:42 + AlwaysAssert(!MeasTable::AntennaResponsesPath(theAntRespPath, "whatever"), AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + theAntRespPath = "dummy_to_be_overwritten"; build 10-Jul-2019 13:16:42 + AlwaysAssert(!MeasTable::AntennaResponsesPath(theAntRespPath, "LOFAR"), AipsError); build 10-Jul-2019 13:16:42 + // LOFAR exists but is empty build 10-Jul-2019 13:16:42 + AlwaysAssert(theAntRespPath=="", AipsError); build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + catch (AipsError x) { build 10-Jul-2019 13:16:42 + cerr << x.getMesg() << endl; build 10-Jul-2019 13:16:42 + cout << "FAIL" << endl; build 10-Jul-2019 13:16:42 + return 1; build 10-Jul-2019 13:16:42 + } build 10-Jul-2019 13:16:42 + catch (...) { build 10-Jul-2019 13:16:42 + cerr << "Exception not derived from AipsError" << endl; build 10-Jul-2019 13:16:42 + cout << "FAIL" << endl; build 10-Jul-2019 13:16:42 + return 2; build 10-Jul-2019 13:16:42 + }; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 + cout << "OK" << endl; build 10-Jul-2019 13:16:42 + return 0; build 10-Jul-2019 13:16:42 + build 10-Jul-2019 13:16:42 +} build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines/ALMAAperture.h b/code/synthesis/TransformMachines/ALMAAperture.h build 10-Jul-2019 13:16:42 index f9eb3ff..6fbda5a 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines/ALMAAperture.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines/ALMAAperture.h build 10-Jul-2019 13:16:42 @@ -32,7 +32,7 @@ build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines/AWProjectFT.FORTRANSTUFF b/code/synthesis/TransformMachines/AWProjectFT.FORTRANSTUFF build 10-Jul-2019 13:16:42 index f632881..5d914a4 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines/AWProjectFT.FORTRANSTUFF build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines/AWProjectFT.FORTRANSTUFF build 10-Jul-2019 13:16:42 @@ -45,7 +45,7 @@ build 10-Jul-2019 13:16:42 Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *doGrad, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -85,7 +85,7 @@ build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -128,7 +128,7 @@ build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -267,7 +267,7 @@ build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -418,7 +418,7 @@ build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -588,7 +588,7 @@ build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines/AWProjectFT.cc b/code/synthesis/TransformMachines/AWProjectFT.cc build 10-Jul-2019 13:16:42 index eb8d772..3f21923 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines/AWProjectFT.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines/AWProjectFT.cc build 10-Jul-2019 13:16:42 @@ -191,7 +191,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 - doPointing=1; build 10-Jul-2019 13:16:42 + usePointing=1; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 maxConvSupport=-1; build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 @@ -249,7 +249,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 - if (applyPointingOffset) doPointing=1; else doPointing=0; build 10-Jul-2019 13:16:42 + if (applyPointingOffset) usePointing=1; else usePointing=0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 maxConvSupport=-1; build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 @@ -381,7 +381,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 - doPointing=other.doPointing; build 10-Jul-2019 13:16:42 + usePointing=other.usePointing; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 maxConvSupport=other.maxConvSupport; build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 @@ -1694,7 +1694,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 interpolateFrequencyTogrid(vb, *imagingweight,data, flags, elWeight, type); build 10-Jul-2019 13:16:42 // NAnt no longer appears to be used build 10-Jul-2019 13:16:42 //Int NAnt; build 10-Jul-2019 13:16:42 - //if (doPointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 + //if (usePointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 //NAnt=NAnt; // Dummy statement to supress complier warnings and will be used when pointing offsets are used. build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // If row is -1 then we pass through all rows build 10-Jul-2019 13:16:42 @@ -1820,7 +1820,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 Nant_p = vb.msColumns().antenna().nrow(); build 10-Jul-2019 13:16:42 // NAnt set but not used build 10-Jul-2019 13:16:42 //Int NAnt=0; build 10-Jul-2019 13:16:42 - //if (doPointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 + //if (usePointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // Get the uvws in a form that Fortran can use build 10-Jul-2019 13:16:42 Matrix uvw(3, vb.uvw().nelements()); build 10-Jul-2019 13:16:42 @@ -2529,7 +2529,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 findConvFunction(*image, vb); build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 Nant_p = vb.msColumns().antenna().nrow(); build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 NAnt = findPointingOffsets(vb,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 l_offsets=l_off; build 10-Jul-2019 13:16:42 @@ -2706,7 +2706,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Nant_p = vb.msColumns().antenna().nrow(); build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 NAnt = findPointingOffsets(vb,pointingOffsets,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Matrix uvw(3, vb.uvw().nelements()); build 10-Jul-2019 13:16:42 @@ -2897,7 +2897,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 Int NAnt=0; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 - if (doPointing) build 10-Jul-2019 13:16:42 + if (usePointing) build 10-Jul-2019 13:16:42 NAnt = findPointingOffsets(vb,l_offsets, m_offsets,true); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines/AWProjectFT.h b/code/synthesis/TransformMachines/AWProjectFT.h build 10-Jul-2019 13:16:42 index 2d2f173..fa50ef6 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines/AWProjectFT.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines/AWProjectFT.h build 10-Jul-2019 13:16:42 @@ -493,7 +493,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 casacore::CountedPtr epJ_p; build 10-Jul-2019 13:16:42 casacore::Double sigma; build 10-Jul-2019 13:16:42 - casacore::Int Nant_p, doPointing; build 10-Jul-2019 13:16:42 + casacore::Int Nant_p, usePointing; build 10-Jul-2019 13:16:42 casacore::Bool doPBCorrection, makingPSF, conjBeams_p; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // casacore::CountedPtr cfCache_p; build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines/AWProjectWBFT.cc b/code/synthesis/TransformMachines/AWProjectWBFT.cc build 10-Jul-2019 13:16:42 index a9c9158..cb4ea77 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines/AWProjectWBFT.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines/AWProjectWBFT.cc build 10-Jul-2019 13:16:42 @@ -81,7 +81,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // convSize=0; build 10-Jul-2019 13:16:42 paChangeDetector.reset(); build 10-Jul-2019 13:16:42 pbLimit_p=pbLimit; build 10-Jul-2019 13:16:42 - if (applyPointingOffset) doPointing=1; else doPointing=0; build 10-Jul-2019 13:16:42 + if (applyPointingOffset) usePointing=1; else usePointing=0; build 10-Jul-2019 13:16:42 maxConvSupport=-1; build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 // Set up the Conv. Func. disk cache manager object. build 10-Jul-2019 13:16:42 @@ -659,7 +659,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // Float *decoff, build 10-Jul-2019 13:16:42 // Double *area, build 10-Jul-2019 13:16:42 // Int *doGrad, build 10-Jul-2019 13:16:42 -// Int *doPointingCorrection, build 10-Jul-2019 13:16:42 +// Int *usePointingCorrection, build 10-Jul-2019 13:16:42 // Int *nPA, build 10-Jul-2019 13:16:42 // Int *paIndex, build 10-Jul-2019 13:16:42 // Int *CFMap, build 10-Jul-2019 13:16:42 @@ -703,7 +703,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 // Double *area, build 10-Jul-2019 13:16:42 // Int *dograd, build 10-Jul-2019 13:16:42 -// Int *doPointingCorrection, build 10-Jul-2019 13:16:42 +// Int *usePointingCorrection, build 10-Jul-2019 13:16:42 // Int *nPA, build 10-Jul-2019 13:16:42 // Int *paIndex, build 10-Jul-2019 13:16:42 // Int *CFMap, build 10-Jul-2019 13:16:42 @@ -746,7 +746,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 // Double *area, build 10-Jul-2019 13:16:42 // Int *dograd, build 10-Jul-2019 13:16:42 -// Int *doPointingCorrection, build 10-Jul-2019 13:16:42 +// Int *usePointingCorrection, build 10-Jul-2019 13:16:42 // Int *nPA, build 10-Jul-2019 13:16:42 // Int *paIndex, build 10-Jul-2019 13:16:42 // Int *CFMap, build 10-Jul-2019 13:16:42 @@ -842,8 +842,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // actualConvSize = cfs_p.data->shape()(0); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // // IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:42 -// Int alwaysDoPointing=1; build 10-Jul-2019 13:16:42 -// alwaysDoPointing=doPointing; build 10-Jul-2019 13:16:42 +// Int alwaysUsePointing=1; build 10-Jul-2019 13:16:42 +// alwaysUsePointing=usePointing; build 10-Jul-2019 13:16:42 // dpbmos(uvw_p, build 10-Jul-2019 13:16:42 // dphase_p, build 10-Jul-2019 13:16:42 // visdata_p, build 10-Jul-2019 13:16:42 @@ -878,7 +878,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // l_off_p, m_off_p, build 10-Jul-2019 13:16:42 // &area, build 10-Jul-2019 13:16:42 // &doGrad, build 10-Jul-2019 13:16:42 -// &alwaysDoPointing, build 10-Jul-2019 13:16:42 +// &alwaysUsePointing, build 10-Jul-2019 13:16:42 // &npa, build 10-Jul-2019 13:16:42 // &paIndex_Fortran, build 10-Jul-2019 13:16:42 // CFMap_p, build 10-Jul-2019 13:16:42 @@ -989,8 +989,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // actualConvSize = cfs_p.data->shape()(0); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // // IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:42 -// Int alwaysDoPointing=1; build 10-Jul-2019 13:16:42 -// alwaysDoPointing = doPointing; build 10-Jul-2019 13:16:42 +// Int alwaysUsePointing=1; build 10-Jul-2019 13:16:42 +// alwaysUsePointing = usePointing; build 10-Jul-2019 13:16:42 // dpbmosgrad(uvw_p, build 10-Jul-2019 13:16:42 // dphase_p, build 10-Jul-2019 13:16:42 // visdata_p, build 10-Jul-2019 13:16:42 @@ -1028,7 +1028,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // l_off_p, m_off_p, build 10-Jul-2019 13:16:42 // &area, build 10-Jul-2019 13:16:42 // &doGrad, build 10-Jul-2019 13:16:42 -// &alwaysDoPointing, build 10-Jul-2019 13:16:42 +// &alwaysUsePointing, build 10-Jul-2019 13:16:42 // &npa, build 10-Jul-2019 13:16:42 // &paIndex_Fortran, build 10-Jul-2019 13:16:42 // CFMap_p, build 10-Jul-2019 13:16:42 @@ -1184,8 +1184,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // if (fabs(lastPAUsedForWtImg-actualPA)*57.2956 >= DELTAPA) lastPAUsedForWtImg = actualPA; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // // IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:42 -// Int alwaysDoPointing=1; build 10-Jul-2019 13:16:42 -// alwaysDoPointing = doPointing; build 10-Jul-2019 13:16:42 +// Int alwaysUsePointing=1; build 10-Jul-2019 13:16:42 +// alwaysUsePointing = usePointing; build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 // gpbmos(uvw_p, build 10-Jul-2019 13:16:42 // dphase_p, build 10-Jul-2019 13:16:42 @@ -1226,7 +1226,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // l_off_p, m_off_p, build 10-Jul-2019 13:16:42 // &area, build 10-Jul-2019 13:16:42 // &doGrad, build 10-Jul-2019 13:16:42 -// &alwaysDoPointing, build 10-Jul-2019 13:16:42 +// &alwaysUsePointing, build 10-Jul-2019 13:16:42 // &npa, build 10-Jul-2019 13:16:42 // &paIndex_Fortran, build 10-Jul-2019 13:16:42 // CFMap_p, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines/BeamCalc.cc b/code/synthesis/TransformMachines/BeamCalc.cc build 10-Jul-2019 13:16:42 index 88d47dc..2d36b48 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines/BeamCalc.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines/BeamCalc.cc build 10-Jul-2019 13:16:42 @@ -33,7 +33,7 @@ build 10-Jul-2019 13:16:42 //#include build 10-Jul-2019 13:16:42 //#include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 -#include build 10-Jul-2019 13:16:42 +#include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 #include build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines2/AWConvFunc.cc b/code/synthesis/TransformMachines2/AWConvFunc.cc build 10-Jul-2019 13:16:42 index 2d557f8..4e07e2e 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines2/AWConvFunc.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines2/AWConvFunc.cc build 10-Jul-2019 13:16:42 @@ -2068,11 +2068,11 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 10-Jul-2019 13:16:42 //---------------------------------------------------------------------- build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:42 Vector > AWConvFunc::findPointingOffset(const ImageInterface& image, build 10-Jul-2019 13:16:42 - const VisBuffer2& vb, const Bool& doPointing) build 10-Jul-2019 13:16:42 + const VisBuffer2& vb, const Bool& usePointing) build 10-Jul-2019 13:16:42 { build 10-Jul-2019 13:16:42 Assert(po_p.null()==False && "Pointingoffset call has not been initialized in AWProjectFT call being made"); build 10-Jul-2019 13:16:42 - return po_p->findPointingOffset(image,vb,doPointing); build 10-Jul-2019 13:16:42 - // if (!doPointing) build 10-Jul-2019 13:16:42 + return po_p->findPointingOffset(image,vb,usePointing); build 10-Jul-2019 13:16:42 + // if (!usePointing) build 10-Jul-2019 13:16:42 // {cerr<<"AWCF: Using mosaic pointing \n";return po_p->findMosaicPointingOffset(image,vb);} build 10-Jul-2019 13:16:42 // else build 10-Jul-2019 13:16:42 // {cerr<<"AWCF: Using antenna pointing table \n";return po_p->findAntennaPointingOffset(image,vb);} build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines2/AWConvFunc.h b/code/synthesis/TransformMachines2/AWConvFunc.h build 10-Jul-2019 13:16:42 index 4f08948..d68ce7f 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines2/AWConvFunc.h build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines2/AWConvFunc.h build 10-Jul-2019 13:16:42 @@ -155,7 +155,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 {if (name=="ATerm") return aTerm_p; else return NULL;} build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 virtual casacore::Vector >findPointingOffset(const casacore::ImageInterface& /*image*/, build 10-Jul-2019 13:16:42 - const VisBuffer2& /*vb*/, const casacore::Bool& doPointing); build 10-Jul-2019 13:16:42 + const VisBuffer2& /*vb*/, const casacore::Bool& usePointing); build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines2/AWProjectFT.FORTRANSTUFF b/code/synthesis/TransformMachines2/AWProjectFT.FORTRANSTUFF build 10-Jul-2019 13:16:42 index d62d733..ab291b0 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines2/AWProjectFT.FORTRANSTUFF build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines2/AWProjectFT.FORTRANSTUFF build 10-Jul-2019 13:16:42 @@ -45,7 +45,7 @@ build 10-Jul-2019 13:16:42 Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *doGrad, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -85,7 +85,7 @@ build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -128,7 +128,7 @@ build 10-Jul-2019 13:16:42 Float *raoff, Float *decoff, build 10-Jul-2019 13:16:42 Double *area, build 10-Jul-2019 13:16:42 Int *dograd, build 10-Jul-2019 13:16:42 - Int *doPointingCorrection, build 10-Jul-2019 13:16:42 + Int *usePointingCorrection, build 10-Jul-2019 13:16:42 Int *nPA, build 10-Jul-2019 13:16:42 Int *paIndex, build 10-Jul-2019 13:16:42 Int *CFMap, build 10-Jul-2019 13:16:42 @@ -269,7 +269,7 @@ build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -421,7 +421,7 @@ build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 @@ -592,7 +592,7 @@ build 10-Jul-2019 13:16:42 l_off_p, m_off_p, build 10-Jul-2019 13:16:42 &area, build 10-Jul-2019 13:16:42 &doGrad, build 10-Jul-2019 13:16:42 - &doPointing, build 10-Jul-2019 13:16:42 + &usePointing, build 10-Jul-2019 13:16:42 &npa, build 10-Jul-2019 13:16:42 &paIndex_Fortran, build 10-Jul-2019 13:16:42 CFMap_p, build 10-Jul-2019 13:16:42 diff --git a/code/synthesis/TransformMachines2/AWProjectFT.cc b/code/synthesis/TransformMachines2/AWProjectFT.cc build 10-Jul-2019 13:16:42 index 5dabba8..a4e0cf1 100644 build 10-Jul-2019 13:16:42 --- a/code/synthesis/TransformMachines2/AWProjectFT.cc build 10-Jul-2019 13:16:42 +++ b/code/synthesis/TransformMachines2/AWProjectFT.cc build 10-Jul-2019 13:16:42 @@ -185,7 +185,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:42 // build 10-Jul-2019 13:16:43 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 - doPointing=1; build 10-Jul-2019 13:16:43 + usePointing=1; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 maxConvSupport=-1; build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 @@ -245,7 +245,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 - if (applyPointingOffset) doPointing=1; else doPointing=0; build 10-Jul-2019 13:16:43 + if (applyPointingOffset) usePointing=1; else usePointing=0; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 maxConvSupport=-1; build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 @@ -381,7 +381,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 // Get various parameters from the visibilities. build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 - doPointing=other.doPointing; build 10-Jul-2019 13:16:43 + usePointing=other.usePointing; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 maxConvSupport=other.maxConvSupport; build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 @@ -1168,7 +1168,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 lastPAUsedForWtImg = currentCFPA = pa; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - Vector > pointingOffset(convFuncCtor_p->findPointingOffset(image,vb, doPointing)); build 10-Jul-2019 13:16:43 + Vector > pointingOffset(convFuncCtor_p->findPointingOffset(image,vb, usePointing)); build 10-Jul-2019 13:16:43 Float dPA = paChangeDetector.getParAngleTolerance().getValue("rad"); build 10-Jul-2019 13:16:43 Quantity dPAQuant = Quantity(paChangeDetector.getParAngleTolerance()); build 10-Jul-2019 13:16:43 // cfSource = visResampler_p->makeVBRow2CFBMap(*cfs2_p, build 10-Jul-2019 13:16:43 @@ -1176,7 +1176,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // vb, build 10-Jul-2019 13:16:43 // dPAQuant, build 10-Jul-2019 13:16:43 // chanMap,polMap,pointingOffset); build 10-Jul-2019 13:16:43 - vb2CFBMap_p->setDoPointing(doPointing); build 10-Jul-2019 13:16:43 + vb2CFBMap_p->setUsePointing(usePointing); build 10-Jul-2019 13:16:43 cfSource = vb2CFBMap_p->makeVBRow2CFBMap(*cfs2_p, build 10-Jul-2019 13:16:43 vb, build 10-Jul-2019 13:16:43 dPAQuant, build 10-Jul-2019 13:16:43 @@ -1715,7 +1715,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 interpolateFrequencyTogrid(vb, imagingweight,data, flags, elWeight, type); build 10-Jul-2019 13:16:43 // nAnt set but not used build 10-Jul-2019 13:16:43 // Int NAnt; build 10-Jul-2019 13:16:43 - // if (doPointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:43 + // if (usePointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 // If row is -1 then we pass through all rows build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 @@ -1842,7 +1842,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 Nant_p = vb.subtableColumns().antenna().nrow(); build 10-Jul-2019 13:16:43 // NAnt set but not used build 10-Jul-2019 13:16:43 // Int NAnt=0; build 10-Jul-2019 13:16:43 - // if (doPointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:43 + // if (usePointing) NAnt = findPointingOffsets(vb,l_offsets,m_offsets,true); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 // Get the uvws in a form that Fortran can use build 10-Jul-2019 13:16:43 Matrix uvw(negateUV(vb)); build 10-Jul-2019 13:16:43 @@ -2464,10 +2464,10 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 //timer_p.mark(); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - Vector >pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb, doPointing)); build 10-Jul-2019 13:16:43 + Vector >pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb, usePointing)); build 10-Jul-2019 13:16:43 if (makingPSF){ build 10-Jul-2019 13:16:43 cfwts2_p->invokeGC(vbs.spwID_p); build 10-Jul-2019 13:16:43 - vb2CFBMap_p->setDoPointing(doPointing); build 10-Jul-2019 13:16:43 + vb2CFBMap_p->setUsePointing(usePointing); build 10-Jul-2019 13:16:43 vb2CFBMap_p->makeVBRow2CFBMap(*cfwts2_p, build 10-Jul-2019 13:16:43 vb, build 10-Jul-2019 13:16:43 paChangeDetector.getParAngleTolerance(), build 10-Jul-2019 13:16:43 @@ -2495,7 +2495,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 cfs2_p->invokeGC(vbs.spwID_p); build 10-Jul-2019 13:16:43 - vb2CFBMap_p->setDoPointing(doPointing); build 10-Jul-2019 13:16:43 + vb2CFBMap_p->setUsePointing(usePointing); build 10-Jul-2019 13:16:43 vb2CFBMap_p->makeVBRow2CFBMap(*cfs2_p, vb, build 10-Jul-2019 13:16:43 paChangeDetector.getParAngleTolerance(), build 10-Jul-2019 13:16:43 chanMap,polMap,pointingOffset); build 10-Jul-2019 13:16:43 @@ -2594,7 +2594,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 findConvFunction(*image, vb); build 10-Jul-2019 13:16:43 Int NAnt=0; build 10-Jul-2019 13:16:43 Nant_p = vb.subtableColumns().antenna().nrow(); build 10-Jul-2019 13:16:43 - if (doPointing) build 10-Jul-2019 13:16:43 + if (usePointing) build 10-Jul-2019 13:16:43 NAnt = findPointingOffsets(vb,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 l_offsets=l_off; build 10-Jul-2019 13:16:43 @@ -2772,7 +2772,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Nant_p = vb.subtableColumns().antenna().nrow(); build 10-Jul-2019 13:16:43 Int NAnt=0; build 10-Jul-2019 13:16:43 - if (doPointing) build 10-Jul-2019 13:16:43 + if (usePointing) build 10-Jul-2019 13:16:43 NAnt = findPointingOffsets(vb,pointingOffsets,l_offsets,m_offsets,false); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Matrix uvw(negateUV(vb)); build 10-Jul-2019 13:16:43 @@ -2965,7 +2965,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Int NAnt=0; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - if (doPointing) build 10-Jul-2019 13:16:43 + if (usePointing) build 10-Jul-2019 13:16:43 NAnt = findPointingOffsets(vb,l_offsets, m_offsets,true); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/AWProjectFT.h b/code/synthesis/TransformMachines2/AWProjectFT.h build 10-Jul-2019 13:16:43 index ea18dc0..e773923 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/AWProjectFT.h build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/AWProjectFT.h build 10-Jul-2019 13:16:43 @@ -508,7 +508,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 casacore::CountedPtr epJ_p; build 10-Jul-2019 13:16:43 casacore::Double sigma; build 10-Jul-2019 13:16:43 - casacore::Int Nant_p, doPointing; build 10-Jul-2019 13:16:43 + casacore::Int Nant_p, usePointing; build 10-Jul-2019 13:16:43 casacore::Bool doPBCorrection, makingPSF, conjBeams_p; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 // casacore::CountedPtr cfCache_p; build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/AWProjectWBFT.cc b/code/synthesis/TransformMachines2/AWProjectWBFT.cc build 10-Jul-2019 13:16:43 index f4287b4..86d057b 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/AWProjectWBFT.cc build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/AWProjectWBFT.cc build 10-Jul-2019 13:16:43 @@ -111,7 +111,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // convSize=0; build 10-Jul-2019 13:16:43 paChangeDetector.reset(); build 10-Jul-2019 13:16:43 pbLimit_p=pbLimit; build 10-Jul-2019 13:16:43 - if (applyPointingOffset) doPointing=1; else doPointing=0; build 10-Jul-2019 13:16:43 + if (applyPointingOffset) usePointing=1; else usePointing=0; build 10-Jul-2019 13:16:43 maxConvSupport=-1; build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 // Set up the Conv. Func. disk cache manager object. build 10-Jul-2019 13:16:43 @@ -837,7 +837,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 //timer_p.mark(); build 10-Jul-2019 13:16:43 visResamplerWt_p->copy(*visResampler_p); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - Vector > pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb,doPointing)); build 10-Jul-2019 13:16:43 + Vector > pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb,usePointing)); build 10-Jul-2019 13:16:43 //cerr << "AWPWB: " << pointingOffset << endl; build 10-Jul-2019 13:16:43 // visResamplerWt_p->makeVBRow2CFBMap(*cfwts2_p,*convFuncCtor_p, vb, build 10-Jul-2019 13:16:43 // paChangeDetector.getParAngleTolerance(), build 10-Jul-2019 13:16:43 @@ -972,7 +972,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // Float *decoff, build 10-Jul-2019 13:16:43 // Double *area, build 10-Jul-2019 13:16:43 // Int *doGrad, build 10-Jul-2019 13:16:43 -// Int *doPointingCorrection, build 10-Jul-2019 13:16:43 +// Int *usePointingCorrection, build 10-Jul-2019 13:16:43 // Int *nPA, build 10-Jul-2019 13:16:43 // Int *paIndex, build 10-Jul-2019 13:16:43 // Int *CFMap, build 10-Jul-2019 13:16:43 @@ -1016,7 +1016,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // Float *raoff, Float *decoff, build 10-Jul-2019 13:16:43 // Double *area, build 10-Jul-2019 13:16:43 // Int *dograd, build 10-Jul-2019 13:16:43 -// Int *doPointingCorrection, build 10-Jul-2019 13:16:43 +// Int *usePointingCorrection, build 10-Jul-2019 13:16:43 // Int *nPA, build 10-Jul-2019 13:16:43 // Int *paIndex, build 10-Jul-2019 13:16:43 // Int *CFMap, build 10-Jul-2019 13:16:43 @@ -1059,7 +1059,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // Float *raoff, Float *decoff, build 10-Jul-2019 13:16:43 // Double *area, build 10-Jul-2019 13:16:43 // Int *dograd, build 10-Jul-2019 13:16:43 -// Int *doPointingCorrection, build 10-Jul-2019 13:16:43 +// Int *usePointingCorrection, build 10-Jul-2019 13:16:43 // Int *nPA, build 10-Jul-2019 13:16:43 // Int *paIndex, build 10-Jul-2019 13:16:43 // Int *CFMap, build 10-Jul-2019 13:16:43 @@ -1155,8 +1155,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // actualConvSize = cfs_p.data->shape()(0); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 // // IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:43 -// Int alwaysDoPointing=1; build 10-Jul-2019 13:16:43 -// alwaysDoPointing=doPointing; build 10-Jul-2019 13:16:43 +// Int alwaysUsePointing=1; build 10-Jul-2019 13:16:43 +// alwaysUsePointing=usePointing; build 10-Jul-2019 13:16:43 // dpbmos(uvw_p, build 10-Jul-2019 13:16:43 // dphase_p, build 10-Jul-2019 13:16:43 // visdata_p, build 10-Jul-2019 13:16:43 @@ -1191,7 +1191,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // l_off_p, m_off_p, build 10-Jul-2019 13:16:43 // &area, build 10-Jul-2019 13:16:43 // &doGrad, build 10-Jul-2019 13:16:43 -// &alwaysDoPointing, build 10-Jul-2019 13:16:43 +// &alwaysUsePointing, build 10-Jul-2019 13:16:43 // &npa, build 10-Jul-2019 13:16:43 // &paIndex_Fortran, build 10-Jul-2019 13:16:43 // CFMap_p, build 10-Jul-2019 13:16:43 @@ -1302,8 +1302,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // actualConvSize = cfs_p.data->shape()(0); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 // // IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:43 -// Int alwaysDoPointing=1; build 10-Jul-2019 13:16:43 -// alwaysDoPointing = doPointing; build 10-Jul-2019 13:16:43 +// Int alwaysUsePointing=1; build 10-Jul-2019 13:16:43 +// alwaysUsePointing = usePointing; build 10-Jul-2019 13:16:43 // dpbmosgrad(uvw_p, build 10-Jul-2019 13:16:43 // dphase_p, build 10-Jul-2019 13:16:43 // visdata_p, build 10-Jul-2019 13:16:43 @@ -1341,7 +1341,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // l_off_p, m_off_p, build 10-Jul-2019 13:16:43 // &area, build 10-Jul-2019 13:16:43 // &doGrad, build 10-Jul-2019 13:16:43 -// &alwaysDoPointing, build 10-Jul-2019 13:16:43 +// &alwaysUsePointing, build 10-Jul-2019 13:16:43 // &npa, build 10-Jul-2019 13:16:43 // &paIndex_Fortran, build 10-Jul-2019 13:16:43 // CFMap_p, build 10-Jul-2019 13:16:43 @@ -1497,8 +1497,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // if (fabs(lastPAUsedForWtImg-actualPA)*57.2956 >= DELTAPA) lastPAUsedForWtImg = actualPA; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 // // IPosition shp=convSupport.shape(); build 10-Jul-2019 13:16:43 -// Int alwaysDoPointing=1; build 10-Jul-2019 13:16:43 -// alwaysDoPointing = doPointing; build 10-Jul-2019 13:16:43 +// Int alwaysUsePointing=1; build 10-Jul-2019 13:16:43 +// alwaysUsePointing = usePointing; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 // gpbmos(uvw_p, build 10-Jul-2019 13:16:43 // dphase_p, build 10-Jul-2019 13:16:43 @@ -1539,7 +1539,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 // l_off_p, m_off_p, build 10-Jul-2019 13:16:43 // &area, build 10-Jul-2019 13:16:43 // &doGrad, build 10-Jul-2019 13:16:43 -// &alwaysDoPointing, build 10-Jul-2019 13:16:43 +// &alwaysUsePointing, build 10-Jul-2019 13:16:43 // &npa, build 10-Jul-2019 13:16:43 // &paIndex_Fortran, build 10-Jul-2019 13:16:43 // CFMap_p, build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/ConvolutionFunction.h b/code/synthesis/TransformMachines2/ConvolutionFunction.h build 10-Jul-2019 13:16:43 index 3a92052..b0065f5 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/ConvolutionFunction.h build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/ConvolutionFunction.h build 10-Jul-2019 13:16:43 @@ -161,7 +161,7 @@ namespace casa{ build 10-Jul-2019 13:16:43 virtual int getOversampling(){return 1;}; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 virtual casacore::Vector > findPointingOffset(const casacore::ImageInterface& image, build 10-Jul-2019 13:16:43 - const VisBuffer2& vb, const casacore::Bool& doPointing) = 0; build 10-Jul-2019 13:16:43 + const VisBuffer2& vb, const casacore::Bool& usePointing) = 0; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/IlluminationConvFunc.h b/code/synthesis/TransformMachines2/IlluminationConvFunc.h build 10-Jul-2019 13:16:43 index 63e6e3d..0239a28 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/IlluminationConvFunc.h build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/IlluminationConvFunc.h build 10-Jul-2019 13:16:43 @@ -120,7 +120,7 @@ namespace casa{ build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 virtual casacore::Vector< casacore::Vector > findPointingOffset(const casacore::ImageInterface& /*image*/, build 10-Jul-2019 13:16:43 - const VisBuffer2& /*vb*/, const casacore::Bool& /*doPointing*/) build 10-Jul-2019 13:16:43 + const VisBuffer2& /*vb*/, const casacore::Bool& /*usePointing*/) build 10-Jul-2019 13:16:43 {throw(casacore::AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));}; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 private: build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/PointingOffsets.cc b/code/synthesis/TransformMachines2/PointingOffsets.cc build 10-Jul-2019 13:16:43 index 1cb00ec..51993d0 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/PointingOffsets.cc build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/PointingOffsets.cc build 10-Jul-2019 13:16:43 @@ -56,7 +56,7 @@ namespace casa{ build 10-Jul-2019 13:16:43 //---------------------------------------------------------------------- build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 Vector >PointingOffsets::findMosaicPointingOffset(const ImageInterface& image, build 10-Jul-2019 13:16:43 - const VisBuffer2& vb, const Bool& doPointing) build 10-Jul-2019 13:16:43 + const VisBuffer2& vb, const Bool& usePointing) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 storeImageParams(image,vb); build 10-Jul-2019 13:16:43 //where in the image in pixels is this pointing build 10-Jul-2019 13:16:43 @@ -66,7 +66,7 @@ namespace casa{ build 10-Jul-2019 13:16:43 numRow = 0; build 10-Jul-2019 13:16:43 Vector >pixFieldGrad_l; build 10-Jul-2019 13:16:43 pixFieldGrad_l.resize(1); build 10-Jul-2019 13:16:43 - MDirection dir = vbUtils_p.getPointingDir(vb,antId,numRow,dc_p.directionType(),doPointing); build 10-Jul-2019 13:16:43 + MDirection dir = vbUtils_p.getPointingDir(vb,antId,numRow,dc_p.directionType(),usePointing); build 10-Jul-2019 13:16:43 thePix_p = toPix(vb, dir, dir); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 pixFieldGrad_p = gradPerPixel(thePix_p); build 10-Jul-2019 13:16:43 @@ -78,7 +78,7 @@ namespace casa{ build 10-Jul-2019 13:16:43 //---------------------------------------------------------------------- build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 Vector > PointingOffsets::findAntennaPointingOffset(const ImageInterface& image, build 10-Jul-2019 13:16:43 - const vi::VisBuffer2& vb, const Bool& doPointing) build 10-Jul-2019 13:16:43 + const vi::VisBuffer2& vb, const Bool& usePointing) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 Vector >antOffsets; build 10-Jul-2019 13:16:43 storeImageParams(image,vb); build 10-Jul-2019 13:16:43 @@ -91,8 +91,8 @@ namespace casa{ build 10-Jul-2019 13:16:43 cerr << "-------------------------------------------------------------------------" << endl; build 10-Jul-2019 13:16:43 for (int irow=0; irow thePixDir1_l, thePixDir2_l; build 10-Jul-2019 13:16:43 @@ -125,16 +125,16 @@ namespace casa{ build 10-Jul-2019 13:16:43 //---------------------------------------------------------------------- build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 Vector< Vector > PointingOffsets::findPointingOffset(const ImageInterface& image, build 10-Jul-2019 13:16:43 - const VisBuffer2& vb, const Bool doPointing) build 10-Jul-2019 13:16:43 + const VisBuffer2& vb, const Bool usePointing) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 - setDoPointing(doPointing); build 10-Jul-2019 13:16:43 - if (!doPointing) build 10-Jul-2019 13:16:43 + setUsePointing(usePointing); build 10-Jul-2019 13:16:43 + if (!usePointing) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 - return findMosaicPointingOffset(image,vb,doPointing); build 10-Jul-2019 13:16:43 + return findMosaicPointingOffset(image,vb,usePointing); build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 else build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 - return findAntennaPointingOffset(image,vb,doPointing); build 10-Jul-2019 13:16:43 + return findAntennaPointingOffset(image,vb,usePointing); build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/PointingOffsets.h b/code/synthesis/TransformMachines2/PointingOffsets.h build 10-Jul-2019 13:16:43 index b68bdd9..2a25698 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/PointingOffsets.h build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/PointingOffsets.h build 10-Jul-2019 13:16:43 @@ -46,7 +46,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 class PointingOffsets build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 public: build 10-Jul-2019 13:16:43 - PointingOffsets(const int& convOversampling):epJ_p(), doPointing_p(false),vbUtils_p() build 10-Jul-2019 13:16:43 + PointingOffsets(const int& convOversampling):epJ_p(), usePointing_p(false),vbUtils_p() build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 convOversampling_p = convOversampling; build 10-Jul-2019 13:16:43 PO_DEBUG_P = SynthesisUtils::getenv("PO_DEBUG",0); build 10-Jul-2019 13:16:43 @@ -57,20 +57,20 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 void setEPJones(SolvableVisJones* epJ) {epJ_p = epJ;}; build 10-Jul-2019 13:16:43 virtual casacore::Vector >findMosaicPointingOffset(const casacore::ImageInterface& image, build 10-Jul-2019 13:16:43 - const vi::VisBuffer2& vb, const casacore::Bool& doPointing=false); build 10-Jul-2019 13:16:43 + const vi::VisBuffer2& vb, const casacore::Bool& usePointing=false); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 virtual casacore::Vector >findAntennaPointingOffset(const casacore::ImageInterface& image, build 10-Jul-2019 13:16:43 - const vi::VisBuffer2& vb, const casacore::Bool& doPointing=true); build 10-Jul-2019 13:16:43 + const vi::VisBuffer2& vb, const casacore::Bool& usePointing=true); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 virtual casacore::Vector >findPointingOffset(const casacore::ImageInterface& image, build 10-Jul-2019 13:16:43 - const vi::VisBuffer2& vb, const casacore::Bool doPointing=false); build 10-Jul-2019 13:16:43 + const vi::VisBuffer2& vb, const casacore::Bool usePointing=false); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 casacore::Vector gradPerPixel(const casacore::Vector& p); build 10-Jul-2019 13:16:43 casacore::Vector& toPix(const vi::VisBuffer2& vb, build 10-Jul-2019 13:16:43 const casacore::MDirection& dir1, const casacore::MDirection& dir2); build 10-Jul-2019 13:16:43 void storeImageParams(const casacore::ImageInterface& iimage, const vi::VisBuffer2& vb); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - void setDoPointing(const bool& dop=false) {doPointing_p = dop;} build 10-Jul-2019 13:16:43 + void setUsePointing(const bool& dop=false) {usePointing_p = dop;} build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 private: build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -87,7 +87,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 casacore::MDirection direction1_p; build 10-Jul-2019 13:16:43 casacore::MDirection direction2_p; build 10-Jul-2019 13:16:43 casacore::CountedPtr epJ_p; build 10-Jul-2019 13:16:43 - bool doPointing_p; build 10-Jul-2019 13:16:43 + bool usePointing_p; build 10-Jul-2019 13:16:43 VisBufferUtil vbUtils_p; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 int PO_DEBUG_P; build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/VB2CFBMap.cc b/code/synthesis/TransformMachines2/VB2CFBMap.cc build 10-Jul-2019 13:16:43 index f21c113..175771d 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/VB2CFBMap.cc build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/VB2CFBMap.cc build 10-Jul-2019 13:16:43 @@ -45,7 +45,7 @@ using namespace vi; build 10-Jul-2019 13:16:43 namespace refim{ build 10-Jul-2019 13:16:43 Int mapAntIDToAntType(const casacore::Int& /*ant*/) {return 0;}; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - VB2CFBMap::VB2CFBMap(): vb2CFBMap_p(), cfPhaseGrad_p(), phaseGradCalculator_p(),doPointing_p(false) build 10-Jul-2019 13:16:43 + VB2CFBMap::VB2CFBMap(): vb2CFBMap_p(), cfPhaseGrad_p(), phaseGradCalculator_p(),usePointing_p(false) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 phaseGradCalculator_p = new PhaseGrad(); build 10-Jul-2019 13:16:43 newPhaseGradComputed_p = false; build 10-Jul-2019 13:16:43 @@ -58,7 +58,7 @@ using namespace vi; build 10-Jul-2019 13:16:43 phaseGradCalculator_p = other.phaseGradCalculator_p; build 10-Jul-2019 13:16:43 cfPhaseGrad_p.assign(other.cfPhaseGrad_p); build 10-Jul-2019 13:16:43 vb2CFBMap_p.assign(other.vb2CFBMap_p); build 10-Jul-2019 13:16:43 - doPointing_p = other.doPointing_p; build 10-Jul-2019 13:16:43 + usePointing_p = other.usePointing_p; build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 return *this; build 10-Jul-2019 13:16:43 }; build 10-Jul-2019 13:16:43 @@ -68,7 +68,7 @@ using namespace vi; build 10-Jul-2019 13:16:43 const vi::VisBuffer2& vb, build 10-Jul-2019 13:16:43 const int& row) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 - // if (doPointing_p) build 10-Jul-2019 13:16:43 + // if (usePointing_p) build 10-Jul-2019 13:16:43 // { build 10-Jul-2019 13:16:43 // if (phaseGradCalculator_p->needsNewPhaseGrad(pointingOffset, vb, 0)) build 10-Jul-2019 13:16:43 // { build 10-Jul-2019 13:16:43 @@ -92,7 +92,7 @@ using namespace vi; build 10-Jul-2019 13:16:43 const Vector& /*dataChan2ImChanMap*/, build 10-Jul-2019 13:16:43 const Vector& /*dataPol2ImPolMap*/, build 10-Jul-2019 13:16:43 const Vector >& pointingOffset) build 10-Jul-2019 13:16:43 - //const Bool& /*doPointing*/) build 10-Jul-2019 13:16:43 + //const Bool& /*usePointing*/) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 // VBRow2CFMapType& vbRow2CFMap_p, build 10-Jul-2019 13:16:43 const Int nRow=vb.nRows(); build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/VB2CFBMap.h b/code/synthesis/TransformMachines2/VB2CFBMap.h build 10-Jul-2019 13:16:43 index b3cc139..906609f 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/VB2CFBMap.h build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/VB2CFBMap.h build 10-Jul-2019 13:16:43 @@ -70,12 +70,12 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 10-Jul-2019 13:16:43 const int& row); build 10-Jul-2019 13:16:43 inline casacore::Matrix& getCFPhaseGrad(const int& row)//, const int& ant0, const int& ant1) build 10-Jul-2019 13:16:43 {return cfPhaseGrad_p(row);} build 10-Jul-2019 13:16:43 - void setDoPointing(const bool& dop=false) {doPointing_p = dop;newPhaseGradComputed_p=false;} build 10-Jul-2019 13:16:43 + void setUsePointing(const bool& dop=false) {usePointing_p = dop;newPhaseGradComputed_p=false;} build 10-Jul-2019 13:16:43 // protected: build 10-Jul-2019 13:16:43 casacore::Vector > vb2CFBMap_p; build 10-Jul-2019 13:16:43 casacore::Vector > cfPhaseGrad_p; build 10-Jul-2019 13:16:43 casacore::CountedPtr phaseGradCalculator_p; build 10-Jul-2019 13:16:43 - bool doPointing_p, newPhaseGradComputed_p; build 10-Jul-2019 13:16:43 + bool usePointing_p, newPhaseGradComputed_p; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 }; build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 diff --git a/code/synthesis/TransformMachines2/test/tAWPFTM.cc b/code/synthesis/TransformMachines2/test/tAWPFTM.cc build 10-Jul-2019 13:16:43 index 5e2a6a0..6ad812a 100644 build 10-Jul-2019 13:16:43 --- a/code/synthesis/TransformMachines2/test/tAWPFTM.cc build 10-Jul-2019 13:16:43 +++ b/code/synthesis/TransformMachines2/test/tAWPFTM.cc build 10-Jul-2019 13:16:43 @@ -77,7 +77,7 @@ void createAWPFTMachine(CountedPtr& theFT, CountedPtr& theFT, CountedPtr po = new refim::PointingOffsets(awConvFunc->getOversampling()); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - po->setDoPointing(doPointing); build 10-Jul-2019 13:16:43 + po->setUsePointing(usePointing); build 10-Jul-2019 13:16:43 awConvFunc->setPointingOffsets(po); build 10-Jul-2019 13:16:43 // build 10-Jul-2019 13:16:43 // Construct the appropriate re-sampler. build 10-Jul-2019 13:16:43 @@ -132,7 +132,7 @@ void createAWPFTMachine(CountedPtr& theFT, CountedPtr 0: build 10-Jul-2019 13:16:43 casalog.post("Setting brightness unit '%s' to image." % self.image_unit) build 10-Jul-2019 13:16:43 my_ia.setbrightnessunit(self.image_unit) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 + csys.done() build 10-Jul-2019 13:16:43 my_ia.close() build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 # Mask image pixels whose weight are smaller than minweight. build 10-Jul-2019 13:16:43 @@ -554,6 +554,7 @@ class sdimaging_worker(sdutil.sdtask_template_imaging): build 10-Jul-2019 13:16:43 my_ia.close() build 10-Jul-2019 13:16:43 outref = csys.referencecode('direction')[0] build 10-Jul-2019 13:16:43 cell = list(csys.increment(type='direction',format='s')['string']) build 10-Jul-2019 13:16:43 + csys.done() build 10-Jul-2019 13:16:43 # pointing sampling build 10-Jul-2019 13:16:43 ref_ms_spw = self.get_selection_param_for_ms(ref_ms_idx,self.spw) build 10-Jul-2019 13:16:43 ref_ms_field = self.get_selection_param_for_ms(ref_ms_idx,self.field) build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/task_tclean.py b/gcwrap/python/scripts/task_tclean.py build 10-Jul-2019 13:16:43 index d46138c..65885af 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/task_tclean.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/task_tclean.py build 10-Jul-2019 13:16:43 @@ -72,14 +72,13 @@ def tclean( build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 ### PB build 10-Jul-2019 13:16:43 vptable, build 10-Jul-2019 13:16:43 -# usepointing, #=false build 10-Jul-2019 13:16:43 mosweight, #=True build 10-Jul-2019 13:16:43 aterm,#=True, build 10-Jul-2019 13:16:43 psterm,#=True, build 10-Jul-2019 13:16:43 wbawp ,#= True, build 10-Jul-2019 13:16:43 conjbeams ,#= True, build 10-Jul-2019 13:16:43 cfcache ,#= "", build 10-Jul-2019 13:16:43 - dopointing, #= False build 10-Jul-2019 13:16:43 + usepointing, #= False build 10-Jul-2019 13:16:43 computepastep ,#=360.0, build 10-Jul-2019 13:16:43 rotatepastep ,#=360.0, build 10-Jul-2019 13:16:43 pointingoffsetsigdev ,#=0.0, build 10-Jul-2019 13:16:43 @@ -205,8 +204,8 @@ def tclean( build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 #paramList.printParameters() build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - if pointingoffsetsigdev!=0.0 and dopointing==False: build 10-Jul-2019 13:16:43 - casalog.post("pointingoffsetsigdev is only revelent when dopointing is True", "WARN") build 10-Jul-2019 13:16:43 + if pointingoffsetsigdev!=0.0 and usepointing==False: build 10-Jul-2019 13:16:43 + casalog.post("pointingoffsetsigdev is only revelent when usepointing is True", "WARN") build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 pcube=False build 10-Jul-2019 13:16:43 concattype='' build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/task_tclean2.py b/gcwrap/python/scripts/task_tclean2.py build 10-Jul-2019 13:16:43 index 7c86a4c..4e29cac 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/task_tclean2.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/task_tclean2.py build 10-Jul-2019 13:16:43 @@ -135,7 +135,7 @@ def tclean2( build 10-Jul-2019 13:16:43 ##################################################### build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 # mterm = True build 10-Jul-2019 13:16:43 - # dopointing = False build 10-Jul-2019 13:16:43 + # usepointing = False build 10-Jul-2019 13:16:43 # dopbcorr = True build 10-Jul-2019 13:16:43 # workdir = '' build 10-Jul-2019 13:16:43 # cflist = [] build 10-Jul-2019 13:16:43 @@ -191,7 +191,7 @@ def tclean2( build 10-Jul-2019 13:16:43 #mterm=mterm, build 10-Jul-2019 13:16:43 wbawp = wbawp, build 10-Jul-2019 13:16:43 cfcache = cfcache, build 10-Jul-2019 13:16:43 - #dopointing = dopointing, build 10-Jul-2019 13:16:43 + #usepointing = usepointing, build 10-Jul-2019 13:16:43 #dopbcorr = dopbcorr, build 10-Jul-2019 13:16:43 conjbeams = conjbeams, build 10-Jul-2019 13:16:43 computepastep =computepastep, build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/task_tsdimaging.py b/gcwrap/python/scripts/task_tsdimaging.py build 10-Jul-2019 13:16:43 index 1690c77..549b5a6 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/task_tsdimaging.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/task_tsdimaging.py build 10-Jul-2019 13:16:43 @@ -551,6 +551,7 @@ def set_beam_size(vis, imagename, build 10-Jul-2019 13:16:43 csys = ia.coordsys() build 10-Jul-2019 13:16:43 outref = csys.referencecode('direction')[0] build 10-Jul-2019 13:16:43 cell = list(csys.increment(type='direction', format='s')['string']) build 10-Jul-2019 13:16:43 + csys.done() build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 old_tool = OldImagerBasedTools() build 10-Jul-2019 13:16:43 sampling_params = old_tool.get_pointing_sampling_params(vis, field, spw, baseline, scan, intent, build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/tests/test_calanalysis.py b/gcwrap/python/scripts/tests/test_calanalysis.py build 10-Jul-2019 13:16:43 index c20e6b3..cfc6b86 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/tests/test_calanalysis.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/tests/test_calanalysis.py build 10-Jul-2019 13:16:43 @@ -1,120 +1,243 @@ build 10-Jul-2019 13:16:43 import os build 10-Jul-2019 13:16:43 import sys build 10-Jul-2019 13:16:43 -import shutil build 10-Jul-2019 13:16:43 -from __main__ import default build 10-Jul-2019 13:16:43 -from tasks import * build 10-Jul-2019 13:16:43 -from taskinit import * build 10-Jul-2019 13:16:43 import casac build 10-Jul-2019 13:16:43 import unittest build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 import numpy build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 -class calanalysis_tsys1( unittest.TestCase ): build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - """This is a very simple unit test for introspective methods. A Tsys build 10-Jul-2019 13:16:43 - calibration table is used.""" build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - ca = casac.casac.calanalysis() build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - calName = 'uid___A002_X30a93d_X43e.ms.tsys.s3.tbl' build 10-Jul-2019 13:16:43 - msName = 'uid___A002_X30a93d_X43e.ms' build 10-Jul-2019 13:16:43 - parType = 'Float' build 10-Jul-2019 13:16:43 - polBasis = 'U' build 10-Jul-2019 13:16:43 - visCal = 'B TSYS' build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - fieldName = ['J2253+161; 3c454.3', 'Callisto', build 10-Jul-2019 13:16:43 - 'B0007+106; J0010+109', 'GRB021004'] build 10-Jul-2019 13:16:43 - fieldNumber = ['0', '1', '2', '3'] build 10-Jul-2019 13:16:43 - numField = len( fieldNumber ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - antennaName = ['DA41', 'DA42', 'DA43', 'DV02', 'DV03', 'DV05', build 10-Jul-2019 13:16:43 - 'DV07', 'DV10', 'DV11', 'DV12', 'DV13', 'DV14', 'PM02', 'PM03'] build 10-Jul-2019 13:16:43 - antennaNumber = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', build 10-Jul-2019 13:16:43 - '10', '11', '12', '13'] build 10-Jul-2019 13:16:43 - numAntenna = len( antennaNumber ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - antenna1Name = antennaName build 10-Jul-2019 13:16:43 - antenna1Number = antennaNumber build 10-Jul-2019 13:16:43 - numAntenna1 = numAntenna build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - antenna2Name = ['NoName'] build 10-Jul-2019 13:16:43 - antenna2Number = ['-1'] build 10-Jul-2019 13:16:43 - numAntenna2 = 1 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - feed = ['1', '2'] build 10-Jul-2019 13:16:43 - numFeed = len( feed ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - spwName = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', build 10-Jul-2019 13:16:43 - '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''] build 10-Jul-2019 13:16:43 - spwNumber = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', build 10-Jul-2019 13:16:43 - '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', build 10-Jul-2019 13:16:43 - '21', '22', '23', '24', '25', '26', '27', '28', '29', '30'] build 10-Jul-2019 13:16:43 - numSPW = len( spwNumber ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - numChannel = numpy.array([4, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, build 10-Jul-2019 13:16:43 - 128, 1, 128, 1, 128, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, build 10-Jul-2019 13:16:43 - 4, 4, 4, 4, 4], dtype=numpy.int32) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - time = numpy.array([4827167647.3920002, 4827167780.5439997, build 10-Jul-2019 13:16:43 - 4827168227.2320004, 4827168353.7600002, 4827168887.7600002, build 10-Jul-2019 13:16:43 - 4827169009.632, 4827169543.6800003, 4827169665.6960001, build 10-Jul-2019 13:16:43 - 4827170204.3520002, 4827170332.4160004, 4827170866.5600004, build 10-Jul-2019 13:16:43 - 4827170989.5360003, 4827171523.776, 4827171647.2799997]) build 10-Jul-2019 13:16:43 - numTime = len( time ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - def setUp( self ): build 10-Jul-2019 13:16:43 - datapath = os.environ.get( 'CASAPATH' ).split()[0] build 10-Jul-2019 13:16:43 - datapath += '/data/regression/unittest/calanalysis/' build 10-Jul-2019 13:16:43 - return self.ca.open( datapath+self.calName ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - def tearDown( self ): build 10-Jul-2019 13:16:43 - return self.ca.close() build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - def test_introspective( self ): build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - """Test of introspective member functions""" build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( os.path.split(self.ca.calname())[1], build 10-Jul-2019 13:16:43 - self.calName ) build 10-Jul-2019 13:16:43 - self.assertEqual( os.path.split(self.ca.msname())[1], build 10-Jul-2019 13:16:43 - self.msName ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.partype(), self.parType ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.polbasis(), self.polBasis ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.viscal(), self.visCal ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numfield(), self.numField ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.field(name=True), self.fieldName ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.field(name=False), self.fieldNumber ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numantenna(), self.numAntenna ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.antenna(name=True), self.antennaName ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.antenna(name=False), build 10-Jul-2019 13:16:43 - self.antennaNumber ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numantenna1(), self.numAntenna1 ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.antenna1(name=True), build 10-Jul-2019 13:16:43 - self.antenna1Name ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.antenna1(name=False), build 10-Jul-2019 13:16:43 - self.antenna1Number ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numantenna2(), self.numAntenna2 ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.antenna2(name=True), build 10-Jul-2019 13:16:43 - self.antenna2Name ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.antenna2(name=False), build 10-Jul-2019 13:16:43 - self.antenna2Number ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numfeed(), self.numFeed ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.feed(), self.feed ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numspw(), self.numSPW ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.spw(name=True), self.spwName ) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.spw(name=False), self.spwNumber ) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - self.assertTrue( numpy.array_equal(self.ca.numchannel(), self.numChannel)) build 10-Jul-2019 13:16:43 - self.assertEqual( self.ca.numtime(), self.numTime ) build 10-Jul-2019 13:16:43 - self.assertTrue( numpy.allclose(self.ca.time(), self.time)) build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - return None build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 +class calanalysis_tsys1_base(unittest.TestCase): build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + """A Tsys calibration table is used in these tests.""" build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + ca = casac.casac.calanalysis() build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + calName = 'uid___A002_X30a93d_X43e.ms.tsys.s3.tbl' build 10-Jul-2019 13:16:43 + msName = 'uid___A002_X30a93d_X43e.ms' build 10-Jul-2019 13:16:43 + parType = 'Float' build 10-Jul-2019 13:16:43 + polBasis = 'U' build 10-Jul-2019 13:16:43 + visCal = 'B TSYS' build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + fieldName = ['J2253+161; 3c454.3', 'Callisto', build 10-Jul-2019 13:16:43 + 'B0007+106; J0010+109', 'GRB021004'] build 10-Jul-2019 13:16:43 + fieldNumber = ['0', '1', '2', '3'] build 10-Jul-2019 13:16:43 + numField = len(fieldNumber) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + antennaName = ['DA41', 'DA42', 'DA43', 'DV02', 'DV03', 'DV05', build 10-Jul-2019 13:16:43 + 'DV07', 'DV10', 'DV11', 'DV12', 'DV13', 'DV14', 'PM02', 'PM03'] build 10-Jul-2019 13:16:43 + antennaNumber = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', build 10-Jul-2019 13:16:43 + '10', '11', '12', '13'] build 10-Jul-2019 13:16:43 + numAntenna = len(antennaNumber) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + antenna1Name = antennaName build 10-Jul-2019 13:16:43 + antenna1Number = antennaNumber build 10-Jul-2019 13:16:43 + numAntenna1 = numAntenna build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + antenna2Name = ['NoName'] build 10-Jul-2019 13:16:43 + antenna2Number = ['-1'] build 10-Jul-2019 13:16:43 + numAntenna2 = 1 build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + feed = ['1', '2'] build 10-Jul-2019 13:16:43 + numFeed = len(feed) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + spwName = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', build 10-Jul-2019 13:16:43 + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''] build 10-Jul-2019 13:16:43 + spwNumber = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', build 10-Jul-2019 13:16:43 + '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', build 10-Jul-2019 13:16:43 + '21', '22', '23', '24', '25', '26', '27', '28', '29', '30'] build 10-Jul-2019 13:16:43 + numSPW = len(spwNumber) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + numChannel = numpy.array([4, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, build 10-Jul-2019 13:16:43 + 128, 1, 128, 1, 128, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, build 10-Jul-2019 13:16:43 + 4, 4, 4, 4, 4], dtype=numpy.int32) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + time = numpy.array([4827167647.3920002, 4827167780.5439997, build 10-Jul-2019 13:16:43 + 4827168227.2320004, 4827168353.7600002, 4827168887.7600002, build 10-Jul-2019 13:16:43 + 4827169009.632, 4827169543.6800003, 4827169665.6960001, build 10-Jul-2019 13:16:43 + 4827170204.3520002, 4827170332.4160004, 4827170866.5600004, build 10-Jul-2019 13:16:43 + 4827170989.5360003, 4827171523.776, 4827171647.2799997]) build 10-Jul-2019 13:16:43 + numTime = len(time) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def setUp(self): build 10-Jul-2019 13:16:43 + datapath = os.environ.get('CASAPATH').split()[0] build 10-Jul-2019 13:16:43 + datapath += '/data/regression/unittest/calanalysis/' build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + os.system('cp -RL {0} {1}'.format(os.path.join(datapath, self.calName), build 10-Jul-2019 13:16:43 + self.calName)) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + return self.ca.open(self.calName) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def tearDown(self): build 10-Jul-2019 13:16:43 + os.system('rm -rf {0}'.format(self.calName)) build 10-Jul-2019 13:16:43 + return self.ca.close() build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 +class calanalysis_tsys1_introspective(calanalysis_tsys1_base): build 10-Jul-2019 13:16:43 + """ This is a very simple unit test for introspective methods. """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_introspective(self): build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + """Test of introspective member functions""" build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(os.path.split(self.ca.calname())[1], build 10-Jul-2019 13:16:43 + self.calName) build 10-Jul-2019 13:16:43 + self.assertEqual(os.path.split(self.ca.msname())[1], build 10-Jul-2019 13:16:43 + self.msName) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.partype(), self.parType) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.polbasis(), self.polBasis) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.viscal(), self.visCal) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numfield(), self.numField) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.field(name=True), self.fieldName) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.field(name=False), self.fieldNumber) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numantenna(), self.numAntenna) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.antenna(name=True), self.antennaName) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.antenna(name=False), build 10-Jul-2019 13:16:43 + self.antennaNumber) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numantenna1(), self.numAntenna1) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.antenna1(name=True), build 10-Jul-2019 13:16:43 + self.antenna1Name) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.antenna1(name=False), build 10-Jul-2019 13:16:43 + self.antenna1Number) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numantenna2(), self.numAntenna2) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.antenna2(name=True), build 10-Jul-2019 13:16:43 + self.antenna2Name) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.antenna2(name=False), build 10-Jul-2019 13:16:43 + self.antenna2Number) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numfeed(), self.numFeed) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.feed(), self.feed) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numspw(), self.numSPW) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.spw(name=True), self.spwName) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.spw(name=False), self.spwNumber) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertTrue(numpy.array_equal(self.ca.numchannel(), self.numChannel)) build 10-Jul-2019 13:16:43 + self.assertEqual(self.ca.numtime(), self.numTime) build 10-Jul-2019 13:16:43 + self.assertTrue(numpy.allclose(self.ca.time(), self.time)) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 +class calanalysis_tsys1_get(calanalysis_tsys1_base): build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def _check_ca_get_out(self, out): build 10-Jul-2019 13:16:43 + """ Checks one output item from calanalysis.get(), making sure expected entries are build 10-Jul-2019 13:16:43 + there, their types are correct, and some simple values specific to the next build 10-Jul-2019 13:16:43 + test cases. """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + for entry in ['valueErr', 'value', 'flag', 'frequency']: build 10-Jul-2019 13:16:43 + self.assertTrue(entry in out) build 10-Jul-2019 13:16:43 + self.assertEquals(type(out[entry]), numpy.ndarray) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + for entry in ['feed', 'rap', 'antenna1', 'antenna2', 'field', 'abscissa']: build 10-Jul-2019 13:16:43 + self.assertTrue(entry in out) build 10-Jul-2019 13:16:43 + self.assertEquals(type(out[entry]), str) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertEquals(out['rap'], 'REAL') build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def _check_stats_items_values(self, stats): build 10-Jul-2019 13:16:43 + """ Sanity checks on the stats output from a calanalysis.get """ build 10-Jul-2019 13:16:43 + stats_len = 392 build 10-Jul-2019 13:16:43 + self.assertEquals(type(stats), dict) build 10-Jul-2019 13:16:43 + self.assertEquals(len(stats), stats_len) build 10-Jul-2019 13:16:43 + for idx in range(0, len(stats)): build 10-Jul-2019 13:16:43 + self.assertEquals(len(stats[str(idx)]), 11) build 10-Jul-2019 13:16:43 + self._check_ca_get_out(stats[str(idx)]) build 10-Jul-2019 13:16:43 + self.assertEquals(stats['0']['feed'], '1') build 10-Jul-2019 13:16:43 + self.assertEquals(stats['0']['field'], '0') build 10-Jul-2019 13:16:43 + self.assertEquals(stats['1']['feed'], '2') build 10-Jul-2019 13:16:43 + self.assertEquals(stats[str(stats_len-1)]['feed'], '2') build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_get_empty(self): build 10-Jul-2019 13:16:43 + """ Test tool get function with wrong selections """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # This uses parameters in similar wasy as the pipeline does in tsyscal/renderer build 10-Jul-2019 13:16:43 + # SPW 10 is missing build 10-Jul-2019 13:16:43 + stats10 = self.ca.get(spw='10', antenna=self.antennaName, axis='TIME', build 10-Jul-2019 13:16:43 + ap='AMPLITUDE') build 10-Jul-2019 13:16:43 + self.assertEquals(stats10, {}) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # SPW 12 also missing build 10-Jul-2019 13:16:43 + stats12 = self.ca.get(spw='12', antenna=self.antennaName, axis='TIME', build 10-Jul-2019 13:16:43 + ap='AMPLITUDE') build 10-Jul-2019 13:16:43 + self.assertEquals(stats12, {}) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_get_one_spw(self): build 10-Jul-2019 13:16:43 + """ Test tool get function. Uses the main stuff in CalAnalysys/CalStats::stats """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # SPW 13 should be there build 10-Jul-2019 13:16:43 + # This uses parameters in similar wasy as the pipeline does in tsyscal/renderer build 10-Jul-2019 13:16:43 + stats13 = self.ca.get(spw='13', antenna=self.antennaName, axis='TIME', build 10-Jul-2019 13:16:43 + ap='AMPLITUDE') build 10-Jul-2019 13:16:43 + self._check_stats_items_values(stats13) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_get_noparams(self): build 10-Jul-2019 13:16:43 + """ Test tool get function, no selection, no other params. build 10-Jul-2019 13:16:43 + Uses stuff in CalAnalysys/CalStats::stats """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + stats_all = self.ca.get() build 10-Jul-2019 13:16:43 + self._check_stats_items_values(stats_all) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 +class calanalysis_tsys1_fit(calanalysis_tsys1_base): build 10-Jul-2019 13:16:43 + """ Tests on the calanalysis.fit function. """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def _check_ca_fit(self, fit): build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + for entry in ['vars', 'frequency', 'res', 'valueErr', 'flag', 'covars', build 10-Jul-2019 13:16:43 + 'pars', 'value', 'model']: build 10-Jul-2019 13:16:43 + self.assertTrue(entry in fit['1']) build 10-Jul-2019 13:16:43 + self.assertEquals(type(fit['1'][entry]), numpy.ndarray) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + for entry in ['feed', 'rap', 'antenna1', 'antenna2', 'weight', 'field', build 10-Jul-2019 13:16:43 + 'abscissa', 'order']: build 10-Jul-2019 13:16:43 + self.assertTrue(entry in fit['1']) build 10-Jul-2019 13:16:43 + self.assertEquals(type(fit['1'][entry]), str) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + for entry in ['resMean', 'redChi2', 'time', 'resVar']: build 10-Jul-2019 13:16:43 + self.assertTrue(entry in fit['1']) build 10-Jul-2019 13:16:43 + self.assertEquals(type(fit['1'][entry]), float) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.assertTrue(fit['1']['abscissa'], 'frequency') build 10-Jul-2019 13:16:43 + self.assertTrue(fit['1']['order'], 'LINEAR') build 10-Jul-2019 13:16:43 + self.assertTrue(fit['1']['validFit']) build 10-Jul-2019 13:16:43 + self.assertTrue(numpy.all(fit['1']['flag'] == False)) build 10-Jul-2019 13:16:43 + self.assertGreater(fit['1']['resVar'], 0) build 10-Jul-2019 13:16:43 + self.assertLess(fit['1']['resVar'], 200) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_fit_amp(self): build 10-Jul-2019 13:16:43 + """ Test tool fit function (amp). Exercises stuff in CalAnalysys/CalStatsFitter """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # An amp fit inspired by pipeline/qa/bpcal.py build 10-Jul-2019 13:16:43 + fit_amp = self.ca.fit(spw='13', axis='TIME', ap='AMPLITUDE', norm=True, build 10-Jul-2019 13:16:43 + order='LINEAR', type='LSQ', weight=False) build 10-Jul-2019 13:16:43 + fit_len = 392 build 10-Jul-2019 13:16:43 + self.assertEquals(len(fit_amp), fit_len) build 10-Jul-2019 13:16:43 + self._check_ca_fit(fit_amp) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_fit_phase(self): build 10-Jul-2019 13:16:43 + """ Test tool fit function (phase). Exercises stuff in CalAnalysys/CalStatsFitter """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # A phase fit inspired by pipeline/qa/bpcal.py build 10-Jul-2019 13:16:43 + fit_phase = self.ca.fit(spw='13', axis='TIME', ap='PHASE', unwrap=True, build 10-Jul-2019 13:16:43 + jumpmax=0.1, order='LINEAR', type='LSQ', weight=False) build 10-Jul-2019 13:16:43 + fit_len = 392 build 10-Jul-2019 13:16:43 + self.assertEquals(len(fit_phase), fit_len) build 10-Jul-2019 13:16:43 + self._check_ca_fit(fit_phase) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_fit_amp_sel(self): build 10-Jul-2019 13:16:43 + """ Test tool fit function (amp + selection). build 10-Jul-2019 13:16:43 + Exercises stuff in CalAnalysys/CalStatsFitter """ build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # A fit with additional field selection / less outputs build 10-Jul-2019 13:16:43 + fit_amp_field = self.ca.fit(field='Callisto', spw='13', axis='TIME', ap='AMPLITUDE', build 10-Jul-2019 13:16:43 + norm=True, order='LINEAR', type='LSQ', weight=False) build 10-Jul-2019 13:16:43 + fit_len_field = 28 build 10-Jul-2019 13:16:43 + self.assertEquals(len(fit_amp_field), fit_len_field) build 10-Jul-2019 13:16:43 + self._check_ca_fit(fit_amp_field) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 def suite(): build 10-Jul-2019 13:16:43 - return [calanalysis_tsys1] build 10-Jul-2019 13:16:43 + return [calanalysis_tsys1_introspective, calanalysis_tsys1_get, calanalysis_tsys1_fit] build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/tests/test_imhead.py b/gcwrap/python/scripts/tests/test_imhead.py build 10-Jul-2019 13:16:43 index b7d96f7..ecf6613 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/tests/test_imhead.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/tests/test_imhead.py build 10-Jul-2019 13:16:43 @@ -926,7 +926,8 @@ class imhead_test(unittest.TestCase): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 for image in [imf, imc]: build 10-Jul-2019 13:16:43 logfile = image + ".log" build 10-Jul-2019 13:16:43 - open(logfile,'w').close build 10-Jul-2019 13:16:43 + # Because append? build 10-Jul-2019 13:16:43 + open(logfile,'w').close() build 10-Jul-2019 13:16:43 casalog.setlogfile(logfile) build 10-Jul-2019 13:16:43 res = imhead(imagename=image, mode='list', verbose=True) build 10-Jul-2019 13:16:43 self.assertTrue(res) build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/tests/test_refimager.py b/gcwrap/python/scripts/tests/test_refimager.py build 10-Jul-2019 13:16:43 index 9cb77f1..3322b9f 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/tests/test_refimager.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/tests/test_refimager.py build 10-Jul-2019 13:16:43 @@ -95,6 +95,7 @@ import operator build 10-Jul-2019 13:16:43 import inspect build 10-Jul-2019 13:16:43 import numpy as np build 10-Jul-2019 13:16:43 from parallel.parallel_task_helper import ParallelTaskHelper build 10-Jul-2019 13:16:43 +from imagerhelpers.parallel_imager_helper import PyParallelImagerHelper build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 _ia = iatool( ) build 10-Jul-2019 13:16:43 @@ -124,8 +125,11 @@ class testref_base(unittest.TestCase): build 10-Jul-2019 13:16:43 # To use subdir in the output image names in some tests (CAS-10937) build 10-Jul-2019 13:16:43 self.img_subdir = 'refimager_tst_subdir' build 10-Jul-2019 13:16:43 self.parallel = False build 10-Jul-2019 13:16:43 + self.nnode = 0 build 10-Jul-2019 13:16:43 if ParallelTaskHelper.isMPIEnabled(): build 10-Jul-2019 13:16:43 self.parallel = True build 10-Jul-2019 13:16:43 + self.PH = PyParallelImagerHelper() build 10-Jul-2019 13:16:43 + self.nnode = len(self.PH.getNodeList()) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 self.th = TestHelpers() build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -246,6 +250,28 @@ class test_onefield(testref_base): build 10-Jul-2019 13:16:43 self.delData(ms2) build 10-Jul-2019 13:16:43 self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. onefield with two MSs, briggs weighing. Enable this when CAS011978 is fixed") build 10-Jul-2019 13:16:43 + def test_onefield_twoMS_Briggs(self): build 10-Jul-2019 13:16:43 + """ [onefield] Test_Onefield_twoMS with Briggs weighting: One field, two input MSs (for verification of CAS-11978)""" build 10-Jul-2019 13:16:43 + ms1 = 'refim_point_onespw0.ms' build 10-Jul-2019 13:16:43 + ms2 = 'refim_point_onespw1.ms' build 10-Jul-2019 13:16:43 + self.prepData(ms1) build 10-Jul-2019 13:16:43 + self.prepData(ms2) build 10-Jul-2019 13:16:43 +# try: build 10-Jul-2019 13:16:43 +# ## This run should fail with an exception build 10-Jul-2019 13:16:43 +# ret = tclean(vis=[ms1,ms2],field='0',spw=['0','0'], imagename=self.img,imsize=100,cell='8.0arcsec',deconvolver='hogbom',niter=10) build 10-Jul-2019 13:16:43 +# correct=False build 10-Jul-2019 13:16:43 +# except Exception as e: build 10-Jul-2019 13:16:43 +# correct=True build 10-Jul-2019 13:16:43 +# self.assertTrue(correct) build 10-Jul-2019 13:16:43 + ## This run should go smoothly. build 10-Jul-2019 13:16:43 + ret = tclean(vis=[ms1,ms2],field='0',spw=['0','0'], imagename=self.img,imsize=100,cell='8.0arcsec',deconvolver='hogbom',niter=10,datacolumn='data',weighting='briggs', interactive=0, parallel=self.parallel) build 10-Jul-2019 13:16:43 + report=self.th.checkall(ret=ret, peakres=0.365259, modflux=0.798692, imexist=[self.img+'.psf',self.img+'.residual']) build 10-Jul-2019 13:16:43 + self.delData(ms1) build 10-Jul-2019 13:16:43 + self.delData(ms2) build 10-Jul-2019 13:16:43 + self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 def test_onefield_twoMS_diffcolumns(self): build 10-Jul-2019 13:16:43 """ [onefield] Test_Onefield_twoMS_diffcolumns : One field, two input MSs, one with data and one with data and corrected """ build 10-Jul-2019 13:16:43 ms1 = 'refim_point_onespw0.ms' build 10-Jul-2019 13:16:43 @@ -736,7 +762,10 @@ class test_multifield(testref_base): build 10-Jul-2019 13:16:43 ret={} build 10-Jul-2019 13:16:43 if self.parallel: build 10-Jul-2019 13:16:43 ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone']) build 10-Jul-2019 13:16:43 - iterdone_expected=46 build 10-Jul-2019 13:16:43 + if self.nnode < 2: build 10-Jul-2019 13:16:43 + iterdone_expected=42 # single server case = serial build 10-Jul-2019 13:16:43 + else: build 10-Jul-2019 13:16:43 + iterdone_expected=46 build 10-Jul-2019 13:16:43 else: build 10-Jul-2019 13:16:43 iterdone_expected=42 build 10-Jul-2019 13:16:43 ret=retpar build 10-Jul-2019 13:16:43 @@ -2548,6 +2577,16 @@ class test_widefield(testref_base): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 #do stokes V too.. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. mosaic, Briggs weighting with mosweight=True. Enable this after fixing CAS-11978") build 10-Jul-2019 13:16:43 + def test_widefield_mosaicft_mfs_mosweightTrue(self): build 10-Jul-2019 13:16:43 + """ [widefield] Test_Widefield_mosaic : MFS with mosaicft stokes I briggs mosweight=True(default)""" build 10-Jul-2019 13:16:43 + self.prepData("refim_mawproject.ms") build 10-Jul-2019 13:16:43 + ret = tclean(vis=self.msfile,spw='1',field='*',imagename=self.img,imsize=512,cell='10.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50", build 10-Jul-2019 13:16:43 + niter=30,gridder='mosaicft',deconvolver='hogbom',pblimit=0.3,weighting='briggs', parallel=self.parallel) build 10-Jul-2019 13:16:43 + report=self.th.checkall(imexist=[self.img+'.image', self.img+'.psf', self.img+'.weight'],imval=[(self.img+'.image',0.962813, [256,256,0,0]),(self.img+'.weight',0.50520, [256,256,0,0]) ] ) build 10-Jul-2019 13:16:43 + #ret = clean(vis=self.msfile,spw='1',field='*',imagename=self.img+'.old',imsize=512,cell='10.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50",niter=30,imagermode='mosaic',psfmode='hogbom') build 10-Jul-2019 13:16:43 + self.checkfinal(report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 def test_widefield_mosaicft_mtmfs(self): build 10-Jul-2019 13:16:43 """ [widefield] Test_Widefield_mosaicft_mtmfs : MT-MFS with mosaicft stokes I, alpha """ build 10-Jul-2019 13:16:43 self.prepData("refim_mawproject.ms") build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/tests/test_refimager_old.py b/gcwrap/python/scripts/tests/test_refimager_old.py build 10-Jul-2019 13:16:43 index 1831760..eb45272 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/tests/test_refimager_old.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/tests/test_refimager_old.py build 10-Jul-2019 13:16:43 @@ -52,7 +52,7 @@ def getparams(testnum=1,testid=0, parallelmajor=False,parallelminor=False,parall build 10-Jul-2019 13:16:43 aterm=True, psterm=False, mterm=True,\ build 10-Jul-2019 13:16:43 wbawp = False, build 10-Jul-2019 13:16:43 cfcache = "perm.mytest0.cube.cfcache.mos", build 10-Jul-2019 13:16:43 - dopointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 + usepointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 computepastep =360.0, rotatepastep =5.0,\ build 10-Jul-2019 13:16:43 deconvolver='hogbom',\ build 10-Jul-2019 13:16:43 #pblimit=0.1,normtype='flatsky', build 10-Jul-2019 13:16:43 @@ -431,7 +431,7 @@ def getparams(testnum=1,testid=0, parallelmajor=False,parallelminor=False,parall build 10-Jul-2019 13:16:43 aterm=True, psterm=False, mterm=True,\ build 10-Jul-2019 13:16:43 wbawp = True, build 10-Jul-2019 13:16:43 cfcache = "perm.wb.nt2.mytest0.cfcache",\ build 10-Jul-2019 13:16:43 - dopointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 + usepointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 computepastep =360.0, rotatepastep =360.0,#5.0,\ build 10-Jul-2019 13:16:43 deconvolver='mtmfs',\ build 10-Jul-2019 13:16:43 pblimit=0.1,normtype='flatnoise', build 10-Jul-2019 13:16:43 @@ -459,7 +459,7 @@ def getparams(testnum=1,testid=0, parallelmajor=False,parallelminor=False,parall build 10-Jul-2019 13:16:43 aterm=True, psterm=False, mterm=True,\ build 10-Jul-2019 13:16:43 wbawp = True, build 10-Jul-2019 13:16:43 cfcache = "perm.wb.mytest0.cfcache",\ build 10-Jul-2019 13:16:43 - dopointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 + usepointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 computepastep =360.0, rotatepastep =5.0,\ build 10-Jul-2019 13:16:43 deconvolver='hogbom',\ build 10-Jul-2019 13:16:43 pblimit=0.1,normtype='flatnoise', build 10-Jul-2019 13:16:43 @@ -487,7 +487,7 @@ def getparams(testnum=1,testid=0, parallelmajor=False,parallelminor=False,parall build 10-Jul-2019 13:16:43 aterm=True, psterm=False, mterm=True,\ build 10-Jul-2019 13:16:43 wbawp = False, build 10-Jul-2019 13:16:43 cfcache = "perm.mytest0.cfcache.mos",#.offcenter",\ build 10-Jul-2019 13:16:43 - dopointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 + usepointing = False, dopbcorr = True, conjbeams = True, build 10-Jul-2019 13:16:43 computepastep =360.0, rotatepastep =5.0,\ build 10-Jul-2019 13:16:43 deconvolver='hogbom',\ build 10-Jul-2019 13:16:43 #pblimit=0.1,normtype='flatsky', build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/tests/test_req_task_listobs.py b/gcwrap/python/scripts/tests/test_req_task_listobs.py build 10-Jul-2019 13:16:43 index e1499aa..5db2f06 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/tests/test_req_task_listobs.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/tests/test_req_task_listobs.py build 10-Jul-2019 13:16:43 @@ -76,8 +76,8 @@ else: build 10-Jul-2019 13:16:43 if CASA6: build 10-Jul-2019 13:16:43 mesSet = casatools.ctsys.resolve('visibilities/alma/uid___X02_X3d737_X1_01_small.ms') build 10-Jul-2019 13:16:43 else: build 10-Jul-2019 13:16:43 - if os.path.exists(os.environ.get('CASAPATH').split()[0] + '/data/casa-data-req/visibilities/uid___X02_X3d737_X1_01_small.ms'): build 10-Jul-2019 13:16:43 - messet = os.environ.get('CASAPATH').split()[0] + '/data/casa-data-req/visibilities/uid___X02_X3d737_X1_01_small.ms' build 10-Jul-2019 13:16:43 + if os.path.exists(os.environ.get('CASAPATH').split()[0] + '/data/casa-data-req/visibilities/alma/uid___X02_X3d737_X1_01_small.ms'): build 10-Jul-2019 13:16:43 + mesSet = os.environ.get('CASAPATH').split()[0] + '/data/casa-data-req/visibilities/alma/uid___X02_X3d737_X1_01_small.ms' build 10-Jul-2019 13:16:43 else: build 10-Jul-2019 13:16:43 mesSet = datapath + 'uid___X02_X3d737_X1_01_small.ms' build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -105,7 +105,6 @@ def _sha1it(filename): build 10-Jul-2019 13:16:43 class listobs_test_base(unittest.TestCase): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 def setUp(self): build 10-Jul-2019 13:16:43 - self.res = None build 10-Jul-2019 13:16:43 if not CASA6: build 10-Jul-2019 13:16:43 default(listobs) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -256,7 +255,7 @@ class listobs_test_base(unittest.TestCase): build 10-Jul-2019 13:16:43 self.assertTrue('No match found for the antenna specificion [ID(s): [3]]' in open('testlog.log').read(), msg='No warning for ID out of range') build 10-Jul-2019 13:16:43 # This one is marked as correct by the documentation, but CASA disagrees build 10-Jul-2019 13:16:43 listobs(vis=dataset, antenna=['0,DV01']) build 10-Jul-2019 13:16:43 - self.assertTrue('incorrect data type used for field baseline' in open('testlog.log').read(), msg='Failed to recognize list as incorrect data type') build 10-Jul-2019 13:16:43 + self.assertTrue('incorrect data type' in open('testlog.log').read(), msg='Failed to recognize list as incorrect data type') build 10-Jul-2019 13:16:43 # return to default log file build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 def selectcheck(self, dataset): build 10-Jul-2019 13:16:43 @@ -298,7 +297,7 @@ class listobs_test_base(unittest.TestCase): build 10-Jul-2019 13:16:43 self.assertFalse('WARN' in open('testlog.log').read(), msg='Warnings are raised for valid inputs') build 10-Jul-2019 13:16:43 # should raise warnings build 10-Jul-2019 13:16:43 listobs(vis=dataset, uvrange=['0~50', '60~100']) build 10-Jul-2019 13:16:43 - self.assertTrue('incorrect data type used for field uvdist' in open('testlog.log').read(), msg='Fails to raise warning for wrong data type') build 10-Jul-2019 13:16:43 + self.assertTrue('incorrect data type' in open('testlog.log').read(), msg='Fails to raise warning for wrong data type') build 10-Jul-2019 13:16:43 listobs(vis=dataset, uvrange='0-100') build 10-Jul-2019 13:16:43 self.assertTrue('near char. 2 in string "0-100"' in open('testlog.log').read(), msg='Fails to raise warning for wrong delimiter') build 10-Jul-2019 13:16:43 listobs(vis=dataset, uvrange='abc') build 10-Jul-2019 13:16:43 @@ -316,7 +315,7 @@ class listobs_test_base(unittest.TestCase): build 10-Jul-2019 13:16:43 listobs(vis=dataset, timerange='abc') build 10-Jul-2019 13:16:43 self.assertTrue('Parse error at or near ' in open('testlog.log').read()) build 10-Jul-2019 13:16:43 listobs(vis=dataset, timerange=[]) build 10-Jul-2019 13:16:43 - self.assertTrue('incorrect data type used for field time' in open('testlog.log').read()) build 10-Jul-2019 13:16:43 + self.assertTrue('incorrect data type' in open('testlog.log').read()) build 10-Jul-2019 13:16:43 listobs(vis=dataset, timerange='03:00:00-04:00:00') build 10-Jul-2019 13:16:43 self.assertTrue('near char. 9 in string "03:00:00-04:00:00"' in open('testlog.log').read()) build 10-Jul-2019 13:16:43 listobs(vis=dataset, timerange='3~4') build 10-Jul-2019 13:16:43 @@ -346,7 +345,7 @@ class listobs_test_base(unittest.TestCase): build 10-Jul-2019 13:16:43 self.assertFalse('WARN' in open('testlog.log').read(), msg='There are warnings for inputs that should raise none') build 10-Jul-2019 13:16:43 # These should raise a warning build 10-Jul-2019 13:16:43 listobs(vis=dataset, intent=[]) build 10-Jul-2019 13:16:43 - self.assertTrue('incorrect data type used for field scanintent' in open('testlog.log').read(), msg='Incorrect data type list accepted') build 10-Jul-2019 13:16:43 + self.assertTrue('incorrect data type' in open('testlog.log').read(), msg='Incorrect data type list accepted') build 10-Jul-2019 13:16:43 listobs(vis=dataset, intent='abc') build 10-Jul-2019 13:16:43 self.assertTrue('No match found for "abc"' in open('testlog.log').read(), msg='Invalid string accepted without warning') build 10-Jul-2019 13:16:43 # Set log path back to default build 10-Jul-2019 13:16:43 @@ -775,10 +774,13 @@ class test_listobs(listobs_test_base): build 10-Jul-2019 13:16:43 def test_CAS_6733(self): build 10-Jul-2019 13:16:43 """Verify listobs runs to completion on data set in CAS-6733. This was an infinite loop bugfix""" build 10-Jul-2019 13:16:43 if CASA6: build 10-Jul-2019 13:16:43 - vis = casatools.ctsys.resolve('regression/unittest/mstransform/CAS-6733.ms') build 10-Jul-2019 13:16:43 + vis = casatools.ctsys.resolve('visibilities/evla/CAS-6733.ms') build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + elif os.path.exists(os.environ.get('CASAPATH').split()[0] + '/data/casa-data-req'): build 10-Jul-2019 13:16:43 + vis = os.environ.get('CASAPATH').split()[0] + '/data/casa-data-req/visibilities/evla/CAS-6733.ms' build 10-Jul-2019 13:16:43 else: build 10-Jul-2019 13:16:43 - vis = os.environ.get('CASAPATH').split()[0] + '/data/regression/unittest/mstransform/' + "CAS-6733.ms" build 10-Jul-2019 13:16:43 + vis = os.environ.get('CASAPATH').split()[0] + '/casa-data-req/visibilities/evla/CAS-6733.ms' build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 self.assertTrue(listobs(vis=vis)) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 # Test average interval build 10-Jul-2019 13:16:43 diff --git a/gcwrap/python/scripts/tests/test_tclean.py b/gcwrap/python/scripts/tests/test_tclean.py build 10-Jul-2019 13:16:43 index b8e2d53..0a3ea84 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/python/scripts/tests/test_tclean.py build 10-Jul-2019 13:16:43 +++ b/gcwrap/python/scripts/tests/test_tclean.py build 10-Jul-2019 13:16:43 @@ -51,11 +51,8 @@ build 10-Jul-2019 13:16:43 # test_cube_D1 build 10-Jul-2019 13:16:43 # build 10-Jul-2019 13:16:43 # Added to skip at least for 5.5 build 10-Jul-2019 13:16:43 -# test_iterbot_cube_2 (was failing in master) build 10-Jul-2019 13:16:43 -# test_multifield_both_cube (was failing in master) build 10-Jul-2019 13:16:43 # test_cube_chanchunks build 10-Jul-2019 13:16:43 # test_cube_chanchunks_savemodel (possible race conditions) build 10-Jul-2019 13:16:43 -# test_mask_5 (was failing in master) build 10-Jul-2019 13:16:43 # test_modelvis_2 (possible race conditions) build 10-Jul-2019 13:16:43 # test_modelvis_3 (possible race conditions) build 10-Jul-2019 13:16:43 # test_modelvis_5 (possible race conditions) build 10-Jul-2019 13:16:43 @@ -67,6 +64,11 @@ build 10-Jul-2019 13:16:43 # test_modelvis_11 (possible race conditions) build 10-Jul-2019 13:16:43 # test_startmodel_with_mask_mfs(possible race conditions) build 10-Jul-2019 13:16:43 # test_startmodel_with_mask_mtmfs(possible race conditions) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 +#Ressurected from skipping after some fixes build 10-Jul-2019 13:16:43 +# test_mask_5 build 10-Jul-2019 13:16:43 +# test_iterbot_cube_2 build 10-Jul-2019 13:16:43 +# test_multifield_both_cube build 10-Jul-2019 13:16:43 ########################################################################## build 10-Jul-2019 13:16:43 # build 10-Jul-2019 13:16:43 # Datasets build 10-Jul-2019 13:16:43 @@ -95,6 +97,7 @@ import operator build 10-Jul-2019 13:16:43 import inspect build 10-Jul-2019 13:16:43 import numpy as np build 10-Jul-2019 13:16:43 from parallel.parallel_task_helper import ParallelTaskHelper build 10-Jul-2019 13:16:43 +from imagerhelpers.parallel_imager_helper import PyParallelImagerHelper build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 _ia = iatool( ) build 10-Jul-2019 13:16:43 @@ -124,8 +127,11 @@ class testref_base(unittest.TestCase): build 10-Jul-2019 13:16:43 # To use subdir in the output image names in some tests (CAS-10937) build 10-Jul-2019 13:16:43 self.img_subdir = 'refimager_tst_subdir' build 10-Jul-2019 13:16:43 self.parallel = False build 10-Jul-2019 13:16:43 + self.nnode = 0 build 10-Jul-2019 13:16:43 if ParallelTaskHelper.isMPIEnabled(): build 10-Jul-2019 13:16:43 self.parallel = True build 10-Jul-2019 13:16:43 + self.PH = PyParallelImagerHelper() build 10-Jul-2019 13:16:43 + self.nnode = len(self.PH.getNodeList()) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 self.th = TestHelpers() build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -160,7 +166,7 @@ class testref_base(unittest.TestCase): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 def checkfinal(self,pstr=""): build 10-Jul-2019 13:16:43 #pstr += "["+inspect.stack()[1][3]+"] : To re-run this test : casa -c `echo $CASAPATH | awk '{print $1}'`/gcwrap/python/scripts/regressions/admin/runUnitTest.py test_refimager["+ inspect.stack()[1][3] +"]" build 10-Jul-2019 13:16:43 - pstr += "["+inspect.stack()[1][3]+"] : To re-run this test : runUnitTest.main(['test_refimager["+ inspect.stack()[1][3] +"]'])" build 10-Jul-2019 13:16:43 + pstr += "["+inspect.stack()[1][3]+"] : To re-run this test : runUnitTest.main(['test_tclean["+ inspect.stack()[1][3] +"]'])" build 10-Jul-2019 13:16:43 casalog.post(pstr,'INFO') build 10-Jul-2019 13:16:43 if( pstr.count("(Fail") > 0 ): build 10-Jul-2019 13:16:43 self.fail("\n"+pstr) build 10-Jul-2019 13:16:43 @@ -226,8 +232,55 @@ class test_onefield(testref_base): build 10-Jul-2019 13:16:43 report=self.th.checkall(imexist=[self.img+'.psf',self.img+'_2.psf',self.img+'_3.psf'] ) build 10-Jul-2019 13:16:43 self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + # weighting test build 10-Jul-2019 13:16:43 + def test_onefield_weighting(self): build 10-Jul-2019 13:16:43 + """ [onefield] Test_Onefield_weighting : mfs with different weighting (natural, uniform, briggs, radial, superuniform)""" build 10-Jul-2019 13:16:43 + self.prepData('refim_twochan.ms') build 10-Jul-2019 13:16:43 + # default = natural build 10-Jul-2019 13:16:43 + ret0 = tclean(vis=self.msfile,imagename=self.img+'0',imsize=100,cell='8.0arcsec',niter=10,weighting='natural', interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + # uniform build 10-Jul-2019 13:16:43 + ret = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',niter=10,weighting='uniform', interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report=self.th.checkall(ret=ret, peakres=0.263, modflux=0.575, iterdone=10, imexist=[self.img+'.psf', self.img+'.residual', self.img+'.image', self.img+'.model'], imval=[(self.img+'.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # briggs r=-2 build 10-Jul-2019 13:16:43 + ret2 = tclean(vis=self.msfile,imagename=self.img+'2',imsize=100,cell='8.0arcsec',niter=10,weighting='briggs', robust=-2, interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report2=self.th.checkall(ret=ret, peakres=0.263, modflux=0.575, iterdone=10, imexist=[self.img+'2.psf', self.img+'2.residual', self.img+'2.image', self.img+'2.model'], imval=[(self.img+'2.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # briggs r=0.5(default) build 10-Jul-2019 13:16:43 + ret3 = tclean(vis=self.msfile,imagename=self.img+'3',imsize=100,cell='8.0arcsec',niter=10,weighting='briggs', robust=0.5, interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report3=self.th.checkall(ret=ret, peakres=0.263, modflux=0.575, iterdone=10, imexist=[self.img+'3.psf', self.img+'3.residual', self.img+'3.image', self.img+'3.model'], imval=[(self.img+'3.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # briggs r=2 build 10-Jul-2019 13:16:43 + ret4 = tclean(vis=self.msfile,imagename=self.img+'4',imsize=100,cell='8.0arcsec',niter=10,weighting='briggs', robust=2, interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report4=self.th.checkall(ret=ret, peakres=0.263, modflux=0.575, iterdone=10, imexist=[self.img+'4.psf', self.img+'4.residual', self.img+'4.image', self.img+'4.model'], imval=[(self.img+'4.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # radial build 10-Jul-2019 13:16:43 + ret5 = tclean(vis=self.msfile,imagename=self.img+'5',imsize=100,cell='8.0arcsec',niter=10,weighting='radial', interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report5=self.th.checkall(ret=ret, peakres=0.263, modflux=0.575, iterdone=10, imexist=[self.img+'5.psf', self.img+'5.residual', self.img+'5.image', self.img+'5.model'], imval=[(self.img+'5.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # superuniform build 10-Jul-2019 13:16:43 + ret6 = tclean(vis=self.msfile,imagename=self.img+'6',imsize=100,cell='8.0arcsec',niter=10,weighting='superuniform', interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report6=self.th.checkall(ret=ret, peakres=0.263, modflux=0.575, iterdone=10, imexist=[self.img+'6.psf', self.img+'6.residual', self.img+'6.image', self.img+'6.model'], imval=[(self.img+'6.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + # beamareas: uniform < briggs-r=-2 < briggs r=0.5 < briggs r=+2 < natural, ... build 10-Jul-2019 13:16:43 + # by default, it checks if im1's beam < im2's beam build 10-Jul-2019 13:16:43 + print "Test beamarea of tst0.image (natural) is greater than beamarea of tst.image (uniform)" build 10-Jul-2019 13:16:43 + self.assertTrue(self.th.check_beam_compare(self.img+'.image', self.img+'0.image')) build 10-Jul-2019 13:16:43 + # parallel fails - uniform wt. psf seems to be bigger in parallel than that of serial run build 10-Jul-2019 13:16:43 + #print "Test beamarea of tst2.image (briggs -2) is greater than beamarea of tst.image (uniform)" build 10-Jul-2019 13:16:43 + #self.assertTrue(self.th.check_beam_compare(self.img+'.image', self.img+'2.image')) build 10-Jul-2019 13:16:43 + print "Test beamarea of tst3.image (briggs 0.5) is greater than beamarea of tst2.image (briggs -2))" build 10-Jul-2019 13:16:43 + self.assertTrue(self.th.check_beam_compare(self.img+'2.image', self.img+'3.image')) build 10-Jul-2019 13:16:43 + print "Test beamarea of tst4.image (briggs 2) is greater than beamarea of tst3.image (briggs 0.5))" build 10-Jul-2019 13:16:43 + self.assertTrue(self.th.check_beam_compare(self.img+'3.image', self.img+'4.image')) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 def test_onefield_twoMS(self): build 10-Jul-2019 13:16:43 - """ [onefield] Test_Onefield_twoMS : One field, two input MSs """ build 10-Jul-2019 13:16:43 + """ [onefield] Test_Onefield_twoMS : One field, two input MSs, also build 10-Jul-2019 13:16:43 + test automatic fallback to 'data' column when no 'corrected' data build 10-Jul-2019 13:16:43 + column""" build 10-Jul-2019 13:16:43 ms1 = 'refim_point_onespw0.ms' build 10-Jul-2019 13:16:43 ms2 = 'refim_point_onespw1.ms' build 10-Jul-2019 13:16:43 self.prepData(ms1) build 10-Jul-2019 13:16:43 @@ -240,12 +293,34 @@ class test_onefield(testref_base): build 10-Jul-2019 13:16:43 # correct=True build 10-Jul-2019 13:16:43 # self.assertTrue(correct) build 10-Jul-2019 13:16:43 ## This run should go smoothly. build 10-Jul-2019 13:16:43 - ret = tclean(vis=[ms1,ms2],field='0',spw=['0','0'], imagename=self.img,imsize=100,cell='8.0arcsec',deconvolver='hogbom',niter=10,datacolumn='data',parallel=self.parallel) build 10-Jul-2019 13:16:43 + ret = tclean(vis=[ms1,ms2],field='0',spw=['0','0'], imagename=self.img,imsize=100,cell='8.0arcsec',deconvolver='hogbom',niter=10,parallel=self.parallel) build 10-Jul-2019 13:16:43 report=self.th.checkall(imexist=[self.img+'.psf',self.img+'.residual']) build 10-Jul-2019 13:16:43 self.delData(ms1) build 10-Jul-2019 13:16:43 self.delData(ms2) build 10-Jul-2019 13:16:43 self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. onefield with two MSs, briggs weighing. Enable this when CAS011978 is fixed") build 10-Jul-2019 13:16:43 + def test_onefield_twoMS_Briggs(self): build 10-Jul-2019 13:16:43 + """ [onefield] Test_Onefield_twoMS with Briggs weighting: One field, two input MSs (for verification of CAS-11978)""" build 10-Jul-2019 13:16:43 + ms1 = 'refim_point_onespw0.ms' build 10-Jul-2019 13:16:43 + ms2 = 'refim_point_onespw1.ms' build 10-Jul-2019 13:16:43 + self.prepData(ms1) build 10-Jul-2019 13:16:43 + self.prepData(ms2) build 10-Jul-2019 13:16:43 +# try: build 10-Jul-2019 13:16:43 +# ## This run should fail with an exception build 10-Jul-2019 13:16:43 +# ret = tclean(vis=[ms1,ms2],field='0',spw=['0','0'], imagename=self.img,imsize=100,cell='8.0arcsec',deconvolver='hogbom',niter=10) build 10-Jul-2019 13:16:43 +# correct=False build 10-Jul-2019 13:16:43 +# except Exception as e: build 10-Jul-2019 13:16:43 +# correct=True build 10-Jul-2019 13:16:43 +# self.assertTrue(correct) build 10-Jul-2019 13:16:43 + ## This run should go smoothly. build 10-Jul-2019 13:16:43 + ret = tclean(vis=[ms1,ms2],field='0',spw=['0','0'], imagename=self.img,imsize=100,cell='8.0arcsec',deconvolver='hogbom',niter=10,weighting='briggs', interactive=0, parallel=self.parallel) build 10-Jul-2019 13:16:43 + report=self.th.checkall(ret=ret, peakres=0.365259, modflux=0.798692, imexist=[self.img+'.psf',self.img+'.residual']) build 10-Jul-2019 13:16:43 + self.delData(ms1) build 10-Jul-2019 13:16:43 + self.delData(ms2) build 10-Jul-2019 13:16:43 + self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 def test_onefield_twoMS_diffcolumns(self): build 10-Jul-2019 13:16:43 """ [onefield] Test_Onefield_twoMS_diffcolumns : One field, two input MSs, one with data and one with data and corrected """ build 10-Jul-2019 13:16:43 ms1 = 'refim_point_onespw0.ms' build 10-Jul-2019 13:16:43 @@ -262,6 +337,7 @@ class test_onefield(testref_base): build 10-Jul-2019 13:16:43 self.delData(ms1) build 10-Jul-2019 13:16:43 self.delData(ms2) build 10-Jul-2019 13:16:43 self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. Erratic in parallel") build 10-Jul-2019 13:16:43 def test_onefield_briggsabs(self): build 10-Jul-2019 13:16:43 """[onefield] test_onefield_briggsabs: """ build 10-Jul-2019 13:16:43 @@ -431,6 +507,16 @@ class test_onefield(testref_base): build 10-Jul-2019 13:16:43 ## iterdone=11 only because of the return (iterdone_p+1) in MultiTermMatrixCleaner::mtclean() ! build 10-Jul-2019 13:16:43 self.checkfinal(pstr=report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + def test_onefield_gridders(self): build 10-Jul-2019 13:16:43 + """ [onefield] Test_Onefield_gridders : Check all single field gridder equivalent names are accepted """ build 10-Jul-2019 13:16:43 + self.prepData('refim_twochan.ms') build 10-Jul-2019 13:16:43 + ret = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',gridder='ft', interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report=self.th.checkall(imexist=[self.img+'.psf', self.img+'.residual', self.img+'.image'], imval=[(self.img+'.psf', 1.0, [50,50,0,0])]) build 10-Jul-2019 13:16:43 + ret2 = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',gridder='gridft', interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + report2=self.th.checkall(imexist=[self.img+'.psf', self.img+'.residual', self.img+'.image'], imval=[(self.img+'.psf', 1.0, [50,50,0,0])]) build 10-Jul-2019 13:16:43 + self.checkfinal(pstr=report+report2) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 def test_onefield_cube_restoringbeam(self): build 10-Jul-2019 13:16:43 """ [onefield] Test explicit restoring beams for cube : Test peak flux with niter=0, compared with smoothing vs restoringbeam""" build 10-Jul-2019 13:16:43 @@ -504,6 +590,31 @@ class test_onefield(testref_base): build 10-Jul-2019 13:16:43 ## Pass or Fail (and why) ? build 10-Jul-2019 13:16:43 self.checkfinal(report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + def test_onefield_projections(self): build 10-Jul-2019 13:16:43 + """ [onefield] Test_Onefield_projections : test selected projections """ build 10-Jul-2019 13:16:43 + self.prepData('refim_twochan.ms') build 10-Jul-2019 13:16:43 + # default projection = SIN build 10-Jul-2019 13:16:43 + ret = tclean(vis=self.msfile,imagename=self.img+'SIN',imsize=100,cell='8.0arcsec',interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + ret2 = tclean(vis=self.msfile,imagename=self.img+'NCP',projection='NCP',imsize=100,cell='8.0arcsec',interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + ret3 = tclean(vis=self.msfile,imagename=self.img+'TAN',projection='TAN',imsize=100,cell='8.0arcsec',interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + ret4 = tclean(vis=self.msfile,imagename=self.img+'ARC',projection='ARC',imsize=100,cell='8.0arcsec',interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + # Current fails with "wcs wcsset_error: Invalid parameter value" for HEALPix build 10-Jul-2019 13:16:43 + #ret5 = tclean(vis=self.msfile,imagename=self.img+'HPX',projection='HPX',imsize=100,cell='8.0arcsec',interactive=0,parallel=self.parallel) build 10-Jul-2019 13:16:43 + testname=inspect.stack()[0][3] build 10-Jul-2019 13:16:43 + report=self.th.checkall(ret=ret, imexist=[self.img+'SIN.image', self.img+'NCP.image', self.img+'TAN.image',self.img+'ARC.image'], imval=[(self.img+'SIN.psf',1.0,[50,50,0,0])]) build 10-Jul-2019 13:16:43 + retSIN = imhead(self.img+"SIN.image", mode='list') build 10-Jul-2019 13:16:43 + retNCP = imhead(self.img+"NCP.image", mode='list') build 10-Jul-2019 13:16:43 + retTAN = imhead(self.img+"TAN.image", mode='list') build 10-Jul-2019 13:16:43 + retARC = imhead(self.img+"ARC.image", mode='list') build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + checkimage = "["+testname+"] The image in SIN projection : (" + self.th.verdict(retSIN['projection']=='SIN') + ")\n" build 10-Jul-2019 13:16:43 + # in serial 'NCP' is added in projection key but in parallel, this seems to be trancated. build 10-Jul-2019 13:16:43 + checkimage += "["+testname+"] The image in NCP projection : (" + self.th.verdict(retNCP['projection'].find('SIN ([0, 1.16122]')==0) + ")\n" build 10-Jul-2019 13:16:43 + checkimage += "["+testname+"] The image in TAN projection : (" + self.th.verdict(retTAN['projection']=='TAN') + ")\n" build 10-Jul-2019 13:16:43 + checkimage += "["+testname+"] The image in ARC projection : (" + self.th.verdict(retARC['projection']=='ARC') + ")\n" build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + self.checkfinal(pstr=checkimage+report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 ############################################## build 10-Jul-2019 13:16:43 ############################################## build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -596,7 +707,8 @@ class test_iterbot(testref_base): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 self.checkfinal(report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip the test temporarily for 5.5") build 10-Jul-2019 13:16:43 + #@unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip the test temporarily for 5.5") build 10-Jul-2019 13:16:43 + # test_imager_helper issue - now fixed and working build 10-Jul-2019 13:16:43 def test_iterbot_cube_2(self): build 10-Jul-2019 13:16:43 """ [iterbot] Test_Iterbot_cube_2 : High threshold, iterate only on line channels. """ build 10-Jul-2019 13:16:43 self.prepData('refim_point_withline.ms') build 10-Jul-2019 13:16:43 @@ -604,6 +716,7 @@ class test_iterbot(testref_base): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 ret={} build 10-Jul-2019 13:16:43 if self.parallel: build 10-Jul-2019 13:16:43 + # peakres and modflux is determined from node1 build 10-Jul-2019 13:16:43 ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone', 'peakres', 'modflux']) build 10-Jul-2019 13:16:43 else: build 10-Jul-2019 13:16:43 ret=retpar build 10-Jul-2019 13:16:43 @@ -726,7 +839,6 @@ class test_multifield(testref_base): build 10-Jul-2019 13:16:43 self.checkfinal(report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - #@unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip the test temporarily for 5.5") build 10-Jul-2019 13:16:43 def test_multifield_both_cube(self): build 10-Jul-2019 13:16:43 """ [multifield] Test_Multifield_both_cube : Two fields, both cube""" build 10-Jul-2019 13:16:43 self.prepData("refim_twopoints_twochan.ms") build 10-Jul-2019 13:16:43 @@ -736,7 +848,10 @@ class test_multifield(testref_base): build 10-Jul-2019 13:16:43 ret={} build 10-Jul-2019 13:16:43 if self.parallel: build 10-Jul-2019 13:16:43 ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone']) build 10-Jul-2019 13:16:43 - iterdone_expected=46 build 10-Jul-2019 13:16:43 + if self.nnode < 2: build 10-Jul-2019 13:16:43 + iterdone_expected=42 # single server case = serial build 10-Jul-2019 13:16:43 + else: build 10-Jul-2019 13:16:43 + iterdone_expected=46 build 10-Jul-2019 13:16:43 else: build 10-Jul-2019 13:16:43 iterdone_expected=42 build 10-Jul-2019 13:16:43 ret=retpar build 10-Jul-2019 13:16:43 @@ -1978,7 +2093,8 @@ class test_mask(testref_base): build 10-Jul-2019 13:16:43 report=self.th.checkall(imexist=[self.img+'1.mask', self.img+'2.mask'], imval=[(self.img+'1.mask',0.0,[50,50,0,1]),(self.img+'1.mask',1.0,[50,50,0,2]),(self.img+'1.mask',1.0,[50,50,0,10]),(self.img+'1.mask',0.0,[50,50,0,11]),(self.img+'2.mask',1.0,[50,50,0,0]),(self.img+'2.mask',1.0,[50,50,0,4]),(self.img+'2.mask',0.0,[50,50,0,10])]) build 10-Jul-2019 13:16:43 self.checkfinal(report) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip the test temporarily for 5.5") build 10-Jul-2019 13:16:43 + #@unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip the test temporarily for 5.5") build 10-Jul-2019 13:16:43 + # parallel mode issue was fixed in imageanalysis 2019.05.23 build 10-Jul-2019 13:16:43 def test_mask_5(self): build 10-Jul-2019 13:16:43 """ [mask] test_mask_5 : Input cube mask that has different chan build 10-Jul-2019 13:16:43 ranges (use mask from the 1st tclean with a different channel range in the 2nd tclean run)""" build 10-Jul-2019 13:16:43 @@ -2550,6 +2666,16 @@ class test_widefield(testref_base): build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 #do stokes V too.. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + @unittest.skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. mosaic, Briggs weighting with mosweight=True. Enable this after fixing CAS-11978") build 10-Jul-2019 13:16:43 + def test_widefield_mosaicft_mfs_mosweightTrue(self): build 10-Jul-2019 13:16:43 + """ [widefield] Test_Widefield_mosaic : MFS with mosaicft stokes I briggs mosweight=True(default)""" build 10-Jul-2019 13:16:43 + self.prepData("refim_mawproject.ms") build 10-Jul-2019 13:16:43 + ret = tclean(vis=self.msfile,spw='1',field='*',imagename=self.img,imsize=512,cell='10.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50", build 10-Jul-2019 13:16:43 + niter=30,gridder='mosaicft',deconvolver='hogbom',pblimit=0.3,weighting='briggs', parallel=self.parallel) build 10-Jul-2019 13:16:43 + report=self.th.checkall(imexist=[self.img+'.image', self.img+'.psf', self.img+'.weight'],imval=[(self.img+'.image',0.962813, [256,256,0,0]),(self.img+'.weight',0.50520, [256,256,0,0]) ] ) build 10-Jul-2019 13:16:43 + #ret = clean(vis=self.msfile,spw='1',field='*',imagename=self.img+'.old',imsize=512,cell='10.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50",niter=30,imagermode='mosaic',psfmode='hogbom') build 10-Jul-2019 13:16:43 + self.checkfinal(report) build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 def test_widefield_mosaicft_mtmfs(self): build 10-Jul-2019 13:16:43 """ [widefield] Test_Widefield_mosaicft_mtmfs : MT-MFS with mosaicft stokes I, alpha """ build 10-Jul-2019 13:16:43 self.prepData("refim_mawproject.ms") build 10-Jul-2019 13:16:43 @@ -3416,7 +3542,7 @@ class test_mosaic_cube(testref_base): build 10-Jul-2019 13:16:43 self.checkfinal(report1+report2+report3+report4) build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 def test_cube_mosaic_cbFalse_mwTrue_twofield(self): build 10-Jul-2019 13:16:43 - self.prepData('refim_oneshiftpoint.mosaic. ms') build 10-Jul-2019 13:16:43 + self.prepData('refim_oneshiftpoint.mosaic.ms') build 10-Jul-2019 13:16:43 phasecenter = '' build 10-Jul-2019 13:16:43 field='0,1' build 10-Jul-2019 13:16:43 tclean(vis=self.msfile, imagename=self.img,niter=0,specmode='cube',spw='*',imsize=1024, phasecenter=phasecenter,cell='10.0arcsec',gridder='mosaic',field=field, conjbeams=False, wbawp=True, psterm=False,pblimit=0.1,reffreq='1.5GHz',pbcor=True,mosweight=True,parallel=self.parallel) build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tasks/plotms.xml b/gcwrap/tasks/plotms.xml build 10-Jul-2019 13:16:43 index 14482a4..49c46e8 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tasks/plotms.xml build 10-Jul-2019 13:16:43 +++ b/gcwrap/tasks/plotms.xml build 10-Jul-2019 13:16:43 @@ -1188,6 +1188,11 @@ Export plot as image Parameters build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + Compute and overlay the image sideband curve build 10-Jul-2019 13:16:43 + False build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - Coordinate projection (SIN, HPX) build 10-Jul-2019 13:16:43 + Coordinate projection build 10-Jul-2019 13:16:43 Coordinate projection build 10-Jul-2019 13:16:43 Examples : SIN, NCP build 10-Jul-2019 13:16:43 A list of supported (but untested) projections can be found here : build 10-Jul-2019 13:16:43 @@ -668,13 +668,14 @@ HPX HEALPix grid. --> build 10-Jul-2019 13:16:43 When calculating weight density for Briggs build 10-Jul-2019 13:16:43 style weighting in a cube, this parameter build 10-Jul-2019 13:16:43 determines whether to calculate the weight build 10-Jul-2019 13:16:43 - density for each channel independently or a build 10-Jul-2019 13:16:43 - common weight density for all of the selected build 10-Jul-2019 13:16:43 - data (the default). This parameter has no build 10-Jul-2019 13:16:43 + density for each channel independently build 10-Jul-2019 13:16:43 + (the default, True) build 10-Jul-2019 13:16:43 + or a common weight density for all of the selected build 10-Jul-2019 13:16:43 + data. This parameter has no build 10-Jul-2019 13:16:43 meaning for continuum (specmode='mfs') build 10-Jul-2019 13:16:43 imaging but for cube imaging build 10-Jul-2019 13:16:43 perchanweightdensity=True is a recommended build 10-Jul-2019 13:16:43 - alternative option that provides more uniform build 10-Jul-2019 13:16:43 + option that provides more uniform build 10-Jul-2019 13:16:43 sensitivity per channel for cubes, but with build 10-Jul-2019 13:16:43 generally larger psfs than the build 10-Jul-2019 13:16:43 perchanweightdensity=False (prior behavior) build 10-Jul-2019 13:16:43 @@ -713,7 +714,7 @@ HPX HEALPix grid. --> build 10-Jul-2019 13:16:43 across the concatenated cube. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + True build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -1095,9 +1096,9 @@ HPX HEALPix grid. --> build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 The parameter makes the gridder utilize the pointing table phase directions while computing the residual image. build 10-Jul-2019 13:16:43 -The dopointing flag informs the gridder that it should utilize the pointing table build 10-Jul-2019 13:16:43 +The usepointing flag informs the gridder that it should utilize the pointing table build 10-Jul-2019 13:16:43 to use the correct direction in which the antenna is pointing with respect to the pointing phasecenter. build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -2603,7 +2604,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 [] build 10-Jul-2019 13:16:43 "linear" build 10-Jul-2019 13:16:43 1 build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + True build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 -1 build 10-Jul-2019 13:16:43 @@ -2614,7 +2615,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 [] build 10-Jul-2019 13:16:43 "linear" build 10-Jul-2019 13:16:43 1 build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + True build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -2653,7 +2654,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 "flatnoise" build 10-Jul-2019 13:16:43 "" build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + False build 10-Jul-2019 13:16:43 True build 10-Jul-2019 13:16:43 0.2 build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 @@ -2662,7 +2663,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 "flatnoise" build 10-Jul-2019 13:16:43 "" build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + False build 10-Jul-2019 13:16:43 True build 10-Jul-2019 13:16:43 0.2 build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 @@ -2671,7 +2672,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 "flatnoise" build 10-Jul-2019 13:16:43 "" build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + False build 10-Jul-2019 13:16:43 True build 10-Jul-2019 13:16:43 0.2 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -2696,7 +2697,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 0.2 build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + False build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 1 build 10-Jul-2019 13:16:43 @@ -2712,7 +2713,7 @@ to use the correct direction in which the antenna is pointing with respect to th build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 0.2 build 10-Jul-2019 13:16:43 False build 10-Jul-2019 13:16:43 - False build 10-Jul-2019 13:16:43 + False build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tools/calanalysis/calanalysis_cmpt.cc b/gcwrap/tools/calanalysis/calanalysis_cmpt.cc build 10-Jul-2019 13:16:43 index 6cde3ef..9c67944 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tools/calanalysis/calanalysis_cmpt.cc build 10-Jul-2019 13:16:43 +++ b/gcwrap/tools/calanalysis/calanalysis_cmpt.cc build 10-Jul-2019 13:16:43 @@ -1221,7 +1221,7 @@ Bool calanalysis::parseSPW( const ::casac::variant& spw, build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 oChannel.resize( uiNumSPW ); build 10-Jul-2019 13:16:43 for ( uInt s=0; s( oChannelTemp[s] ); build 10-Jul-2019 13:16:43 + CalAnalysis::unique( oChannelTemp[s], oChannel[s] ); build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 @@ -1303,7 +1303,7 @@ Bool calanalysis::parseFeed( const ::casac::variant& feed, build 10-Jul-2019 13:16:43 delete [] aoFeed; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 oFeed.resize(); build 10-Jul-2019 13:16:43 - oFeed = CalAnalysis::unique( oFeedTemp ); build 10-Jul-2019 13:16:43 + CalAnalysis::unique( oFeedTemp, oFeed ); build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 if ( oFeed.nelements() != 1 && oFeed.nelements() != 2 ) { build 10-Jul-2019 13:16:43 oFeed.resize(); build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tools/plotms/plotms.xml b/gcwrap/tools/plotms/plotms.xml build 10-Jul-2019 13:16:43 index 7ecd2e5..2c35d96 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tools/plotms/plotms.xml build 10-Jul-2019 13:16:43 +++ b/gcwrap/tools/plotms/plotms.xml build 10-Jul-2019 13:16:43 @@ -1435,11 +1435,11 @@ called. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - setShowAtm build 10-Jul-2019 13:16:43 - Whether to overlay the atmospheric curve. build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + setShowCurve build 10-Jul-2019 13:16:43 + Whether to overlay the atm, tsky, and image curves. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 -Request that the atmospheric transmission curve is calculateda and overplotted. build 10-Jul-2019 13:16:43 +Request that the atmospheric or sky temperature transmission curve is calculated and overplotted. Optionally display the image sideband curve. build 10-Jul-2019 13:16:43 If updateImmediately is true, this change takes effect immediately IF the build 10-Jul-2019 13:16:43 plotms window is currently shown; otherwise it will only be applied next time build 10-Jul-2019 13:16:43 update() and/or show() is called. build 10-Jul-2019 13:16:43 @@ -1449,6 +1449,14 @@ update() and/or show() is called. build 10-Jul-2019 13:16:43 whether to plot atm curve build 10-Jul-2019 13:16:43 false build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + whether to plot tsky curve build 10-Jul-2019 13:16:43 + false build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + whether to plot image sideband curve build 10-Jul-2019 13:16:43 + false build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 whether to apply this change immediately, IF the window is currently shown build 10-Jul-2019 13:16:43 true build 10-Jul-2019 13:16:43 @@ -1478,36 +1486,25 @@ update() and/or show() is called. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - setShowTsky build 10-Jul-2019 13:16:43 - Whether to overlay the sky temperature curve. build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 -Request that the sky temperature curve is calculated and overplotted. If build 10-Jul-2019 13:16:43 -updateImmediately is true, this change takes effect immediately IF the plotms build 10-Jul-2019 13:16:43 -window is currently shown; otherwise it will only be applied next time update() build 10-Jul-2019 13:16:43 -and/or show() is called. build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + getShowTsky build 10-Jul-2019 13:16:43 + Get whether tsky curve is overlaid build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - whether to plot tsky curve build 10-Jul-2019 13:16:43 - false build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - whether to apply this change immediately, IF the window is currently shown build 10-Jul-2019 13:16:43 - true build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Index of the plot (0-based). build 10-Jul-2019 13:16:43 0 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + showtsky flag build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - build 10-Jul-2019 13:16:43 - getShowTsky build 10-Jul-2019 13:16:43 - Get whether tsky curve is overlaid build 10-Jul-2019 13:16:43 + build 10-Jul-2019 13:16:43 + getShowImage build 10-Jul-2019 13:16:43 + Get whether image sideband curve is overlaid build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -1517,7 +1514,7 @@ and/or show() is called. build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - showtsky flag build 10-Jul-2019 13:16:43 + showimage flag build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tools/plotms/plotms_cmpt.cc b/gcwrap/tools/plotms/plotms_cmpt.cc build 10-Jul-2019 13:16:43 index 99a796c..b68ef59 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tools/plotms/plotms_cmpt.cc build 10-Jul-2019 13:16:43 +++ b/gcwrap/tools/plotms/plotms_cmpt.cc build 10-Jul-2019 13:16:43 @@ -690,11 +690,13 @@ void plotms::setPlotAxes(const string& xAxis, const string& yAxis, build 10-Jul-2019 13:16:43 PlotMSDBusApp::METHOD_SETPLOTPARAMS, params, /*true*/asyncCall); build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 -void plotms::setShowAtm(const bool showatm, const bool updateImmediately, const int plotIndex) build 10-Jul-2019 13:16:43 +void plotms::setShowCurve(const bool showatm, const bool showtsky, const bool showimage, const bool updateImmediately, const int plotIndex) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 launchApp(); build 10-Jul-2019 13:16:43 Record params; build 10-Jul-2019 13:16:43 params.define(PlotMSDBusApp::PARAM_SHOWATM, showatm); build 10-Jul-2019 13:16:43 + params.define(PlotMSDBusApp::PARAM_SHOWTSKY, showtsky); build 10-Jul-2019 13:16:43 + params.define(PlotMSDBusApp::PARAM_SHOWIMAGE, showimage); build 10-Jul-2019 13:16:43 params.define(PlotMSDBusApp::PARAM_UPDATEIMMEDIATELY, updateImmediately); build 10-Jul-2019 13:16:43 params.define(PlotMSDBusApp::PARAM_PLOTINDEX, plotIndex); build 10-Jul-2019 13:16:43 QtDBusXmlApp::dbusXmlCallNoRet(dbus::FROM_NAME, app.dbusName( ), build 10-Jul-2019 13:16:43 @@ -707,21 +709,16 @@ bool plotms::getShowAtm(const int plotIndex) build 10-Jul-2019 13:16:43 GETSINGLEPLOTBOOL(SHOWATM) build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 -void plotms::setShowTsky(const bool showtsky, const bool updateImmediately, const int plotIndex) build 10-Jul-2019 13:16:43 +bool plotms::getShowTsky(const int plotIndex) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 launchApp(); build 10-Jul-2019 13:16:43 - Record params; build 10-Jul-2019 13:16:43 - params.define(PlotMSDBusApp::PARAM_SHOWTSKY, showtsky); build 10-Jul-2019 13:16:43 - params.define(PlotMSDBusApp::PARAM_UPDATEIMMEDIATELY, updateImmediately); build 10-Jul-2019 13:16:43 - params.define(PlotMSDBusApp::PARAM_PLOTINDEX, plotIndex); build 10-Jul-2019 13:16:43 - QtDBusXmlApp::dbusXmlCallNoRet(dbus::FROM_NAME, app.dbusName( ), build 10-Jul-2019 13:16:43 - PlotMSDBusApp::METHOD_SETPLOTPARAMS, params, /*true*/asyncCall); build 10-Jul-2019 13:16:43 + GETSINGLEPLOTBOOL(SHOWTSKY) build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 -bool plotms::getShowTsky(const int plotIndex) build 10-Jul-2019 13:16:43 +bool plotms::getShowImage(const int plotIndex) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 launchApp(); build 10-Jul-2019 13:16:43 - GETSINGLEPLOTBOOL(SHOWTSKY) build 10-Jul-2019 13:16:43 + GETSINGLEPLOTBOOL(SHOWIMAGE) build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 string plotms::getPlotXAxis(const int plotIndex) build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tools/synthesis/synthesisimager_cmpt.cc b/gcwrap/tools/synthesis/synthesisimager_cmpt.cc build 10-Jul-2019 13:16:43 index e93ca86..90075ba 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tools/synthesis/synthesisimager_cmpt.cc build 10-Jul-2019 13:16:43 +++ b/gcwrap/tools/synthesis/synthesisimager_cmpt.cc build 10-Jul-2019 13:16:43 @@ -245,7 +245,7 @@ bool synthesisimager::defineimage(const casac::record& impars, const casac::reco build 10-Jul-2019 13:16:43 gpars.padding, gpars.useAutoCorr, gpars.useDoublePrec, gpars.wprojplanes, build 10-Jul-2019 13:16:43 gpars.convFunc, ipars.startModel, gpars.aTermOn, build 10-Jul-2019 13:16:43 gpars.psTermOn, gpars.mTermOn, gpars.wbAWP, gpars.cfCache, build 10-Jul-2019 13:16:43 - gpars.doPointing,gpars.doPBCorr,gpars.conjBeams, build 10-Jul-2019 13:16:43 + gpars.usePointing,gpars.doPBCorr,gpars.conjBeams, build 10-Jul-2019 13:16:43 gpars.computePAStep,gpars.rotatePAStep); build 10-Jul-2019 13:16:43 */ build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 @@ -290,7 +290,7 @@ synthesisimager::setimage(const std::string& imagename, build 10-Jul-2019 13:16:43 const bool mterm,// = false, build 10-Jul-2019 13:16:43 const bool wbawp,// = true, build 10-Jul-2019 13:16:43 const std::string& cfcache,// = "", build 10-Jul-2019 13:16:43 - const bool dopointing,// = false, build 10-Jul-2019 13:16:43 + const bool usepointing,// = false, build 10-Jul-2019 13:16:43 const bool dopbcorr,// = true, build 10-Jul-2019 13:16:43 const bool conjbeams,// = false, build 10-Jul-2019 13:16:43 const float computepastep, //=360.0 build 10-Jul-2019 13:16:43 @@ -392,7 +392,7 @@ synthesisimager::setimage(const std::string& imagename, build 10-Jul-2019 13:16:43 ntaylorterms, refFreq, build 10-Jul-2019 13:16:43 imageprojection, cdistance, freqframetype, tracksource, trackDir, overwrite, build 10-Jul-2019 13:16:43 padding, useautocorr, usedoubleprec, wprojplanes, convfunc, startmodel, aterm, build 10-Jul-2019 13:16:43 - psterm, mterm,wbawp, cfcache,dopointing,dopbcorr,conjbeams,computepastep,rotatepastep); build 10-Jul-2019 13:16:43 + psterm, mterm,wbawp, cfcache,usepointing,dopbcorr,conjbeams,computepastep,rotatepastep); build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 catch (AipsError x) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tools/synthesis/vpmanager_cmpt.cc b/gcwrap/tools/synthesis/vpmanager_cmpt.cc build 10-Jul-2019 13:16:43 index 1ff387b..aa7a1b2 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tools/synthesis/vpmanager_cmpt.cc build 10-Jul-2019 13:16:43 +++ b/gcwrap/tools/synthesis/vpmanager_cmpt.cc build 10-Jul-2019 13:16:43 @@ -26,7 +26,7 @@ build 10-Jul-2019 13:16:43 #include build 10-Jul-2019 13:16:43 #include build 10-Jul-2019 13:16:43 #include build 10-Jul-2019 13:16:43 -#include build 10-Jul-2019 13:16:43 +#include build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 using namespace std; build 10-Jul-2019 13:16:43 using namespace casacore; build 10-Jul-2019 13:16:43 diff --git a/gcwrap/tools/tables/tableplot_cmpt.cc b/gcwrap/tools/tables/tableplot_cmpt.cc build 10-Jul-2019 13:16:43 index 2d5ca07..4dd1f94 100644 build 10-Jul-2019 13:16:43 --- a/gcwrap/tools/tables/tableplot_cmpt.cc build 10-Jul-2019 13:16:43 +++ b/gcwrap/tools/tables/tableplot_cmpt.cc build 10-Jul-2019 13:16:43 @@ -149,7 +149,7 @@ tableplot::open(const std::vector& tabnames) build 10-Jul-2019 13:16:43 if(adbg)cout << "nTabs : " << nTabs << endl; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 /* Open tables and attach to internal list */ build 10-Jul-2019 13:16:43 - if(TP->setTableS(TabNames,TabNames,SelStr)==-1) return false; build 10-Jul-2019 13:16:43 + if(! TP->setTableS(TabNames,TabNames,SelStr)) return false; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 /* Record the tables - for use in data selection later on */ build 10-Jul-2019 13:16:43 TABS.resize(0); build 10-Jul-2019 13:16:43 @@ -261,7 +261,7 @@ tableplot::selectdata(const std::string& taqlstring) build 10-Jul-2019 13:16:43 SelStr[i] = selectstring; build 10-Jul-2019 13:16:43 } build 10-Jul-2019 13:16:43 /* Attach selected tables to internal list */ build 10-Jul-2019 13:16:43 - if(TP->setTableT(SelTABS,TabNames,SelStr)==-1) return false; build 10-Jul-2019 13:16:43 + if(! TP->setTableT(SelTABS,TabNames,SelStr)) return false; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 } catch (AipsError x) { build 10-Jul-2019 13:16:43 *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 10-Jul-2019 13:16:43 @@ -387,7 +387,7 @@ tableplot::iterplotstart(const ::casac::record& poption, const std::vector0)cout<< Errors[1] <0){cout<<"ERRORS :"<iterMultiPlotStart(pop,temptaqlvector,tempiteraxes)==-1) build 10-Jul-2019 13:16:43 + if(! TP->iterMultiPlotStart(pop,temptaqlvector,tempiteraxes)) build 10-Jul-2019 13:16:43 return false; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 TP->changeGuiButtonState("iternext","enabled"); build 10-Jul-2019 13:16:43 @@ -452,7 +452,7 @@ tableplot::markregions(const int nrows, const int ncols, const int panel,const s build 10-Jul-2019 13:16:43 for(Int i=0;i<(Int)region.size();i++) build 10-Jul-2019 13:16:43 regionvec[i] = (Double)region[i]; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 - if(TP->markRegions(nrows,ncols,panel,regionvec) == -1) return false; build 10-Jul-2019 13:16:43 + if(! TP->markRegions(nrows,ncols,panel,regionvec)) return false; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 } catch (AipsError x) { build 10-Jul-2019 13:16:43 *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 10-Jul-2019 13:16:43 @@ -530,7 +530,7 @@ tableplot::clearplot(const int nrows, const int ncols, const int panel) build 10-Jul-2019 13:16:43 { build 10-Jul-2019 13:16:43 if(adbg)cout << " Clear Plot " << endl; build 10-Jul-2019 13:16:43 try { build 10-Jul-2019 13:16:43 - if(TP->clearPlot(nrows,ncols,panel) == -1) return false; build 10-Jul-2019 13:16:43 + if(! TP->clearPlot(nrows,ncols,panel)) return false; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 } catch (AipsError x) { build 10-Jul-2019 13:16:43 *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Comparison returned: 1 build 10-Jul-2019 13:16:43 Checkout: git checkout ARD-25-fix error 10-Jul-2019 13:16:43 Already on 'ARD-25-fix' build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 [git, tag, -a, test-ARD-25-fix-6, -m 'Automatic tag'] build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Done tagging test-ARD-25-fix-6 build 10-Jul-2019 13:16:43 Pushing test-ARD-25-fix-6 to origin error 10-Jul-2019 13:16:43 To ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git error 10-Jul-2019 13:16:43 * [new tag] test-ARD-25-fix-6 -> test-ARD-25-fix-6 build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Pushed test-ARD-25-fix-6 to origin build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 BUILD SUCCESSFUL build 10-Jul-2019 13:16:43 build 10-Jul-2019 13:16:43 Total time: 9.075 secs simple 10-Jul-2019 13:16:44 Finished task 'Script' with result: Success simple 10-Jul-2019 13:16:44 Running post build plugin 'Docker Container Cleanup' simple 10-Jul-2019 13:16:44 Running post build plugin 'NCover Results Collector' simple 10-Jul-2019 13:16:44 Running post build plugin 'Clover Results Collector' simple 10-Jul-2019 13:16:44 Running post build plugin 'npm Cache Cleanup' simple 10-Jul-2019 13:16:44 Running post build plugin 'Artifact Copier' simple 10-Jul-2019 13:16:44 Finalising the build... simple 10-Jul-2019 13:16:44 Stopping timer. simple 10-Jul-2019 13:16:44 Build ARD-BPT22-TBFP-6 completed. simple 10-Jul-2019 13:16:44 Running on server: post build plugin 'NCover Results Collector' simple 10-Jul-2019 13:16:44 Running on server: post build plugin 'Build Hanging Detection Configuration' simple 10-Jul-2019 13:16:44 Running on server: post build plugin 'Clover Delta Calculator' simple 10-Jul-2019 13:16:44 Running on server: post build plugin 'Maven Dependencies Postprocessor' simple 10-Jul-2019 13:16:44 All post build plugins have finished simple 10-Jul-2019 13:16:44 Generating build results summary... simple 10-Jul-2019 13:16:44 Saving build results to disk... simple 10-Jul-2019 13:16:44 Logging substituted variables... simple 10-Jul-2019 13:16:44 Indexing build results... simple 10-Jul-2019 13:16:44 Finished building ARD-BPT22-TBFP-6.