simple 12-Apr-2018 16:00:41 Build ARD - Build And Package - ARD-3 - Tag Branch for Packages #3 (ARD-BPT4-TBFP-3) started building on agent cbt-el7-4.cv.nrao.edu simple 12-Apr-2018 16:00:41 Remote agent on host cbt-el7-4.cv.nrao.edu simple 12-Apr-2018 16:00:41 Build working directory is /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP simple 12-Apr-2018 16:00:41 Executing build ARD - Build And Package - ARD-3 - Tag Branch for Packages #3 (ARD-BPT4-TBFP-3) simple 12-Apr-2018 16:00:41 Skipping execution of task 'Checkout Default Repository' as it is disabled simple 12-Apr-2018 16:00:41 Running pre-build action: VCS Version Collector simple 12-Apr-2018 16:00:41 Skipping execution of task 'Checkout Default Repository' as it is disabled command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.repository.branch.name} with ARD-3 command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.buildNumber} with 3 command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.planRepository.revision} with 786b1dc3ae141cae7d76e110084b53cedfee67ec command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.build.working.directory} with /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.repository.branch.name} with ARD-3 command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.build.working.directory} with /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.repository.branch.name} with ARD-3 command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.build.working.directory} with /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP command 12-Apr-2018 16:00:41 Substituting variable: ${bamboo.planRepository.repositoryUrl} with ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git simple 12-Apr-2018 16:00:41 Starting task 'Script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' command 12-Apr-2018 16:00:41 Beginning to execute external process for build 'ARD - Build And Package - ARD-3 - Tag Branch for Packages #3 (ARD-BPT4-TBFP-3)'\n ... running command line: \n/bin/sh /export/home/cbt-el7-4/bamboohome/temp/ARD-BPT4-TBFP-3-ScriptBuildTask-5841081200418782166.sh\n ... in: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP\n ... using extra environment variables: \nbamboo_planRepository_1_branch=ARD-3\nbamboo_capability_buildmachinetype=build\nbamboo_repository_20939039_git_branch=ARD-3\nbamboo_planRepository_2_branch=master\nbamboo_planRepository_1_branchDisplayName=ARD-3\nbamboo_repository_revision_number=786b1dc3ae141cae7d76e110084b53cedfee67ec\nbamboo_repository_20938876_previous_revision_number=cae615125a909fc8aad6647c1835c4236132ab22\nbamboo_resultsUrl=https://open-bamboo.nrao.edu/browse/ARD-BPT4-TBFP-3\nbamboo_repository_20938876_git_username=\nbamboo_planRepository_1_name=OPEN-CASA-FULL\nbamboo_build_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP\nbamboo_buildKey=ARD-BPT4-TBFP\nbamboo_shortPlanName=ARD-3\nbamboo_capability_hostname=cbt-el7-4.cv.nrao.edu\nbamboo_repository_20939039_name=OPEN-CASA-FULL\nbamboo_planRepository_2_username=\nbamboo_planRepository_name=OPEN-CASA-FULL\nbamboo_buildNumber=3\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-BPT4-TBFP-3\nbamboo_planRepository_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_agentId=6160386\nbamboo_planName=ARD - Build And Package - ARD-3\nbamboo_shortPlanKey=BPT4\nbamboo_shortJobKey=TBFP\nbamboo_planRepository_2_name=OPEN-CASA-PKG\nbamboo_planRepository_revision=786b1dc3ae141cae7d76e110084b53cedfee67ec\nbamboo_repository_previous_revision_number=c669673519db4c2774a2be1dc091690b9870b5db\nbamboo_buildTimeStamp=2018-04-12T16:00:40.931-04:00\nbamboo_casaadm_password=********\nbamboo_planRepository_previousRevision=c669673519db4c2774a2be1dc091690b9870b5db\nbamboo_repository_20938876_git_branch=master\nbamboo_repository_20938876_branch_name=master\nbamboo_repository_20938876_name=OPEN-CASA-PKG\nbamboo_repository_20939039_previous_revision_number=c669673519db4c2774a2be1dc091690b9870b5db\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_buildResultKey=ARD-BPT4-TBFP-3\nbamboo_repository_git_branch=ARD-3\nbamboo_repository_branch_name=ARD-3\nbamboo_buildPlanName=ARD - Build And Package - ARD-3 - Tag Branch for Packages\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_planRepository_1_revision=786b1dc3ae141cae7d76e110084b53cedfee67ec\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=cae615125a909fc8aad6647c1835c4236132ab22\nbamboo_dependenciesDisabled=false\nbamboo_buildFailed=false\nbamboo_capability_isCIMachine=true\nbamboo_planRepository_branch=ARD-3\nbamboo_agentWorkingDirectory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir\nbamboo_planRepository_2_revision=de293f6de3d7409f904a575ef3a9e4a11736ad0c\nbamboo_capability_system_git_executable=/bin/git\nbamboo_planRepository_1_previousRevision=c669673519db4c2774a2be1dc091690b9870b5db\nbamboo_capability_tag=true\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_repository_git_username=\nbamboo_capability_operating_system=EL7\nbamboo_planRepository_branchDisplayName=ARD-3\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_repository_20939039_revision_number=786b1dc3ae141cae7d76e110084b53cedfee67ec\nbamboo_planRepository_1_type=bbserver\nbamboo_planRepository_branchName=ARD-3\nbamboo_capability_project=CASA\nbamboo_planRepository_2_type=bbserver\nbamboo_repository_20939039_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_repository_20938876_revision_number=de293f6de3d7409f904a575ef3a9e4a11736ad0c\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-20744168\nbamboo_planRepository_2_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa-pkg.git\nbamboo_planRepository_type=bbserver\nbamboo_planRepository_1_username=\nbamboo_ManualBuildTriggerReason_userName=sbhatnag\nbamboo_repository_20939039_branch_name=ARD-3\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_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP\nbamboo_planKey=ARD-BPT4\nbamboo_planRepository_1_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git\nbamboo_planRepository_username=\nbamboo_repository_20939039_git_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_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-3\n build 12-Apr-2018 16:00:41 3 build 12-Apr-2018 16:00:41 786b1dc3ae141cae7d76e110084b53cedfee67ec build 12-Apr-2018 16:00:41 ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git build 12-Apr-2018 16:00:41 Fetching origin error 12-Apr-2018 16:00:43 From https://open-bitbucket.nrao.edu/scm/casa/casa-pkg error 12-Apr-2018 16:00:43 cae6151..de293f6 master -> origin/master build 12-Apr-2018 16:00:43 Updating cae6151..de293f6 build 12-Apr-2018 16:00:43 Fast-forward build 12-Apr-2018 16:00:43 .../main/groovy/edu/nrao/pullrequestparser/Pullrequestparser2.groovy | 2 +- build 12-Apr-2018 16:00:43 1 file changed, 1 insertion(+), 1 deletion(-) build 12-Apr-2018 16:00:44 Starting a Gradle Daemon (subsequent builds will be faster) build 12-Apr-2018 16:00:47 :compileJava UP-TO-DATE build 12-Apr-2018 16:00:48 :compileGroovy UP-TO-DATE build 12-Apr-2018 16:00:48 :processResources UP-TO-DATE build 12-Apr-2018 16:00:48 :classes UP-TO-DATE build 12-Apr-2018 16:00:48 :jar UP-TO-DATE build 12-Apr-2018 16:00:48 :compileTestJava UP-TO-DATE build 12-Apr-2018 16:00:49 :compileTestGroovy UP-TO-DATE build 12-Apr-2018 16:00:49 :processTestResources UP-TO-DATE build 12-Apr-2018 16:00:49 :testClasses UP-TO-DATE build 12-Apr-2018 16:00:49 :test UP-TO-DATE build 12-Apr-2018 16:00:50 :uploadArchives build 12-Apr-2018 16:00:50 build 12-Apr-2018 16:00:50 BUILD SUCCESSFUL build 12-Apr-2018 16:00:50 build 12-Apr-2018 16:00:50 Total time: 6.966 secs build 12-Apr-2018 16:00:53 :createTag build 12-Apr-2018 16:00:53 workdir: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP/taggitworkdir build 12-Apr-2018 16:00:53 sourcedir: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP/taggitworkdir/casa build 12-Apr-2018 16:00:53 gitremote: ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git build 12-Apr-2018 16:00:53 branch: ARD-3 build 12-Apr-2018 16:00:53 Push option: true error 12-Apr-2018 16:00:54 Switched to branch 'master' build 12-Apr-2018 16:00:54 build 12-Apr-2018 16:00:54 Fetching origin error 12-Apr-2018 16:00:56 From ssh://open-bitbucket.nrao.edu:7999/casa/casa error 12-Apr-2018 16:00:56 de2f103..d3eb427 master -> origin/master error 12-Apr-2018 16:00:56 038bb19..f5dca2a ARD-2 -> origin/ARD-2 error 12-Apr-2018 16:00:56 c669673..786b1dc ARD-3 -> origin/ARD-3 error 12-Apr-2018 16:00:56 * [new branch] CAS-10550 -> origin/CAS-10550 error 12-Apr-2018 16:00:56 d1c64a6..379ecd6 CAS-11135 -> origin/CAS-11135 error 12-Apr-2018 16:00:56 * [new branch] CAS-11216 -> origin/CAS-11216 error 12-Apr-2018 16:00:56 * [new branch] CAS-11254 -> origin/CAS-11254 error 12-Apr-2018 16:00:56 * [new branch] CAS-11259 -> origin/CAS-11259 error 12-Apr-2018 16:00:56 * [new branch] CAS-11262 -> origin/CAS-11262 error 12-Apr-2018 16:00:56 * [new branch] CAS-11287 -> origin/CAS-11287 error 12-Apr-2018 16:00:56 * [new branch] CAS-11290 -> origin/CAS-11290 error 12-Apr-2018 16:00:56 * [new branch] CAS-11292 -> origin/CAS-11292 error 12-Apr-2018 16:00:56 * [new branch] CAS-11293 -> origin/CAS-11293 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-10263 -> origin/bugfix/CAS-10263 error 12-Apr-2018 16:00:56 8d28432..85312f7 bugfix/CAS-10326 -> origin/bugfix/CAS-10326 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-10487 -> origin/bugfix/CAS-10487 error 12-Apr-2018 16:00:56 6374343..c5d127e bugfix/CAS-10530 -> origin/bugfix/CAS-10530 error 12-Apr-2018 16:00:56 32280e3..a6ebd7a bugfix/CAS-10584 -> origin/bugfix/CAS-10584 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-10937 -> origin/bugfix/CAS-10937 error 12-Apr-2018 16:00:56 1b7883f..55ae610 bugfix/CAS-10941 -> origin/bugfix/CAS-10941 error 12-Apr-2018 16:00:56 5efd142..0b0fb21 bugfix/CAS-11059 -> origin/bugfix/CAS-11059 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11129 -> origin/bugfix/CAS-11129 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11139 -> origin/bugfix/CAS-11139 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11183 -> origin/bugfix/CAS-11183 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11224 -> origin/bugfix/CAS-11224 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11233 -> origin/bugfix/CAS-11233 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11247 -> origin/bugfix/CAS-11247 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11265 -> origin/bugfix/CAS-11265 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11269 -> origin/bugfix/CAS-11269 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11272 -> origin/bugfix/CAS-11272 error 12-Apr-2018 16:00:56 * [new branch] bugfix/CAS-11288 -> origin/bugfix/CAS-11288 error 12-Apr-2018 16:00:56 99ece2e..7e3a389 feature/CAS-10013 -> origin/feature/CAS-10013 error 12-Apr-2018 16:00:56 2f833af..3e6773a feature/CAS-10060 -> origin/feature/CAS-10060 error 12-Apr-2018 16:00:56 6f91cbd..ce4c354 feature/CAS-10516 -> origin/feature/CAS-10516 error 12-Apr-2018 16:00:56 38cfb0f..503523a feature/CAS-10648 -> origin/feature/CAS-10648 error 12-Apr-2018 16:00:56 ce5f325..a58efbf feature/CAS-10684 -> origin/feature/CAS-10684 error 12-Apr-2018 16:00:56 3d8e93e..43c558c feature/CAS-10693 -> origin/feature/CAS-10693 error 12-Apr-2018 16:00:56 bd6de2a..d3b8786 feature/CAS-10768 -> origin/feature/CAS-10768 error 12-Apr-2018 16:00:56 755ec80..31acdf0 feature/CAS-11058 -> origin/feature/CAS-11058 error 12-Apr-2018 16:00:56 87e3aa6..4cf37ee feature/CAS-11177 -> origin/feature/CAS-11177 error 12-Apr-2018 16:00:56 ae1147f..62162ba feature/CAS-5808 -> origin/feature/CAS-5808 error 12-Apr-2018 16:00:56 1b85c01..7bf2f92 feature/CAS-8556 -> origin/feature/CAS-8556 error 12-Apr-2018 16:00:56 5fef635..db7466b feature/CAS-9089 -> origin/feature/CAS-9089 error 12-Apr-2018 16:00:56 * [new tag] 5.0.0-196-bugfix-CAS-10263-3 -> 5.0.0-196-bugfix-CAS-10263-3 error 12-Apr-2018 16:00:56 * [new tag] 5.1.0-52-feature-CAS-10013-2 -> 5.1.0-52-feature-CAS-10013-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-bugfix-CAS-11224-2 -> 5.3.0-100-bugfix-CAS-11224-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-feature-CAS-10060-1 -> 5.3.0-100-feature-CAS-10060-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-102-test-CAS-11259-3 -> 5.3.0-102-test-CAS-11259-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11265-2 -> 5.3.0-103-bugfix-CAS-11265-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11269-1 -> 5.3.0-103-bugfix-CAS-11269-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11272-4 -> 5.3.0-103-bugfix-CAS-11272-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-105-test-CAS-10550-1 -> 5.3.0-105-test-CAS-10550-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-106-bugfix-CAS-10487-1 -> 5.3.0-106-bugfix-CAS-10487-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-106-bugfix-CAS-11288-1 -> 5.3.0-106-bugfix-CAS-11288-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-106-test-CAS-11287-1 -> 5.3.0-106-test-CAS-11287-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-106-test-CAS-11290-1 -> 5.3.0-106-test-CAS-11290-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-107-bugfix-CAS-10937-2 -> 5.3.0-107-bugfix-CAS-10937-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-19-feature-CAS-10768-4 -> 5.3.0-19-feature-CAS-10768-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-3-feature-CAS-10648-4 -> 5.3.0-3-feature-CAS-10648-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-52-bugfix-CAS-10530-4 -> 5.3.0-52-bugfix-CAS-10530-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-52-bugfix-CAS-10941-2 -> 5.3.0-52-bugfix-CAS-10941-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-60-feature-CAS-10516-2 -> 5.3.0-60-feature-CAS-10516-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-62-bugfix-CAS-10383-3 -> 5.3.0-62-bugfix-CAS-10383-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-63-feature-CAS-8556-7 -> 5.3.0-63-feature-CAS-8556-7 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-64-bugfix-CAS-11059-2 -> 5.3.0-64-bugfix-CAS-11059-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-7-feature-CAS-10684-21 -> 5.3.0-7-feature-CAS-10684-21 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-73-feature-CAS-5808-2 -> 5.3.0-73-feature-CAS-5808-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-76-bugfix-CAS-10584-4 -> 5.3.0-76-bugfix-CAS-10584-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-79-feature-CAS-11058-5 -> 5.3.0-79-feature-CAS-11058-5 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-88-test-CAS-11135-1 -> 5.3.0-88-test-CAS-11135-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-97-feature-CAS-11177-1 -> 5.3.0-97-feature-CAS-11177-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-99-bugfix-CAS-11183-2 -> 5.3.0-99-bugfix-CAS-11183-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-101 -> 5.3.0-mas-101 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-103 -> 5.3.0-mas-103 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-105 -> 5.3.0-mas-105 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-96 -> 5.3.0-mas-96 error 12-Apr-2018 16:00:56 From ssh://open-bitbucket.nrao.edu:7999/casa/casa error 12-Apr-2018 16:00:56 * [new tag] 5.0.0-196-bugfix-CAS-10263-2 -> 5.0.0-196-bugfix-CAS-10263-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-bugfix-CAS-11224-1 -> 5.3.0-100-bugfix-CAS-11224-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11037-1 -> 5.3.0-100-test-CAS-11037-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11037-2 -> 5.3.0-100-test-CAS-11037-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11232-1 -> 5.3.0-100-test-CAS-11232-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11232-2 -> 5.3.0-100-test-CAS-11232-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11232-3 -> 5.3.0-100-test-CAS-11232-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11238-1 -> 5.3.0-100-test-CAS-11238-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11239-1 -> 5.3.0-100-test-CAS-11239-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-100-test-CAS-11241-1 -> 5.3.0-100-test-CAS-11241-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-102-test-CAS-11259-1 -> 5.3.0-102-test-CAS-11259-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-102-test-CAS-11259-2 -> 5.3.0-102-test-CAS-11259-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11263-1 -> 5.3.0-103-bugfix-CAS-11263-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11265-1 -> 5.3.0-103-bugfix-CAS-11265-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11272-1 -> 5.3.0-103-bugfix-CAS-11272-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11272-2 -> 5.3.0-103-bugfix-CAS-11272-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-bugfix-CAS-11272-3 -> 5.3.0-103-bugfix-CAS-11272-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-103-test-CAS-11274-1 -> 5.3.0-103-test-CAS-11274-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-105-test-CAS-11275-1 -> 5.3.0-105-test-CAS-11275-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-105-test-CAS-11275-2 -> 5.3.0-105-test-CAS-11275-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-107-bugfix-CAS-10937-1 -> 5.3.0-107-bugfix-CAS-10937-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-27-feature-CAS-10758-21 -> 5.3.0-27-feature-CAS-10758-21 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-40-feature-CAS-10880-8 -> 5.3.0-40-feature-CAS-10880-8 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-45-feature-CAS-10386-5 -> 5.3.0-45-feature-CAS-10386-5 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-52-bugfix-CAS-10530-3 -> 5.3.0-52-bugfix-CAS-10530-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-58-feature-CAS-4922-6 -> 5.3.0-58-feature-CAS-4922-6 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-58-feature-CAS-4922-7 -> 5.3.0-58-feature-CAS-4922-7 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-58-feature-CAS-9004-10 -> 5.3.0-58-feature-CAS-9004-10 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-58-feature-CAS-9004-9 -> 5.3.0-58-feature-CAS-9004-9 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-63-feature-CAS-8556-5 -> 5.3.0-63-feature-CAS-8556-5 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-63-feature-CAS-8556-6 -> 5.3.0-63-feature-CAS-8556-6 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-64-feature-CAS-10977-7 -> 5.3.0-64-feature-CAS-10977-7 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-7-feature-CAS-10684-20 -> 5.3.0-7-feature-CAS-10684-20 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-79-feature-CAS-11058-4 -> 5.3.0-79-feature-CAS-11058-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-80-feature-CAS-10787-2 -> 5.3.0-80-feature-CAS-10787-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-80-feature-CAS-10787-3 -> 5.3.0-80-feature-CAS-10787-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-83-feature-CAS-10138-4 -> 5.3.0-83-feature-CAS-10138-4 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-83-feature-CAS-10138-5 -> 5.3.0-83-feature-CAS-10138-5 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-83-feature-CAS-10138-6 -> 5.3.0-83-feature-CAS-10138-6 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-83-feature-CAS-10138-7 -> 5.3.0-83-feature-CAS-10138-7 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-83-feature-CAS-10138-8 -> 5.3.0-83-feature-CAS-10138-8 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-90-feature-CAS-11195-11 -> 5.3.0-90-feature-CAS-11195-11 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-90-feature-CAS-11195-12 -> 5.3.0-90-feature-CAS-11195-12 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-90-feature-CAS-11195-13 -> 5.3.0-90-feature-CAS-11195-13 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-91-test-CAS-426-2 -> 5.3.0-91-test-CAS-426-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-95-feature-CAS-11001-1 -> 5.3.0-95-feature-CAS-11001-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-95-feature-CAS-11001-2 -> 5.3.0-95-feature-CAS-11001-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-95-test-CAS-6081-1 -> 5.3.0-95-test-CAS-6081-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-97-bugfix-CAS-11230-1 -> 5.3.0-97-bugfix-CAS-11230-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-97-bugfix-CAS-11230-2 -> 5.3.0-97-bugfix-CAS-11230-2 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-97-bugfix-CAS-11230-3 -> 5.3.0-97-bugfix-CAS-11230-3 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-97-test-CAS-11228-1 -> 5.3.0-97-test-CAS-11228-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-99-bugfix-CAS-11183-1 -> 5.3.0-99-bugfix-CAS-11183-1 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-100 -> 5.3.0-mas-100 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-102 -> 5.3.0-mas-102 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-104 -> 5.3.0-mas-104 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-106 -> 5.3.0-mas-106 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-107 -> 5.3.0-mas-107 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-97 -> 5.3.0-mas-97 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-98 -> 5.3.0-mas-98 error 12-Apr-2018 16:00:56 * [new tag] 5.3.0-mas-99 -> 5.3.0-mas-99 build 12-Apr-2018 16:00:56 Updating de2f103..d3eb427 build 12-Apr-2018 16:00:56 Fast-forward build 12-Apr-2018 16:00:56 casacore | 2 +- build 12-Apr-2018 16:00:56 code/CMakeLists.txt | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/ASDM.cc | 150 + build 12-Apr-2018 16:00:56 code/alma/ASDM/ASDM.h | 28 + build 12-Apr-2018 16:00:56 code/alma/ASDM/ASDMEntities.h | 8 + build 12-Apr-2018 16:00:56 code/alma/ASDM/AlmaRadiometerTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/AnnotationTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAmpliTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAntennaSolutionsRow.cc | 3198 ++++++++++++++++++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAntennaSolutionsRow.h | 1365 +++++++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAntennaSolutionsTable.cc | 1323 ++++++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAntennaSolutionsTable.h | 762 +++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAppPhaseTable.h | 14 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalAtmosphereTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalBandpassRow.cc | 1660 +++++++++- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalBandpassRow.h | 427 +++ build 12-Apr-2018 16:00:56 code/alma/ASDM/CalBandpassTable.cc | 37 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalBandpassTable.h | 71 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalCurveTable.h | 8 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalDataTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalDelayTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalDeviceTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalFluxTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalFocusModelTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalFocusTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalHolographyTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalPhaseTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalPointingModelTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalPointingTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalPositionTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalPrimaryBeamTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalReductionTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalSeeingTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CalWVRTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/ConfigDescriptionTable.h | 10 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/CorrelatorModeTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/DataDescriptionRow.cc | 142 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/DataDescriptionRow.h | 50 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/DataDescriptionTable.cc | 7 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/DataDescriptionTable.h | 10 + build 12-Apr-2018 16:00:56 code/alma/ASDM/DelayModelTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/EphemerisTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/ExecBlockTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/FeedTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/FieldTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/FlagRow.cc | 407 +++ build 12-Apr-2018 16:00:56 code/alma/ASDM/FlagRow.h | 122 + build 12-Apr-2018 16:00:56 code/alma/ASDM/FlagTable.cc | 12 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/FlagTable.h | 31 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/FocusModelTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/GainTrackingTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/HolographyTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/MainTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/Merger.cc | 90 + build 12-Apr-2018 16:00:56 code/alma/ASDM/Merger.h | 20 + build 12-Apr-2018 16:00:56 code/alma/ASDM/PointingModelTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/PointingTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/PolarizationTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/PulsarRow.cc | 2300 ++++++++++++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/PulsarRow.h | 1004 ++++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/PulsarTable.cc | 1195 ++++++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/PulsarTable.h | 615 ++++ build 12-Apr-2018 16:00:56 code/alma/ASDM/ReceiverTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SBSummaryTable.h | 8 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/ScanTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SeeingTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SourceTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SpectralWindowTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SquareLawDetectorTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SubscanTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SwitchCycleTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SysCalTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/SysPowerTable.h | 2 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/TagType.cc | 12 + build 12-Apr-2018 16:00:56 code/alma/ASDM/TagType.h | 15 + build 12-Apr-2018 16:00:56 code/alma/ASDM/WVMCalTable.h | 6 +- build 12-Apr-2018 16:00:56 code/alma/ASDM/WeatherTable.h | 4 +- build 12-Apr-2018 16:00:56 code/alma/CMakeLists.txt | 4 + build 12-Apr-2018 16:00:56 code/alma/apps/asdm2MS/ASDMTables.cc | 503 +++ build 12-Apr-2018 16:00:56 code/alma/apps/asdm2MS/ASDMTables.h | 26 + build 12-Apr-2018 16:00:56 code/alma/apps/asdm2MS/Name2Table.cc | 4 + build 12-Apr-2018 16:00:56 code/alma/apps/asdm2MS/bdflags2MS.cc | 140 +- build 12-Apr-2018 16:00:56 code/casaqt/QwtPlotter/QPCanvas.cc | 53 +- build 12-Apr-2018 16:00:56 code/casaqt/QwtPlotter/QPCanvas.qo.h | 4 +- build 12-Apr-2018 16:00:56 code/casaqt/QwtPlotter/QPCanvasHelpers.cc | 14 +- build 12-Apr-2018 16:00:56 code/casaqt/QwtPlotter/QPExporter.cc | 18 +- build 12-Apr-2018 16:00:56 code/casaqt/QwtPlotter/QPPlotter.cc | 75 +- build 12-Apr-2018 16:00:56 code/casaqt/QwtPlotter/QPPlotter.qo.h | 18 +- build 12-Apr-2018 16:00:56 code/casatools/Proc/Registrar.cc | 20 +- build 12-Apr-2018 16:00:56 code/components/ComponentModels/C11Timer.cc | 4 + build 12-Apr-2018 16:00:56 code/components/ComponentModels/DiskShape.cc | 7 +- build 12-Apr-2018 16:00:56 .../ComponentModels/FluxCalc_SS_JPL_Butler.cc | 19 +- build 12-Apr-2018 16:00:56 code/components/ComponentModels/FluxStdSrcs.cc | 6 +- build 12-Apr-2018 16:00:56 code/components/ComponentModels/FluxStdsQS2.cc | 11 +- build 12-Apr-2018 16:00:56 .../test/EphemObjFluxStandard_GTest.cc | 10 +- build 12-Apr-2018 16:00:56 .../ComponentModels/test/FluxStandard2_GTest.cc | 11 +- build 12-Apr-2018 16:00:56 .../ComponentModels/test/tFluxStandard2.cc | 13 +- build 12-Apr-2018 16:00:56 .../ComponentModels/test/tFluxStandard3.cc | 13 +- build 12-Apr-2018 16:00:56 code/display/QtViewer/QtDBusViewerAdaptor.cc | 9 +- build 12-Apr-2018 16:00:56 code/display/QtViewer/QtDisplayData.cc | 10 + build 12-Apr-2018 16:00:56 code/display/QtViewer/QtDisplayData.qo.h | 3 + build 12-Apr-2018 16:00:56 code/flagging/Flagging/AgentFlagger.cc | 8 + build 12-Apr-2018 16:00:56 code/flagging/Flagging/AgentFlagger.h | 4 + build 12-Apr-2018 16:00:56 code/flagging/Flagging/FlagAgentBase.cc | 4 + build 12-Apr-2018 16:00:56 code/graphics/GenericPlotter/Plotter.cc | 2 +- build 12-Apr-2018 16:00:56 .../ImageAnalysis/ImageMomentsTask.tcc | 4 +- build 12-Apr-2018 16:00:56 code/imageanalysis/ImageAnalysis/ImagePolProxy.cc | 55 +- build 12-Apr-2018 16:00:56 .../ImageAnalysis/ImagePolarimetry.cc | 741 +++-- build 12-Apr-2018 16:00:56 code/imageanalysis/ImageAnalysis/MomentClip.tcc | 1 - build 12-Apr-2018 16:00:56 code/imageanalysis/ImageAnalysis/MomentWindow.tcc | 1 - build 12-Apr-2018 16:00:56 code/mstransform/TVI/StatWtTVI.cc | 31 +- build 12-Apr-2018 16:00:56 code/mstransform/TVI/StatWtTVI.h | 4 +- build 12-Apr-2018 16:00:56 code/msvis/MSVis/MSUtil.cc | 2 + build 12-Apr-2018 16:00:56 code/msvis/MSVis/VisBufferUtil.cc | 153 +- build 12-Apr-2018 16:00:56 code/msvis/MSVis/VisBufferUtil.h | 6 + build 12-Apr-2018 16:00:56 code/plotms/Plots/PlotMSPlot.cc | 237 +- build 12-Apr-2018 16:00:56 code/plotms/Plots/PlotMSPlot.h | 8 +- build 12-Apr-2018 16:00:56 code/spectrallines/Splatalogue/SearcherFactory.cc | 19 +- build 12-Apr-2018 16:00:56 code/stdcasa/StdCasa/CrashReporter.cc | 9 + build 12-Apr-2018 16:00:56 code/synthesis/CMakeLists.txt | 3 + build 12-Apr-2018 16:00:56 code/synthesis/CalTables/CLPatchPanel.cc | 201 +- build 12-Apr-2018 16:00:56 code/synthesis/CalTables/CLPatchPanel.h | 18 +- build 12-Apr-2018 16:00:56 code/synthesis/CalTables/CTDesc.cc | 2 + build 12-Apr-2018 16:00:56 code/synthesis/CalTables/CTTimeInterp1.cc | 35 +- build 12-Apr-2018 16:00:56 code/synthesis/CalTables/NewCalTable.cc | 9 + build 12-Apr-2018 16:00:56 code/synthesis/CalTables/NewCalTable.h | 3 + build 12-Apr-2018 16:00:56 code/synthesis/CalTables/test/tCTTimeInterp1.cc | 41 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/InteractiveMasking.h | 11 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/IterationControl.h | 27 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SDMaskHandler.cc | 668 +++- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SDMaskHandler.h | 66 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SIIterBot.cc | 2 + build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SIMapper.cc | 12 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SIMapper.h | 2 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SIMapperCollection.cc | 4 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SIMapperCollection.h | 2 +- build 12-Apr-2018 16:00:56 .../ImagerObjects/SIMinorCycleController.cc | 11 + build 12-Apr-2018 16:00:56 .../ImagerObjects/SIMinorCycleController.h | 4 +- build 12-Apr-2018 16:00:56 .../ImagerObjects/SynthesisDeconvolver.cc | 22 +- build 12-Apr-2018 16:00:56 .../synthesis/ImagerObjects/SynthesisDeconvolver.h | 8 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SynthesisImager.cc | 15 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SynthesisImager.h | 4 + build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SynthesisImagerVi2.cc | 86 +- build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/SynthesisImagerVi2.h | 4 + build 12-Apr-2018 16:00:56 .../ImagerObjects/SynthesisUtilMethods.cc | 30 + build 12-Apr-2018 16:00:56 .../synthesis/ImagerObjects/SynthesisUtilMethods.h | 3 + build 12-Apr-2018 16:00:56 .../ImagerObjects/test/SDMaskHandler_GTest.cc | 16 +- build 12-Apr-2018 16:00:56 .../ImagerObjects/test/tBinaryDilation.cc | 129 + build 12-Apr-2018 16:00:56 .../test/tLabelandFindRegionsFullCube.cc | 154 + build 12-Apr-2018 16:00:56 code/synthesis/ImagerObjects/test/tSkipChannels.cc | 117 + build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/Calibrater.cc | 80 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/Calibrater.h | 6 +- build 12-Apr-2018 16:00:56 .../MeasurementComponents/CalibratingVi2.cc | 2 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/EJones.cc | 19 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/EJones.h | 6 - build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/KJones.cc | 235 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/KJones.h | 36 +- build 12-Apr-2018 16:00:56 .../MeasurementComponents/SDDoubleCircleGainCal.cc | 1 + build 12-Apr-2018 16:00:56 .../MeasurementComponents/SingleDishSkyCal.cc | 1 + build 12-Apr-2018 16:00:56 .../MeasurementComponents/SolvableVisCal.cc | 129 +- build 12-Apr-2018 16:00:56 .../MeasurementComponents/SolvableVisCal.h | 10 + build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/VisCal.cc | 20 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementComponents/VisCal.h | 10 + build 12-Apr-2018 16:00:56 .../MeasurementComponents/test/tKJones_GT.cc | 177 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementEquations/Feather.cc | 2 + build 12-Apr-2018 16:00:56 code/synthesis/MeasurementEquations/Imager.cc | 60 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementEquations/Imager.h | 5 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementEquations/Imager2.cc | 2 + build 12-Apr-2018 16:00:56 code/synthesis/MeasurementEquations/VisEquation.cc | 24 +- build 12-Apr-2018 16:00:56 code/synthesis/MeasurementEquations/VisEquation.h | 8 + build 12-Apr-2018 16:00:56 code/synthesis/TransformMachines2/FTMachine.cc | 157 +- build 12-Apr-2018 16:00:56 code/synthesis/TransformMachines2/FTMachine.h | 6 +- build 12-Apr-2018 16:00:56 .../TransformMachines2/HetArrayConvFunc.cc | 9 +- build 12-Apr-2018 16:00:56 .../TransformMachines2/HetArrayConvFunc.h | 5 +- build 12-Apr-2018 16:00:56 code/synthesis/TransformMachines2/MosaicFT.cc | 24 +- build 12-Apr-2018 16:00:56 .../TransformMachines2/SimplePBConvFunc.cc | 26 +- build 12-Apr-2018 16:00:56 .../TransformMachines2/SimplePBConvFunc.h | 4 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/ialib.py | 11 +- build 12-Apr-2018 16:00:56 .../scripts/imagerhelpers/input_parameters.py | 6 +- build 12-Apr-2018 16:00:56 .../python/scripts/recipes/pixelmask2cleanmask.py | 8 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/regressions/admin/runTest.py | 497 ++- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/task_applycal.py | 7 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/task_plotants.py | 123 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/task_tclean.py | 8 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/CMakeLists.txt | 1 + build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_flagdata.py | 98 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_flagmanager.py | 2 - build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_imcollapse.py | 10 + build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_immoments.py | 18 + build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_importasdm.py | 116 + build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_mstool.py | 34 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_plotms.py | 26 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_refimager.py | 20 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_setjy.py | 27 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_statwt2.py | 4 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/test_tsdcal.py | 4 +- build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/uTest_Template.dat | 159 + build 12-Apr-2018 16:00:56 gcwrap/python/scripts/tests/uTest_list.json | 456 +-- build 12-Apr-2018 16:00:56 gcwrap/tasks/asdmsummary.xml | 6 +- build 12-Apr-2018 16:00:56 gcwrap/tasks/immoments.xml | 4 +- build 12-Apr-2018 16:00:56 gcwrap/tasks/plotms.xml | 8 +- build 12-Apr-2018 16:00:56 gcwrap/tasks/slsearch.xml | 2 +- build 12-Apr-2018 16:00:56 gcwrap/tasks/tclean.xml | 47 +- build 12-Apr-2018 16:00:56 gcwrap/tools/images/image_cmpt.cc | 158 +- build 12-Apr-2018 16:00:56 gcwrap/tools/images/image_private.h | 7 +- build 12-Apr-2018 16:00:56 gcwrap/tools/images/imagepol_cmpt.cc | 79 +- build 12-Apr-2018 16:00:56 gcwrap/tools/measures/measures_cmpt.cc | 11 +- build 12-Apr-2018 16:00:56 gcwrap/tools/ms/ms.xml | 36 +- build 12-Apr-2018 16:00:56 gcwrap/tools/ms/ms_cmpt.cc | 54 +- build 12-Apr-2018 16:00:56 gcwrap/tools/ms/ms_private.h | 1 + build 12-Apr-2018 16:00:56 gcwrap/tools/plotms/plotms.xml | 4 +- build 12-Apr-2018 16:00:56 gcwrap/tools/synthesis/calibrater.xml | 29 + build 12-Apr-2018 16:00:56 gcwrap/tools/synthesis/calibrater_cmpt.cc | 41 + build 12-Apr-2018 16:00:56 gcwrap/tools/synthesis/synthesisimager_cmpt.cc | 46 +- build 12-Apr-2018 16:00:56 gcwrap/tools/synthesis/synthesisimager_private.h | 2 +- build 12-Apr-2018 16:00:56 215 files changed, 20462 insertions(+), 2032 deletions(-) build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/CalAntennaSolutionsRow.cc build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/CalAntennaSolutionsRow.h build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/CalAntennaSolutionsTable.cc build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/CalAntennaSolutionsTable.h build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/PulsarRow.cc build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/PulsarRow.h build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/PulsarTable.cc build 12-Apr-2018 16:00:56 create mode 100644 code/alma/ASDM/PulsarTable.h build 12-Apr-2018 16:00:56 create mode 100644 code/synthesis/ImagerObjects/test/tBinaryDilation.cc build 12-Apr-2018 16:00:56 create mode 100644 code/synthesis/ImagerObjects/test/tLabelandFindRegionsFullCube.cc build 12-Apr-2018 16:00:56 create mode 100644 code/synthesis/ImagerObjects/test/tSkipChannels.cc build 12-Apr-2018 16:00:56 create mode 100644 gcwrap/python/scripts/tests/uTest_Template.dat build 12-Apr-2018 16:00:56 build 12-Apr-2018 16:00:56 edu.nrao.gradle.casa.build.GitRepository@6619c8f4 build 12-Apr-2018 16:00:56 getLastTag called with build 12-Apr-2018 16:00:56 branch: ARD-3 build 12-Apr-2018 16:00:56 env: [bamboo_planRepository_1_branch=ARD-3, PATH=/bin:/usr/bin:/bin, bamboo_planRepository_2_branch=master, bamboo_repository_revision_number=786b1dc3ae141cae7d76e110084b53cedfee67ec, bamboo_planRepository_1_branchDisplayName=ARD-3, bamboo_repository_20938876_previous_revision_number=cae615125a909fc8aad6647c1835c4236132ab22, bamboo_repository_20938876_git_username=, WRAPPER_BITS=32, bamboo_buildKey=ARD-BPT4-TBFP, bamboo_repository_20939039_name=OPEN-CASA-FULL, PWD=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-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-BPT4-TBFP-3, bamboo_planRepository_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, bamboo_agentId=6160386, bamboo_planRepository_revision=786b1dc3ae141cae7d76e110084b53cedfee67ec, bamboo_casaadm_password=********, bamboo_planRepository_previousRevision=c669673519db4c2774a2be1dc091690b9870b5db, bamboo_repository_20938876_git_branch=master, bamboo_repository_20938876_name=OPEN-CASA-PKG, bamboo_repository_20939039_previous_revision_number=c669673519db4c2774a2be1dc091690b9870b5db, 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-3, 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, 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-3, 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_repository_20939039_revision_number=786b1dc3ae141cae7d76e110084b53cedfee67ec, bamboo_planRepository_branchName=ARD-3, bamboo_planRepository_1_type=bbserver, WRAPPER_FILE_SEPARATOR=/, bamboo_repository_20938876_revision_number=de293f6de3d7409f904a575ef3a9e4a11736ad0c, bamboo_repository_20939039_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, 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_planRepository_type=bbserver, bamboo_planRepository_1_username=, bamboo_ManualBuildTriggerReason_userName=sbhatnag, bamboo_repository_20939039_branch_name=ARD-3, bamboo_planRepository_2_branchName=master, bamboo_capability_system_builder_ant_Ant=/usr, bamboo_planKey=ARD-BPT4, bamboo_planRepository_username=, 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-3, bamboo_repository_20939039_git_branch=ARD-3, bamboo_capability_buildmachinetype=build, bamboo_resultsUrl=https://open-bamboo.nrao.edu/browse/ARD-BPT4-TBFP-3, bamboo_build_working_directory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP, bamboo_planRepository_1_name=OPEN-CASA-FULL, bamboo_shortPlanName=ARD-3, bamboo_capability_hostname=cbt-el7-4.cv.nrao.edu, bamboo_planRepository_2_username=, bamboo_planRepository_name=OPEN-CASA-FULL, LOGNAME=casaci, bamboo_buildNumber=3, SHELL=/bin/sh, bamboo_planName=ARD - Build And Package - ARD-3, bamboo_shortPlanKey=BPT4, OLDPWD=/usr/lib/jvm/gradle-3.2.1, bamboo_shortJobKey=TBFP, bamboo_planRepository_2_name=OPEN-CASA-PKG, bamboo_repository_previous_revision_number=c669673519db4c2774a2be1dc091690b9870b5db, bamboo_buildTimeStamp=2018-04-12T16:00:40.931-04:00, bamboo_repository_20938876_branch_name=master, bamboo_buildResultKey=ARD-BPT4-TBFP-3, bamboo_repository_git_branch=ARD-3, 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-3 - Tag Branch for Packages, bamboo_planRepository_1_revision=786b1dc3ae141cae7d76e110084b53cedfee67ec, bamboo_capability_system_hg_executable=/bin/hg, bamboo_repository_name=OPEN-CASA-PKG, bamboo_planRepository_2_previousRevision=cae615125a909fc8aad6647c1835c4236132ab22, LANG=en_US.UTF-8, bamboo_buildFailed=false, bamboo_agentWorkingDirectory=/export/home/cbt-el7-4/bamboohome/xml-data/build-dir, bamboo_capability_system_git_executable=/bin/git, bamboo_planRepository_2_revision=de293f6de3d7409f904a575ef3a9e4a11736ad0c, 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=c669673519db4c2774a2be1dc091690b9870b5db, bamboo_repository_git_username=, bamboo_capability_operating_system=EL7, bamboo_planRepository_branchDisplayName=ARD-3, bamboo_capability_project=CASA, bamboo_planRepository_2_type=bbserver, bamboo_plan_storageTag=plan-20744168, 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-BPT4-TBFP, bamboo_planRepository_1_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git, bamboo_repository_20939039_git_username=, 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_20938876_git_repositoryUrl=ssh://git@open-bitbucket.nrao.edu:7999/casa/casa-pkg.git, XDG_RUNTIME_DIR=/run/user/9285, HOME=/users/casaci] build 12-Apr-2018 16:00:56 sourceDir: /export/home/cbt-el7-4/bamboohome/xml-data/build-dir/ARD-BPT4-TBFP/taggitworkdir/casa build 12-Apr-2018 16:00:56 Resolving CAS-/feature/bugfix tag build 12-Apr-2018 16:00:56 Branch parts: [ARD-3] build 12-Apr-2018 16:00:56 Checking for an existing tag for the branch build 12-Apr-2018 16:00:56 tagGrep: grep test-ARD-3 build 12-Apr-2018 16:00:56 java.lang.UNIXProcess@49eced97 | java.lang.UNIXProcess@5bfc762e | java.lang.UNIXProcess@1fc01031 | java.lang.UNIXProcess@1f7aeac1 build 12-Apr-2018 16:00:56 Checking out ARD-3 error 12-Apr-2018 16:00:57 Switched to branch 'ARD-3' build 12-Apr-2018 16:00:57 Your branch is behind 'origin/ARD-3' by 380 commits, and can be fast-forwarded. build 12-Apr-2018 16:00:57 (use "git pull" to update your local branch) build 12-Apr-2018 16:00:57 build 12-Apr-2018 16:00:57 Updating ARD-3 build 12-Apr-2018 16:00:57 Updating c669673..786b1dc build 12-Apr-2018 16:00:57 Fast-forward build 12-Apr-2018 16:00:58 casacore | 2 +- build 12-Apr-2018 16:00:58 code/alma/apps/asdm2MS/asdm2MS.cc | 466 ++++++++---- build 12-Apr-2018 16:00:58 code/alma/apps/asdm2MS/bdflags2MS.cc | 160 ++-- build 12-Apr-2018 16:00:58 code/casaqt/QwtPlotter/QPCanvas.cc | 53 +- build 12-Apr-2018 16:00:58 code/casaqt/QwtPlotter/QPCanvas.qo.h | 4 +- build 12-Apr-2018 16:00:58 code/casaqt/QwtPlotter/QPCanvasHelpers.cc | 14 +- build 12-Apr-2018 16:00:58 code/casaqt/QwtPlotter/QPExporter.cc | 18 +- build 12-Apr-2018 16:00:58 code/casaqt/QwtPlotter/QPPlotter.cc | 75 +- build 12-Apr-2018 16:00:58 code/casaqt/QwtPlotter/QPPlotter.qo.h | 18 +- build 12-Apr-2018 16:00:58 code/casatools/Proc/Registrar.cc | 20 +- build 12-Apr-2018 16:00:58 code/components/ComponentModels/C11Timer.cc | 4 + build 12-Apr-2018 16:00:58 code/display/QtViewer/QtDBusViewerAdaptor.cc | 9 +- build 12-Apr-2018 16:00:58 code/display/QtViewer/QtDisplayData.cc | 10 + build 12-Apr-2018 16:00:58 code/display/QtViewer/QtDisplayData.qo.h | 3 + build 12-Apr-2018 16:00:58 code/flagging/Flagging/AgentFlagger.cc | 8 + build 12-Apr-2018 16:00:58 code/flagging/Flagging/AgentFlagger.h | 4 + build 12-Apr-2018 16:00:58 code/flagging/Flagging/FlagAgentBase.cc | 4 + build 12-Apr-2018 16:00:58 code/graphics/GenericPlotter/Plotter.cc | 2 +- build 12-Apr-2018 16:00:58 .../imageanalysis/ImageAnalysis/ImageCollapser2.cc | 4 +- build 12-Apr-2018 16:00:58 code/imageanalysis/ImageAnalysis/ImageFactory2.cc | 20 +- build 12-Apr-2018 16:00:58 .../ImageAnalysis/ImageMomentsTask.tcc | 4 +- build 12-Apr-2018 16:00:58 code/imageanalysis/ImageAnalysis/ImagePolProxy.cc | 55 +- build 12-Apr-2018 16:00:58 .../ImageAnalysis/ImagePolarimetry.cc | 741 +++++++++---------- build 12-Apr-2018 16:00:58 code/imageanalysis/ImageAnalysis/ImageRotator.cc | 2 - build 12-Apr-2018 16:00:58 code/imageanalysis/ImageAnalysis/ImageRotator.h | 4 +- build 12-Apr-2018 16:00:58 .../ImageAnalysis/ImageStatsCalculator.cc | 121 ++- build 12-Apr-2018 16:00:58 .../ImageAnalysis/ImageStatsCalculator.h | 9 +- build 12-Apr-2018 16:00:58 .../ImageAnalysis/ImageStatsConfigurator.cc | 15 + build 12-Apr-2018 16:00:58 .../ImageAnalysis/ImageStatsConfigurator.h | 27 +- build 12-Apr-2018 16:00:58 .../LinearPolarizationAngleCalculator.cc | 8 +- build 12-Apr-2018 16:00:58 code/imageanalysis/ImageAnalysis/MomentClip.tcc | 1 - build 12-Apr-2018 16:00:58 code/imageanalysis/ImageAnalysis/MomentWindow.tcc | 1 - build 12-Apr-2018 16:00:58 .../ImageAnalysis/StatImageCreator.cc | 2 +- build 12-Apr-2018 16:00:58 code/imageanalysis/ImageTypedefs.h | 3 - build 12-Apr-2018 16:00:58 code/install/BreakpadInstall.cmake | 18 +- build 12-Apr-2018 16:00:58 .../MSTransform/MSTransformDataHandler.cc | 17 +- build 12-Apr-2018 16:00:58 code/mstransform/MSTransform/MSTransformManager.cc | 5 +- build 12-Apr-2018 16:00:58 code/mstransform/TVI/StatWtTVI.cc | 31 +- build 12-Apr-2018 16:00:58 code/mstransform/TVI/StatWtTVI.h | 4 +- build 12-Apr-2018 16:00:58 code/msvis/MSVis/VisBufferUtil.cc | 153 +++- build 12-Apr-2018 16:00:58 code/msvis/MSVis/VisBufferUtil.h | 6 + build 12-Apr-2018 16:00:58 code/plotms/Actions/ActionSummary.cc | 95 ++- build 12-Apr-2018 16:00:58 code/plotms/Actions/ActionSummary.h | 2 + build 12-Apr-2018 16:00:58 code/plotms/Actions/ActionSummaryDialog.cc | 5 +- build 12-Apr-2018 16:00:58 code/plotms/Data/CalCache.cc | 660 +++++++++-------- build 12-Apr-2018 16:00:58 code/plotms/Data/MSCacheVolMeter.cc | 2 + build 12-Apr-2018 16:00:58 code/plotms/Data/PlotMSAtm.cc | 25 +- build 12-Apr-2018 16:00:58 code/plotms/Data/PlotMSCacheBase.cc | 6 + build 12-Apr-2018 16:00:58 code/plotms/Data/PlotMSCacheBase.h | 4 + build 12-Apr-2018 16:00:58 code/plotms/Data/PlotMSIndexer.cc | 17 +- build 12-Apr-2018 16:00:58 code/plotms/Gui/PlotMSSummaryDialog.cc | 29 +- build 12-Apr-2018 16:00:58 code/plotms/Gui/PlotMSSummaryDialog.qo.h | 4 + build 12-Apr-2018 16:00:58 code/plotms/PlotMS/PlotMSConstants.cc | 3 +- build 12-Apr-2018 16:00:58 code/plotms/PlotMS/PlotMSConstants.h | 45 +- build 12-Apr-2018 16:00:58 code/plotms/Plots/PlotMSPlot.cc | 267 ++++--- build 12-Apr-2018 16:00:58 code/plotms/Plots/PlotMSPlot.h | 8 +- build 12-Apr-2018 16:00:58 code/plotms/Plots/PlotMSPlotParameterGroups.cc | 6 +- build 12-Apr-2018 16:00:58 code/plotms/Threads/Gui/PlotMSCacheThread.cc | 4 +- build 12-Apr-2018 16:00:58 code/singledish/SingleDish/SingleDishMS.cc | 34 +- build 12-Apr-2018 16:00:58 .../singledishfiller/Filler/SingleDishMSFiller.tcc | 2 + build 12-Apr-2018 16:00:58 code/stdcasa/StdCasa/CrashReporter.cc | 9 + build 12-Apr-2018 16:00:58 code/synthesis/CMakeLists.txt | 11 +- build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CLPatchPanel.cc | 213 ++++-- build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CLPatchPanel.h | 18 +- build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTDesc.cc | 2 + build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTIter.cc | 4 + build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTIter.h | 4 + build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTPatchedInterp.cc | 12 + build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTSummary.cc | 821 +++++++++++++++++++++ build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTSummary.h | 159 ++++ build 12-Apr-2018 16:00:58 code/synthesis/CalTables/CTTimeInterp1.cc | 35 +- build 12-Apr-2018 16:00:58 code/synthesis/CalTables/NewCalTable.cc | 9 + build 12-Apr-2018 16:00:58 code/synthesis/CalTables/NewCalTable.h | 3 + build 12-Apr-2018 16:00:58 code/synthesis/CalTables/test/tCTTimeInterp1.cc | 41 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/InteractiveMasking.h | 11 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/IterationControl.h | 27 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SDMaskHandler.cc | 668 +++++++++++++---- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SDMaskHandler.h | 66 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SIIterBot.cc | 2 + build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SIMapper.cc | 12 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SIMapper.h | 2 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SIMapperCollection.cc | 4 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SIMapperCollection.h | 2 +- build 12-Apr-2018 16:00:58 .../ImagerObjects/SIMinorCycleController.cc | 11 + build 12-Apr-2018 16:00:58 .../ImagerObjects/SIMinorCycleController.h | 4 +- build 12-Apr-2018 16:00:58 .../ImagerObjects/SynthesisDeconvolver.cc | 22 +- build 12-Apr-2018 16:00:58 .../synthesis/ImagerObjects/SynthesisDeconvolver.h | 8 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SynthesisImager.cc | 15 +- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SynthesisImager.h | 4 + build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SynthesisImagerVi2.cc | 93 ++- build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/SynthesisImagerVi2.h | 4 + build 12-Apr-2018 16:00:58 .../ImagerObjects/SynthesisUtilMethods.cc | 30 + build 12-Apr-2018 16:00:58 .../synthesis/ImagerObjects/SynthesisUtilMethods.h | 3 + build 12-Apr-2018 16:00:58 .../ImagerObjects/test/SDMaskHandler_GTest.cc | 16 +- build 12-Apr-2018 16:00:58 .../ImagerObjects/test/tBinaryDilation.cc | 129 ++++ build 12-Apr-2018 16:00:58 .../test/tLabelandFindRegionsFullCube.cc | 154 ++++ build 12-Apr-2018 16:00:58 code/synthesis/ImagerObjects/test/tSkipChannels.cc | 117 +++ build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/Calibrater.cc | 80 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/Calibrater.h | 6 +- build 12-Apr-2018 16:00:58 .../MeasurementComponents/CalibratingVi2.cc | 2 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/EJones.cc | 19 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/EJones.h | 6 - build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/KJones.cc | 235 +++++- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/KJones.h | 36 +- build 12-Apr-2018 16:00:58 .../MeasurementComponents/SDDoubleCircleGainCal.cc | 1 + build 12-Apr-2018 16:00:58 .../MeasurementComponents/SingleDishSkyCal.cc | 1 + build 12-Apr-2018 16:00:58 .../MeasurementComponents/SolvableVisCal.cc | 129 +++- build 12-Apr-2018 16:00:58 .../MeasurementComponents/SolvableVisCal.h | 10 + build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/VisCal.cc | 20 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementComponents/VisCal.h | 10 + build 12-Apr-2018 16:00:58 .../MeasurementComponents/VisCalGlobals.cc | 60 +- build 12-Apr-2018 16:00:58 .../MeasurementComponents/test/tKJones_GT.cc | 177 ++++- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementEquations/Feather.cc | 2 + build 12-Apr-2018 16:00:58 code/synthesis/MeasurementEquations/Imager.cc | 60 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementEquations/Imager.h | 5 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementEquations/Imager2.cc | 2 + build 12-Apr-2018 16:00:58 code/synthesis/MeasurementEquations/VisEquation.cc | 24 +- build 12-Apr-2018 16:00:58 code/synthesis/MeasurementEquations/VisEquation.h | 8 + build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines/CFCell.h | 3 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/AWConvFunc.cc | 171 +++-- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/AWProjectFT.cc | 45 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/AWProjectWBFT.cc | 604 ++++++++------- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/AWProjectWBFT.h | 21 +- build 12-Apr-2018 16:00:58 .../synthesis/TransformMachines2/AWVisResampler.cc | 5 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/CFStore2.cc | 6 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/FTMachine.cc | 157 +++- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/FTMachine.h | 6 +- build 12-Apr-2018 16:00:58 .../TransformMachines2/FortranizedLoopsToGrid.cc | 4 +- build 12-Apr-2018 16:00:58 .../TransformMachines2/HetArrayConvFunc.cc | 9 +- build 12-Apr-2018 16:00:58 .../TransformMachines2/HetArrayConvFunc.h | 5 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/MosaicFT.cc | 24 +- build 12-Apr-2018 16:00:58 .../TransformMachines2/SimplePBConvFunc.cc | 26 +- build 12-Apr-2018 16:00:58 .../TransformMachines2/SimplePBConvFunc.h | 4 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/VisModelData.cc | 66 +- build 12-Apr-2018 16:00:58 code/synthesis/TransformMachines2/VisModelData.h | 4 +- build 12-Apr-2018 16:00:58 .../TransformMachines2/VisibilityResamplerBase.cc | 2 +- build 12-Apr-2018 16:00:58 gcwrap/python/CMakeLists.txt | 1 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/casa.py | 1 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/ialib.py | 28 + build 12-Apr-2018 16:00:58 .../scripts/imagerhelpers/input_parameters.py | 6 +- build 12-Apr-2018 16:00:58 .../python/scripts/recipes/pixelmask2cleanmask.py | 8 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/regressions/admin/runTest.py | 497 ++++++++++--- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_applycal.py | 7 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_immoments.py | 24 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_imregrid.py | 8 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_imsmooth.py | 25 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_imstat.py | 4 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_imtrans.py | 19 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_imview.py | 2 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_oldplotants.py | 56 ++ build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_plotants.py | 397 ++++++++-- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_plotms.py | 1 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_rmfit.py | 13 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_specfit.py | 42 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_tclean.py | 8 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/task_tsdimaging.py | 2 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/CMakeLists.txt | 1 + build 12-Apr-2018 16:00:58 .../python/scripts/tests/test_FirstLook_Imaging.py | 263 ++++--- build 12-Apr-2018 16:00:58 .../scripts/tests/test_FirstLook_LineImaging.py | 40 +- build 12-Apr-2018 16:00:58 .../tests/test_FirstLook_SelfCalibration.py | 129 ++-- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_flagdata.py | 98 ++- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_flagmanager.py | 2 - build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_imcollapse.py | 10 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_immoments.py | 18 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_importasdm.py | 314 +++++++- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_imsmooth.py | 28 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_imstat.py | 26 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_imtrans.py | 23 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_mstool.py | 34 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_mstransform.py | 39 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_plotants.py | 74 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_plotms.py | 35 +- build 12-Apr-2018 16:00:58 .../scripts/tests/test_po_rotationmeasure.py | 8 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_refimager.py | 20 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_setjy.py | 27 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_specfit.py | 9 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_statwt2.py | 4 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_tsdcal.py | 12 +- build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/test_tsdimaging.py | 11 + build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/uTest_Template.dat | 159 ++++ build 12-Apr-2018 16:00:58 gcwrap/python/scripts/tests/uTest_list.json | 456 ++++++------ build 12-Apr-2018 16:00:58 gcwrap/tasks/CMakeLists.txt | 1 + build 12-Apr-2018 16:00:58 gcwrap/tasks/immoments.xml | 4 +- build 12-Apr-2018 16:00:58 gcwrap/tasks/imstat.xml | 12 +- build 12-Apr-2018 16:00:58 gcwrap/tasks/oldplotants.xml | 59 ++ build 12-Apr-2018 16:00:58 gcwrap/tasks/plotants.xml | 68 +- build 12-Apr-2018 16:00:58 gcwrap/tasks/plotms.xml | 65 +- build 12-Apr-2018 16:00:58 gcwrap/tasks/slsearch.xml | 2 +- build 12-Apr-2018 16:00:58 gcwrap/tasks/tclean.xml | 47 +- build 12-Apr-2018 16:00:58 gcwrap/tools/images/coordsys_cmpt.cc | 128 ++-- build 12-Apr-2018 16:00:58 gcwrap/tools/images/image.xml | 98 ++- build 12-Apr-2018 16:00:58 gcwrap/tools/images/image_cmpt.cc | 15 +- build 12-Apr-2018 16:00:58 gcwrap/tools/images/imagepol_cmpt.cc | 79 +- build 12-Apr-2018 16:00:58 gcwrap/tools/measures/measures_cmpt.cc | 11 +- build 12-Apr-2018 16:00:58 gcwrap/tools/ms/ms.xml | 36 +- build 12-Apr-2018 16:00:58 gcwrap/tools/ms/ms_cmpt.cc | 54 +- build 12-Apr-2018 16:00:58 gcwrap/tools/ms/ms_private.h | 1 + build 12-Apr-2018 16:00:58 gcwrap/tools/mstransformer/mstransformer_cmpt.cc | 14 +- build 12-Apr-2018 16:00:58 gcwrap/tools/plotms/plotms.xml | 4 +- build 12-Apr-2018 16:00:58 gcwrap/tools/synthesis/CalTables/PlotCal.h | 3 +- build 12-Apr-2018 16:00:58 gcwrap/tools/synthesis/calibrater.xml | 29 + build 12-Apr-2018 16:00:58 gcwrap/tools/synthesis/calibrater_cmpt.cc | 41 + build 12-Apr-2018 16:00:58 gcwrap/tools/synthesis/synthesisimager_cmpt.cc | 46 +- build 12-Apr-2018 16:00:58 gcwrap/tools/synthesis/synthesisimager_private.h | 2 +- build 12-Apr-2018 16:00:58 204 files changed, 8884 insertions(+), 3067 deletions(-) build 12-Apr-2018 16:00:58 create mode 100644 code/synthesis/CalTables/CTSummary.cc build 12-Apr-2018 16:00:58 create mode 100644 code/synthesis/CalTables/CTSummary.h build 12-Apr-2018 16:00:58 create mode 100644 code/synthesis/ImagerObjects/test/tBinaryDilation.cc build 12-Apr-2018 16:00:58 create mode 100644 code/synthesis/ImagerObjects/test/tLabelandFindRegionsFullCube.cc build 12-Apr-2018 16:00:58 create mode 100644 code/synthesis/ImagerObjects/test/tSkipChannels.cc build 12-Apr-2018 16:00:58 create mode 100644 gcwrap/python/scripts/task_oldplotants.py build 12-Apr-2018 16:00:58 create mode 100644 gcwrap/python/scripts/tests/uTest_Template.dat build 12-Apr-2018 16:00:58 create mode 100644 gcwrap/tasks/oldplotants.xml build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Constructing a new tag based on 5.3.0-84-test-ARD-3-2 build 12-Apr-2018 16:00:58 Branch: ARD-3 build 12-Apr-2018 16:00:58 ARD- detected build 12-Apr-2018 16:00:58 Prefix: 5.3.0-84-test-ARD-3 build 12-Apr-2018 16:00:58 5.3.0-84-test-ARD-3-3 build 12-Apr-2018 16:00:58 Last tag: 5.3.0-84-test-ARD-3-2 build 12-Apr-2018 16:00:58 Branch: ARD-3 build 12-Apr-2018 16:00:58 Comparing tag to branch with: git diff --exit-code 5.3.0-84-test-ARD-3-2 ARD-3 build 12-Apr-2018 16:00:58 diff --git a/casacore b/casacore build 12-Apr-2018 16:00:58 index e684938..2f2c1fd 160000 build 12-Apr-2018 16:00:58 --- a/casacore build 12-Apr-2018 16:00:58 +++ b/casacore build 12-Apr-2018 16:00:58 @@ -1 +1 @@ build 12-Apr-2018 16:00:58 -Subproject commit e6849387b20e21c985a0c51aebfbd897937e0014 build 12-Apr-2018 16:00:58 +Subproject commit 2f2c1fdbaac330999ea3dd49f1b9f333b00126c8 build 12-Apr-2018 16:00:58 diff --git a/code/alma/apps/asdm2MS/asdm2MS.cc b/code/alma/apps/asdm2MS/asdm2MS.cc build 12-Apr-2018 16:00:58 index 1f3ff5e..0004482 100644 build 12-Apr-2018 16:00:58 --- a/code/alma/apps/asdm2MS/asdm2MS.cc build 12-Apr-2018 16:00:58 +++ b/code/alma/apps/asdm2MS/asdm2MS.cc build 12-Apr-2018 16:00:58 @@ -59,8 +59,7 @@ using namespace casacore; build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include "CBasebandName.h" build 12-Apr-2018 16:00:58 #include "CCalibrationDevice.h" build 12-Apr-2018 16:00:58 @@ -1189,7 +1188,6 @@ void solveTridiagonalSystem(unsigned int n, build 12-Apr-2018 16:00:58 for (int i = n-2; i >=0; i--) { build 12-Apr-2018 16:00:58 x[i] = dprime[i] - cprime[i] * x[i+1]; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - cout << endl; build 12-Apr-2018 16:00:58 LOGEXIT("solveTridiagonalSystem"); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -2566,7 +2564,8 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 ASDM* ds_p, build 12-Apr-2018 16:00:58 std::map >& selected_eb_scan_m, build 12-Apr-2018 16:00:58 std::map& effectiveBwPerDD_m, build 12-Apr-2018 16:00:58 - Enum e_query_cm) { build 12-Apr-2018 16:00:58 + Enum e_query_cm, build 12-Apr-2018 16:00:58 + bool checkDupInts) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 LOGENTER("fillMainLazily"); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -2697,8 +2696,14 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 uInt lastMSNUrows = 0; build 12-Apr-2018 16:00:58 uInt lastMSNCrows = 0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // used in checking for duplicate integrations in the WVR (Radiometer) case build 12-Apr-2018 16:00:58 + // This holds the most recent last integration time for each configDescriptionId - but only for Radiometer data. build 12-Apr-2018 16:00:58 + map lastTimeMap; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 try { build 12-Apr-2018 16:00:58 - for (vector::iterator iter=mRCU_s_v.begin(); iter!=mRCU_s_v.end(); iter++) { build 12-Apr-2018 16:00:58 + unsigned int mainRowIndex; build 12-Apr-2018 16:00:58 + vector::iterator iter; build 12-Apr-2018 16:00:58 + for (iter=mRCU_s_v.begin(), mainRowIndex=0; iter!=mRCU_s_v.end(); iter++, mainRowIndex++) { build 12-Apr-2018 16:00:58 MainRow* mR_p = iter->mR_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 SDMDataObjectStreamReader sdosr; build 12-Apr-2018 16:00:58 @@ -2936,6 +2941,18 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 int64_t startTime = (int64_t)sdmDataSubset.time() - (int64_t)sdmDataSubset.interval()/2LL + deltaTime/2LL; build 12-Apr-2018 16:00:58 double interval = deltaTime / 1000000000.0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // should the first integration be skipped? Any actual skipping happens later. build 12-Apr-2018 16:00:58 + bool skipFirstIntegration = checkDupInts && lastTimeMap[mR_p->getConfigDescriptionId()] == ArrayTime(startTime).getMJD(); build 12-Apr-2018 16:00:58 + if (debug && skipFirstIntegration) { build 12-Apr-2018 16:00:58 + cout << "Duplicate time seen in Row : " << mainRowIndex build 12-Apr-2018 16:00:58 + << " cdId : " << mR_p->getConfigDescriptionId() build 12-Apr-2018 16:00:58 + << " " << mR_p->getDataUID().getEntityId().toString() build 12-Apr-2018 16:00:58 + << " numTime : " << sdosr.numTime() build 12-Apr-2018 16:00:58 + << " num MS rows : " << dataDescriptionIds.size()*sdosr.numTime()*antennaIds.size() build 12-Apr-2018 16:00:58 + << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + lastTimeMap[mR_p->getConfigDescriptionId()] = ArrayTime(startTime+(sdosr.numTime()-1)*deltaTime).getMJD(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for (unsigned int iDD = 0; iDD < dataDescriptionIds.size(); iDD++) { build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Prepare a pair to transport the shape of some cells build 12-Apr-2018 16:00:58 @@ -2951,6 +2968,7 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 double sigma = 1./sqrt(weight); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 for (unsigned int itime = 0; itime < sdosr.numTime(); itime++) { build 12-Apr-2018 16:00:58 + if (skipFirstIntegration && itime==0) continue; build 12-Apr-2018 16:00:58 for (unsigned int iA = 0; iA < antennaIds.size(); iA++) { build 12-Apr-2018 16:00:58 antenna1_vv[iDD].push_back(antennaIds[iA].getTagValue()); build 12-Apr-2018 16:00:58 antenna2_vv[iDD].push_back(antennaIds[iA].getTagValue()); build 12-Apr-2018 16:00:58 @@ -2998,7 +3016,7 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // If we have uncorrected data (which is in practice always the case I think) and want to output those then populate the asdmindex of uncorrected data MS. build 12-Apr-2018 16:00:58 if (iter->uncorrected and produceUncorrected) build 12-Apr-2018 16:00:58 bdf2AsdmStManIndexU.dumpAutoCross(); build 12-Apr-2018 16:00:58 @@ -3013,32 +3031,36 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 for (map::iterator msfIter = msFillers.begin(); build 12-Apr-2018 16:00:58 msfIter != msFillers.end(); build 12-Apr-2018 16:00:58 ++msfIter) { build 12-Apr-2018 16:00:58 - msfIter->second->addData(true, // Yes ! these are complex data. build 12-Apr-2018 16:00:58 - time_vv[iDD], build 12-Apr-2018 16:00:58 - antenna1_vv[iDD], build 12-Apr-2018 16:00:58 - antenna2_vv[iDD], build 12-Apr-2018 16:00:58 - feed1_vv[iDD], build 12-Apr-2018 16:00:58 - feed2_vv[iDD], build 12-Apr-2018 16:00:58 - dataDescId_vv[iDD], build 12-Apr-2018 16:00:58 - processorId, build 12-Apr-2018 16:00:58 - fieldId, build 12-Apr-2018 16:00:58 - interval_vv[iDD], build 12-Apr-2018 16:00:58 - exposure_vv[iDD], build 12-Apr-2018 16:00:58 - timeCentroid_vv[iDD], build 12-Apr-2018 16:00:58 - scanNumber, build 12-Apr-2018 16:00:58 - arrayId, build 12-Apr-2018 16:00:58 - observationId, build 12-Apr-2018 16:00:58 - stateId_vv[iDD], build 12-Apr-2018 16:00:58 - nChanNPol_vv[iDD], build 12-Apr-2018 16:00:58 - uvw_vv[iDD], build 12-Apr-2018 16:00:58 - weight_vv[iDD], build 12-Apr-2018 16:00:58 - sigma_vv[iDD]); build 12-Apr-2018 16:00:58 + if (time_vv[iDD].size() > 0) { build 12-Apr-2018 16:00:58 + msfIter->second->addData(true, // Yes ! these are complex data. build 12-Apr-2018 16:00:58 + time_vv[iDD], build 12-Apr-2018 16:00:58 + antenna1_vv[iDD], build 12-Apr-2018 16:00:58 + antenna2_vv[iDD], build 12-Apr-2018 16:00:58 + feed1_vv[iDD], build 12-Apr-2018 16:00:58 + feed2_vv[iDD], build 12-Apr-2018 16:00:58 + dataDescId_vv[iDD], build 12-Apr-2018 16:00:58 + processorId, build 12-Apr-2018 16:00:58 + fieldId, build 12-Apr-2018 16:00:58 + interval_vv[iDD], build 12-Apr-2018 16:00:58 + exposure_vv[iDD], build 12-Apr-2018 16:00:58 + timeCentroid_vv[iDD], build 12-Apr-2018 16:00:58 + scanNumber, build 12-Apr-2018 16:00:58 + arrayId, build 12-Apr-2018 16:00:58 + observationId, build 12-Apr-2018 16:00:58 + stateId_vv[iDD], build 12-Apr-2018 16:00:58 + nChanNPol_vv[iDD], build 12-Apr-2018 16:00:58 + uvw_vv[iDD], build 12-Apr-2018 16:00:58 + weight_vv[iDD], build 12-Apr-2018 16:00:58 + sigma_vv[iDD]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 else if (!sdosr.hasPackedData() && (processorType == CORRELATOR || processorType == RADIOMETER)) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // duplicate time skipping is not supported here build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Declare some containers required to populate the columns of the MS MAIN table in a non lazy way. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -3299,7 +3321,7 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 msfIter != msFillers.end(); build 12-Apr-2018 16:00:58 ++msfIter) build 12-Apr-2018 16:00:58 if ((msfIter->first == AP_UNCORRECTED and iter->uncorrected and produceUncorrected) || build 12-Apr-2018 16:00:58 - (msfIter->first == AP_CORRECTED and iter->corrected and produceCorrected)) build 12-Apr-2018 16:00:58 + (msfIter->first == AP_CORRECTED and iter->corrected and produceCorrected)) { build 12-Apr-2018 16:00:58 msfIter->second->addData(true, // Yes ! these are complex data. build 12-Apr-2018 16:00:58 auto_time_vv[iDD], build 12-Apr-2018 16:00:58 auto_antenna1_vv[iDD], build 12-Apr-2018 16:00:58 @@ -3320,12 +3342,13 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 auto_uvw_vv[iDD], build 12-Apr-2018 16:00:58 auto_weight_vv[iDD], build 12-Apr-2018 16:00:58 auto_sigma_vv[iDD]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if (hasCrossData) build 12-Apr-2018 16:00:58 for (map::iterator msfIter = msFillers.begin(); build 12-Apr-2018 16:00:58 msfIter != msFillers.end(); build 12-Apr-2018 16:00:58 ++msfIter) build 12-Apr-2018 16:00:58 if ((msfIter->first == AP_UNCORRECTED and iter->uncorrected and produceUncorrected) || build 12-Apr-2018 16:00:58 - (msfIter->first == AP_CORRECTED and iter->corrected and produceCorrected)) build 12-Apr-2018 16:00:58 + (msfIter->first == AP_CORRECTED and iter->corrected and produceCorrected)) { build 12-Apr-2018 16:00:58 msfIter->second->addData(true, // Yes ! these are complex data. build 12-Apr-2018 16:00:58 cross_time_vv[iDD], build 12-Apr-2018 16:00:58 cross_antenna1_vv[iDD], build 12-Apr-2018 16:00:58 @@ -3345,7 +3368,8 @@ void fillMainLazily(const string& dsName, build 12-Apr-2018 16:00:58 cross_nChanNPol_vv[iDD], build 12-Apr-2018 16:00:58 cross_uvw_vv[iDD], build 12-Apr-2018 16:00:58 cross_weight_vv[iDD], build 12-Apr-2018 16:00:58 - cross_sigma_vv[iDD]); build 12-Apr-2018 16:00:58 + cross_sigma_vv[iDD]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 @@ -3406,6 +3430,7 @@ vector reorder(const vector& v, vector index) { build 12-Apr-2018 16:00:58 * @parameter uvwCoords a reference to the UVW calculator. build 12-Apr-2018 16:00:58 * @parameter complexData a bool which says if the DATA is going to be filled (true) or if it will be the FLOAT_DATA (false). build 12-Apr-2018 16:00:58 * @parameter mute if the value of this parameter is false then nothing is written in the MS . build 12-Apr-2018 16:00:58 + * @parameter skipFirstTime if the value of this parameter is true, then all rows with time equal to the first time seen will be skipped (not filled). build 12-Apr-2018 16:00:58 * build 12-Apr-2018 16:00:58 * !!!!! One must be carefull to the fact that fillState must have been called before fillMain. During the execution of fillState , the global vector msStateID build 12-Apr-2018 16:00:58 * is filled and will be used by fillMain. build 12-Apr-2018 16:00:58 @@ -3418,7 +3443,8 @@ void fillMain( build 12-Apr-2018 16:00:58 std::map& effectiveBwPerDD_m, build 12-Apr-2018 16:00:58 bool complexData, build 12-Apr-2018 16:00:58 bool mute, build 12-Apr-2018 16:00:58 - bool ac_xc_per_timestamp) { build 12-Apr-2018 16:00:58 + bool ac_xc_per_timestamp, build 12-Apr-2018 16:00:58 + bool skipFirstTime=false) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (debug) cout << "fillMain : entering" << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -3434,13 +3460,17 @@ void fillMain( build 12-Apr-2018 16:00:58 return; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + // msRowReIndex_v maps from location in the vmsData_p vectors to the output MS row build 12-Apr-2018 16:00:58 + // this may be reorderd and the first time integration may be skipped (in which case msRowReIndex_v[i] is -1 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 vector msRowReIndex_v(vmsData_p->v_antennaId1.size()); build 12-Apr-2018 16:00:58 - for (unsigned int i = 0; i < msRowReIndex_v.size(); i++) build 12-Apr-2018 16:00:58 - msRowReIndex_v[i] = i; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // cout << "skipFirstTime ; " << skipFirstTime << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 CorrelationModeMod::CorrelationMode cm = r_p->getTable().getContainer().getConfigDescription().getRowByKey(r_p->getConfigDescriptionId())->getCorrelationMode(); build 12-Apr-2018 16:00:58 if (cm == CorrelationModeMod::CROSS_AND_AUTO and ac_xc_per_timestamp) { build 12-Apr-2018 16:00:58 + // this is the case where the rows may be reordered build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 unsigned int numDD = r_p->getTable().getContainer().getConfigDescription().getRowByKey(r_p->getConfigDescriptionId())->getDataDescriptionId().size(); build 12-Apr-2018 16:00:58 unsigned int numOfMSRowsPerIntegration = 0; build 12-Apr-2018 16:00:58 unsigned int numAntenna = r_p->getNumAntenna(); build 12-Apr-2018 16:00:58 @@ -3457,16 +3487,35 @@ void fillMain( build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 unsigned int i = 0; build 12-Apr-2018 16:00:58 - for (unsigned int iDD = 0; i < numDD; i++) { build 12-Apr-2018 16:00:58 + for (unsigned int iDD = 0; iDD < numDD; iDD++) { build 12-Apr-2018 16:00:58 unsigned int ddOffset = iDD * numIntegrations * (numAntenna + numBl); build 12-Apr-2018 16:00:58 for (unsigned int integration = 0; integration < numIntegrations; integration++) { build 12-Apr-2018 16:00:58 // First the auto correlations. build 12-Apr-2018 16:00:58 - for (unsigned int iAnt = 0; iAnt < numAntenna; iAnt++) build 12-Apr-2018 16:00:58 - msRowReIndex_v[i++] = ddOffset + numAntenna * integration + iAnt; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + for (unsigned int iAnt = 0; iAnt < numAntenna; iAnt++) { build 12-Apr-2018 16:00:58 + if (skipFirstTime && integration == 0) { build 12-Apr-2018 16:00:58 + msRowReIndex_v[i++] = -1; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + msRowReIndex_v[i++] = ddOffset + numAntenna * integration + iAnt; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 // Then the cross correlations. build 12-Apr-2018 16:00:58 for (unsigned iBl = 0; iBl < numBl; iBl++) build 12-Apr-2018 16:00:58 - msRowReIndex_v[i++] = ddOffset + numIntegrations * numAntenna + integration * numBl + iBl; build 12-Apr-2018 16:00:58 + if (skipFirstTime && integration == 0) { build 12-Apr-2018 16:00:58 + msRowReIndex_v[i++] = -1; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + msRowReIndex_v[i++] = ddOffset + numIntegrations * numAntenna + integration * numBl + iBl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + // set them in order, skipping times as appropriate build 12-Apr-2018 16:00:58 + // it's not obvious that the vmsData_p rows are time sorted, but the first time there should be the time to be skipped build 12-Apr-2018 16:00:58 + double timeToSkip = vmsData_p->v_time[0]; build 12-Apr-2018 16:00:58 + for (unsigned int i = 0; i < msRowReIndex_v.size(); i++) { build 12-Apr-2018 16:00:58 + if (skipFirstTime && (vmsData_p->v_time[i] == timeToSkip)) { build 12-Apr-2018 16:00:58 + msRowReIndex_v[i] = -1; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + msRowReIndex_v[i] = i; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -3475,7 +3524,7 @@ void fillMain( build 12-Apr-2018 16:00:58 for (unsigned int ipart = 0; ipart < filteredShape_vv.size(); ipart++) { build 12-Apr-2018 16:00:58 if (filteredShape_vv.at(ipart).at(0) == 3) filteredShape_vv.at(ipart).at(0) = 4; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 vector filteredDD; build 12-Apr-2018 16:00:58 for (unsigned int idd = 0; idd < vmsData_p->v_dataDescId.size(); idd++){ build 12-Apr-2018 16:00:58 filteredDD.push_back(dataDescriptionIdx2Idx.at(vmsData_p->v_dataDescId.at(idd))); build 12-Apr-2018 16:00:58 @@ -3484,8 +3533,16 @@ void fillMain( build 12-Apr-2018 16:00:58 vector uncorrectedData_v; build 12-Apr-2018 16:00:58 vector correctedData_v; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - /* compute the UVW */ build 12-Apr-2018 16:00:58 - vector uvw_v(3*vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 + // these sizes of these are not known immediately if there skipFirstTime is true build 12-Apr-2018 16:00:58 + vector uvw_v; // when set here, this is reordered and can be used as is when writing to the uncorrected MS build 12-Apr-2018 16:00:58 + vector weight_v; // these are the weights, in the order seen. They must be reordered to use. build 12-Apr-2018 16:00:58 + vector correctedWeight_v; // to be put into the MS, can only be set later when other corrected column values are set build 12-Apr-2018 16:00:58 + vector uncorrectedWeight_v; // to be put into the MS. May be set here when skipFirstTime is not true. build 12-Apr-2018 16:00:58 + vector sigma_v; // the sigmas, in the order seen. They must be reordered to use. build 12-Apr-2018 16:00:58 + vector correctedSigma_v; // to be put into the MS, can only be set later when other corrected column values are set build 12-Apr-2018 16:00:58 + vector uncorrectedSigma_v; // to be put into the MS. May be set here when skipFirstTime is not true. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + /* compute the UVW - do this for all times, time skipping happens later */ build 12-Apr-2018 16:00:58 vector > vv_uvw(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 #if DDPRIORITY build 12-Apr-2018 16:00:58 uvwCoords.uvw_bl(r_p, sdmBinData.timeSequence(), e_query_cm, build 12-Apr-2018 16:00:58 @@ -3497,43 +3554,62 @@ void fillMain( build 12-Apr-2018 16:00:58 vv_uvw); build 12-Apr-2018 16:00:58 #endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - ** Let's apply the reindexing on the UVW coordinates !!! build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - int k = 0; build 12-Apr-2018 16:00:58 - for (unsigned int iUvw = 0; iUvw < vv_uvw.size(); iUvw++) { build 12-Apr-2018 16:00:58 - uvw_v[k++] = vv_uvw[msRowReIndex_v[iUvw]](0); build 12-Apr-2018 16:00:58 - uvw_v[k++] = vv_uvw[msRowReIndex_v[iUvw]](1); build 12-Apr-2018 16:00:58 - uvw_v[k++] = vv_uvw[msRowReIndex_v[iUvw]](2); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - ** Let's apply the reindexing on weight and sigma. build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - vector weight_v(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 - vector correctedWeight_v(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - vector sigma_v(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 - vector correctedSigma_v(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 + // set sigma_v and weight_v first, in order. build 12-Apr-2018 16:00:58 + weight_v.resize(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 + sigma_v.resize(vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 for (unsigned int i = 0; i < weight_v.size(); i++) { build 12-Apr-2018 16:00:58 - weight_v[i] = vmsData_p->v_exposure.at(msRowReIndex_v[i]) * effectiveBwPerDD_m[filteredDD[msRowReIndex_v[i]]]; build 12-Apr-2018 16:00:58 - if (vmsData_p->v_antennaId1[msRowReIndex_v[i]] != vmsData_p->v_antennaId2[msRowReIndex_v[i]]) build 12-Apr-2018 16:00:58 + weight_v[i] = vmsData_p->v_exposure[i] * effectiveBwPerDD_m[filteredDD[i]]; build 12-Apr-2018 16:00:58 + if (vmsData_p->v_antennaId1[i] != vmsData_p->v_antennaId2[i]) build 12-Apr-2018 16:00:58 weight_v[i] *= 2.0; build 12-Apr-2018 16:00:58 - correctedWeight_v[i] = weight_v[i]; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if (weight_v[i] == 0.0) weight_v[i] = 1.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 sigma_v[i] = 1.0 / sqrt(weight_v[i]); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - correctedSigma_v[i] = sigma_v[i]; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (!skipFirstTime) { build 12-Apr-2018 16:00:58 + // several values can be fully filled out in this case. build 12-Apr-2018 16:00:58 + // it's more efficient to just do that, most of the time this block will be executed build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + ** Let's apply the reindexing on the UVW coordinates !!! build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + uvw_v.resize(3*vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 + int k = 0; build 12-Apr-2018 16:00:58 + for (unsigned int iUvw = 0; iUvw < vv_uvw.size(); iUvw++) { build 12-Apr-2018 16:00:58 + uvw_v[k++] = vv_uvw[msRowReIndex_v[iUvw]](0); build 12-Apr-2018 16:00:58 + uvw_v[k++] = vv_uvw[msRowReIndex_v[iUvw]](1); build 12-Apr-2018 16:00:58 + uvw_v[k++] = vv_uvw[msRowReIndex_v[iUvw]](2); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Here we make the assumption that the State is the same for all the antennas and let's use the first State found in the vector stateId contained in the ASDM Main Row build 12-Apr-2018 16:00:58 - // int asdmStateIdx = r_p->getStateId().at(0).getTagValue(); build 12-Apr-2018 16:00:58 - vector msStateId_v(vmsData_p->v_m_data.size(), stateIdx2Idx[r_p]); build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + ** Let's apply the reindexing on weight and sigma. build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + uncorrectedWeight_v.resize(weight_v.size()); build 12-Apr-2018 16:00:58 + uncorrectedSigma_v.resize(weight_v.size()); build 12-Apr-2018 16:00:58 + for (unsigned int i = 0; i < weight_v.size(); i++) { build 12-Apr-2018 16:00:58 + uncorrectedWeight_v[i] = weight_v.at(msRowReIndex_v[i]); build 12-Apr-2018 16:00:58 + uncorrectedSigma_v[i] = sigma_v.at(msRowReIndex_v[i]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ComplexDataFilter cdf; build 12-Apr-2018 16:00:58 map::const_iterator iter; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + vector uncorrectedTime_v; build 12-Apr-2018 16:00:58 + vector uncorrectedAntennaId1_v; build 12-Apr-2018 16:00:58 + vector uncorrectedAntennaId2_v; build 12-Apr-2018 16:00:58 + vector uncorrectedFeedId1_v; build 12-Apr-2018 16:00:58 + vector uncorrectedFeedId2_v; build 12-Apr-2018 16:00:58 + vector uncorrectedFieldId_v; build 12-Apr-2018 16:00:58 + vector uncorrectedFilteredDD_v; build 12-Apr-2018 16:00:58 + vector > uncorrectedFilteredShape_vv; build 12-Apr-2018 16:00:58 + vector uncorrectedInterval_v; build 12-Apr-2018 16:00:58 + vector uncorrectedExposure_v; build 12-Apr-2018 16:00:58 + vector uncorrectedTimeCentroid_v; build 12-Apr-2018 16:00:58 + vector uncorrectedFlag_v; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 vector correctedTime_v; build 12-Apr-2018 16:00:58 vector correctedAntennaId1_v; build 12-Apr-2018 16:00:58 vector correctedAntennaId2_v; build 12-Apr-2018 16:00:58 @@ -3545,7 +3621,6 @@ void fillMain( build 12-Apr-2018 16:00:58 vector correctedInterval_v; build 12-Apr-2018 16:00:58 vector correctedExposure_v; build 12-Apr-2018 16:00:58 vector correctedTimeCentroid_v; build 12-Apr-2018 16:00:58 - vector correctedMsStateId_v(msStateId_v); build 12-Apr-2018 16:00:58 vector correctedUvw_v; build 12-Apr-2018 16:00:58 vector correctedFlag_v; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -3559,17 +3634,42 @@ void fillMain( build 12-Apr-2018 16:00:58 // Apply here the redindexing on uncorrected data !!!! build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 for (unsigned int iData = 0; iData < vmsData_p->v_m_data.size(); iData++) { build 12-Apr-2018 16:00:58 + if (skipFirstTime && msRowReIndex_v[iData] < 0) { build 12-Apr-2018 16:00:58 + continue; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if ((iter=vmsData_p->v_m_data.at(msRowReIndex_v[iData]).find(AtmPhaseCorrectionMod::AP_UNCORRECTED)) != vmsData_p->v_m_data.at(msRowReIndex_v[iData]).end()){ build 12-Apr-2018 16:00:58 uncorrectedData_v.push_back(cdf.to4Pol(vmsData_p->vv_dataShape.at(msRowReIndex_v[iData]).at(0), build 12-Apr-2018 16:00:58 vmsData_p->vv_dataShape.at(msRowReIndex_v[iData]).at(1), build 12-Apr-2018 16:00:58 iter->second)); build 12-Apr-2018 16:00:58 + if (skipFirstTime) { build 12-Apr-2018 16:00:58 + // uncorrected values must also be explicitly added here since they can not be put in as entire vectors build 12-Apr-2018 16:00:58 + uncorrectedTime_v.push_back(vmsData_p->v_time.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedAntennaId1_v.push_back(vmsData_p->v_antennaId1.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedAntennaId2_v.push_back(vmsData_p->v_antennaId2.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedFeedId1_v.push_back(vmsData_p->v_feedId1.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedFeedId2_v.push_back(vmsData_p->v_feedId2.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedFilteredDD_v.push_back(filteredDD.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedFilteredShape_vv.push_back(filteredShape_vv.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedFieldId_v.push_back(vmsData_p->v_fieldId.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedInterval_v.push_back(vmsData_p->v_interval.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedExposure_v.push_back(vmsData_p->v_exposure.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedTimeCentroid_v.push_back(vmsData_p->v_timeCentroid.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](0)); build 12-Apr-2018 16:00:58 + uvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](1)); build 12-Apr-2018 16:00:58 + uvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](2)); build 12-Apr-2018 16:00:58 + uncorrectedFlag_v.push_back(vmsData_p->v_flag.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedWeight_v.push_back(weight_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + uncorrectedSigma_v.push_back(sigma_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Have we asked to write an MS with corrected data + radiometric data ? build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Are we with radiometric data ? Then we assume that the data are labelled AP_UNCORRECTED. build 12-Apr-2018 16:00:58 if (sdmBinData.processorType(r_p) == RADIOMETER) { build 12-Apr-2018 16:00:58 if ((iter=vmsData_p->v_m_data.at(msRowReIndex_v[iData]).find(AtmPhaseCorrectionMod::AP_UNCORRECTED)) != vmsData_p->v_m_data.at(msRowReIndex_v[iData]).end()){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 correctedTime_v.push_back(vmsData_p->v_time.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 correctedAntennaId1_v.push_back(vmsData_p->v_antennaId1.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 correctedAntennaId2_v.push_back(vmsData_p->v_antennaId2.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 @@ -3584,8 +3684,13 @@ void fillMain( build 12-Apr-2018 16:00:58 correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](0)); build 12-Apr-2018 16:00:58 correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](1)); build 12-Apr-2018 16:00:58 correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](2)); build 12-Apr-2018 16:00:58 - correctedData_v.push_back(uncorrectedData_v.at(iData)); // <------------Attention here the uncorrected data have been already re ordered ! build 12-Apr-2018 16:00:58 + // this is probably the most recent uncorrectedData, but it might not be - else why the if blocks here build 12-Apr-2018 16:00:58 + correctedData_v.push_back(cdf.to4Pol(vmsData_p->vv_dataShape.at(msRowReIndex_v[iData]).at(0), build 12-Apr-2018 16:00:58 + vmsData_p->vv_dataShape.at(msRowReIndex_v[iData]).at(1), build 12-Apr-2018 16:00:58 + iter->second)); build 12-Apr-2018 16:00:58 correctedFlag_v.push_back(vmsData_p->v_flag.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + correctedWeight_v.push_back(weight_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + correctedSigma_v.push_back(sigma_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { // We assume that we are in front of CORRELATOR data, but do we have corrected data on that specific subscan ? build 12-Apr-2018 16:00:58 @@ -3608,11 +3713,16 @@ void fillMain( build 12-Apr-2018 16:00:58 correctedTimeCentroid_v.push_back(vmsData_p->v_timeCentroid.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](0)); build 12-Apr-2018 16:00:58 correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](1)); build 12-Apr-2018 16:00:58 - correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](2)); build 12-Apr-2018 16:00:58 - correctedData_v.push_back(uncorrectedData_v.at(iData)); // <-------- Here we re-use the autodata already present in the uncorrected data and which have been build 12-Apr-2018 16:00:58 - // already reindexed !!! build 12-Apr-2018 16:00:58 + correctedUvw_v.push_back(vv_uvw[msRowReIndex_v[iData]](2)); build 12-Apr-2018 16:00:58 + // this is probably the most recent uncorrectedData, but it might not be - else why the if blocks here build 12-Apr-2018 16:00:58 + correctedData_v.push_back(cdf.to4Pol(vmsData_p->vv_dataShape.at(msRowReIndex_v[iData]).at(0), build 12-Apr-2018 16:00:58 + vmsData_p->vv_dataShape.at(msRowReIndex_v[iData]).at(1), build 12-Apr-2018 16:00:58 + iter->second)); build 12-Apr-2018 16:00:58 correctedFlag_v.push_back(vmsData_p->v_flag.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 correctedFilteredShape_vv.push_back(filteredShape_vv.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + correctedWeight_v.push_back(weight_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + correctedSigma_v.push_back(sigma_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 @@ -3639,6 +3749,8 @@ void fillMain( build 12-Apr-2018 16:00:58 correctedData_v.push_back(theData); build 12-Apr-2018 16:00:58 correctedFlag_v.push_back(vmsData_p->v_flag.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 correctedFilteredShape_vv.push_back(filteredShape_vv.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + correctedWeight_v.push_back(weight_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 + correctedSigma_v.push_back(sigma_v.at(msRowReIndex_v[iData])); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -3647,18 +3759,26 @@ void fillMain( build 12-Apr-2018 16:00:58 if (uncorrectedData_v.size() > 0 && (msFillers.find(AP_UNCORRECTED) != msFillers.end())) { build 12-Apr-2018 16:00:58 if (! mute) { // Here we make the assumption that we have always uncorrected data. This realistic even if not totally rigorous. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - vector uncorrectedTime_v = reorder( vmsData_p->v_time, msRowReIndex_v); build 12-Apr-2018 16:00:58 - vector uncorrectedAntennaId1_v = reorder (vmsData_p->v_antennaId1, msRowReIndex_v ) ; build 12-Apr-2018 16:00:58 - vector uncorrectedAntennaId2_v = reorder(vmsData_p->v_antennaId2, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedFeedId1_v = reorder(vmsData_p->v_feedId1, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedFeedId2_v = reorder(vmsData_p->v_feedId2, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedFieldId_v = reorder(vmsData_p->v_fieldId, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedFilteredDD_v = reorder(filteredDD, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector > uncorrectedFilteredShape_vv = reorder >(filteredShape_vv, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedInterval_v = reorder(vmsData_p->v_interval, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedExposure_v = reorder(vmsData_p->v_exposure, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedTimeCentroid_v = reorder(vmsData_p->v_timeCentroid, msRowReIndex_v ); build 12-Apr-2018 16:00:58 - vector uncorrectedFlag_v = reorder(vmsData_p->v_flag, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + if (!skipFirstTime) { build 12-Apr-2018 16:00:58 + // need to set these now, but they can be set as vectors that need to be reordered build 12-Apr-2018 16:00:58 + uncorrectedTime_v = reorder( vmsData_p->v_time, msRowReIndex_v); build 12-Apr-2018 16:00:58 + uncorrectedAntennaId1_v = reorder (vmsData_p->v_antennaId1, msRowReIndex_v ) ; build 12-Apr-2018 16:00:58 + uncorrectedAntennaId2_v = reorder(vmsData_p->v_antennaId2, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedFeedId1_v = reorder(vmsData_p->v_feedId1, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedFeedId2_v = reorder(vmsData_p->v_feedId2, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedFieldId_v = reorder(vmsData_p->v_fieldId, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedFilteredDD_v = reorder(filteredDD, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedFilteredShape_vv = reorder >(filteredShape_vv, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedInterval_v = reorder(vmsData_p->v_interval, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedExposure_v = reorder(vmsData_p->v_exposure, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedTimeCentroid_v = reorder(vmsData_p->v_timeCentroid, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + uncorrectedFlag_v = reorder(vmsData_p->v_flag, msRowReIndex_v ); build 12-Apr-2018 16:00:58 + // uvw_v, uncorrectedSigma_v, and uncorrectedWeight_v have all been previously set build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Here we make the assumption that the State is the same for all the antennas and let's use the first State found in the vector stateId contained in the ASDM Main Row build 12-Apr-2018 16:00:58 + // state must have already been filled so that the stateIdx2IDx map is available to extract the state ID for this main row pointer (r_p). build 12-Apr-2018 16:00:58 + vector msStateId_v(uncorrectedTime_v.size(), stateIdx2Idx[r_p]); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 msFillers[AP_UNCORRECTED]->addData(complexData, build 12-Apr-2018 16:00:58 uncorrectedTime_v , // this is already time midpoint build 12-Apr-2018 16:00:58 @@ -3668,25 +3788,29 @@ void fillMain( build 12-Apr-2018 16:00:58 uncorrectedFeedId2_v, build 12-Apr-2018 16:00:58 uncorrectedFilteredDD_v, build 12-Apr-2018 16:00:58 (int) vmsData_p->processorId, build 12-Apr-2018 16:00:58 - (vector &) vmsData_p->v_fieldId, build 12-Apr-2018 16:00:58 - (vector &) vmsData_p->v_interval, build 12-Apr-2018 16:00:58 - (vector &) vmsData_p->v_exposure, build 12-Apr-2018 16:00:58 - (vector &)vmsData_p->v_timeCentroid, build 12-Apr-2018 16:00:58 + uncorrectedFieldId_v, build 12-Apr-2018 16:00:58 + uncorrectedInterval_v, build 12-Apr-2018 16:00:58 + uncorrectedExposure_v, build 12-Apr-2018 16:00:58 + uncorrectedTimeCentroid_v, build 12-Apr-2018 16:00:58 (int) r_p->getScanNumber(), build 12-Apr-2018 16:00:58 0, // Array Id build 12-Apr-2018 16:00:58 (int) r_p->getExecBlockId().getTagValue(), // Observation Id build 12-Apr-2018 16:00:58 msStateId_v, build 12-Apr-2018 16:00:58 - uvw_v, build 12-Apr-2018 16:00:58 + uvw_v, build 12-Apr-2018 16:00:58 uncorrectedFilteredShape_vv, // vmsData_p->vv_dataShape after filtering the case numCorr == 3 build 12-Apr-2018 16:00:58 uncorrectedData_v, build 12-Apr-2018 16:00:58 uncorrectedFlag_v, build 12-Apr-2018 16:00:58 - weight_v, build 12-Apr-2018 16:00:58 - sigma_v); build 12-Apr-2018 16:00:58 + uncorrectedWeight_v, build 12-Apr-2018 16:00:58 + uncorrectedSigma_v); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if (correctedData_v.size() > 0 && (msFillers.find(AP_CORRECTED) != msFillers.end())) { build 12-Apr-2018 16:00:58 if (! mute) { build 12-Apr-2018 16:00:58 + // Here we make the assumption that the State is the same for all the antennas and let's use the first State found in the vector stateId contained in the ASDM Main Row build 12-Apr-2018 16:00:58 + // state must have already been filled so that the stateIdx2IDx map is available to extract the state ID for this main row pointer (r_p). build 12-Apr-2018 16:00:58 + vector correctedMsStateId_v(correctedTime_v.size(), stateIdx2Idx[r_p]); build 12-Apr-2018 16:00:58 msFillers[AP_CORRECTED]->addData(complexData, build 12-Apr-2018 16:00:58 correctedTime_v, // this is already time midpoint build 12-Apr-2018 16:00:58 correctedAntennaId1_v, build 12-Apr-2018 16:00:58 @@ -3714,44 +3838,12 @@ void fillMain( build 12-Apr-2018 16:00:58 if (debug) cout << "fillMain : exiting" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -void testFunc(string& tstr) { build 12-Apr-2018 16:00:58 - cerr<& mat_uvw) { build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - vector< casacore::Vector > vv_uvw; build 12-Apr-2018 16:00:58 - mat_uvw.resize(3,vmsData_p->v_time.size()); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -#if DDPRIORITY build 12-Apr-2018 16:00:58 - uvwCoords.uvw_bl(r_p, sdmBinData.timeSequence(), e_query_cm, build 12-Apr-2018 16:00:58 - sdmbin::SDMBinData::dataOrder(), build 12-Apr-2018 16:00:58 - vv_uvw); build 12-Apr-2018 16:00:58 -#else build 12-Apr-2018 16:00:58 - uvwCoords.uvw_bl(r_p, vmsData_p->v_timeCentroid, e_query_cm, build 12-Apr-2018 16:00:58 - sdmbin::SDMBinData::dataOrder(), build 12-Apr-2018 16:00:58 - vv_uvw); build 12-Apr-2018 16:00:58 -#endif build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - //put in a Matrix build 12-Apr-2018 16:00:58 - for (unsigned int iUvw = 0; iUvw < vv_uvw.size(); iUvw++) { build 12-Apr-2018 16:00:58 - mat_uvw(iUvw, 0) = vv_uvw[iUvw](0); build 12-Apr-2018 16:00:58 - mat_uvw(iUvw, 1) = vv_uvw[iUvw](1); build 12-Apr-2018 16:00:58 - mat_uvw(iUvw, 2) = vv_uvw[iUvw](2); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -} build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 /** build 12-Apr-2018 16:00:58 + * This function has not been used in production. It therefore has not kept up with build 12-Apr-2018 16:00:58 + * ongoing development elsewhere here. It should be seen as an example for possible build 12-Apr-2018 16:00:58 + * future multithreading work and should not be use as is. build 12-Apr-2018 16:00:58 + * build 12-Apr-2018 16:00:58 + ** build 12-Apr-2018 16:00:58 * This function fills the MS Main table from an ASDM Main table which refers to correlator data. build 12-Apr-2018 16:00:58 * designed for multithreading........ build 12-Apr-2018 16:00:58 * build 12-Apr-2018 16:00:58 @@ -3989,9 +4081,9 @@ void fillMain_mt(MainRow* r_p, build 12-Apr-2018 16:00:58 if (debug) cout << "fillMain_mt : exiting" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 #endif build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -void fillSysPower_aux (const vector& sysPowers, map& msFillers_m) { build 12-Apr-2018 16:00:58 - LOGENTER("fillSysPower_aux"); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + void fillSysPower_aux (const vector& sysPowers, map& msFillers_m) { build 12-Apr-2018 16:00:58 + LOGENTER("fillSysPower_aux"); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 vector antennaId; build 12-Apr-2018 16:00:58 vector spectralWindowId; build 12-Apr-2018 16:00:58 @@ -4302,6 +4394,8 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 bool interpolate_ephemeris = false ; build 12-Apr-2018 16:00:58 bool tabulate_ephemeris_polynomials = false; build 12-Apr-2018 16:00:58 double polyephem_tabtimestep = 0.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + bool checkDupInts = true; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Process command line options and parameters. build 12-Apr-2018 16:00:58 po::variables_map vm; build 12-Apr-2018 16:00:58 @@ -4358,6 +4452,11 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 ("ms-directory-prefix", po::value< string >(), "ms directory prefix") build 12-Apr-2018 16:00:58 ; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // This is only used by the test programs. Not indended for general use. build 12-Apr-2018 16:00:58 + hidden.add_options() build 12-Apr-2018 16:00:58 + ("checkdupints", po::value()->default_value("true"),"a value of false turns off checks for duplicate integration times in RADIOMETER data") build 12-Apr-2018 16:00:58 + ; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 po::options_description cmdline_options; build 12-Apr-2018 16:00:58 cmdline_options.add(generic).add(hidden); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -4597,6 +4696,12 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 warning(infostream.str()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // check for duplicate integrations in RADIOMETER data? build 12-Apr-2018 16:00:58 + checkDupInts = vm["checkdupints"].as< bool >(); build 12-Apr-2018 16:00:58 + if (debug) { build 12-Apr-2018 16:00:58 + cout << "checkDupInts : " << checkDupInts << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Do we consider another order than ac_xc_per_timestamp ? build 12-Apr-2018 16:00:58 ac_xc_per_timestamp = (vm.count("ac-xc-per-timestamp") == 0) ? false : build 12-Apr-2018 16:00:58 boost::algorithm::to_lower_copy(vm["ac-xc-per-timestamp"].as()) == "yes"; build 12-Apr-2018 16:00:58 @@ -5670,9 +5775,21 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 // All rows of ASDM-Pointing must have their attribute usePolynomials equal to false build 12-Apr-2018 16:00:58 // and their numTerm attribute equal to 1. Use the opportunity of this check build 12-Apr-2018 16:00:58 // to compute the number of rows to be created in the MS-Pointing by summing build 12-Apr-2018 16:00:58 - // all the numSample attributes values. build 12-Apr-2018 16:00:58 + // all the numSample attributes values. Watch for duplicate times due and avoid. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 int numMSPointingRows = 0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // initialize the lastTime to 0.0 for all antennaIds build 12-Apr-2018 16:00:58 + map lastTime; build 12-Apr-2018 16:00:58 + const AntennaTable& antennaT = ds->getAntenna(); build 12-Apr-2018 16:00:58 + const vector& vAntRow = antennaT.get(); build 12-Apr-2018 16:00:58 + for (unsigned int i=0; i < vAntRow.size(); i++) { build 12-Apr-2018 16:00:58 + lastTime[vAntRow[i]->getAntennaId()] = 0.0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // set this to true for any rows where the first element should be skipped because the time is a duplicate build 12-Apr-2018 16:00:58 + vector vSkipFirst(v.size(),false); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for (unsigned int i = 0; i < v.size(); i++) { build 12-Apr-2018 16:00:58 if (v[i]->getUsePolynomials()) { build 12-Apr-2018 16:00:58 errstream.str(""); build 12-Apr-2018 16:00:58 @@ -5680,7 +5797,30 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 error(errstream.str()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - numMSPointingRows += v[i]->getNumSample(); build 12-Apr-2018 16:00:58 + // look for duplicate rows - time at the start of row is near the time at the end of the previous row for that antennaId build 12-Apr-2018 16:00:58 + int numSample = v[i]->getNumSample(); build 12-Apr-2018 16:00:58 + Tag antId = v[i]->getAntennaId(); build 12-Apr-2018 16:00:58 + double tfirst = 0.0; build 12-Apr-2018 16:00:58 + double tlast = 0.0; build 12-Apr-2018 16:00:58 + if (v[i]->isSampledTimeIntervalExists()) { build 12-Apr-2018 16:00:58 + tfirst = ((double) (v[i]->getSampledTimeInterval().at(0).getStart().get())) / ArrayTime::unitsInASecond; build 12-Apr-2018 16:00:58 + tlast = ((double) (v[i]->getSampledTimeInterval().at(numSample-1).getStart().get())) / ArrayTime::unitsInASecond; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + double tstart = ((double) v[i]->getTimeInterval().getStart().get()) / ArrayTime::unitsInASecond; build 12-Apr-2018 16:00:58 + double tint = ((double) v[i]->getTimeInterval().getDuration().get()) / ArrayTime::unitsInASecond / numSample; build 12-Apr-2018 16:00:58 + tfirst = tstart + tint/2.0; build 12-Apr-2018 16:00:58 + tlast = tfirst + tint*(numSample-1); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (casacore::near(tfirst,lastTime[antId])) { build 12-Apr-2018 16:00:58 + infostream.str(""); build 12-Apr-2018 16:00:58 + infostream << "First time in Pointing row " << i << " for antenna " << antId << " is near the previous last time for that antenna, skipping that first time in the output MS POINTING table" << endl; build 12-Apr-2018 16:00:58 + info(infostream.str()); build 12-Apr-2018 16:00:58 + numSample--; build 12-Apr-2018 16:00:58 + lastTime[antId] = tlast; build 12-Apr-2018 16:00:58 + vSkipFirst[i] = true; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + lastTime[antId] = tlast; build 12-Apr-2018 16:00:58 + numMSPointingRows += numSample; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -5769,27 +5909,33 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 vector timeInterval ; build 12-Apr-2018 16:00:58 if (r->isSampledTimeIntervalExists()) timeInterval = r->getSampledTimeInterval(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // and now insert the values into the MS POINTING table build 12-Apr-2018 16:00:58 + // watch for the skipped initial sample build 12-Apr-2018 16:00:58 + int numSampleUsed = numSample; build 12-Apr-2018 16:00:58 + if (vSkipFirst.at(i)) numSampleUsed--; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Use 'fill' from algorithm for the cases where values remain constant. build 12-Apr-2018 16:00:58 // ANTENNA_ID build 12-Apr-2018 16:00:58 - fill(antenna_id_.begin()+iMSPointingRow, antenna_id_.begin()+iMSPointingRow+numSample, antennaId); build 12-Apr-2018 16:00:58 + fill(antenna_id_.begin()+iMSPointingRow, antenna_id_.begin()+iMSPointingRow+numSampleUsed, antennaId); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // TRACKING build 12-Apr-2018 16:00:58 - fill(tracking_.begin()+iMSPointingRow, tracking_.begin()+iMSPointingRow+numSample, pointingTracking); build 12-Apr-2018 16:00:58 + fill(tracking_.begin()+iMSPointingRow, tracking_.begin()+iMSPointingRow+numSampleUsed, pointingTracking); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // OVER_THE_TOP build 12-Apr-2018 16:00:58 if (overTheTopExists4All) build 12-Apr-2018 16:00:58 // it's present everywhere build 12-Apr-2018 16:00:58 - fill(v_overTheTop_.begin()+iMSPointingRow, v_overTheTop_.begin()+iMSPointingRow+numSample, build 12-Apr-2018 16:00:58 + fill(v_overTheTop_.begin()+iMSPointingRow, v_overTheTop_.begin()+iMSPointingRow+numSampleUsed, build 12-Apr-2018 16:00:58 r->getOverTheTop()); build 12-Apr-2018 16:00:58 else if (r->isOverTheTopExists()) { build 12-Apr-2018 16:00:58 // it's present only in some rows. build 12-Apr-2018 16:00:58 s_overTheTop saux ; build 12-Apr-2018 16:00:58 - saux.start = iMSPointingRow; saux.len = numSample; saux.value = r->getOverTheTop(); build 12-Apr-2018 16:00:58 + saux.start = iMSPointingRow; saux.len = numSampleUsed; saux.value = r->getOverTheTop(); build 12-Apr-2018 16:00:58 v_s_overTheTop_.push_back(saux); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Use an explicit loop for the other values. build 12-Apr-2018 16:00:58 for (int j = 0 ; j < numSample; j++) { // ... must be expanded in numSample MS-Pointing rows. build 12-Apr-2018 16:00:58 + if (j == 0 && vSkipFirst.at(i)) continue; // the first element is to be skipped build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // TIME and INTERVAL build 12-Apr-2018 16:00:58 if (r->isSampledTimeIntervalExists()) { //if sampledTimeInterval is present use its values. build 12-Apr-2018 16:00:58 @@ -6562,7 +6708,7 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 // And then finally process the state and the main table. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 if (lazy) { build 12-Apr-2018 16:00:58 - fillMainLazily(dsName, ds, selected_eb_scan_m,effectiveBwPerDD_m,e_query_cm); build 12-Apr-2018 16:00:58 + fillMainLazily(dsName, ds, selected_eb_scan_m,effectiveBwPerDD_m,e_query_cm,checkDupInts); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -6604,8 +6750,13 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 ostringstream oss; build 12-Apr-2018 16:00:58 EnumSet es_query_ap_uncorrected; build 12-Apr-2018 16:00:58 es_query_ap_uncorrected.fromString("AP_UNCORRECTED"); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // For each selected main row. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // used in checking for duplicate integrations in the WVR (Radiometer) case build 12-Apr-2018 16:00:58 + // This holds the most recent last integration time for each configDescriptionId - but only for Radiometer data. build 12-Apr-2018 16:00:58 + map lastTimeMap; build 12-Apr-2018 16:00:58 + // for debugging - to report on what uid the lastTime being compared came from build 12-Apr-2018 16:00:58 + // map lastTimeUIDMap; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for (unsigned int i = 0; i < nMain; i++) { build 12-Apr-2018 16:00:58 try { build 12-Apr-2018 16:00:58 // What's the processor for this Main row ? build 12-Apr-2018 16:00:58 @@ -6656,7 +6807,33 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 continue; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 vmsDataPtr = sdmBinData.getDataCols(); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + bool skipFirstIntegration = checkDupInts && lastTimeMap[cdId] == vmsDataPtr->v_time[0]; build 12-Apr-2018 16:00:58 + unsigned int skipValues = 0; build 12-Apr-2018 16:00:58 + // useful just for debugging build 12-Apr-2018 16:00:58 + if (skipFirstIntegration) { build 12-Apr-2018 16:00:58 + // work out the number of elements in this first row build 12-Apr-2018 16:00:58 + // possibly this is available reliably elsewhere, but thats' not obvious build 12-Apr-2018 16:00:58 + // this should be rare and only a few elements should tested, so relatively quick build 12-Apr-2018 16:00:58 + bool firstIntegration = True; build 12-Apr-2018 16:00:58 + while (firstIntegration && skipValues < vmsDataPtr->v_time.size()) { build 12-Apr-2018 16:00:58 + firstIntegration = lastTimeMap[cdId] == vmsDataPtr->v_time[skipValues]; build 12-Apr-2018 16:00:58 + if (firstIntegration) skipValues++; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (debug) { build 12-Apr-2018 16:00:58 + cout << "Duplicate time seen in Row : " << i build 12-Apr-2018 16:00:58 + << " cdId : " << cdId build 12-Apr-2018 16:00:58 + << " " << v[i]->getDataUID().getEntityId().toString() build 12-Apr-2018 16:00:58 + // << " duplicates time at end of " << lastTimeUIDMap[cdId] build 12-Apr-2018 16:00:58 + << " time size " << vmsDataPtr->v_time.size() build 12-Apr-2018 16:00:58 + << " antennaId1 size " << vmsDataPtr->v_antennaId1.size() build 12-Apr-2018 16:00:58 + << " skipValues : " << skipValues build 12-Apr-2018 16:00:58 + << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + lastTimeMap[cdId] = vmsDataPtr->v_time[vmsDataPtr->v_time.size()-1]; build 12-Apr-2018 16:00:58 + // lastTimeUIDMap[cdId] = v[i]->getDataUID().getEntityId().toString(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 fillMain( build 12-Apr-2018 16:00:58 v[i], build 12-Apr-2018 16:00:58 sdmBinData, build 12-Apr-2018 16:00:58 @@ -6665,10 +6842,11 @@ int main(int argc, char *argv[]) { build 12-Apr-2018 16:00:58 effectiveBwPerDD_m, build 12-Apr-2018 16:00:58 complexData, build 12-Apr-2018 16:00:58 mute, build 12-Apr-2018 16:00:58 - ac_xc_per_timestamp); build 12-Apr-2018 16:00:58 + ac_xc_per_timestamp, build 12-Apr-2018 16:00:58 + skipValues); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 infostream.str(""); build 12-Apr-2018 16:00:58 - infostream << "ASDM Main row #" << mainRowIndex[i] << " produced a total of " << vmsDataPtr->v_antennaId1.size() << " MS Main rows." << endl; build 12-Apr-2018 16:00:58 + infostream << "ASDM Main row #" << mainRowIndex[i] << " produced a total of " << (vmsDataPtr->v_antennaId1.size()-skipValues) << " MS Main rows." << endl; build 12-Apr-2018 16:00:58 info(infostream.str()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { // Assume we are in front of a Correlator. build 12-Apr-2018 16:00:58 diff --git a/code/alma/apps/asdm2MS/bdflags2MS.cc b/code/alma/apps/asdm2MS/bdflags2MS.cc build 12-Apr-2018 16:00:58 index e631f1c..1a64f4c 100644 build 12-Apr-2018 16:00:58 --- a/code/alma/apps/asdm2MS/bdflags2MS.cc build 12-Apr-2018 16:00:58 +++ b/code/alma/apps/asdm2MS/bdflags2MS.cc build 12-Apr-2018 16:00:58 @@ -478,23 +478,28 @@ public: build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 pair< vector*, build 12-Apr-2018 16:00:58 - vector* > orderedByDDTIMBAL() { build 12-Apr-2018 16:00:58 + vector* > orderedByDDTIMBAL(bool skipFirstIntegration=false) { build 12-Apr-2018 16:00:58 LOGENTER("MSFlagAccumulator::orderedByDDTIMBAL(bool MSORDER=true)"); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + unsigned int numIntUsed = skipFirstIntegration ? (numIntegration_-1) : numIntegration_; build 12-Apr-2018 16:00:58 flagShapes_p_v.clear(); build 12-Apr-2018 16:00:58 - flagShapes_p_v.resize(numIntegration_*numBAL_*numDD_); build 12-Apr-2018 16:00:58 + flagShapes_p_v.resize(numIntUsed*numBAL_*numDD_); build 12-Apr-2018 16:00:58 flagValues_p_v.clear(); build 12-Apr-2018 16:00:58 - flagValues_p_v.resize(numIntegration_*numBAL_*numDD_); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + flagValues_p_v.resize(numIntUsed*numBAL_*numDD_); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 unsigned int k = 0; build 12-Apr-2018 16:00:58 - for (unsigned int iDD = 0; iDD < numDD_; iDD++) build 12-Apr-2018 16:00:58 - for (unsigned int iIntegration = 0; iIntegration < numIntegration_; iIntegration++) build 12-Apr-2018 16:00:58 + for (unsigned int iDD = 0; iDD < numDD_; iDD++) { build 12-Apr-2018 16:00:58 + for (unsigned int iIntegration = 0; iIntegration < numIntegration_; iIntegration++) { build 12-Apr-2018 16:00:58 + if (skipFirstIntegration && (iIntegration==0)) continue; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for (unsigned int iBAL = 0; iBAL < numBAL_; iBAL++) { build 12-Apr-2018 16:00:58 flagShapes_p_v[k] = &(flagCell_vvv[iIntegration][iBAL][iDD].first); build 12-Apr-2018 16:00:58 flagValues_p_v[k] = &(flagCell_vvv[iIntegration][iBAL][iDD].second); build 12-Apr-2018 16:00:58 k++; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 LOGEXIT("MSFlagAccumulator::orderedByDDTIMBAL(bool MSORDER=true)"); build 12-Apr-2018 16:00:58 return make_pair< vector *, vector *> (&flagShapes_p_v, &flagValues_p_v); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -883,10 +888,11 @@ pair mergeAndPut(CorrelationModeMod::CorrelationMode correlationMode build 12-Apr-2018 16:00:58 pair put(MSFlagAccumulator& accumulator, build 12-Apr-2018 16:00:58 uInt iRow0, build 12-Apr-2018 16:00:58 ArrayColumn& flag, build 12-Apr-2018 16:00:58 - ScalarColumn flagRow) { build 12-Apr-2018 16:00:58 + ScalarColumn flagRow, build 12-Apr-2018 16:00:58 + bool skipFirstIntegration=false) { build 12-Apr-2018 16:00:58 LOGENTER("put"); build 12-Apr-2018 16:00:58 pair< vector*, build 12-Apr-2018 16:00:58 - vector* > cds = accumulator.orderedByDDTIMBAL(); build 12-Apr-2018 16:00:58 + vector* > cds = accumulator.orderedByDDTIMBAL(skipFirstIntegration); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 vector *>* shapes_p_v_p = cds.first; build 12-Apr-2018 16:00:58 vector *>* values_p_v_p = cds.second; build 12-Apr-2018 16:00:58 @@ -1325,10 +1331,12 @@ int main (int argC, char * argV[]) { build 12-Apr-2018 16:00:58 ; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // nocheckdupints is used during testing but should not be visible to users build 12-Apr-2018 16:00:58 po::options_description hidden("Hidden options"); build 12-Apr-2018 16:00:58 hidden.add_options() build 12-Apr-2018 16:00:58 ("asdm-directory", po::value(), "asdm directory") build 12-Apr-2018 16:00:58 ("ms-directory", po::value(), "ms directory") build 12-Apr-2018 16:00:58 + ("checkdupints", po::value()->default_value(true), "a value of false turns off checks for duplicate integration times in RADIOMETER data") build 12-Apr-2018 16:00:58 ; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 po::options_description cmdline_options; build 12-Apr-2018 16:00:58 @@ -1497,6 +1505,12 @@ int main (int argC, char * argV[]) { build 12-Apr-2018 16:00:58 error(errstream.str()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // check for duplicate integrations build 12-Apr-2018 16:00:58 + bool checkDupInts = vm["checkdupints"].as< bool >(); build 12-Apr-2018 16:00:58 + if (debug) { build 12-Apr-2018 16:00:58 + cout << "checkDupInts : " << checkDupInts << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Selection of the kind of data - uncorrected or corrected - to consider. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -1682,6 +1696,10 @@ int main (int argC, char * argV[]) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 unsigned int numFlaggedRowsTotal = 0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // used in checking for duplicate integrations in the WVR (Radiometer) case build 12-Apr-2018 16:00:58 + // This holds the most recent last integration time for each configDescriptionId - but only for Radiometer data. build 12-Apr-2018 16:00:58 + map lastTimeMap; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 iMSRowBegin = iMSRow; build 12-Apr-2018 16:00:58 unsigned int iASDMIndex = 0; build 12-Apr-2018 16:00:58 for (MainRow * mR: v) { build 12-Apr-2018 16:00:58 @@ -1780,62 +1798,88 @@ int main (int argC, char * argV[]) { build 12-Apr-2018 16:00:58 case ProcessorTypeMod::RADIOMETER : build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 const SDMDataObject& sdo = sdor.read(bdfPath); build 12-Apr-2018 16:00:58 - const SDMDataObject::BinaryPart & flagsBP = sdo.dataStruct().flags(); build 12-Apr-2018 16:00:58 - const vector & flagsAxes = flagsBP.axes(); build 12-Apr-2018 16:00:58 - ostringstream oss; build 12-Apr-2018 16:00:58 - hack06 hack06_instance(oss); build 12-Apr-2018 16:00:58 - for_each(flagsAxes.begin(), flagsAxes.end(), hack06_instance); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Check the validity of the sequence of flags axes (depending on the fact that data are packed or not). build 12-Apr-2018 16:00:58 - if (sdo.hasPackedData()) { build 12-Apr-2018 16:00:58 - if (!regex_match(oss.str(), ALMARadiometerPackedFlagsAxesRegex)) build 12-Apr-2018 16:00:58 - throw ProcessFlagsException("'" + oss.str() + "' is not a valid sequence of flags axes for an ALMA radiometer."); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - else { build 12-Apr-2018 16:00:58 - if (!regex_match(oss.str(), ALMARadiometerFlagsAxesRegex)) build 12-Apr-2018 16:00:58 - throw ProcessFlagsException("'" + oss.str() + "' is not a valid sequence of flags axes for an ALMA radiometer."); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - unsigned int numIntegrations = sdo.hasPackedData() ? sdo.numTime() : sdo.sdmDataSubsets().size(); build 12-Apr-2018 16:00:58 - MSFlagAccumulator accumulator( numIntegrations, antennas.size(), numDD); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (numIntegrations != numIntegration) { build 12-Apr-2018 16:00:58 - infostream << "(the number of integrations actually read in the BDF (numIntegrations = " << numIntegrations << ") is different from the value announced in the Main table (numIntegration = " << numIntegration build 12-Apr-2018 16:00:58 - << "). Using " << numIntegrations << ")"; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + // should this correlationMode be skipped? This is probably always AUTO_ONLY, but this is a general test just in case build 12-Apr-2018 16:00:58 + if ((sdo.correlationMode()==CorrelationModeMod::AUTO_ONLY and ocorrelationMode==CorrelationModeMod::CROSS_ONLY) || build 12-Apr-2018 16:00:58 + (sdo.correlationMode()==CorrelationModeMod::CROSS_ONLY and ocorrelationMode==CorrelationModeMod::AUTO_ONLY)) { build 12-Apr-2018 16:00:58 + if (debug) { build 12-Apr-2018 16:00:58 + cout << "Skipped file " << bdfPath << " due to output correlation mode selection" << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + const SDMDataObject::BinaryPart & flagsBP = sdo.dataStruct().flags(); build 12-Apr-2018 16:00:58 + const vector & flagsAxes = flagsBP.axes(); build 12-Apr-2018 16:00:58 + ostringstream oss; build 12-Apr-2018 16:00:58 + hack06 hack06_instance(oss); build 12-Apr-2018 16:00:58 + for_each(flagsAxes.begin(), flagsAxes.end(), hack06_instance); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Check the validity of the sequence of flags axes (depending on the fact that data are packed or not). build 12-Apr-2018 16:00:58 + // also check tos ee if the first integration should be skipped - only done for packed data build 12-Apr-2018 16:00:58 + // must be known before accumulator is instantiated. build 12-Apr-2018 16:00:58 + bool skipFirstIntegration = false; build 12-Apr-2018 16:00:58 + if (sdo.hasPackedData()) { build 12-Apr-2018 16:00:58 + if (!regex_match(oss.str(), ALMARadiometerPackedFlagsAxesRegex)) build 12-Apr-2018 16:00:58 + throw ProcessFlagsException("'" + oss.str() + "' is not a valid sequence of flags axes for an ALMA radiometer."); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // determine if the first integration should be skipped due a duplicate time from a subscan. build 12-Apr-2018 16:00:58 + const SDMDataSubset& sdmDataSubset = sdo.sdmDataSubsets()[0]; build 12-Apr-2018 16:00:58 + int64_t deltaTime = sdmDataSubset.interval() / sdo.numTime(); build 12-Apr-2018 16:00:58 + int64_t startTime = (int64_t)sdmDataSubset.time() - (int64_t)sdmDataSubset.interval()/2LL + deltaTime/2LL; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // should the first integration be skipped? Any actual skipping happens later. build 12-Apr-2018 16:00:58 + skipFirstIntegration = checkDupInts && lastTimeMap[mR->getConfigDescriptionId()] == ArrayTime(startTime).getMJD(); build 12-Apr-2018 16:00:58 + if (debug && skipFirstIntegration) { build 12-Apr-2018 16:00:58 + cout << "Duplicate time seen in Row : " << mainRowIndex[iASDMIndex] build 12-Apr-2018 16:00:58 + << " cdId : " << mR->getConfigDescriptionId() build 12-Apr-2018 16:00:58 + << " " << mR->getDataUID().getEntityId().toString() build 12-Apr-2018 16:00:58 + << " numTime : " << sdo.numTime() build 12-Apr-2018 16:00:58 + << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + lastTimeMap[mR->getConfigDescriptionId()] = ArrayTime(startTime+(sdo.numTime()-1)*deltaTime).getMJD(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + if (!regex_match(oss.str(), ALMARadiometerFlagsAxesRegex)) build 12-Apr-2018 16:00:58 + throw ProcessFlagsException("'" + oss.str() + "' is not a valid sequence of flags axes for an ALMA radiometer."); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + unsigned int numIntegrations = sdo.hasPackedData() ? sdo.numTime() : sdo.sdmDataSubsets().size(); build 12-Apr-2018 16:00:58 + if (numIntegrations != numIntegration) { build 12-Apr-2018 16:00:58 + infostream << "(the number of integrations actually read in the BDF (numIntegrations = " << numIntegrations << ") is different from the value announced in the Main table (numIntegration = " << numIntegration build 12-Apr-2018 16:00:58 + << "). Using " << numIntegrations << ")"; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + MSFlagAccumulator accumulator(numIntegrations, antennas.size(), numDD); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - const FLAGSTYPE * flags_p = NULL; build 12-Apr-2018 16:00:58 - unsigned int numFlags = 0; build 12-Apr-2018 16:00:58 + const FLAGSTYPE * flags_p = NULL; build 12-Apr-2018 16:00:58 + unsigned int numFlags = 0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - if (sdo.hasPackedData()) { build 12-Apr-2018 16:00:58 - numFlags = sdo.tpDataSubset().flags(flags_p); build 12-Apr-2018 16:00:58 - pair flagsPair(numFlags, flags_p); build 12-Apr-2018 16:00:58 - accumulator.resetIntegration(); build 12-Apr-2018 16:00:58 - traverseALMARadiometerFlagsAxes(numIntegrations, sdo.dataStruct().basebands(), antennas, flagsPair, flagEval, accumulator); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - else { build 12-Apr-2018 16:00:58 - const vector& sdmDataSubsets = sdo.sdmDataSubsets(); build 12-Apr-2018 16:00:58 - accumulator.resetIntegration(); build 12-Apr-2018 16:00:58 - for (unsigned int iIntegration = 0; iIntegration < numIntegrations; iIntegration++) { build 12-Apr-2018 16:00:58 - numFlags = sdmDataSubsets[iIntegration].flags(flags_p); build 12-Apr-2018 16:00:58 + if (sdo.hasPackedData()) { build 12-Apr-2018 16:00:58 + numFlags = sdo.tpDataSubset().flags(flags_p); build 12-Apr-2018 16:00:58 pair flagsPair(numFlags, flags_p); build 12-Apr-2018 16:00:58 - traverseALMARadiometerFlagsAxes(1, sdo.dataStruct().basebands(), antennas, flagsPair, flagEval, accumulator); build 12-Apr-2018 16:00:58 + accumulator.resetIntegration(); build 12-Apr-2018 16:00:58 + traverseALMARadiometerFlagsAxes(numIntegrations, sdo.dataStruct().basebands(), antennas, flagsPair, flagEval, accumulator); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - // MAFlagAccumulator::flagCell() just returns a data member, it doesn't change anything build 12-Apr-2018 16:00:58 - // in the object, and here, the returned value (x) is not used. So this can be build 12-Apr-2018 16:00:58 - // safely commented out. build 12-Apr-2018 16:00:58 - // const vector < vector < vector > >& x = accumulator.flagCell(); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - infostream.str(""); build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + // duplicate integrations are not checked or skipped here build 12-Apr-2018 16:00:58 + const vector& sdmDataSubsets = sdo.sdmDataSubsets(); build 12-Apr-2018 16:00:58 + accumulator.resetIntegration(); build 12-Apr-2018 16:00:58 + for (unsigned int iIntegration = 0; iIntegration < numIntegrations; iIntegration++) { build 12-Apr-2018 16:00:58 + numFlags = sdmDataSubsets[iIntegration].flags(flags_p); build 12-Apr-2018 16:00:58 + pair flagsPair(numFlags, flags_p); build 12-Apr-2018 16:00:58 + traverseALMARadiometerFlagsAxes(1, sdo.dataStruct().basebands(), antennas, flagsPair, flagEval, accumulator); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // MAFlagAccumulator::flagCell() just returns a data member, it doesn't change anything build 12-Apr-2018 16:00:58 + // in the object, and here, the returned value (x) is not used. So this can be build 12-Apr-2018 16:00:58 + // safely commented out. build 12-Apr-2018 16:00:58 + // const vector < vector < vector > >& x = accumulator.flagCell(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + infostream.str(""); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - infostream << "ASDM Main row #" << mainRowIndex[iASDMIndex] << " - " << numIntegrations << "/" << numIntegrations << " integrations done so far."; build 12-Apr-2018 16:00:58 - info(infostream.str()); build 12-Apr-2018 16:00:58 + infostream << "ASDM Main row #" << mainRowIndex[iASDMIndex] << " - " << numIntegrations << "/" << numIntegrations << " integrations done so far."; build 12-Apr-2018 16:00:58 + info(infostream.str()); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + pair putReturn = put(accumulator, iMSRow, flag, flagRow,skipFirstIntegration); build 12-Apr-2018 16:00:58 + // accumulator.dump(cout, true); build 12-Apr-2018 16:00:58 + iMSRow = putReturn.first; build 12-Apr-2018 16:00:58 + numFlaggedRows = putReturn.second; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 sdor.done(); build 12-Apr-2018 16:00:58 - pair putReturn = put(accumulator, iMSRow, flag, flagRow); build 12-Apr-2018 16:00:58 - // accumulator.dump(cout, true); build 12-Apr-2018 16:00:58 - iMSRow = putReturn.first; build 12-Apr-2018 16:00:58 - numFlaggedRows = putReturn.second; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/casaqt/QwtPlotter/QPCanvas.cc b/code/casaqt/QwtPlotter/QPCanvas.cc build 12-Apr-2018 16:00:58 index ea4dd15..01e3279 100644 build 12-Apr-2018 16:00:58 --- a/code/casaqt/QwtPlotter/QPCanvas.cc build 12-Apr-2018 16:00:58 +++ b/code/casaqt/QwtPlotter/QPCanvas.cc build 12-Apr-2018 16:00:58 @@ -38,6 +38,7 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 using namespace std; build 12-Apr-2018 16:00:58 @@ -637,13 +638,22 @@ void QPCanvas::setAxesRanges(PlotAxis xAxis, double xFrom, double xTo, build 12-Apr-2018 16:00:58 bool changed = false; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // set bounds build 12-Apr-2018 16:00:58 - if(xFrom != xTo) { build 12-Apr-2018 16:00:58 - m_canvas.setAxisScale(QPOptions::axis(xAxis), xFrom, xTo, build 12-Apr-2018 16:00:58 - m_canvas.axisStepSize(QPOptions::axis(xAxis))); build 12-Apr-2018 16:00:58 + if (xFrom != xTo) { build 12-Apr-2018 16:00:58 + if ((axisScale(xAxis) >= PlotAxisScale::DATE_MJ_SEC) && (xTo-xFrom)>120.0) { build 12-Apr-2018 16:00:58 + setTimeScaleDiv(xAxis, xFrom, xTo); // ticks to even steps/minutes build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + m_canvas.setAxisScale(QPOptions::axis(xAxis), xFrom, xTo, build 12-Apr-2018 16:00:58 + m_canvas.axisStepSize(QPOptions::axis(xAxis))); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 changed = true; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if(yAxis != xAxis && yFrom != yTo) { build 12-Apr-2018 16:00:58 - m_canvas.setAxisScale(QPOptions::axis(yAxis), yFrom, yTo); build 12-Apr-2018 16:00:58 + if (axisScale(yAxis) >= PlotAxisScale::DATE_MJ_SEC && (yTo-yFrom)>120.0) { build 12-Apr-2018 16:00:58 + setTimeScaleDiv(yAxis, yFrom, yTo); // ticks to even steps/minutes build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + m_canvas.setAxisScale(QPOptions::axis(yAxis), yFrom, yTo); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 changed = true; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -681,7 +691,38 @@ void QPCanvas::setAxesRanges(PlotAxis xAxis, double xFrom, double xTo, build 12-Apr-2018 16:00:58 logMethod(CLASS_NAME, "setAxesRanges", false); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +void QPCanvas::setTimeScaleDiv(PlotAxis axis, double from, double to) { build 12-Apr-2018 16:00:58 + // Set step size for ticks to even n* 10s, 30s, 1min, or 1hr steps; build 12-Apr-2018 16:00:58 + // autoscale for linear scale uses even base-10 steps build 12-Apr-2018 16:00:58 + // so e.g. 100 sec->1:40 step, 1000 sec->16:40 step build 12-Apr-2018 16:00:58 + QwtPlot::Axis qwtAxis = QPOptions::axis(axis); build 12-Apr-2018 16:00:58 + int majorSteps = m_canvas.axisMaxMajor(qwtAxis)-1; build 12-Apr-2018 16:00:58 + int minorSteps = m_canvas.axisMaxMinor(qwtAxis); build 12-Apr-2018 16:00:58 + double step(10.0), interval(to - from); build 12-Apr-2018 16:00:58 + if (interval > 36000.0) build 12-Apr-2018 16:00:58 + step = 3600.0; build 12-Apr-2018 16:00:58 + else if (interval > 600.0) build 12-Apr-2018 16:00:58 + step = 60.0; build 12-Apr-2018 16:00:58 + else if (interval > 120.0) build 12-Apr-2018 16:00:58 + step = 30.0; build 12-Apr-2018 16:00:58 + double stepSize(step); build 12-Apr-2018 16:00:58 + int n(1), nsteps(interval/stepSize); build 12-Apr-2018 16:00:58 + while (nsteps > majorSteps) { build 12-Apr-2018 16:00:58 + stepSize = ++n * step; build 12-Apr-2018 16:00:58 + nsteps = interval / stepSize; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // add margins build 12-Apr-2018 16:00:58 + from -= stepSize; build 12-Apr-2018 16:00:58 + to += stepSize; build 12-Apr-2018 16:00:58 + if (interval > 600.0) { build 12-Apr-2018 16:00:58 + // convert to and from values to even hh[:mm] build 12-Apr-2018 16:00:58 + from -= fmod(from, step); build 12-Apr-2018 16:00:58 + to += fmod(to, step); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + QwtScaleDiv div = m_canvas.axisScaleEngine(qwtAxis)->divideScale(from, to, build 12-Apr-2018 16:00:58 + majorSteps, minorSteps, stepSize); build 12-Apr-2018 16:00:58 + m_canvas.setAxisScaleDiv(qwtAxis, div); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 bool QPCanvas::axesAutoRescale() const { build 12-Apr-2018 16:00:58 return !m_axesRatioLocked && build 12-Apr-2018 16:00:58 diff --git a/code/casaqt/QwtPlotter/QPCanvas.qo.h b/code/casaqt/QwtPlotter/QPCanvas.qo.h build 12-Apr-2018 16:00:58 index 476b191..cfe4bd5 100644 build 12-Apr-2018 16:00:58 --- a/code/casaqt/QwtPlotter/QPCanvas.qo.h build 12-Apr-2018 16:00:58 +++ b/code/casaqt/QwtPlotter/QPCanvas.qo.h build 12-Apr-2018 16:00:58 @@ -215,7 +215,7 @@ public: build 12-Apr-2018 16:00:58 // Overrides PlotCanvas::setAxesRanges(). build 12-Apr-2018 16:00:58 void setAxesRanges(PlotAxis xAxis, double xFrom, double xTo, build 12-Apr-2018 16:00:58 PlotAxis yAxis, double yFrom, double yTo); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Implements PlotCanvas::axesAutoRescale(). build 12-Apr-2018 16:00:58 bool axesAutoRescale() const; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -579,6 +579,8 @@ private: build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 const QwtScaleDiv* getAxisScaleDiv(int axisId) const; build 12-Apr-2018 16:00:58 + // set time scale to even hh:mm build 12-Apr-2018 16:00:58 + void setTimeScaleDiv(PlotAxis axis, double from, double to); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 QSize minSizeHint; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/casaqt/QwtPlotter/QPCanvasHelpers.cc b/code/casaqt/QwtPlotter/QPCanvasHelpers.cc build 12-Apr-2018 16:00:58 index c7e44a4..9765518 100644 build 12-Apr-2018 16:00:58 --- a/code/casaqt/QwtPlotter/QPCanvasHelpers.cc build 12-Apr-2018 16:00:58 +++ b/code/casaqt/QwtPlotter/QPCanvasHelpers.cc build 12-Apr-2018 16:00:58 @@ -150,12 +150,16 @@ QwtText QPScaleDraw::label(double value) const { build 12-Apr-2018 16:00:58 if(m_referenceSet) value -= m_referenceValue; build 12-Apr-2018 16:00:58 if(m_scale == DATE_MJ_DAY || m_scale == DATE_MJ_SEC) { build 12-Apr-2018 16:00:58 // Relative dates should always be positive values; build 12-Apr-2018 16:00:58 - // if not, default axes range 0-1000 used since no data build 12-Apr-2018 16:00:58 - // and subtracting reference time invalid build 12-Apr-2018 16:00:58 - if (m_referenceSet && (value < 0.0)) build 12-Apr-2018 16:00:58 + // converting neg double to date doesn't work. build 12-Apr-2018 16:00:58 + // If ref value is 0 then all values are zero build 12-Apr-2018 16:00:58 + int timePrecision; build 12-Apr-2018 16:00:58 + if (m_referenceSet && (m_referenceValue==0.0 || value < 0.0)) { build 12-Apr-2018 16:00:58 value = 0.0; build 12-Apr-2018 16:00:58 - int timePrecision = getTickPrecision(); build 12-Apr-2018 16:00:58 - if (timePrecision > 4) timePrecision = 4; build 12-Apr-2018 16:00:58 + timePrecision = 0; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + timePrecision = getTickPrecision(); build 12-Apr-2018 16:00:58 + if (timePrecision > 4) timePrecision = 4; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 return QString(Plotter::formattedDateString( build 12-Apr-2018 16:00:58 m_referenceSet ? m_relativeDateFormat : m_dateFormat, value, build 12-Apr-2018 16:00:58 m_scale, m_referenceSet, timePrecision).c_str()); build 12-Apr-2018 16:00:58 diff --git a/code/casaqt/QwtPlotter/QPExporter.cc b/code/casaqt/QwtPlotter/QPExporter.cc build 12-Apr-2018 16:00:58 index 9938626..787d04e 100644 build 12-Apr-2018 16:00:58 --- a/code/casaqt/QwtPlotter/QPExporter.cc build 12-Apr-2018 16:00:58 +++ b/code/casaqt/QwtPlotter/QPExporter.cc build 12-Apr-2018 16:00:58 @@ -44,32 +44,28 @@ QPExporter::QPExporter() { build 12-Apr-2018 16:00:58 void QPExporter::findGridProperties( QPExportCanvas* grabCanvas, build 12-Apr-2018 16:00:58 QPPlotter* grabPlotter, Int& width, Int& height, build 12-Apr-2018 16:00:58 Int& gridRows, Int& gridCols) { build 12-Apr-2018 16:00:58 - //Figure out the grid size build 12-Apr-2018 16:00:58 width = 0; build 12-Apr-2018 16:00:58 if ( grabPlotter != NULL ){ build 12-Apr-2018 16:00:58 - width = grabPlotter->squareHeight(); // width=height in square build 12-Apr-2018 16:00:58 - if (width==0) // not a square build 12-Apr-2018 16:00:58 - width = grabPlotter->width(); build 12-Apr-2018 16:00:58 + width = grabPlotter->plotWidth(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else if( grabCanvas != NULL ){ build 12-Apr-2018 16:00:58 - width = grabCanvas->canvasWidth(); build 12-Apr-2018 16:00:58 + width = grabCanvas->canvasWidth(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 height = 0; build 12-Apr-2018 16:00:58 if ( grabPlotter != NULL ){ build 12-Apr-2018 16:00:58 - height = grabPlotter->squareHeight(); build 12-Apr-2018 16:00:58 - if (height==0) // not a square build 12-Apr-2018 16:00:58 - height = grabPlotter->height(); build 12-Apr-2018 16:00:58 + height = grabPlotter->plotHeight(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - else if (grabCanvas != NULL ){ build 12-Apr-2018 16:00:58 - height = grabCanvas->canvasHeight(); build 12-Apr-2018 16:00:58 + else if (grabCanvas != NULL ){ build 12-Apr-2018 16:00:58 + height = grabCanvas->canvasHeight(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + //Figure out the grid size build 12-Apr-2018 16:00:58 gridRows = 1; build 12-Apr-2018 16:00:58 gridCols = 1; build 12-Apr-2018 16:00:58 if ( grabPlotter != NULL ){ build 12-Apr-2018 16:00:58 gridRows = grabPlotter->getRowCount(); build 12-Apr-2018 16:00:58 - gridCols = grabPlotter->getColCount(); build 12-Apr-2018 16:00:58 + gridCols = grabPlotter->getColCount(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/casaqt/QwtPlotter/QPPlotter.cc b/code/casaqt/QwtPlotter/QPPlotter.cc build 12-Apr-2018 16:00:58 index 31279ad..e87e3f1 100644 build 12-Apr-2018 16:00:58 --- a/code/casaqt/QwtPlotter/QPPlotter.cc build 12-Apr-2018 16:00:58 +++ b/code/casaqt/QwtPlotter/QPPlotter.cc build 12-Apr-2018 16:00:58 @@ -86,12 +86,12 @@ bool QPPlotter::initColors() { build 12-Apr-2018 16:00:58 // Constructors/Destructors // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 QPPlotter::QPPlotter(QPCanvas* canvas, int logEventFlags, QWidget* parent) : build 12-Apr-2018 16:00:58 - QWidget(parent), m_layout(), m_emitResize(true), m_sizeRatio(1.0) { build 12-Apr-2018 16:00:58 + QWidget(parent), m_layout(), m_emitResize(true), m_plotWidth(0), build 12-Apr-2018 16:00:58 + m_plotHeight(0) { build 12-Apr-2018 16:00:58 setLogFilterEventFlags(logEventFlags); build 12-Apr-2018 16:00:58 logObject(CLASS_NAME, this, true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 initialize(); build 12-Apr-2018 16:00:58 - m_squareHeight = 0; // assume rectangular plot build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(canvas != NULL) { build 12-Apr-2018 16:00:58 m_layout = new PlotLayoutSingle(canvas); build 12-Apr-2018 16:00:58 @@ -101,12 +101,11 @@ QPPlotter::QPPlotter(QPCanvas* canvas, int logEventFlags, QWidget* parent) : build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 QPPlotter::QPPlotter(PlotCanvasLayoutPtr layout, int logEventFlags, build 12-Apr-2018 16:00:58 QWidget* parent) : QWidget(parent), m_layout(layout), build 12-Apr-2018 16:00:58 - m_emitResize(true), m_sizeRatio(1.0) { build 12-Apr-2018 16:00:58 + m_emitResize(true), m_plotWidth(0), m_plotHeight(0) { build 12-Apr-2018 16:00:58 setLogFilterEventFlags(logEventFlags); build 12-Apr-2018 16:00:58 logObject(CLASS_NAME, this, true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 initialize(); build 12-Apr-2018 16:00:58 - m_squareHeight = 0; // assume rectangular plot build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(!m_layout.null()) { build 12-Apr-2018 16:00:58 bool valid = m_layout->isValid(); build 12-Apr-2018 16:00:58 @@ -140,7 +139,7 @@ void QPPlotter::showGUI(bool showGUI) { build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 bool QPPlotter::isGuiShown() const { build 12-Apr-2018 16:00:58 - return m_guiShown; build 12-Apr-2018 16:00:58 + return m_guiShown; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 pair QPPlotter::size() const { build 12-Apr-2018 16:00:58 @@ -150,41 +149,37 @@ pair QPPlotter::size() const { build 12-Apr-2018 16:00:58 void QPPlotter::setSize(int width, int height) { resize(width, height); } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void QPPlotter::makeSquarePlot(bool square, bool waveplot) { build 12-Apr-2018 16:00:58 - if (square) { // make square plot width=height build 12-Apr-2018 16:00:58 - // save rectangle ratio of width to height and new square size build 12-Apr-2018 16:00:58 - // (only first time if exporting iterated plots else ratio=1!) build 12-Apr-2018 16:00:58 - if (m_sizeRatio == 1.0) { build 12-Apr-2018 16:00:58 - pair rectSize = size(); build 12-Apr-2018 16:00:58 - m_sizeRatio = double(rectSize.first) / double(rectSize.second); build 12-Apr-2018 16:00:58 - // save this dimension, size gets reset to 0: build 12-Apr-2018 16:00:58 - // resize event causes setGeometry to be called build 12-Apr-2018 16:00:58 - m_squareHeight = rectSize.second; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // for exported plots build 12-Apr-2018 16:00:58 - if (waveplot) { build 12-Apr-2018 16:00:58 - // uwave/vwave plots have larger values which make yaxis build 12-Apr-2018 16:00:58 - // label wider and scrunches xaxis, so inc width by 10% build 12-Apr-2018 16:00:58 - setSize(m_squareHeight*1.1, m_squareHeight); build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - setSize(m_squareHeight, m_squareHeight); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // for gui plots build 12-Apr-2018 16:00:58 - if (isGuiShown()) { build 12-Apr-2018 16:00:58 - if (waveplot) build 12-Apr-2018 16:00:58 - setCanvasSize(m_squareHeight*1.07, m_squareHeight); build 12-Apr-2018 16:00:58 - else build 12-Apr-2018 16:00:58 - setCanvasSize(m_squareHeight, m_squareHeight); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } else if (m_sizeRatio != 1.0) { // restore rect plot after square build 12-Apr-2018 16:00:58 - pair rectSize = size(); build 12-Apr-2018 16:00:58 - // set width to correct ratio to height build 12-Apr-2018 16:00:58 - int newWidth = int(rectSize.first * m_sizeRatio); build 12-Apr-2018 16:00:58 - setSize(newWidth, rectSize.second); build 12-Apr-2018 16:00:58 - if (isGuiShown()) // this undoes fixed size build 12-Apr-2018 16:00:58 - setCanvasSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); build 12-Apr-2018 16:00:58 - m_sizeRatio = 1.0; // next time, keep width the same build 12-Apr-2018 16:00:58 - m_squareHeight = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + int width, height; build 12-Apr-2018 16:00:58 + if (isGuiShown()) { // use canvas build 12-Apr-2018 16:00:58 + width = canvasWidget()->width(); build 12-Apr-2018 16:00:58 + height = canvasWidget()->height(); build 12-Apr-2018 16:00:58 + if (width > 0) m_plotWidth = width-6; build 12-Apr-2018 16:00:58 + if (height > 0) m_plotHeight = height-6; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (square) { // set canvas size build 12-Apr-2018 16:00:58 + m_plotWidth = m_plotHeight; build 12-Apr-2018 16:00:58 + // uwave/vwave plots have larger values which make yaxis build 12-Apr-2018 16:00:58 + // label wider and scrunches xaxis, so inc width by 10% build 12-Apr-2018 16:00:58 + if (waveplot) m_plotWidth *= 1.1; build 12-Apr-2018 16:00:58 + setSize(m_plotWidth, m_plotHeight); build 12-Apr-2018 16:00:58 + setCanvasSize(m_plotWidth, m_plotHeight); build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + setSize(m_plotWidth, m_plotHeight); build 12-Apr-2018 16:00:58 + // this resets fixed size build 12-Apr-2018 16:00:58 + setCanvasSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { // can't use canvas size build 12-Apr-2018 16:00:58 + width = size().first; build 12-Apr-2018 16:00:58 + height = size().second; build 12-Apr-2018 16:00:58 + if (square) { build 12-Apr-2018 16:00:58 + m_plotHeight = height-6; build 12-Apr-2018 16:00:58 + m_plotWidth = m_plotHeight; build 12-Apr-2018 16:00:58 + if (waveplot) m_plotWidth *= 1.1; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + m_plotWidth = width-6; build 12-Apr-2018 16:00:58 + m_plotHeight = height-6; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 String QPPlotter::windowTitle() const { build 12-Apr-2018 16:00:58 diff --git a/code/casaqt/QwtPlotter/QPPlotter.qo.h b/code/casaqt/QwtPlotter/QPPlotter.qo.h build 12-Apr-2018 16:00:58 index 02864af..5f6d96f 100644 build 12-Apr-2018 16:00:58 --- a/code/casaqt/QwtPlotter/QPPlotter.qo.h build 12-Apr-2018 16:00:58 +++ b/code/casaqt/QwtPlotter/QPPlotter.qo.h build 12-Apr-2018 16:00:58 @@ -232,13 +232,12 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Implements Plotter::makeSquarePlot to set width=height build 12-Apr-2018 16:00:58 virtual void makeSquarePlot(bool square, bool waveplot=false); build 12-Apr-2018 16:00:58 - bool isSquarePlot() { return (m_sizeRatio != 1.0); } build 12-Apr-2018 16:00:58 - // For iteration plot exports build 12-Apr-2018 16:00:58 - int squareHeight() { return m_squareHeight; } build 12-Apr-2018 16:00:58 + inline int plotWidth() { return m_plotWidth; } build 12-Apr-2018 16:00:58 + inline int plotHeight() { return m_plotHeight; } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 virtual bool exportPlot(const PlotExportFormat& format ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - //Return the number of rows and columns in the current grid. build 12-Apr-2018 16:00:58 + //Return the number of rows and columns in the current grid. build 12-Apr-2018 16:00:58 int getRowCount(); build 12-Apr-2018 16:00:58 int getColCount(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -288,13 +287,6 @@ private: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 QList externalAxes; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Save height for square iteration plots build 12-Apr-2018 16:00:58 - int m_squareHeight; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // For restoring rectangular plot after square one; build 12-Apr-2018 16:00:58 - // ratio of width/height build 12-Apr-2018 16:00:58 - double m_sizeRatio; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Sets up the canvas QFrame for the current layout. build 12-Apr-2018 16:00:58 void setupCanvasFrame(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -304,6 +296,10 @@ private: build 12-Apr-2018 16:00:58 void clearExternalAxes(); build 12-Apr-2018 16:00:58 void emptyLayout(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // for exports build 12-Apr-2018 16:00:58 + int m_plotWidth; build 12-Apr-2018 16:00:58 + int m_plotHeight; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Static // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Used to initialize GLOBAL_COLORS. build 12-Apr-2018 16:00:58 diff --git a/code/casatools/Proc/Registrar.cc b/code/casatools/Proc/Registrar.cc build 12-Apr-2018 16:00:58 index de9f1b4..c6469cf 100644 build 12-Apr-2018 16:00:58 --- a/code/casatools/Proc/Registrar.cc build 12-Apr-2018 16:00:58 +++ b/code/casatools/Proc/Registrar.cc build 12-Apr-2018 16:00:58 @@ -114,17 +114,27 @@ namespace casatools { /** namespace for CASAtools classes within "CASA code" * build 12-Apr-2018 16:00:58 grpcState *state = new grpcState; build 12-Apr-2018 16:00:58 state->reg.reset(new grpcRegistrar(this)); build 12-Apr-2018 16:00:58 ServerBuilder builder; build 12-Apr-2018 16:00:58 - std::string server_address("0.0.0.0:50055"); build 12-Apr-2018 16:00:58 + char address_buf[100]; build 12-Apr-2018 16:00:58 + constexpr char address_template[] = "0.0.0.0:%d"; build 12-Apr-2018 16:00:58 + snprintf(address_buf,sizeof(address_buf),address_template,0); build 12-Apr-2018 16:00:58 + std::string server_address(address_buf); build 12-Apr-2018 16:00:58 + int selected_port = 0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Listen on the given address without any authentication mechanism. build 12-Apr-2018 16:00:58 - builder.AddListeningPort(server_address, grpc::InsecureServerCredentials()); build 12-Apr-2018 16:00:58 + builder.AddListeningPort(server_address, grpc::InsecureServerCredentials(), &selected_port); build 12-Apr-2018 16:00:58 // Register "service" as the instance through which we'll communicate with build 12-Apr-2018 16:00:58 // clients. In this case it corresponds to an *synchronous* service. build 12-Apr-2018 16:00:58 builder.RegisterService(state->reg.get( )); build 12-Apr-2018 16:00:58 // Finally assemble the server. build 12-Apr-2018 16:00:58 state->server = builder.BuildAndStart( ); build 12-Apr-2018 16:00:58 - uri_ = server_address; build 12-Apr-2018 16:00:58 - std::cout << "registry available at " << server_address << std::endl; build 12-Apr-2018 16:00:58 - grpc_state = (void*) state; build 12-Apr-2018 16:00:58 + if ( selected_port > 0 ) { build 12-Apr-2018 16:00:58 + // if an available port can be found, selected_port is set to a value greater than zero build 12-Apr-2018 16:00:58 + snprintf(address_buf,sizeof(address_buf),address_template,selected_port); build 12-Apr-2018 16:00:58 + uri_ = address_buf; build 12-Apr-2018 16:00:58 + std::cout << "registry available at " << uri_ << std::endl; build 12-Apr-2018 16:00:58 + grpc_state = (void*) state; build 12-Apr-2018 16:00:58 + } else delete state; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 #endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/components/ComponentModels/C11Timer.cc b/code/components/ComponentModels/C11Timer.cc build 12-Apr-2018 16:00:58 index 76ac589..acf1821 100755 build 12-Apr-2018 16:00:58 --- a/code/components/ComponentModels/C11Timer.cc build 12-Apr-2018 16:00:58 +++ b/code/components/ComponentModels/C11Timer.cc build 12-Apr-2018 16:00:58 @@ -38,6 +38,10 @@ Double C11Timer::duration() const { build 12-Apr-2018 16:00:58 return _duration.count(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +Double C11Timer::meanDuration() const { build 12-Apr-2018 16:00:58 + return _duration.count()/_nCycles; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 uInt C11Timer::nCycles() const { build 12-Apr-2018 16:00:58 return _nCycles; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/display/QtViewer/QtDBusViewerAdaptor.cc b/code/display/QtViewer/QtDBusViewerAdaptor.cc build 12-Apr-2018 16:00:58 index 654dddf..5213100 100644 build 12-Apr-2018 16:00:58 --- a/code/display/QtViewer/QtDBusViewerAdaptor.cc build 12-Apr-2018 16:00:58 +++ b/code/display/QtViewer/QtDBusViewerAdaptor.cc build 12-Apr-2018 16:00:58 @@ -464,14 +464,13 @@ namespace casa { build 12-Apr-2018 16:00:58 QtDisplayData *result = 0; build 12-Apr-2018 16:00:58 viewer::DisplayDataOptions ddo; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + result = dpg->createDD( to_string(path), datatype, to_string(displaytype), true, build 12-Apr-2018 16:00:58 + -1, false, false, false, ddo ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if ( scaling != 0.0 ) { build 12-Apr-2018 16:00:58 - char buf[1024]; build 12-Apr-2018 16:00:58 - sprintf( buf, "%f", scaling ); build 12-Apr-2018 16:00:58 - ddo.insert( "powercycles", buf ); build 12-Apr-2018 16:00:58 + result->setRasterPowerScaling(scaling); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - result = dpg->createDD( to_string(path), datatype, to_string(displaytype), true, build 12-Apr-2018 16:00:58 - -1, false, false, false, ddo ); build 12-Apr-2018 16:00:58 dpg->addedData( displaytype, result ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 return QDBusVariant(QVariant(get_id( dpg, result, path, displaytype ))); build 12-Apr-2018 16:00:58 diff --git a/code/display/QtViewer/QtDisplayData.cc b/code/display/QtViewer/QtDisplayData.cc build 12-Apr-2018 16:00:58 index 581ff36..7262f80 100644 build 12-Apr-2018 16:00:58 --- a/code/display/QtViewer/QtDisplayData.cc build 12-Apr-2018 16:00:58 +++ b/code/display/QtViewer/QtDisplayData.cc build 12-Apr-2018 16:00:58 @@ -1541,6 +1541,16 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 return iter != clrMapNames_.end() ? true : false; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + void QtDisplayData::setRasterPowerScaling( float powerScale ) { build 12-Apr-2018 16:00:58 + Record rec; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Record powerScaleRecord; build 12-Apr-2018 16:00:58 + powerScaleRecord.define( "value", powerScale ); build 12-Apr-2018 16:00:58 + rec.defineRecord(WCPowerScaleHandler::POWER_CYCLES, powerScaleRecord ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + setOptions( rec, true ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Get/set colormap shift/slope ('fiddle') and brightness/contrast build 12-Apr-2018 16:00:58 // settings. (At present this is usually set for the PC's current build 12-Apr-2018 16:00:58 // colormap via mouse tools. These may want to to into get/setOptions build 12-Apr-2018 16:00:58 diff --git a/code/display/QtViewer/QtDisplayData.qo.h b/code/display/QtViewer/QtDisplayData.qo.h build 12-Apr-2018 16:00:58 index a21c3ef..5d9d416 100644 build 12-Apr-2018 16:00:58 --- a/code/display/QtViewer/QtDisplayData.qo.h build 12-Apr-2018 16:00:58 +++ b/code/display/QtViewer/QtDisplayData.qo.h build 12-Apr-2018 16:00:58 @@ -336,6 +336,9 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void setColormap(const casacore::String& clrMapName) { build 12-Apr-2018 16:00:58 setColormap_(clrMapName); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + void setRasterPowerScaling( float powerScale ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void setHistogramColorMapping( float minValue, float maxValue, float powerScale ); build 12-Apr-2018 16:00:58 // This is used to get the display data to set a saturation range build 12-Apr-2018 16:00:58 // from another image. build 12-Apr-2018 16:00:58 diff --git a/code/flagging/Flagging/AgentFlagger.cc b/code/flagging/Flagging/AgentFlagger.cc build 12-Apr-2018 16:00:58 index 265c370..f0305ed 100644 build 12-Apr-2018 16:00:58 --- a/code/flagging/Flagging/AgentFlagger.cc build 12-Apr-2018 16:00:58 +++ b/code/flagging/Flagging/AgentFlagger.cc build 12-Apr-2018 16:00:58 @@ -53,7 +53,9 @@ AgentFlagger::AgentFlagger () build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 fdh_p = NULL; build 12-Apr-2018 16:00:58 summaryAgent_p = NULL; build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 displayAgent_p = NULL; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 done(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -118,9 +120,11 @@ AgentFlagger::done() build 12-Apr-2018 16:00:58 summaryAgent_p = NULL; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 if(displayAgent_p){ build 12-Apr-2018 16:00:58 displayAgent_p = NULL; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 mode_p = ""; build 12-Apr-2018 16:00:58 agents_config_list_p.clear(); build 12-Apr-2018 16:00:58 @@ -688,9 +692,11 @@ AgentFlagger::initAgents() build 12-Apr-2018 16:00:58 */ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Get the display agent. build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 if (mode.compare("display") == 0){ build 12-Apr-2018 16:00:58 displayAgent_p = (FlagAgentDisplay *) fa; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Add the agent to the FlagAgentList build 12-Apr-2018 16:00:58 agents_list_p.push_back(fa); build 12-Apr-2018 16:00:58 @@ -785,8 +791,10 @@ AgentFlagger::run(Bool writeflags, Bool sequential) build 12-Apr-2018 16:00:58 combinedReport = agents_list_p.gatherReports(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Send reports to display agent build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 if (displayAgent_p) build 12-Apr-2018 16:00:58 displayAgent_p->displayReports(combinedReport); build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 agents_list_p.clear(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/flagging/Flagging/AgentFlagger.h b/code/flagging/Flagging/AgentFlagger.h build 12-Apr-2018 16:00:58 index b5a3c8e..f750b39 100644 build 12-Apr-2018 16:00:58 --- a/code/flagging/Flagging/AgentFlagger.h build 12-Apr-2018 16:00:58 +++ b/code/flagging/Flagging/AgentFlagger.h build 12-Apr-2018 16:00:58 @@ -41,7 +41,9 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 @@ -247,7 +249,9 @@ protected: build 12-Apr-2018 16:00:58 casacore::Bool mixed_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Display agent parameters build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 FlagAgentDisplay *displayAgent_p; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // variables for initAgents build 12-Apr-2018 16:00:58 FlagDataHandler *fdh_p; build 12-Apr-2018 16:00:58 diff --git a/code/flagging/Flagging/FlagAgentBase.cc b/code/flagging/Flagging/FlagAgentBase.cc build 12-Apr-2018 16:00:58 index 70405be..41ac901 100644 build 12-Apr-2018 16:00:58 --- a/code/flagging/Flagging/FlagAgentBase.cc build 12-Apr-2018 16:00:58 +++ b/code/flagging/Flagging/FlagAgentBase.cc build 12-Apr-2018 16:00:58 @@ -32,7 +32,9 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 using namespace casacore; build 12-Apr-2018 16:00:58 @@ -312,12 +314,14 @@ FlagAgentBase::create (FlagDataHandler *dh,Record config) build 12-Apr-2018 16:00:58 FlagAgentAntennaIntegrations* agent = new FlagAgentAntennaIntegrations(dh,config,writePrivateFlags, true); build 12-Apr-2018 16:00:58 return agent; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 // Display build 12-Apr-2018 16:00:58 else if (mode.compare("display")==0) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 FlagAgentDisplay* agent = new FlagAgentDisplay(dh,config,writePrivateFlags); build 12-Apr-2018 16:00:58 return agent; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 cerr << "FlagAgentFactory::" << __FUNCTION__ << " Mode " << mode << " not supported" << endl; build 12-Apr-2018 16:00:58 diff --git a/code/graphics/GenericPlotter/Plotter.cc b/code/graphics/GenericPlotter/Plotter.cc build 12-Apr-2018 16:00:58 index 4eafaf9..73bdc62 100644 build 12-Apr-2018 16:00:58 --- a/code/graphics/GenericPlotter/Plotter.cc build 12-Apr-2018 16:00:58 +++ b/code/graphics/GenericPlotter/Plotter.cc build 12-Apr-2018 16:00:58 @@ -115,7 +115,7 @@ String Plotter::formattedDateString(const String& format, double value, build 12-Apr-2018 16:00:58 if(t.hours() < 10) ss << '0'; build 12-Apr-2018 16:00:58 ss << t.hours(); build 12-Apr-2018 16:00:58 } else { build 12-Apr-2018 16:00:58 - if(hours < 10) ss << '0'; build 12-Apr-2018 16:00:58 + if (hours < 10) ss << '0'; build 12-Apr-2018 16:00:58 ss << hours; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageCollapser2.cc b/code/imageanalysis/ImageAnalysis/ImageCollapser2.cc build 12-Apr-2018 16:00:58 index 49ed6b4..b48734b 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageCollapser2.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageCollapser2.cc build 12-Apr-2018 16:00:58 @@ -83,7 +83,7 @@ template<> void ImageCollapser::_doHighPerf( build 12-Apr-2018 16:00:58 else if (doMADM) { build 12-Apr-2018 16:00:58 auto x = stats.getMedianAbsDevMed(); build 12-Apr-2018 16:00:58 if (_aggType == ImageCollapserData::XMADM) { build 12-Apr-2018 16:00:58 - x *= PROBIT_3_4; build 12-Apr-2018 16:00:58 + x *= C::probit_3_4; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 outImage.putAt(x, stepper.position()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -97,7 +97,7 @@ template<> void ImageCollapser::_doHighPerf( build 12-Apr-2018 16:00:58 else if (doMADM) { build 12-Apr-2018 16:00:58 auto x = stats.getMedianAbsDevMed(); build 12-Apr-2018 16:00:58 if (_aggType == ImageCollapserData::XMADM) { build 12-Apr-2018 16:00:58 - x *= PROBIT_3_4; build 12-Apr-2018 16:00:58 + x *= C::probit_3_4; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 outImage.putAt(x, stepper.position()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageFactory2.cc b/code/imageanalysis/ImageAnalysis/ImageFactory2.cc build 12-Apr-2018 16:00:58 index f7fbb90..f9b645f 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageFactory2.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageFactory2.cc build 12-Apr-2018 16:00:58 @@ -353,29 +353,13 @@ pair ImageFactory::fromFile(const String& infile, Bool cache) { build 12-Apr-2018 16:00:58 pair ImageFactory::_fromLatticeBase(unique_ptr& latt) { build 12-Apr-2018 16:00:58 DataType dataType = latt->dataType(); build 12-Apr-2018 16:00:58 pair ret(nullptr, nullptr); build 12-Apr-2018 16:00:58 - if (isReal(dataType)) { build 12-Apr-2018 16:00:58 - if (dataType != TpFloat) { build 12-Apr-2018 16:00:58 - ostringstream os; build 12-Apr-2018 16:00:58 - os << dataType; build 12-Apr-2018 16:00:58 - LogIO log; build 12-Apr-2018 16:00:58 - log << LogOrigin(className(), __func__); build 12-Apr-2018 16:00:58 - log << LogIO::WARN << "Converting " << os.str() << " precision pixel values " build 12-Apr-2018 16:00:58 - << "to float precision in CASA image" << LogIO::POST; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + if (dataType == TpFloat) { build 12-Apr-2018 16:00:58 return pair( build 12-Apr-2018 16:00:58 SPIIF(dynamic_cast *>(latt.release())), build 12-Apr-2018 16:00:58 SPIIC(nullptr) build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - else if (isComplex(dataType)) { build 12-Apr-2018 16:00:58 - if (dataType != TpComplex) { build 12-Apr-2018 16:00:58 - ostringstream os; build 12-Apr-2018 16:00:58 - os << dataType; build 12-Apr-2018 16:00:58 - LogIO log; build 12-Apr-2018 16:00:58 - log << LogOrigin(className(), __func__); build 12-Apr-2018 16:00:58 - log << LogIO::WARN << "Converting " << os.str() << " precision pixel values " build 12-Apr-2018 16:00:58 - << "to complex float precision in CASA image" << LogIO::POST; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + else if (dataType == TpComplex) { build 12-Apr-2018 16:00:58 return pair( build 12-Apr-2018 16:00:58 SPIIF(nullptr), build 12-Apr-2018 16:00:58 SPIIC(dynamic_cast *>(latt.release())) build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageMomentsTask.tcc b/code/imageanalysis/ImageAnalysis/ImageMomentsTask.tcc build 12-Apr-2018 16:00:58 index f80041d..d84e6b6 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageMomentsTask.tcc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageMomentsTask.tcc build 12-Apr-2018 16:00:58 @@ -28,11 +28,11 @@ template SPIIT ImageMomentsTask::makeMoments() const { build 12-Apr-2018 16:00:58 SPIIT pIm; build 12-Apr-2018 16:00:58 try { build 12-Apr-2018 16:00:58 SPCIIT x; build 12-Apr-2018 16:00:58 - if (this->_getImage()->imageType() != PagedImage::className()) { build 12-Apr-2018 16:00:58 + if (this->_getImage()->imageType() == FITSImage::className()) { build 12-Apr-2018 16:00:58 Path tmpImage = File::newUniqueName (".", "moments.scratch.image"); build 12-Apr-2018 16:00:58 tmpImageName = tmpImage.baseName(); build 12-Apr-2018 16:00:58 *this->_getLog() << LogIO::NORMAL build 12-Apr-2018 16:00:58 - << "Calculating moments of non-paged images can be notoriously slow, " build 12-Apr-2018 16:00:58 + << "Calculating moments of FITS images can be notoriously slow, " build 12-Apr-2018 16:00:58 << "so converting to a CASA temporary paged image named " build 12-Apr-2018 16:00:58 << tmpImageName << " first which will be written to the current " build 12-Apr-2018 16:00:58 << "directory" << LogIO::POST; build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImagePolProxy.cc b/code/imageanalysis/ImageAnalysis/ImagePolProxy.cc build 12-Apr-2018 16:00:58 index 2d88e1b..c2a78c4 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImagePolProxy.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImagePolProxy.cc build 12-Apr-2018 16:00:58 @@ -708,56 +708,51 @@ namespace casa { //# name space casa begins build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Find Rotation Measure from traditional method build 12-Apr-2018 16:00:58 - void ImagePol::rotationMeasure(const String& outRM, const String& outRMErr, build 12-Apr-2018 16:00:58 - const String& outPA0, const String& outPA0Err, build 12-Apr-2018 16:00:58 - const String& outNTurns, const String& outChiSq, build 12-Apr-2018 16:00:58 - Int axis2, Float sigmaQU, Float rmFg, build 12-Apr-2018 16:00:58 - Float rmMax, Float maxPaErr/*, build 12-Apr-2018 16:00:58 - const String& plotter, build 12-Apr-2018 16:00:58 - Int nx, Int ny*/) { build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 - if(itsImPol==0){ build 12-Apr-2018 16:00:58 - *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 - << LogIO::POST; build 12-Apr-2018 16:00:58 - return; build 12-Apr-2018 16:00:58 +void ImagePol::rotationMeasure( build 12-Apr-2018 16:00:58 + const String& outRM, const String& outRMErr, build 12-Apr-2018 16:00:58 + const String& outPA0, const String& outPA0Err, build 12-Apr-2018 16:00:58 + const String& outNTurns, const String& outChiSq, build 12-Apr-2018 16:00:58 + Int axis2, Float sigmaQU, Float rmFg, build 12-Apr-2018 16:00:58 + Float rmMax, Float maxPaErr build 12-Apr-2018 16:00:58 +) { build 12-Apr-2018 16:00:58 + // Find Rotation Measure from traditional method build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("ImagePol", __func__); build 12-Apr-2018 16:00:58 + if(itsImPol==0) { build 12-Apr-2018 16:00:58 + *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 + << LogIO::POST; build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Make output images. Give them all a mask as we don't know if output build 12-Apr-2018 16:00:58 // will be masked or not. build 12-Apr-2018 16:00:58 CoordinateSystem cSysRM; build 12-Apr-2018 16:00:58 Int fAxis, sAxis; build 12-Apr-2018 16:00:58 Int axis = axis2; build 12-Apr-2018 16:00:58 - IPosition shapeRM = build 12-Apr-2018 16:00:58 - itsImPol->rotationMeasureShape(cSysRM, fAxis, sAxis, *itsLog, axis); build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 + IPosition shapeRM = itsImPol->rotationMeasureShape( build 12-Apr-2018 16:00:58 + cSysRM, fAxis, sAxis, *itsLog, axis build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 ImageInterface* pRMOut = 0; build 12-Apr-2018 16:00:58 ImageInterface* pRMOutErr = 0; build 12-Apr-2018 16:00:58 makeImage (pRMOut, outRM, cSysRM, shapeRM, true, false); build 12-Apr-2018 16:00:58 // manage naked pointers so exception throwing doesn't leave open images build 12-Apr-2018 16:00:58 std::unique_ptr > managed5(pRMOut); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 makeImage (pRMOutErr, outRMErr, cSysRM, shapeRM, true, false); build 12-Apr-2018 16:00:58 std::unique_ptr > managed6(pRMOutErr); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 CoordinateSystem cSysPA; build 12-Apr-2018 16:00:58 - IPosition shapePA = build 12-Apr-2018 16:00:58 - itsImPol->positionAngleShape(cSysPA, fAxis, sAxis, *itsLog, axis); build 12-Apr-2018 16:00:58 + IPosition shapePA = itsImPol->positionAngleShape( build 12-Apr-2018 16:00:58 + cSysPA, fAxis, sAxis, *itsLog, axis build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 ImageInterface* pPA0Out = 0; build 12-Apr-2018 16:00:58 ImageInterface* pPA0OutErr = 0; build 12-Apr-2018 16:00:58 makeImage (pPA0Out, outPA0, cSysPA, shapePA, true, false); build 12-Apr-2018 16:00:58 std::unique_ptr > managed1(pPA0Out); build 12-Apr-2018 16:00:58 makeImage (pPA0OutErr, outPA0Err, cSysPA, shapePA, true, false); build 12-Apr-2018 16:00:58 std::unique_ptr > managed2(pPA0OutErr); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 ImageInterface* pNTurnsOut = 0; build 12-Apr-2018 16:00:58 makeImage (pNTurnsOut, outNTurns, cSysRM, shapeRM, true, false); build 12-Apr-2018 16:00:58 std::unique_ptr > managed3(pNTurnsOut); build 12-Apr-2018 16:00:58 ImageInterface* pChiSqOut = 0; build 12-Apr-2018 16:00:58 makeImage (pChiSqOut, outChiSq, cSysRM, shapeRM, true, false); build 12-Apr-2018 16:00:58 std::unique_ptr > managed4(pChiSqOut); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 itsImPol->rotationMeasure( build 12-Apr-2018 16:00:58 pRMOut, pRMOutErr, pPA0Out, pPA0OutErr, build 12-Apr-2018 16:00:58 pNTurnsOut, pChiSqOut, build 12-Apr-2018 16:00:58 @@ -766,24 +761,24 @@ namespace casa { //# name space casa begins build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 auto p = itsImPol->imageInterface(); build 12-Apr-2018 16:00:58 if (pRMOut) { build 12-Apr-2018 16:00:58 - copyMiscellaneous (*pRMOut, *p); build 12-Apr-2018 16:00:58 + copyMiscellaneous (*pRMOut, *p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (pRMOutErr) { build 12-Apr-2018 16:00:58 - copyMiscellaneous (*pRMOutErr, *p); build 12-Apr-2018 16:00:58 + copyMiscellaneous (*pRMOutErr, *p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (pPA0Out) { build 12-Apr-2018 16:00:58 - copyMiscellaneous (*pPA0Out, *p); build 12-Apr-2018 16:00:58 + copyMiscellaneous (*pPA0Out, *p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (pPA0OutErr) { build 12-Apr-2018 16:00:58 copyMiscellaneous (*pPA0OutErr, *p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (pNTurnsOut) { build 12-Apr-2018 16:00:58 - copyMiscellaneous (*pNTurnsOut, *p); build 12-Apr-2018 16:00:58 + copyMiscellaneous (*pNTurnsOut, *p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (pChiSqOut) { build 12-Apr-2018 16:00:58 - copyMiscellaneous (*pChiSqOut, *p); build 12-Apr-2018 16:00:58 + copyMiscellaneous (*pChiSqOut, *p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Make a complex image build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImagePolarimetry.cc b/code/imageanalysis/ImageAnalysis/ImagePolarimetry.cc build 12-Apr-2018 16:00:58 index dfd50d6..e22a51e 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImagePolarimetry.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImagePolarimetry.cc build 12-Apr-2018 16:00:58 @@ -178,7 +178,7 @@ void ImagePolarimetry::_setInfo(ImageInterface& im, const StokesTypes sto build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageExpr ImagePolarimetry::complexFractionalLinearPolarization() build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 hasQU(); build 12-Apr-2018 16:00:58 if (itsStokesPtr[ImagePolarimetry::I]==0) { build 12-Apr-2018 16:00:58 os << "This image does not have Stokes I so cannot provide fractional linear polarization" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 @@ -198,7 +198,7 @@ ImageExpr ImagePolarimetry::complexFractionalLinearPolarization() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageExpr ImagePolarimetry::fracLinPol(Bool debias, Float clip, Float sigma) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 hasQU(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (itsStokesPtr[ImagePolarimetry::I]==0) { build 12-Apr-2018 16:00:58 @@ -237,7 +237,7 @@ ImageExpr ImagePolarimetry::sigmaFracLinPol(Float clip, Float sigma) build 12-Apr-2018 16:00:58 // sigmaI = sigmaI build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 hasQU(); build 12-Apr-2018 16:00:58 if (itsStokesPtr[ImagePolarimetry::I]==0) { build 12-Apr-2018 16:00:58 os << "This image does not have Stokes I so cannot provide fractional linear polarization" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 @@ -275,7 +275,7 @@ ImageExpr ImagePolarimetry::sigmaFracLinPol(Float clip, Float sigma) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageExpr ImagePolarimetry::fracTotPol(Bool debias, Float clip, Float sigma) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 Bool doLin, doCirc; build 12-Apr-2018 16:00:58 _setDoLinDoCirc(doLin, doCirc); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -302,7 +302,7 @@ ImageExpr ImagePolarimetry::fracTotPol(Bool debias, Float clip, Float sig build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void ImagePolarimetry::_setDoLinDoCirc(Bool& doLin, Bool& doCirc) const { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 doLin = ( build 12-Apr-2018 16:00:58 itsStokesPtr[ImagePolarimetry::Q]!=0 build 12-Apr-2018 16:00:58 && itsStokesPtr[ImagePolarimetry::U]!=0 build 12-Apr-2018 16:00:58 @@ -342,7 +342,7 @@ ImageExpr ImagePolarimetry::sigmaFracTotPol(Float clip, Float sigma) build 12-Apr-2018 16:00:58 // sigmaI = sigmaI build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 Bool doLin, doCirc; build 12-Apr-2018 16:00:58 _setDoLinDoCirc(doLin, doCirc); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -380,7 +380,7 @@ ImageExpr ImagePolarimetry::sigmaFracTotPol(Float clip, Float sigma) build 12-Apr-2018 16:00:58 void ImagePolarimetry::fourierRotationMeasure(ImageInterface& cpol, build 12-Apr-2018 16:00:58 Bool zeroZeroLag) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 hasQU(); build 12-Apr-2018 16:00:58 _checkQUBeams(true, false); build 12-Apr-2018 16:00:58 // Check image shape build 12-Apr-2018 16:00:58 @@ -457,7 +457,7 @@ Float ImagePolarimetry::sigmaLinPolInt(Float clip, Float sigma) build 12-Apr-2018 16:00:58 // sigma_P = sigma_QU build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 if (itsStokesPtr[ImagePolarimetry::Q]==0 && itsStokesPtr[ImagePolarimetry::U]==0) { build 12-Apr-2018 16:00:58 os << "This image does not have Stokes Q and U so cannot provide linear polarization" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -478,7 +478,7 @@ Float ImagePolarimetry::sigmaLinPolInt(Float clip, Float sigma) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageExpr ImagePolarimetry::linPolPosAng(Bool radians) const build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 if (itsStokesPtr[ImagePolarimetry::Q]==0 && itsStokesPtr[ImagePolarimetry::U]==0) { build 12-Apr-2018 16:00:58 os << "This image does not have Stokes Q and U so cannot provide linear polarization" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -552,7 +552,7 @@ ImageExpr ImagePolarimetry::sigmaLinPolPosAng(Bool radians, Float clip, F build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Float ImagePolarimetry::sigma(Float clip) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 Float sigma2 = 0.0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (itsStokesPtr[ImagePolarimetry::V]!=0) { build 12-Apr-2018 16:00:58 @@ -580,390 +580,339 @@ Float ImagePolarimetry::sigma(Float clip) build 12-Apr-2018 16:00:58 return sigma2; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -void ImagePolarimetry::rotationMeasure(ImageInterface*& rmOutPtr, build 12-Apr-2018 16:00:58 - ImageInterface*& rmOutErrorPtr, build 12-Apr-2018 16:00:58 - ImageInterface*& pa0OutPtr, build 12-Apr-2018 16:00:58 - ImageInterface*& pa0OutErrorPtr, build 12-Apr-2018 16:00:58 - ImageInterface*& nTurnsOutPtr, build 12-Apr-2018 16:00:58 - ImageInterface*& chiSqOutPtr, build 12-Apr-2018 16:00:58 - Int axis, Float rmMax, Float maxPaErr, build 12-Apr-2018 16:00:58 - Float sigma, Float rmFg, Bool showProgress) build 12-Apr-2018 16:00:58 -{ build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 - hasQU(); build 12-Apr-2018 16:00:58 - _checkQUBeams(false); build 12-Apr-2018 16:00:58 -// Do we have anything to do ? build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (!rmOutPtr && !rmOutErrorPtr && !pa0OutPtr && !pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 - os << "No output images specified" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Find expected shape of output RM images (Stokes and spectral axes gone) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - CoordinateSystem cSysRM; build 12-Apr-2018 16:00:58 - Int fAxis, sAxis; build 12-Apr-2018 16:00:58 - IPosition shapeRM = rotationMeasureShape(cSysRM, fAxis, sAxis, os, axis); build 12-Apr-2018 16:00:58 - IPosition shapeNTurns = shapeRM; build 12-Apr-2018 16:00:58 - IPosition shapeChiSq = shapeRM; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Check RM image shapes build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (rmOutPtr && !rmOutPtr->shape().isEqual(shapeRM)) { build 12-Apr-2018 16:00:58 - os << "The provided Rotation Measure image has the wrong shape " << rmOutPtr->shape() << endl; build 12-Apr-2018 16:00:58 - os << "It should be of shape " << shapeRM << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (rmOutErrorPtr && !rmOutErrorPtr->shape().isEqual(shapeRM)) { build 12-Apr-2018 16:00:58 - os << "The provided Rotation Measure error image has the wrong shape " << rmOutErrorPtr->shape() << endl; build 12-Apr-2018 16:00:58 - os << "It should be of shape " << shapeRM << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Check position angle image shapes build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - CoordinateSystem cSysPA; build 12-Apr-2018 16:00:58 - IPosition shapePA = positionAngleShape(cSysPA, fAxis, sAxis, os, axis); build 12-Apr-2018 16:00:58 - if (pa0OutPtr && !pa0OutPtr->shape().isEqual(shapePA)) { build 12-Apr-2018 16:00:58 - os << "The provided position angle at zero wavelength image has the wrong shape " << pa0OutPtr->shape() << endl; build 12-Apr-2018 16:00:58 - os << "It should be of shape " << shapePA << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (pa0OutErrorPtr && !pa0OutErrorPtr->shape().isEqual(shapePA)) { build 12-Apr-2018 16:00:58 - os << "The provided position angle at zero wavelength image has the wrong shape " << pa0OutErrorPtr->shape() << endl; build 12-Apr-2018 16:00:58 - os << "It should be of shape " << shapePA << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// nTurns and chi sq build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (nTurnsOutPtr && !nTurnsOutPtr->shape().isEqual(shapeNTurns)) { build 12-Apr-2018 16:00:58 - os << "The provided nTurns image has the wrong shape " << nTurnsOutPtr->shape() << endl; build 12-Apr-2018 16:00:58 - os << "It should be of shape " << shapeNTurns << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (chiSqOutPtr && !chiSqOutPtr->shape().isEqual(shapeChiSq)) { build 12-Apr-2018 16:00:58 - os << "The provided chi squared image has the wrong shape " << chiSqOutPtr->shape() << endl; build 12-Apr-2018 16:00:58 - os << "It should be of shape " << shapeChiSq << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Generate linear polarization position angle image expressions build 12-Apr-2018 16:00:58 -// and error in radians build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Bool radians = true; build 12-Apr-2018 16:00:58 - Float clip = 10.0; build 12-Apr-2018 16:00:58 - ImageExpr pa = linPolPosAng(radians); build 12-Apr-2018 16:00:58 - ImageExpr paerr = sigmaLinPolPosAng(radians, clip, sigma); build 12-Apr-2018 16:00:58 - CoordinateSystem cSys0 = pa.coordinates(); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Set frequency axis units to Hz build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Int fAxisWorld = cSys0.pixelAxisToWorldAxis(fAxis); build 12-Apr-2018 16:00:58 - if (fAxisWorld <0) { build 12-Apr-2018 16:00:58 - os << "World axis has been removed for the frequency pixel axis" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - Vector axisUnits = cSys0.worldAxisUnits(); build 12-Apr-2018 16:00:58 - axisUnits(fAxisWorld) = String("Hz"); build 12-Apr-2018 16:00:58 - if (!cSys0.setWorldAxisUnits(axisUnits)) { build 12-Apr-2018 16:00:58 - os << "Failed to set frequency axis units to Hz because " build 12-Apr-2018 16:00:58 - << cSys0.errorMessage() << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Do we have enough frequency pixels ? build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - const uInt nFreq = pa.shape()(fAxis); build 12-Apr-2018 16:00:58 - if (nFreq < 3) { build 12-Apr-2018 16:00:58 - os << "This image only has " << nFreq << "frequencies, this is not enough" build 12-Apr-2018 16:00:58 - << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Copy units only over. The output images don't have a beam build 12-Apr-2018 16:00:58 -// so unset beam. MiscInfo and history require writable II. build 12-Apr-2018 16:00:58 -// We leave this to the caller who knows what sort of II these are. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - ImageInfo ii = itsInImagePtr->imageInfo(); build 12-Apr-2018 16:00:58 - ii.removeRestoringBeam(); build 12-Apr-2018 16:00:58 - if (rmOutPtr) { build 12-Apr-2018 16:00:58 - rmOutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 - rmOutPtr->setUnits(Unit("rad/m/m")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (rmOutErrorPtr) { build 12-Apr-2018 16:00:58 - rmOutErrorPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 - rmOutErrorPtr->setUnits(Unit("rad/m/m")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (pa0OutPtr) { build 12-Apr-2018 16:00:58 - pa0OutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 - pa0OutPtr->setUnits(Unit("deg")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 - pa0OutErrorPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 - pa0OutErrorPtr->setUnits(Unit("deg")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (nTurnsOutPtr) { build 12-Apr-2018 16:00:58 - nTurnsOutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 - nTurnsOutPtr->setUnits(Unit("")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (chiSqOutPtr) { build 12-Apr-2018 16:00:58 - chiSqOutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 - chiSqOutPtr->setUnits(Unit("")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Get lambda squared in m**2 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Vector freqs(nFreq); build 12-Apr-2018 16:00:58 - Vector wsq(nFreq); build 12-Apr-2018 16:00:58 - Vector world; build 12-Apr-2018 16:00:58 - Vector pixel(cSys0.referencePixel().copy()); build 12-Apr-2018 16:00:58 - Double c = QC::c.getValue(Unit("m/s")); build 12-Apr-2018 16:00:58 - Double csq = c*c; build 12-Apr-2018 16:00:58 - for (uInt i=0; i sortidx; build 12-Apr-2018 16:00:58 - GenSortIndirect::sort (sortidx, wsq, Sort::Ascending, Sort::QuickSort|Sort::NoDuplicates); build 12-Apr-2018 16:00:58 - Vector wsqsort(sortidx.nelements()); build 12-Apr-2018 16:00:58 - for (uInt i=0; i; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Create and set the polynomial functional build 12-Apr-2018 16:00:58 -// p = c(0) + c(1)*x where x = lambda**2 build 12-Apr-2018 16:00:58 -// PA = PA0 + RM*Lambda**2 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Polynomial > poly1(1); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Makes a copy of poly1 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - itsFitterPtr->setFunction(poly1); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Deal with masks. The outputs are all given a mask if possible as we build 12-Apr-2018 16:00:58 -// don't know at this point whether output points will be masked or not build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - IPosition whereRM; build 12-Apr-2018 16:00:58 - Bool isMaskedRM = false; build 12-Apr-2018 16:00:58 - Lattice* outRMMaskPtr = 0; build 12-Apr-2018 16:00:58 - if (rmOutPtr) { build 12-Apr-2018 16:00:58 - isMaskedRM = dealWithMask (outRMMaskPtr, rmOutPtr, os, String("RM")); build 12-Apr-2018 16:00:58 - whereRM.resize(rmOutPtr->ndim()); build 12-Apr-2018 16:00:58 - whereRM = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - Bool isMaskedRMErr = false; build 12-Apr-2018 16:00:58 - Lattice* outRMErrMaskPtr = 0; build 12-Apr-2018 16:00:58 - if (rmOutErrorPtr) { build 12-Apr-2018 16:00:58 - isMaskedRMErr = dealWithMask (outRMErrMaskPtr, rmOutErrorPtr, os, String("RM error")); build 12-Apr-2018 16:00:58 - whereRM.resize(rmOutErrorPtr->ndim()); build 12-Apr-2018 16:00:58 - whereRM = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - IPosition wherePA; build 12-Apr-2018 16:00:58 - Bool isMaskedPa0 = false; build 12-Apr-2018 16:00:58 - Lattice* outPa0MaskPtr = 0; build 12-Apr-2018 16:00:58 - if (pa0OutPtr) { build 12-Apr-2018 16:00:58 - isMaskedPa0 = dealWithMask (outPa0MaskPtr, pa0OutPtr, os, String("Position Angle")); build 12-Apr-2018 16:00:58 - wherePA.resize(pa0OutPtr->ndim()); build 12-Apr-2018 16:00:58 - wherePA = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - Bool isMaskedPa0Err = false; build 12-Apr-2018 16:00:58 - Lattice* outPa0ErrMaskPtr = 0; build 12-Apr-2018 16:00:58 - if (pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 - isMaskedPa0Err = dealWithMask (outPa0ErrMaskPtr, pa0OutErrorPtr, os, String("Position Angle error")); build 12-Apr-2018 16:00:58 - wherePA.resize(pa0OutErrorPtr->ndim()); build 12-Apr-2018 16:00:58 - wherePA = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - IPosition whereNTurns; build 12-Apr-2018 16:00:58 - Bool isMaskedNTurns = false; build 12-Apr-2018 16:00:58 - Lattice* outNTurnsMaskPtr = 0; build 12-Apr-2018 16:00:58 - if (nTurnsOutPtr) { build 12-Apr-2018 16:00:58 - isMaskedNTurns = dealWithMask (outNTurnsMaskPtr, nTurnsOutPtr, os, String("nTurns")); build 12-Apr-2018 16:00:58 - whereNTurns.resize(nTurnsOutPtr->ndim()); build 12-Apr-2018 16:00:58 - whereNTurns = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - IPosition whereChiSq; build 12-Apr-2018 16:00:58 - Bool isMaskedChiSq = false; build 12-Apr-2018 16:00:58 - Lattice* outChiSqMaskPtr = 0; build 12-Apr-2018 16:00:58 - if (chiSqOutPtr) { build 12-Apr-2018 16:00:58 - isMaskedChiSq = dealWithMask (outChiSqMaskPtr, chiSqOutPtr, os, String("chi sqared")); build 12-Apr-2018 16:00:58 - whereChiSq.resize(nTurnsOutPtr->ndim()); build 12-Apr-2018 16:00:58 - whereChiSq = 0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - Array tmpMaskRM(IPosition(shapeRM.nelements(), 1), true); build 12-Apr-2018 16:00:58 - Array tmpValueRM(IPosition(shapeRM.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 - Array tmpMaskPA(IPosition(shapePA.nelements(), 1), true); build 12-Apr-2018 16:00:58 - Array tmpValuePA(IPosition(shapePA.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 - Array tmpValueNTurns(IPosition(shapeNTurns.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 - Array tmpMaskNTurns(IPosition(shapeNTurns.nelements(), 1), true); build 12-Apr-2018 16:00:58 - Array tmpValueChiSq(IPosition(shapeChiSq.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 - Array tmpMaskChiSq(IPosition(shapeChiSq.nelements(), 1), true); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Iterate build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - const IPosition tileShape = pa.niceCursorShape(); build 12-Apr-2018 16:00:58 - TiledLineStepper ts(pa.shape(), tileShape, fAxis); build 12-Apr-2018 16:00:58 - RO_MaskedLatticeIterator it(pa, ts); build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - Float rm, rmErr, pa0, pa0Err, rChiSq, nTurns; build 12-Apr-2018 16:00:58 - uInt j, k, l, m; build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - maxPaErr *= C::pi / 180.0; build 12-Apr-2018 16:00:58 - maxPaErr = abs(maxPaErr); build 12-Apr-2018 16:00:58 - Bool doRM = whereRM.nelements() > 0; build 12-Apr-2018 16:00:58 - Bool doPA = wherePA.nelements() > 0; build 12-Apr-2018 16:00:58 - Bool doNTurns = whereNTurns.nelements() > 0; build 12-Apr-2018 16:00:58 - Bool doChiSq = whereChiSq.nelements() > 0; build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - ProgressMeter* pProgressMeter = 0; build 12-Apr-2018 16:00:58 - if (showProgress) { build 12-Apr-2018 16:00:58 - Double nMin = 0.0; build 12-Apr-2018 16:00:58 - Double nMax = 1.0; build 12-Apr-2018 16:00:58 - for (Int i=0; ishape(); build 12-Apr-2018 16:00:58 - uInt nrtiles = (1 + (mainShape(fAxis)-1) / tileShape(fAxis)) * build 12-Apr-2018 16:00:58 - (1 + (mainShape(sAxis)-1) / tileShape(sAxis)); build 12-Apr-2018 16:00:58 - ImageInterface* mainImagePtr = build 12-Apr-2018 16:00:58 - const_cast*>(itsInImagePtr.get()); build 12-Apr-2018 16:00:58 - mainImagePtr->setCacheSizeInTiles (nrtiles); build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - String posString; build 12-Apr-2018 16:00:58 - Bool ok = false; build 12-Apr-2018 16:00:58 - IPosition shp; build 12-Apr-2018 16:00:58 - for (it.reset(); !it.atEnd(); it++) { build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Find rotation measure for this line build 12-Apr-2018 16:00:58 -/* build 12-Apr-2018 16:00:58 - if (plotter.isAttached()) { build 12-Apr-2018 16:00:58 - ostringstream oss; build 12-Apr-2018 16:00:58 - oss << it.position() + 1; build 12-Apr-2018 16:00:58 - posString = String(oss); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - ok = findRotationMeasure (rm, rmErr, pa0, pa0Err, rChiSq, nTurns, build 12-Apr-2018 16:00:58 - sortidx, wsqsort, it.vectorCursor(), build 12-Apr-2018 16:00:58 - it.getMask(false), build 12-Apr-2018 16:00:58 - paerr.getSlice(it.position(),it.cursorShape()), build 12-Apr-2018 16:00:58 - rmFg, rmMax, maxPaErr, /*plotter,*/ posString); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Plonk values into output image. This is slow and clunky, but should be relatively fast build 12-Apr-2018 16:00:58 -// c.f. the fitting. Could be reimplemented with LatticeApply if need be. Buffering build 12-Apr-2018 16:00:58 -// is hard because the navigator doesn't take a regular path. If I used a LatticeStepper build 12-Apr-2018 16:00:58 -// instead, the path would be regular and then I could buffer, but then the iteration build 12-Apr-2018 16:00:58 -// would be less efficient !!! build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - j = k = l = m = 0; build 12-Apr-2018 16:00:58 - for (Int i=0; iputSlice (tmpMaskRM, whereRM); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (isMaskedRMErr) { build 12-Apr-2018 16:00:58 - tmpMaskRM.set(ok); build 12-Apr-2018 16:00:58 - outRMErrMaskPtr->putSlice (tmpMaskRM, whereRM); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (isMaskedPa0) { build 12-Apr-2018 16:00:58 - tmpMaskPA.set(ok); build 12-Apr-2018 16:00:58 - outPa0MaskPtr->putSlice (tmpMaskPA, wherePA); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (isMaskedPa0Err) { build 12-Apr-2018 16:00:58 - tmpMaskPA.set(ok); build 12-Apr-2018 16:00:58 - outPa0ErrMaskPtr->putSlice (tmpMaskPA, wherePA); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (isMaskedNTurns) { build 12-Apr-2018 16:00:58 - tmpMaskNTurns.set(ok); build 12-Apr-2018 16:00:58 - outNTurnsMaskPtr->putSlice (tmpMaskNTurns, whereNTurns); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (isMaskedChiSq) { build 12-Apr-2018 16:00:58 - tmpMaskChiSq.set(ok); build 12-Apr-2018 16:00:58 - outChiSqMaskPtr->putSlice (tmpMaskChiSq, whereChiSq); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// If the output value is masked, the value itself is 0 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (rmOutPtr) { build 12-Apr-2018 16:00:58 - tmpValueRM.set(rm); build 12-Apr-2018 16:00:58 - rmOutPtr->putSlice(tmpValueRM, whereRM); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (rmOutErrorPtr) { build 12-Apr-2018 16:00:58 - tmpValueRM.set(rmErr); build 12-Apr-2018 16:00:58 - rmOutErrorPtr->putSlice(tmpValueRM, whereRM); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Position angles in degrees build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (pa0OutPtr) { build 12-Apr-2018 16:00:58 - tmpValuePA.set(pa0*180/C::pi); build 12-Apr-2018 16:00:58 - pa0OutPtr->putSlice(tmpValuePA, wherePA); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - if (pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 - tmpValuePA.set(pa0Err*180/C::pi); build 12-Apr-2018 16:00:58 - pa0OutErrorPtr->putSlice(tmpValuePA, wherePA); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Number of turns and chi sq build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (nTurnsOutPtr) { build 12-Apr-2018 16:00:58 - tmpValueNTurns.set(nTurns); build 12-Apr-2018 16:00:58 - nTurnsOutPtr->putSlice(tmpValueNTurns, whereNTurns); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (chiSqOutPtr) { build 12-Apr-2018 16:00:58 - tmpValueChiSq.set(rChiSq); build 12-Apr-2018 16:00:58 - chiSqOutPtr->putSlice(tmpValueChiSq, whereChiSq); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 -// build 12-Apr-2018 16:00:58 - if (showProgress) pProgressMeter->update(Double(it.nsteps())); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (showProgress) delete pProgressMeter; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// Clear the cache of the main image again. build 12-Apr-2018 16:00:58 - mainImagePtr->clearCache(); build 12-Apr-2018 16:00:58 +void ImagePolarimetry::rotationMeasure( build 12-Apr-2018 16:00:58 + ImageInterface*& rmOutPtr, ImageInterface*& rmOutErrorPtr, build 12-Apr-2018 16:00:58 + ImageInterface*& pa0OutPtr, ImageInterface*& pa0OutErrorPtr, build 12-Apr-2018 16:00:58 + ImageInterface*& nTurnsOutPtr, ImageInterface*& chiSqOutPtr, build 12-Apr-2018 16:00:58 + Int axis, Float rmMax, Float maxPaErr, Float sigma, Float rmFg, build 12-Apr-2018 16:00:58 + Bool showProgress build 12-Apr-2018 16:00:58 +) { build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 + hasQU(); build 12-Apr-2018 16:00:58 + _checkQUBeams(false); build 12-Apr-2018 16:00:58 + // Do we have anything to do ? build 12-Apr-2018 16:00:58 + if (!rmOutPtr && !rmOutErrorPtr && !pa0OutPtr && !pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 + os << "No output images specified" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Find expected shape of output RM images (Stokes and spectral axes gone) build 12-Apr-2018 16:00:58 + CoordinateSystem cSysRM; build 12-Apr-2018 16:00:58 + Int fAxis, sAxis; build 12-Apr-2018 16:00:58 + IPosition shapeRM = rotationMeasureShape(cSysRM, fAxis, sAxis, os, axis); build 12-Apr-2018 16:00:58 + IPosition shapeNTurns = shapeRM; build 12-Apr-2018 16:00:58 + IPosition shapeChiSq = shapeRM; build 12-Apr-2018 16:00:58 + // Check RM image shapes build 12-Apr-2018 16:00:58 + if (rmOutPtr && !rmOutPtr->shape().isEqual(shapeRM)) { build 12-Apr-2018 16:00:58 + os << "The provided Rotation Measure image has the wrong shape " << rmOutPtr->shape() << endl; build 12-Apr-2018 16:00:58 + os << "It should be of shape " << shapeRM << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (rmOutErrorPtr && !rmOutErrorPtr->shape().isEqual(shapeRM)) { build 12-Apr-2018 16:00:58 + os << "The provided Rotation Measure error image has the wrong shape " << rmOutErrorPtr->shape() << endl; build 12-Apr-2018 16:00:58 + os << "It should be of shape " << shapeRM << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Check position angle image shapes build 12-Apr-2018 16:00:58 + CoordinateSystem cSysPA; build 12-Apr-2018 16:00:58 + IPosition shapePA = positionAngleShape(cSysPA, fAxis, sAxis, os, axis); build 12-Apr-2018 16:00:58 + if (pa0OutPtr && !pa0OutPtr->shape().isEqual(shapePA)) { build 12-Apr-2018 16:00:58 + os << "The provided position angle at zero wavelength image has the wrong shape " << pa0OutPtr->shape() << endl; build 12-Apr-2018 16:00:58 + os << "It should be of shape " << shapePA << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (pa0OutErrorPtr && !pa0OutErrorPtr->shape().isEqual(shapePA)) { build 12-Apr-2018 16:00:58 + os << "The provided position angle at zero wavelength image has the wrong shape " << pa0OutErrorPtr->shape() << endl; build 12-Apr-2018 16:00:58 + os << "It should be of shape " << shapePA << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // nTurns and chi sq build 12-Apr-2018 16:00:58 + if (nTurnsOutPtr && !nTurnsOutPtr->shape().isEqual(shapeNTurns)) { build 12-Apr-2018 16:00:58 + os << "The provided nTurns image has the wrong shape " << nTurnsOutPtr->shape() << endl; build 12-Apr-2018 16:00:58 + os << "It should be of shape " << shapeNTurns << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (chiSqOutPtr && !chiSqOutPtr->shape().isEqual(shapeChiSq)) { build 12-Apr-2018 16:00:58 + os << "The provided chi squared image has the wrong shape " << chiSqOutPtr->shape() << endl; build 12-Apr-2018 16:00:58 + os << "It should be of shape " << shapeChiSq << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Generate linear polarization position angle image expressions build 12-Apr-2018 16:00:58 + // and error in radians build 12-Apr-2018 16:00:58 + Bool radians = true; build 12-Apr-2018 16:00:58 + Float clip = 10.0; build 12-Apr-2018 16:00:58 + ImageExpr pa = linPolPosAng(radians); build 12-Apr-2018 16:00:58 + ImageExpr paerr = sigmaLinPolPosAng(radians, clip, sigma); build 12-Apr-2018 16:00:58 + CoordinateSystem cSys0 = pa.coordinates(); build 12-Apr-2018 16:00:58 + // Set frequency axis units to Hz build 12-Apr-2018 16:00:58 + Int fAxisWorld = cSys0.pixelAxisToWorldAxis(fAxis); build 12-Apr-2018 16:00:58 + if (fAxisWorld <0) { build 12-Apr-2018 16:00:58 + os << "World axis has been removed for the frequency pixel axis" << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + Vector axisUnits = cSys0.worldAxisUnits(); build 12-Apr-2018 16:00:58 + axisUnits(fAxisWorld) = String("Hz"); build 12-Apr-2018 16:00:58 + if (!cSys0.setWorldAxisUnits(axisUnits)) { build 12-Apr-2018 16:00:58 + os << "Failed to set frequency axis units to Hz because " build 12-Apr-2018 16:00:58 + << cSys0.errorMessage() << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Do we have enough frequency pixels ? build 12-Apr-2018 16:00:58 + const uInt nFreq = pa.shape()(fAxis); build 12-Apr-2018 16:00:58 + if (nFreq < 3) { build 12-Apr-2018 16:00:58 + os << "This image only has " << nFreq << "frequencies, this is not enough" build 12-Apr-2018 16:00:58 + << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Copy units only over. The output images don't have a beam build 12-Apr-2018 16:00:58 + // so unset beam. MiscInfo and history require writable II. build 12-Apr-2018 16:00:58 + // We leave this to the caller who knows what sort of II these are. build 12-Apr-2018 16:00:58 + ImageInfo ii = itsInImagePtr->imageInfo(); build 12-Apr-2018 16:00:58 + ii.removeRestoringBeam(); build 12-Apr-2018 16:00:58 + if (rmOutPtr) { build 12-Apr-2018 16:00:58 + rmOutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 + rmOutPtr->setUnits(Unit("rad/m/m")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (rmOutErrorPtr) { build 12-Apr-2018 16:00:58 + rmOutErrorPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 + rmOutErrorPtr->setUnits(Unit("rad/m/m")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (pa0OutPtr) { build 12-Apr-2018 16:00:58 + pa0OutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 + pa0OutPtr->setUnits(Unit("deg")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 + pa0OutErrorPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 + pa0OutErrorPtr->setUnits(Unit("deg")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (nTurnsOutPtr) { build 12-Apr-2018 16:00:58 + nTurnsOutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 + nTurnsOutPtr->setUnits(Unit("")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (chiSqOutPtr) { build 12-Apr-2018 16:00:58 + chiSqOutPtr->setImageInfo(ii); build 12-Apr-2018 16:00:58 + chiSqOutPtr->setUnits(Unit("")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Get lambda squared in m**2 build 12-Apr-2018 16:00:58 + Vector freqs(nFreq); build 12-Apr-2018 16:00:58 + Vector wsq(nFreq); build 12-Apr-2018 16:00:58 + Vector world; build 12-Apr-2018 16:00:58 + Vector pixel(cSys0.referencePixel().copy()); build 12-Apr-2018 16:00:58 + Double c = QC::c.getValue(Unit("m/s")); build 12-Apr-2018 16:00:58 + Double csq = c*c; build 12-Apr-2018 16:00:58 + for (uInt i=0; i sortidx; build 12-Apr-2018 16:00:58 + GenSortIndirect::sort( build 12-Apr-2018 16:00:58 + sortidx, wsq, Sort::Ascending, Sort::QuickSort|Sort::NoDuplicates build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + Vector wsqsort(sortidx.nelements()); build 12-Apr-2018 16:00:58 + for (uInt i=0; i; build 12-Apr-2018 16:00:58 + // Create and set the polynomial functional build 12-Apr-2018 16:00:58 + // p = c(0) + c(1)*x where x = lambda**2 build 12-Apr-2018 16:00:58 + // PA = PA0 + RM*Lambda**2 build 12-Apr-2018 16:00:58 + Polynomial > poly1(1); build 12-Apr-2018 16:00:58 + // Makes a copy of poly1 build 12-Apr-2018 16:00:58 + itsFitterPtr->setFunction(poly1); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Deal with masks. The outputs are all given a mask if possible as we build 12-Apr-2018 16:00:58 + // don't know at this point whether output points will be masked or not build 12-Apr-2018 16:00:58 + IPosition whereRM; build 12-Apr-2018 16:00:58 + Bool isMaskedRM = false; build 12-Apr-2018 16:00:58 + Lattice* outRMMaskPtr = 0; build 12-Apr-2018 16:00:58 + if (rmOutPtr) { build 12-Apr-2018 16:00:58 + isMaskedRM = dealWithMask (outRMMaskPtr, rmOutPtr, os, String("RM")); build 12-Apr-2018 16:00:58 + whereRM.resize(rmOutPtr->ndim()); build 12-Apr-2018 16:00:58 + whereRM = 0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + Bool isMaskedRMErr = false; build 12-Apr-2018 16:00:58 + Lattice* outRMErrMaskPtr = 0; build 12-Apr-2018 16:00:58 + if (rmOutErrorPtr) { build 12-Apr-2018 16:00:58 + isMaskedRMErr = dealWithMask( build 12-Apr-2018 16:00:58 + outRMErrMaskPtr, rmOutErrorPtr, os, String("RM error") build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + whereRM.resize(rmOutErrorPtr->ndim()); build 12-Apr-2018 16:00:58 + whereRM = 0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + IPosition wherePA; build 12-Apr-2018 16:00:58 + Bool isMaskedPa0 = false; build 12-Apr-2018 16:00:58 + Lattice* outPa0MaskPtr = 0; build 12-Apr-2018 16:00:58 + if (pa0OutPtr) { build 12-Apr-2018 16:00:58 + isMaskedPa0 = dealWithMask( build 12-Apr-2018 16:00:58 + outPa0MaskPtr, pa0OutPtr, os, String("Position Angle") build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + wherePA.resize(pa0OutPtr->ndim()); build 12-Apr-2018 16:00:58 + wherePA = 0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + Bool isMaskedPa0Err = false; build 12-Apr-2018 16:00:58 + Lattice* outPa0ErrMaskPtr = 0; build 12-Apr-2018 16:00:58 + if (pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 + isMaskedPa0Err = dealWithMask( build 12-Apr-2018 16:00:58 + outPa0ErrMaskPtr, pa0OutErrorPtr, os, "Position Angle error" build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + wherePA.resize(pa0OutErrorPtr->ndim()); build 12-Apr-2018 16:00:58 + wherePA = 0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + IPosition whereNTurns; build 12-Apr-2018 16:00:58 + Bool isMaskedNTurns = false; build 12-Apr-2018 16:00:58 + Lattice* outNTurnsMaskPtr = 0; build 12-Apr-2018 16:00:58 + if (nTurnsOutPtr) { build 12-Apr-2018 16:00:58 + isMaskedNTurns = dealWithMask( build 12-Apr-2018 16:00:58 + outNTurnsMaskPtr, nTurnsOutPtr, os, "nTurns" build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + whereNTurns.resize(nTurnsOutPtr->ndim()); build 12-Apr-2018 16:00:58 + whereNTurns = 0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + IPosition whereChiSq; build 12-Apr-2018 16:00:58 + Bool isMaskedChiSq = false; build 12-Apr-2018 16:00:58 + Lattice* outChiSqMaskPtr = 0; build 12-Apr-2018 16:00:58 + if (chiSqOutPtr) { build 12-Apr-2018 16:00:58 + isMaskedChiSq = dealWithMask( build 12-Apr-2018 16:00:58 + outChiSqMaskPtr, chiSqOutPtr, os, String("chi sqared") build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + whereChiSq.resize(chiSqOutPtr->ndim()); build 12-Apr-2018 16:00:58 + whereChiSq = 0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + Array tmpMaskRM(IPosition(shapeRM.nelements(), 1), true); build 12-Apr-2018 16:00:58 + Array tmpValueRM(IPosition(shapeRM.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 + Array tmpMaskPA(IPosition(shapePA.nelements(), 1), true); build 12-Apr-2018 16:00:58 + Array tmpValuePA(IPosition(shapePA.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 + Array tmpValueNTurns(IPosition(shapeNTurns.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 + Array tmpMaskNTurns(IPosition(shapeNTurns.nelements(), 1), true); build 12-Apr-2018 16:00:58 + Array tmpValueChiSq(IPosition(shapeChiSq.nelements(), 1), 0.0); build 12-Apr-2018 16:00:58 + Array tmpMaskChiSq(IPosition(shapeChiSq.nelements(), 1), true); build 12-Apr-2018 16:00:58 + // Iterate build 12-Apr-2018 16:00:58 + const IPosition tileShape = pa.niceCursorShape(); build 12-Apr-2018 16:00:58 + TiledLineStepper ts(pa.shape(), tileShape, fAxis); build 12-Apr-2018 16:00:58 + RO_MaskedLatticeIterator it(pa, ts); build 12-Apr-2018 16:00:58 + Float rm, rmErr, pa0, pa0Err, rChiSq, nTurns; build 12-Apr-2018 16:00:58 + uInt j, k, l, m; build 12-Apr-2018 16:00:58 + maxPaErr *= C::pi / 180.0; build 12-Apr-2018 16:00:58 + maxPaErr = abs(maxPaErr); build 12-Apr-2018 16:00:58 + Bool doRM = whereRM.nelements() > 0; build 12-Apr-2018 16:00:58 + Bool doPA = wherePA.nelements() > 0; build 12-Apr-2018 16:00:58 + Bool doNTurns = whereNTurns.nelements() > 0; build 12-Apr-2018 16:00:58 + Bool doChiSq = whereChiSq.nelements() > 0; build 12-Apr-2018 16:00:58 + unique_ptr pProgressMeter; build 12-Apr-2018 16:00:58 + if (showProgress) { build 12-Apr-2018 16:00:58 + Double nMin = 0.0; build 12-Apr-2018 16:00:58 + Double nMax = 1.0; build 12-Apr-2018 16:00:58 + for (Int i=0; ishape(); build 12-Apr-2018 16:00:58 + uInt nrtiles = (1 + (mainShape(fAxis)-1) / tileShape(fAxis)) * build 12-Apr-2018 16:00:58 + (1 + (mainShape(sAxis)-1) / tileShape(sAxis)); build 12-Apr-2018 16:00:58 + ImageInterface* mainImagePtr = build 12-Apr-2018 16:00:58 + const_cast*>(itsInImagePtr.get()); build 12-Apr-2018 16:00:58 + mainImagePtr->setCacheSizeInTiles (nrtiles); build 12-Apr-2018 16:00:58 + String posString; build 12-Apr-2018 16:00:58 + Bool ok = false; build 12-Apr-2018 16:00:58 + IPosition shp; build 12-Apr-2018 16:00:58 + for (it.reset(); !it.atEnd(); it++) { build 12-Apr-2018 16:00:58 + // Find rotation measure for this line build 12-Apr-2018 16:00:58 + ok = findRotationMeasure (rm, rmErr, pa0, pa0Err, rChiSq, nTurns, build 12-Apr-2018 16:00:58 + sortidx, wsqsort, it.vectorCursor(), build 12-Apr-2018 16:00:58 + it.getMask(false), build 12-Apr-2018 16:00:58 + paerr.getSlice(it.position(),it.cursorShape()), build 12-Apr-2018 16:00:58 + rmFg, rmMax, maxPaErr, /*plotter,*/ posString); build 12-Apr-2018 16:00:58 + // Plonk values into output image. This is slow and clunky, but should be relatively fast build 12-Apr-2018 16:00:58 + // c.f. the fitting. Could be reimplemented with LatticeApply if need be. Buffering build 12-Apr-2018 16:00:58 + // is hard because the navigator doesn't take a regular path. If I used a LatticeStepper build 12-Apr-2018 16:00:58 + // instead, the path would be regular and then I could buffer, but then the iteration build 12-Apr-2018 16:00:58 + // would be less efficient !!! build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + j = k = l = m = 0; build 12-Apr-2018 16:00:58 + for (Int i=0; iputSlice (tmpMaskRM, whereRM); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (isMaskedRMErr) { build 12-Apr-2018 16:00:58 + tmpMaskRM.set(ok); build 12-Apr-2018 16:00:58 + outRMErrMaskPtr->putSlice (tmpMaskRM, whereRM); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (isMaskedPa0) { build 12-Apr-2018 16:00:58 + tmpMaskPA.set(ok); build 12-Apr-2018 16:00:58 + outPa0MaskPtr->putSlice (tmpMaskPA, wherePA); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (isMaskedPa0Err) { build 12-Apr-2018 16:00:58 + tmpMaskPA.set(ok); build 12-Apr-2018 16:00:58 + outPa0ErrMaskPtr->putSlice (tmpMaskPA, wherePA); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (isMaskedNTurns) { build 12-Apr-2018 16:00:58 + tmpMaskNTurns.set(ok); build 12-Apr-2018 16:00:58 + outNTurnsMaskPtr->putSlice (tmpMaskNTurns, whereNTurns); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (isMaskedChiSq) { build 12-Apr-2018 16:00:58 + tmpMaskChiSq.set(ok); build 12-Apr-2018 16:00:58 + outChiSqMaskPtr->putSlice (tmpMaskChiSq, whereChiSq); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // If the output value is masked, the value itself is 0 build 12-Apr-2018 16:00:58 + if (rmOutPtr) { build 12-Apr-2018 16:00:58 + tmpValueRM.set(rm); build 12-Apr-2018 16:00:58 + rmOutPtr->putSlice(tmpValueRM, whereRM); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (rmOutErrorPtr) { build 12-Apr-2018 16:00:58 + tmpValueRM.set(rmErr); build 12-Apr-2018 16:00:58 + rmOutErrorPtr->putSlice(tmpValueRM, whereRM); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Position angles in degrees build 12-Apr-2018 16:00:58 + if (pa0OutPtr) { build 12-Apr-2018 16:00:58 + tmpValuePA.set(pa0*180/C::pi); build 12-Apr-2018 16:00:58 + pa0OutPtr->putSlice(tmpValuePA, wherePA); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (pa0OutErrorPtr) { build 12-Apr-2018 16:00:58 + tmpValuePA.set(pa0Err*180/C::pi); build 12-Apr-2018 16:00:58 + pa0OutErrorPtr->putSlice(tmpValuePA, wherePA); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Number of turns and chi sq build 12-Apr-2018 16:00:58 + if (nTurnsOutPtr) { build 12-Apr-2018 16:00:58 + tmpValueNTurns.set(nTurns); build 12-Apr-2018 16:00:58 + nTurnsOutPtr->putSlice(tmpValueNTurns, whereNTurns); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (chiSqOutPtr) { build 12-Apr-2018 16:00:58 + tmpValueChiSq.set(rChiSq); build 12-Apr-2018 16:00:58 + chiSqOutPtr->putSlice(tmpValueChiSq, whereChiSq); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (showProgress) { build 12-Apr-2018 16:00:58 + pProgressMeter->update(Double(it.nsteps())); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Clear the cache of the main image again. build 12-Apr-2018 16:00:58 + mainImagePtr->clearCache(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition ImagePolarimetry::rotationMeasureShape(CoordinateSystem& cSys, Int& fAxis, build 12-Apr-2018 16:00:58 @@ -1129,7 +1078,7 @@ void ImagePolarimetry::summary(LogIO& os) const build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageExpr ImagePolarimetry::totPolInt(Bool debias, Float clip, Float sigma) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 Bool doLin, doCirc; build 12-Apr-2018 16:00:58 _setDoLinDoCirc(doLin, doCirc); build 12-Apr-2018 16:00:58 // Make node. build 12-Apr-2018 16:00:58 @@ -1160,7 +1109,7 @@ Float ImagePolarimetry::sigmaTotPolInt(Float clip, Float sigma) build 12-Apr-2018 16:00:58 // sigma_P = sigma_QUV build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("ImagePolarimetry", __FUNCTION__, WHERE)); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE)); build 12-Apr-2018 16:00:58 Bool doLin, doCirc; build 12-Apr-2018 16:00:58 _setDoLinDoCirc(doLin, doCirc); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageRotator.cc b/code/imageanalysis/ImageAnalysis/ImageRotator.cc build 12-Apr-2018 16:00:58 index a4524c1..e4c085f 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageRotator.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageRotator.cc build 12-Apr-2018 16:00:58 @@ -62,7 +62,6 @@ SPIIF ImageRotator::rotate() { build 12-Apr-2018 16:00:58 // We automatically find a DirectionCoordinate or LInearCoordinate build 12-Apr-2018 16:00:58 // These must hold *only* 2 axes at this point (restriction in ImageRegrid) build 12-Apr-2018 16:00:58 Vector pixelAxes; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 if (cSysTo.hasDirectionCoordinate()) { build 12-Apr-2018 16:00:58 auto index = cSysTo.directionCoordinateNumber(); build 12-Apr-2018 16:00:58 pixelAxes = cSysTo.pixelAxes(index); build 12-Apr-2018 16:00:58 @@ -96,7 +95,6 @@ SPIIF ImageRotator::rotate() { build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 IPosition axes2(pixelAxes); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 ImageRegridder regridder( build 12-Apr-2018 16:00:58 subImage, nullptr, "", this->_getOutname(), build 12-Apr-2018 16:00:58 this->_getOverwrite(), cSysTo, axes2, _shape build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageRotator.h b/code/imageanalysis/ImageAnalysis/ImageRotator.h build 12-Apr-2018 16:00:58 index 7700fac..5d887bd 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageRotator.h build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageRotator.h build 12-Apr-2018 16:00:58 @@ -75,7 +75,8 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageRotator( build 12-Apr-2018 16:00:58 const SPCIIF image, const casacore::Record *const ®ionPtr, build 12-Apr-2018 16:00:58 - const casacore::String& mask,const casacore::String& outname, casacore::Bool overwrite build 12-Apr-2018 16:00:58 + const casacore::String& mask,const casacore::String& outname, build 12-Apr-2018 16:00:58 + casacore::Bool overwrite build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageRotator(const ImageRotator &other) = delete; build 12-Apr-2018 16:00:58 @@ -104,7 +105,6 @@ public: build 12-Apr-2018 16:00:58 // set shape of output image build 12-Apr-2018 16:00:58 void setShape(const casacore::IPosition& shape) { _shape = shape; } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 CasacRegionManager::StokesControl _getStokesControl() const { build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.cc b/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.cc build 12-Apr-2018 16:00:58 index 0fc53c6..9b171c7 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.cc build 12-Apr-2018 16:00:58 @@ -329,18 +329,25 @@ void ImageStatsCalculator::_reportDetailedStats( build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 auto bUnit = _getImage()->units().getName(); build 12-Apr-2018 16:00:58 + const auto alg = _getAlgorithm(); build 12-Apr-2018 16:00:58 + const auto doBiweight = alg == StatisticsData::BIWEIGHT; build 12-Apr-2018 16:00:58 if (_verbose) { build 12-Apr-2018 16:00:58 oss.str(""); build 12-Apr-2018 16:00:58 - oss << "Sum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 + if (! doBiweight) { build 12-Apr-2018 16:00:58 + oss << "Sum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 oss << "Mean column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 oss << "Std_dev column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 oss << "Minimum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 oss << "Maximum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 *_getLog() << LogIO::NORMAL << oss.str() << LogIO::POST; build 12-Apr-2018 16:00:58 + oss.str(""); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (_getLogFile()) { build 12-Apr-2018 16:00:58 oss.str(""); build 12-Apr-2018 16:00:58 - oss << "#Sum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 + if (! doBiweight) { build 12-Apr-2018 16:00:58 + oss << "#Sum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 oss << "#Mean column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 oss << "#Std_dev column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 oss << "#Minimum column unit = " << bUnit << endl; build 12-Apr-2018 16:00:58 @@ -365,9 +372,13 @@ void ImageStatsCalculator::_reportDetailedStats( build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 Vector axesMap = reportAxes.asVector(); build 12-Apr-2018 16:00:58 GenSort::sort(axesMap); build 12-Apr-2018 16:00:58 - oss << "Npts Sum Mean Rms Std_dev Minimum Maximum "; build 12-Apr-2018 16:00:58 + if (doBiweight) { build 12-Apr-2018 16:00:58 + oss << "Npts Mean Std_dev Minimum Maximum "; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + oss << "Npts Sum Mean Rms Std_dev Minimum Maximum "; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 std::map chauvIters; build 12-Apr-2018 16:00:58 - const auto alg = _getAlgConf().algorithm; build 12-Apr-2018 16:00:58 const auto& stats = _getImageStats(); build 12-Apr-2018 16:00:58 if (alg == StatisticsData::CHAUVENETCRITERION) { build 12-Apr-2018 16:00:58 chauvIters = stats->getChauvenetNiter(); build 12-Apr-2018 16:00:58 @@ -453,11 +464,15 @@ void ImageStatsCalculator::_reportDetailedStats( build 12-Apr-2018 16:00:58 << (position[reportAxes[i]] + blc[reportAxes[i]]) << " "; build 12-Apr-2018 16:00:58 ++colNum; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - oss << std::setw(width) << npts << " " build 12-Apr-2018 16:00:58 - << std::setw(width) << retval.asArrayDouble("sum")(arrayIndex) << " " build 12-Apr-2018 16:00:58 - << std::setw(width) << retval.asArrayDouble("mean")(arrayIndex) << " " build 12-Apr-2018 16:00:58 - << std::setw(width) << retval.asArrayDouble("rms")(arrayIndex) << " " build 12-Apr-2018 16:00:58 - << std::setw(width) << retval.asArrayDouble(SIGMA)(arrayIndex) << " " build 12-Apr-2018 16:00:58 + oss << std::setw(width) << npts << " "; build 12-Apr-2018 16:00:58 + if (alg != StatisticsData::BIWEIGHT) { build 12-Apr-2018 16:00:58 + oss << std::setw(width) << retval.asArrayDouble("sum")(arrayIndex) << " "; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + oss << std::setw(width) << retval.asArrayDouble("mean")(arrayIndex) << " "; build 12-Apr-2018 16:00:58 + if (alg != StatisticsData::BIWEIGHT) { build 12-Apr-2018 16:00:58 + oss << std::setw(width) << retval.asArrayDouble("rms")(arrayIndex) << " "; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + oss << std::setw(width) << retval.asArrayDouble(SIGMA)(arrayIndex) << " " build 12-Apr-2018 16:00:58 << std::setw(width) << retval.asArrayDouble("min")(arrayIndex) << " " build 12-Apr-2018 16:00:58 << std::setw(width) << retval.asArrayDouble("max")(arrayIndex); build 12-Apr-2018 16:00:58 if (alg == StatisticsData::CHAUVENETCRITERION) { build 12-Apr-2018 16:00:58 @@ -545,10 +560,13 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 stats->setNewImage(*_subImage); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - stats->setComputeQuantiles(_robust); build 12-Apr-2018 16:00:58 // prevent the table of stats we no longer use from being logged build 12-Apr-2018 16:00:58 stats->setListStats(false); build 12-Apr-2018 16:00:58 - String myAlg = _configureAlgorithm(); build 12-Apr-2018 16:00:58 + auto myAlg = _configureAlgorithm(); build 12-Apr-2018 16:00:58 + _logStartup( build 12-Apr-2018 16:00:58 + messageStore, myAlg, blc, trc, blcf, trcf build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 if (_list) { build 12-Apr-2018 16:00:58 *_getLog() << myOrigin << LogIO::NORMAL; build 12-Apr-2018 16:00:58 String algInfo = "Statistics calculated using " build 12-Apr-2018 16:00:58 @@ -579,18 +597,24 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + auto doBiweight = _getAlgorithm() == StatisticsData::BIWEIGHT; build 12-Apr-2018 16:00:58 + if (_robust && doBiweight) { build 12-Apr-2018 16:00:58 + *_getLog() << LogIO::WARN << "The biweight algorithm does not " build 12-Apr-2018 16:00:58 + << "support the computation of quantile-like statistics. " build 12-Apr-2018 16:00:58 + << "These will not be computed" << LogIO::POST; build 12-Apr-2018 16:00:58 + _robust = False; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + stats->setComputeQuantiles(_robust); build 12-Apr-2018 16:00:58 if (messageStore) { build 12-Apr-2018 16:00:58 stats->recordMessages(true); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 stats->setPrecision(precis); build 12-Apr-2018 16:00:58 stats->setBlc(blc); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Assign old regions to current regions build 12-Apr-2018 16:00:58 _oldStatsMask.reset(0); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 _oldStatsRegion = region; build 12-Apr-2018 16:00:58 _oldStatsMask = mask; build 12-Apr-2018 16:00:58 - //_oldStatsStorageForce = _disk; build 12-Apr-2018 16:00:58 // Set cursor axes build 12-Apr-2018 16:00:58 *_getLog() << myOrigin; build 12-Apr-2018 16:00:58 ThrowIf(! stats->setAxes(_axes), stats->errorMessage()); build 12-Apr-2018 16:00:58 @@ -607,8 +631,8 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 Array npts, sum, sumsquared, min, max, mean, sigma; build 12-Apr-2018 16:00:58 Array rms, fluxDensity, med, medAbsDevMed, quartile, q1, q3; build 12-Apr-2018 16:00:58 Bool ok = true; build 12-Apr-2018 16:00:58 - Bool doFlux = true; build 12-Apr-2018 16:00:58 - if (_getImage()->imageInfo().hasMultipleBeams()) { build 12-Apr-2018 16:00:58 + auto doFlux = ! doBiweight; build 12-Apr-2018 16:00:58 + if (doFlux && _getImage()->imageInfo().hasMultipleBeams()) { build 12-Apr-2018 16:00:58 if (csys.hasSpectralAxis() || csys.hasPolarizationCoordinate()) { build 12-Apr-2018 16:00:58 Int spAxis = csys.spectralAxisNumber(); build 12-Apr-2018 16:00:58 Int poAxis = csys.polarizationAxisNumber(); build 12-Apr-2018 16:00:58 @@ -638,24 +662,28 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 q3, LatticeStatsBase::Q3 build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - if (ok) { build 12-Apr-2018 16:00:58 - ok = stats->getStatistic(npts, LatticeStatsBase::NPTS) build 12-Apr-2018 16:00:58 - && stats->getStatistic(sum, LatticeStatsBase::SUM) build 12-Apr-2018 16:00:58 + ok = ok && stats->getStatistic(npts, LatticeStatsBase::NPTS) build 12-Apr-2018 16:00:58 + && stats->getStatistic(min, LatticeStatsBase::MIN) build 12-Apr-2018 16:00:58 + && stats->getStatistic(max, LatticeStatsBase::MAX) build 12-Apr-2018 16:00:58 + && stats->getStatistic(mean, LatticeStatsBase::MEAN) build 12-Apr-2018 16:00:58 + && stats->getStatistic(sigma, LatticeStatsBase::SIGMA); build 12-Apr-2018 16:00:58 + if (! doBiweight) { build 12-Apr-2018 16:00:58 + ok = ok && stats->getStatistic(sum, LatticeStatsBase::SUM) build 12-Apr-2018 16:00:58 && stats->getStatistic(sumsquared, LatticeStatsBase::SUMSQ) build 12-Apr-2018 16:00:58 - && stats->getStatistic(min, LatticeStatsBase::MIN) build 12-Apr-2018 16:00:58 - && stats->getStatistic(max, LatticeStatsBase::MAX) build 12-Apr-2018 16:00:58 - && stats->getStatistic(mean, LatticeStatsBase::MEAN) build 12-Apr-2018 16:00:58 - && stats->getStatistic(sigma, LatticeStatsBase::SIGMA) build 12-Apr-2018 16:00:58 && stats->getStatistic(rms, LatticeStatsBase::RMS); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 ThrowIf(! ok, stats->errorMessage()); build 12-Apr-2018 16:00:58 Record statsout; build 12-Apr-2018 16:00:58 statsout.define("npts", npts); build 12-Apr-2018 16:00:58 - statsout.define("sum", sum); build 12-Apr-2018 16:00:58 - statsout.define("sumsq", sumsquared); build 12-Apr-2018 16:00:58 statsout.define("min", min); build 12-Apr-2018 16:00:58 statsout.define("max", max); build 12-Apr-2018 16:00:58 statsout.define("mean", mean); build 12-Apr-2018 16:00:58 + statsout.define(SIGMA, sigma); build 12-Apr-2018 16:00:58 + if (! doBiweight) { build 12-Apr-2018 16:00:58 + statsout.define("sum", sum); build 12-Apr-2018 16:00:58 + statsout.define("sumsq", sumsquared); build 12-Apr-2018 16:00:58 + statsout.define("rms", rms); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if (_robust) { build 12-Apr-2018 16:00:58 statsout.define("median", med); build 12-Apr-2018 16:00:58 statsout.define("medabsdevmed", medAbsDevMed); build 12-Apr-2018 16:00:58 @@ -663,8 +691,6 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 statsout.define("q1", q1); build 12-Apr-2018 16:00:58 statsout.define("q3", q3); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - statsout.define(SIGMA, sigma); build 12-Apr-2018 16:00:58 - statsout.define("rms", rms); build 12-Apr-2018 16:00:58 if ( build 12-Apr-2018 16:00:58 doFlux build 12-Apr-2018 16:00:58 && stats->getStatistic( build 12-Apr-2018 16:00:58 @@ -679,7 +705,7 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 statsout.define("trcf", trcf); build 12-Apr-2018 16:00:58 String tmp; build 12-Apr-2018 16:00:58 IPosition minPos, maxPos; build 12-Apr-2018 16:00:58 - if (stats->getMinMaxPos(minPos, maxPos)) { build 12-Apr-2018 16:00:58 + if (! doBiweight && stats->getMinMaxPos(minPos, maxPos)) { build 12-Apr-2018 16:00:58 if (minPos.nelements() > 0) { build 12-Apr-2018 16:00:58 statsout.define("minpos", (blc + minPos).asVector()); build 12-Apr-2018 16:00:58 tmp = CoordinateUtil::formatCoordinate(blc + minPos, csys, precis); build 12-Apr-2018 16:00:58 @@ -711,6 +737,45 @@ Record ImageStatsCalculator::statistics( build 12-Apr-2018 16:00:58 return statsout; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void ImageStatsCalculator::_logStartup( build 12-Apr-2018 16:00:58 + std::vector *const &messageStore, const String& myAlg, build 12-Apr-2018 16:00:58 + const casacore::IPosition& blc, const casacore::IPosition& trc, build 12-Apr-2018 16:00:58 + const casacore::String& blcf, const casacore::String trcf build 12-Apr-2018 16:00:58 +) const { build 12-Apr-2018 16:00:58 + if (! _list) { build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + LogOrigin myOrigin(_class, __func__); build 12-Apr-2018 16:00:58 + *_getLog() << myOrigin << LogIO::NORMAL; build 12-Apr-2018 16:00:58 + String algInfo = "Statistics calculated using " build 12-Apr-2018 16:00:58 + + myAlg + " algorithm"; build 12-Apr-2018 16:00:58 + *_getLog() << algInfo << LogIO::POST; build 12-Apr-2018 16:00:58 + if (messageStore) { build 12-Apr-2018 16:00:58 + messageStore->push_back(algInfo + "\n"); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Only write to the logger if the user wants it displayed. build 12-Apr-2018 16:00:58 + Vector x(5); build 12-Apr-2018 16:00:58 + ostringstream y; build 12-Apr-2018 16:00:58 + x[0] = "Regions --- "; build 12-Apr-2018 16:00:58 + y << " -- bottom-left corner (pixel) [blc]: " << blc; build 12-Apr-2018 16:00:58 + x[1] = y.str(); build 12-Apr-2018 16:00:58 + y.str(""); build 12-Apr-2018 16:00:58 + y << " -- top-right corner (pixel) [trc]: " << trc; build 12-Apr-2018 16:00:58 + x[2] = y.str(); build 12-Apr-2018 16:00:58 + y.str(""); build 12-Apr-2018 16:00:58 + y << " -- bottom-left corner (world) [blcf]: " << blcf; build 12-Apr-2018 16:00:58 + x[3] = y.str(); build 12-Apr-2018 16:00:58 + y.str(""); build 12-Apr-2018 16:00:58 + y << " -- top-right corner (world) [trcf]: " << trcf; build 12-Apr-2018 16:00:58 + x[4] = y.str(); build 12-Apr-2018 16:00:58 + for (uInt i=0; ipush_back(x[i] + "\n"); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void ImageStatsCalculator::setRobust(Bool b) { build 12-Apr-2018 16:00:58 _robust = b; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.h b/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.h build 12-Apr-2018 16:00:58 index 172ff6d..ce5aa2d 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.h build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageStatsCalculator.h build 12-Apr-2018 16:00:58 @@ -63,7 +63,8 @@ public: build 12-Apr-2018 16:00:58 ImageStatsCalculator( build 12-Apr-2018 16:00:58 const SPCIIF image, build 12-Apr-2018 16:00:58 const casacore::Record *const ®ionPtr, build 12-Apr-2018 16:00:58 - const casacore::String& maskInp, casacore::Bool beVerboseDuringConstruction=false build 12-Apr-2018 16:00:58 + const casacore::String& maskInp, build 12-Apr-2018 16:00:58 + casacore::Bool beVerboseDuringConstruction=false build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ~ImageStatsCalculator(); build 12-Apr-2018 16:00:58 @@ -140,6 +141,12 @@ private: build 12-Apr-2018 16:00:58 casacore::ImageRegion* oldMask build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + void _logStartup( build 12-Apr-2018 16:00:58 + std::vector *const &messageStore, const String& alg, build 12-Apr-2018 16:00:58 + const casacore::IPosition& blc, const casacore::IPosition& trc, build 12-Apr-2018 16:00:58 + const casacore::String& blcf, const casacore::String trcf build 12-Apr-2018 16:00:58 + ) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void _reportDetailedStats( build 12-Apr-2018 16:00:58 const SHARED_PTR > tempIm, build 12-Apr-2018 16:00:58 const casacore::Record& retval build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.cc b/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.cc build 12-Apr-2018 16:00:58 index 1f7fa04..a91858e 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.cc build 12-Apr-2018 16:00:58 @@ -43,6 +43,17 @@ ImageStatsConfigurator::ImageStatsConfigurator( build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ImageStatsConfigurator::~ImageStatsConfigurator() {} build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void ImageStatsConfigurator::configureBiweight(Int maxIter) { build 12-Apr-2018 16:00:58 + if ( build 12-Apr-2018 16:00:58 + _algConf.algorithm != StatisticsData::BIWEIGHT build 12-Apr-2018 16:00:58 + || maxIter != _algConf.mi build 12-Apr-2018 16:00:58 + ) { build 12-Apr-2018 16:00:58 + _algConf.algorithm = StatisticsData::BIWEIGHT; build 12-Apr-2018 16:00:58 + _algConf.mi = maxIter; build 12-Apr-2018 16:00:58 + _statistics.reset(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void ImageStatsConfigurator::configureChauvenet( build 12-Apr-2018 16:00:58 Double zscore, Int maxIterations build 12-Apr-2018 16:00:58 ) { build 12-Apr-2018 16:00:58 @@ -107,6 +118,10 @@ void ImageStatsConfigurator::configureHingesFences(Double f) { build 12-Apr-2018 16:00:58 String ImageStatsConfigurator::_configureAlgorithm() { build 12-Apr-2018 16:00:58 String myAlg; build 12-Apr-2018 16:00:58 switch (_algConf.algorithm) { build 12-Apr-2018 16:00:58 + case StatisticsData::BIWEIGHT: build 12-Apr-2018 16:00:58 + _statistics->configureBiweight(_algConf.mi, 6.0); build 12-Apr-2018 16:00:58 + myAlg = "Biweight"; build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 case StatisticsData::CHAUVENETCRITERION: build 12-Apr-2018 16:00:58 _statistics->configureChauvenet(_algConf.zs, _algConf.mi); build 12-Apr-2018 16:00:58 myAlg = "Chauvenet Criterion/Z-score"; build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.h b/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.h build 12-Apr-2018 16:00:58 index ba96925..daca7bf 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.h build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/ImageStatsConfigurator.h build 12-Apr-2018 16:00:58 @@ -78,6 +78,8 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ~ImageStatsConfigurator(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + void configureBiweight(casacore::Int maxIter); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void configureChauvenet(casacore::Double zscore, casacore::Int maxIterations); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void configureClassical(PreferredClassicalAlgorithm p); build 12-Apr-2018 16:00:58 @@ -94,6 +96,22 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + struct AlgConf { build 12-Apr-2018 16:00:58 + casacore::StatisticsData::ALGORITHM algorithm; build 12-Apr-2018 16:00:58 + // hinges-fences f factor build 12-Apr-2018 16:00:58 + casacore::Double hf; build 12-Apr-2018 16:00:58 + // fit to have center type build 12-Apr-2018 16:00:58 + casacore::FitToHalfStatisticsData::CENTER ct; build 12-Apr-2018 16:00:58 + // fit to half data portion to use build 12-Apr-2018 16:00:58 + casacore::FitToHalfStatisticsData::USE_DATA ud; build 12-Apr-2018 16:00:58 + // fit to half center value build 12-Apr-2018 16:00:58 + casacore::Float cv; build 12-Apr-2018 16:00:58 + // Chauvenet zscore build 12-Apr-2018 16:00:58 + casacore::Double zs; build 12-Apr-2018 16:00:58 + // Chauvenet/Biweight max iterations build 12-Apr-2018 16:00:58 + casacore::Int mi; build 12-Apr-2018 16:00:58 + }; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 ImageStatsConfigurator( build 12-Apr-2018 16:00:58 const SPCIIF image, build 12-Apr-2018 16:00:58 const casacore::Record *const ®ionPtr, build 12-Apr-2018 16:00:58 @@ -108,15 +126,20 @@ protected: build 12-Apr-2018 16:00:58 return _statistics; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - casacore::LatticeStatistics::AlgConf _getAlgConf() const { build 12-Apr-2018 16:00:58 + StatisticsData::ALGORITHM _getAlgorithm() const { build 12-Apr-2018 16:00:58 + return _algConf.algorithm; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + AlgConf _getAlgConf() const { build 12-Apr-2018 16:00:58 return _algConf; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void _resetStats(ImageStatistics* stat=nullptr) { _statistics.reset(stat); } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 private: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 std::unique_ptr > _statistics; build 12-Apr-2018 16:00:58 - casacore::LatticeStatistics::AlgConf _algConf; build 12-Apr-2018 16:00:58 + AlgConf _algConf; build 12-Apr-2018 16:00:58 PreferredClassicalAlgorithm _prefClassStatsAlg; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/LinearPolarizationAngleCalculator.cc b/code/imageanalysis/ImageAnalysis/LinearPolarizationAngleCalculator.cc build 12-Apr-2018 16:00:58 index 5bdbd2f..9b2e60b 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/LinearPolarizationAngleCalculator.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/LinearPolarizationAngleCalculator.cc build 12-Apr-2018 16:00:58 @@ -53,7 +53,13 @@ SPIIF LinearPolarizationAngleCalculator::compute(Bool radians) { build 12-Apr-2018 16:00:58 ImageExpr ie(le, String("LinearlyPolarizedPositionAngle")); build 12-Apr-2018 16:00:58 ie.setUnits(Unit(radians ? "rad" : "deg")); build 12-Apr-2018 16:00:58 ImageInfo ii = _getImage()->imageInfo(); build 12-Apr-2018 16:00:58 - ii.removeRestoringBeam(); build 12-Apr-2018 16:00:58 + if (ii.hasMultipleBeams()) { build 12-Apr-2018 16:00:58 + *this->_getLog() << LogIO::WARN << "The input image has " build 12-Apr-2018 16:00:58 + << "multiple beams. Because these beams can vary with " build 12-Apr-2018 16:00:58 + << "stokes/polarization, they will not be copied to the " build 12-Apr-2018 16:00:58 + << "output image" << LogIO::POST; build 12-Apr-2018 16:00:58 + ii.removeRestoringBeam(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 ie.setImageInfo(ii); build 12-Apr-2018 16:00:58 _fiddleStokesCoordinate(ie, Stokes::Pangle); build 12-Apr-2018 16:00:58 return _prepareOutputImage(ie); build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/MomentClip.tcc b/code/imageanalysis/ImageAnalysis/MomentClip.tcc build 12-Apr-2018 16:00:58 index 1ead1fb..fcf7217 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/MomentClip.tcc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/MomentClip.tcc build 12-Apr-2018 16:00:58 @@ -124,7 +124,6 @@ template void MomentClip::multiProcess( build 12-Apr-2018 16:00:58 pixelIn_p[i] = casacore::Double(inPos[i]); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Compute moments. The actual moment computation always done with build 12-Apr-2018 16:00:58 // the original data, regardless of whether the pixel selection is build 12-Apr-2018 16:00:58 // done with the primary or ancilliary data. build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/MomentWindow.tcc b/code/imageanalysis/ImageAnalysis/MomentWindow.tcc build 12-Apr-2018 16:00:58 index 6f258bb..3d5c683 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/MomentWindow.tcc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/MomentWindow.tcc build 12-Apr-2018 16:00:58 @@ -145,7 +145,6 @@ void MomentWindow::multiProcess(casacore::Vector& moments, build 12-Apr-2018 16:00:58 // require me to create the slice empty every time so degenerate build 12-Apr-2018 16:00:58 // axes can be chucked out. We set up a pointer to the primary or build 12-Apr-2018 16:00:58 // ancilliary vector object that we can use for fast access build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 const T* pProfileSelect = 0; build 12-Apr-2018 16:00:58 casacore::Bool deleteIt; build 12-Apr-2018 16:00:58 if (_ancilliaryLattice) { build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageAnalysis/StatImageCreator.cc b/code/imageanalysis/ImageAnalysis/StatImageCreator.cc build 12-Apr-2018 16:00:58 index f6c1ca2..06d85b7 100755 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageAnalysis/StatImageCreator.cc build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageAnalysis/StatImageCreator.cc build 12-Apr-2018 16:00:58 @@ -133,7 +133,7 @@ SPIIF StatImageCreator::compute() { build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 _computeStat(*writeTo, subImageRO, nxpts, nypts, xstart, ystart); build 12-Apr-2018 16:00:58 if (_doProbit) { build 12-Apr-2018 16:00:58 - writeTo->copyData((LatticeExpr)(*writeTo * PROBIT_3_4)); build 12-Apr-2018 16:00:58 + writeTo->copyData((LatticeExpr)(*writeTo * C::probit_3_4)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (interpolate) { build 12-Apr-2018 16:00:58 _doInterpolation( build 12-Apr-2018 16:00:58 diff --git a/code/imageanalysis/ImageTypedefs.h b/code/imageanalysis/ImageTypedefs.h build 12-Apr-2018 16:00:58 index b36dbc2..5c46c94 100644 build 12-Apr-2018 16:00:58 --- a/code/imageanalysis/ImageTypedefs.h build 12-Apr-2018 16:00:58 +++ b/code/imageanalysis/ImageTypedefs.h build 12-Apr-2018 16:00:58 @@ -49,9 +49,6 @@ namespace casa { build 12-Apr-2018 16:00:58 using SPCIIC = SHARED_PTR >; build 12-Apr-2018 16:00:58 using SPIIC = SHARED_PTR >; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // 1/(Phi^(-1)(3/4), see https://en.wikipedia.org/wiki/Median_absolute_deviation#Relation_to_standard_deviation build 12-Apr-2018 16:00:58 - const casacore::Double PROBIT_3_4 = 1.482602218505602; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #endif build 12-Apr-2018 16:00:58 diff --git a/code/install/BreakpadInstall.cmake b/code/install/BreakpadInstall.cmake build 12-Apr-2018 16:00:58 index e1df124..79e80d3 100644 build 12-Apr-2018 16:00:58 --- a/code/install/BreakpadInstall.cmake build 12-Apr-2018 16:00:58 +++ b/code/install/BreakpadInstall.cmake build 12-Apr-2018 16:00:58 @@ -89,6 +89,20 @@ macro (configure_breakpad Breakpad_Root) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (APPLE) build 12-Apr-2018 16:00:58 message ("Configuring on Mac") build 12-Apr-2018 16:00:58 + execute_process (COMMAND ./configure build 12-Apr-2018 16:00:58 + WORKING_DIRECTORY "breakpad/breakpad-distro" build 12-Apr-2018 16:00:58 + RESULT_VARIABLE status) build 12-Apr-2018 16:00:58 + if (NOT ${status} EQUAL 0) build 12-Apr-2018 16:00:58 + message (SEND_ERROR "*** Failed to make breakpad: ${Breakpad_Root}") build 12-Apr-2018 16:00:58 + endif () build 12-Apr-2018 16:00:58 + message ("Building minidump_stackwalk") build 12-Apr-2018 16:00:58 + execute_process (COMMAND make build 12-Apr-2018 16:00:58 + WORKING_DIRECTORY "breakpad/breakpad-distro" build 12-Apr-2018 16:00:58 + RESULT_VARIABLE status) build 12-Apr-2018 16:00:58 + if (NOT ${status} EQUAL 0) build 12-Apr-2018 16:00:58 + message (SEND_ERROR "*** Failed to make breakpad: ${Breakpad_Root}") build 12-Apr-2018 16:00:58 + endif () build 12-Apr-2018 16:00:58 + message ("Building breakpad") build 12-Apr-2018 16:00:58 execute_process (COMMAND xcodebuild -sdk macosx GCC_VERSION=com.apple.compilers.llvm.clang.1_0 OTHER_CFLAGS=-stdlib=libc++ "OTHER_LDFLAGS=-stdlib=libc++ -headerpad_max_install_names" build 12-Apr-2018 16:00:58 WORKING_DIRECTORY "breakpad/breakpad-distro/src/client/mac" build 12-Apr-2018 16:00:58 RESULT_VARIABLE status) build 12-Apr-2018 16:00:58 @@ -236,13 +250,13 @@ if (UseCrashReporter) build 12-Apr-2018 16:00:58 # Only the Breakpad_Timestamp line below should require changing when upgrading build 12-Apr-2018 16:00:58 # to a later breakpad release build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - set (Breakpad_Timestamp "160426") build 12-Apr-2018 16:00:58 + set (Breakpad_Timestamp "180213") build 12-Apr-2018 16:00:58 set (Breakpad_Url_At_Casa "https://casa.nrao.edu/download/devel/breakpad/") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ################################ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 set (Breakpad_Root ${CMAKE_BINARY_DIR}/breakpad) # Root of breakpad within the build tree. build 12-Apr-2018 16:00:58 - set (Breakpad_ArchiveFile "breakpad-from-google-${Breakpad_Timestamp}-patch3.tgz") build 12-Apr-2018 16:00:58 + set (Breakpad_ArchiveFile "breakpad-from-google-${Breakpad_Timestamp}-patch2.tgz") build 12-Apr-2018 16:00:58 set (Breakpad_ArchiveUrl build 12-Apr-2018 16:00:58 "${Breakpad_Url_At_Casa}/${Breakpad_ArchiveFile}") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/mstransform/MSTransform/MSTransformDataHandler.cc b/code/mstransform/MSTransform/MSTransformDataHandler.cc build 12-Apr-2018 16:00:58 index f1a96fc..571ea18 100755 build 12-Apr-2018 16:00:58 --- a/code/mstransform/MSTransform/MSTransformDataHandler.cc build 12-Apr-2018 16:00:58 +++ b/code/mstransform/MSTransform/MSTransformDataHandler.cc build 12-Apr-2018 16:00:58 @@ -1138,14 +1138,15 @@ Bool MSTransformDataHandler::makeSelection() build 12-Apr-2018 16:00:58 //So if you see -1 in the main, feed, or pointing tables, fix it build 12-Apr-2018 16:00:58 antNewIndex_p.set(-1); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Bool trivial = true; build 12-Apr-2018 16:00:58 - for (uInt k = 0; k < nAnts; ++k) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - trivial &= (selAnts[k] == static_cast (k)); build 12-Apr-2018 16:00:58 - antNewIndex_p[selAnts[k]] = k; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // It is possible to exclude baselines without excluding any antennas. build 12-Apr-2018 16:00:58 - antennaSel_p = !trivial; build 12-Apr-2018 16:00:58 + for (uInt k = 0; k < nAnts; ++k) build 12-Apr-2018 16:00:58 + antNewIndex_p[selAnts[k]] = k; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //If the total number of output antennas is the same as the input antennas build 12-Apr-2018 16:00:58 + //this means that the selection of baselines includes at the end build 12-Apr-2018 16:00:58 + //all the input antennas. Therefore setting antenna selection to false. build 12-Apr-2018 16:00:58 + //See CAS-11111 build 12-Apr-2018 16:00:58 + if(nAnts == elms->antenna().nrow()) build 12-Apr-2018 16:00:58 + antennaSel_p = false; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // This still gets tripped up by VLA:OUT. build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 diff --git a/code/mstransform/MSTransform/MSTransformManager.cc b/code/mstransform/MSTransform/MSTransformManager.cc build 12-Apr-2018 16:00:58 index ef2227e..d2aa1d4 100755 build 12-Apr-2018 16:00:58 --- a/code/mstransform/MSTransform/MSTransformManager.cc build 12-Apr-2018 16:00:58 +++ b/code/mstransform/MSTransform/MSTransformManager.cc build 12-Apr-2018 16:00:58 @@ -1408,9 +1408,8 @@ void MSTransformManager::createOutputMSStructure() build 12-Apr-2018 16:00:58 catch (AipsError ex) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 outputMSStructureCreated = false; build 12-Apr-2018 16:00:58 - logger_p << LogIO::SEVERE build 12-Apr-2018 16:00:58 + logger_p << LogIO::DEBUG1 build 12-Apr-2018 16:00:58 << "Exception creating output MS structure: " << ex.getMesg() << endl build 12-Apr-2018 16:00:58 - << "Stack Trace: " << ex.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 throw AipsError(ex.getMesg()); build 12-Apr-2018 16:00:58 @@ -5613,7 +5612,7 @@ void MSTransformManager::generateIterator() build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch (AipsError x) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - logger_p << LogIO::SEVERE << LogOrigin("MSTransformManager",__FUNCTION__) build 12-Apr-2018 16:00:58 + logger_p << LogIO::DEBUG1 << LogOrigin("MSTransformManager",__FUNCTION__) build 12-Apr-2018 16:00:58 << "Error initializing calibration VI: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 throw(x); build 12-Apr-2018 16:00:58 diff --git a/code/mstransform/TVI/StatWtTVI.cc b/code/mstransform/TVI/StatWtTVI.cc build 12-Apr-2018 16:00:58 index f2c8abe..89c3dda 100644 build 12-Apr-2018 16:00:58 --- a/code/mstransform/TVI/StatWtTVI.cc build 12-Apr-2018 16:00:58 +++ b/code/mstransform/TVI/StatWtTVI.cc build 12-Apr-2018 16:00:58 @@ -39,8 +39,6 @@ namespace vi { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 const String StatWtTVI::CHANBIN = "stchanbin"; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -const Complex StatWtTVI::DEFAULT_MODEL_VALUE(1, 0); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 StatWtTVI::StatWtTVI(ViImplementation2 * inputVii, const Record &configuration) build 12-Apr-2018 16:00:58 : TransformingVi2 (inputVii) { build 12-Apr-2018 16:00:58 // Parse and check configuration parameters build 12-Apr-2018 16:00:58 @@ -50,20 +48,25 @@ StatWtTVI::StatWtTVI(ViImplementation2 * inputVii, const Record &configuration) build 12-Apr-2018 16:00:58 ! _parseConfiguration(configuration), build 12-Apr-2018 16:00:58 "Error parsing StatWtTVI configuration" build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 + // FIXME when the TVI framework has methods to build 12-Apr-2018 16:00:58 + // check for metadata, like the existence of build 12-Apr-2018 16:00:58 + // columns, remove references to the original MS build 12-Apr-2018 16:00:58 + const auto& origMS = ms(); build 12-Apr-2018 16:00:58 ThrowIf( build 12-Apr-2018 16:00:58 (_column == CORRECTED || _column == RESIDUAL) build 12-Apr-2018 16:00:58 - && ! ms().isColumn(MSMainEnums::CORRECTED_DATA), build 12-Apr-2018 16:00:58 + && ! origMS.isColumn(MSMainEnums::CORRECTED_DATA), build 12-Apr-2018 16:00:58 "StatWtTVI requires the MS to have a " build 12-Apr-2018 16:00:58 "CORRECTED_DATA column. This MS does not" build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 ThrowIf( build 12-Apr-2018 16:00:58 (_column == DATA || _column == RESIDUAL_DATA) build 12-Apr-2018 16:00:58 - && ! ms().isColumn(MSMainEnums::DATA), build 12-Apr-2018 16:00:58 + && ! origMS.isColumn(MSMainEnums::DATA), build 12-Apr-2018 16:00:58 "StatWtTVI requires the MS to have a " build 12-Apr-2018 16:00:58 "DATA column. This MS does not" build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 - _useDefaultModelValue = (_column == RESIDUAL || _column == RESIDUAL_DATA) build 12-Apr-2018 16:00:58 - && ! ms().isColumn(MSMainEnums::MODEL_DATA); build 12-Apr-2018 16:00:58 + _noModel = (_column == RESIDUAL || _column == RESIDUAL_DATA) build 12-Apr-2018 16:00:58 + && ! origMS.isColumn(MSMainEnums::MODEL_DATA) build 12-Apr-2018 16:00:58 + && ! origMS.source().isColumn(MSSourceEnums::SOURCE_MODEL); build 12-Apr-2018 16:00:58 // Initialize attached VisBuffer build 12-Apr-2018 16:00:58 setVisBuffer(createAttachedVisBuffer(VbRekeyable)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -945,11 +948,19 @@ const casacore::Cube StatWtTVI::_dataCube(const VisBuffer2 *c build 12-Apr-2018 16:00:58 case DATA: build 12-Apr-2018 16:00:58 return vb->visCube(); build 12-Apr-2018 16:00:58 case RESIDUAL: build 12-Apr-2018 16:00:58 - return _useDefaultModelValue ? vb->visCubeCorrected() - DEFAULT_MODEL_VALUE build 12-Apr-2018 16:00:58 - : vb->visCubeCorrected() - vb->visCubeModel(); build 12-Apr-2018 16:00:58 + if (_noModel) { build 12-Apr-2018 16:00:58 + return vb->visCubeCorrected(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + return vb->visCubeCorrected() - vb->visCubeModel(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 case RESIDUAL_DATA: build 12-Apr-2018 16:00:58 - return _useDefaultModelValue ? vb->visCube() - DEFAULT_MODEL_VALUE build 12-Apr-2018 16:00:58 - : vb->visCube() - vb->visCubeModel(); build 12-Apr-2018 16:00:58 + if(_noModel) { build 12-Apr-2018 16:00:58 + return vb->visCube(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + return vb->visCube() - vb->visCubeModel(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 default: build 12-Apr-2018 16:00:58 ThrowCc("Logic error: column type not handled"); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/mstransform/TVI/StatWtTVI.h b/code/mstransform/TVI/StatWtTVI.h build 12-Apr-2018 16:00:58 index 1b51099..9a84cd0 100644 build 12-Apr-2018 16:00:58 --- a/code/mstransform/TVI/StatWtTVI.h build 12-Apr-2018 16:00:58 +++ b/code/mstransform/TVI/StatWtTVI.h build 12-Apr-2018 16:00:58 @@ -202,7 +202,7 @@ private: build 12-Apr-2018 16:00:58 mutable std::map _rowIDInMSTorowIndexInChunk; build 12-Apr-2018 16:00:58 casacore::Double _slidingTimeWindowWidth = -1; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - casacore::Bool _useDefaultModelValue = casacore::False; build 12-Apr-2018 16:00:58 + casacore::Bool _noModel = casacore::False; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 SHARED_PTR< build 12-Apr-2018 16:00:58 casacore::ClassicalStatistics::const_iterator> build 12-Apr-2018 16:00:58 > _wtStats = nullptr; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - const static casacore::Complex DEFAULT_MODEL_VALUE; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // returns True if this chunk has already been processed. This can happen build 12-Apr-2018 16:00:58 // for the last chunk. build 12-Apr-2018 16:00:58 casacore::Bool _checkFirsSubChunk( build 12-Apr-2018 16:00:58 diff --git a/code/msvis/MSVis/VisBufferUtil.cc b/code/msvis/MSVis/VisBufferUtil.cc build 12-Apr-2018 16:00:58 index 4a04144..f81e3c8 100644 build 12-Apr-2018 16:00:58 --- a/code/msvis/MSVis/VisBufferUtil.cc build 12-Apr-2018 16:00:58 +++ b/code/msvis/MSVis/VisBufferUtil.cc build 12-Apr-2018 16:00:58 @@ -39,6 +39,7 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -48,6 +49,9 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#ifdef _OPENMP build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 using namespace std; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 using namespace casacore; build 12-Apr-2018 16:00:58 @@ -639,7 +643,7 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 String key=oss.str(); build 12-Apr-2018 16:00:58 //String key=String::toString(t[uniqIndx[k]])+String("_")+String::toString(a); build 12-Apr-2018 16:00:58 Int row=mspc.pointingIndex(a, t[uniqIndx[k]], guessIndex); build 12-Apr-2018 16:00:58 - cerr << "String "<< key << "pointing row "<< row << endl; build 12-Apr-2018 16:00:58 + //cerr << "String "<< key << "pointing row "<< row << endl; build 12-Apr-2018 16:00:58 timeAntIndex_p[oldMSId_p][key]=row > -1 ? cachedPointingDir_p[oldMSId_p].shape()[0] : -1; build 12-Apr-2018 16:00:58 guessIndex=row; build 12-Apr-2018 16:00:58 if(row >-1){ build 12-Apr-2018 16:00:58 @@ -661,7 +665,7 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 oss << vb.time()(vbrow) << "_" << antid ; build 12-Apr-2018 16:00:58 String index=oss.str(); build 12-Apr-2018 16:00:58 Int rowincache=timeAntIndex_p[oldMSId_p][index]; build 12-Apr-2018 16:00:58 - cerr << "key "<< index << " index " << rowincache << endl; build 12-Apr-2018 16:00:58 + //cerr << "key "<< index << " index " << rowincache << endl; build 12-Apr-2018 16:00:58 tim.show("retrieved cache"); build 12-Apr-2018 16:00:58 if(rowincache <0) build 12-Apr-2018 16:00:58 return vb.phaseCenter(); build 12-Apr-2018 16:00:58 @@ -674,10 +678,7 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 Timer tim; build 12-Apr-2018 16:00:58 tim.mark(); build 12-Apr-2018 16:00:58 ROMSColumns msc(vb.ms()); build 12-Apr-2018 16:00:58 - //MDirection outdir; build 12-Apr-2018 16:00:58 if(oldMSId_p != vb.msId()){ build 12-Apr-2018 16:00:58 - tim.mark(); build 12-Apr-2018 16:00:58 - //cerr << "MSID: "<< oldMSId_p << " " << vb.msId() << endl; build 12-Apr-2018 16:00:58 oldMSId_p=vb.msId(); build 12-Apr-2018 16:00:58 if(timeAntIndex_p.shape()(0) < (oldMSId_p+1)){ build 12-Apr-2018 16:00:58 timeAntIndex_p.resize(oldMSId_p+1, true); build 12-Apr-2018 16:00:58 @@ -692,28 +693,60 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 uInt nTimes=GenSortIndirect::sort (uniqIndx, t, Sort::Ascending, Sort::QuickSort|Sort::NoDuplicates); build 12-Apr-2018 16:00:58 uInt nAnt=msc.antenna().nrow(); build 12-Apr-2018 16:00:58 const ROMSPointingColumns& mspc=msc.pointing(); build 12-Apr-2018 16:00:58 - Int guessIndex=0; build 12-Apr-2018 16:00:58 + Vector tUniq(nTimes); build 12-Apr-2018 16:00:58 for (uInt k=0; k timecol; build 12-Apr-2018 16:00:58 + Vector intervalcol; build 12-Apr-2018 16:00:58 + Vector antcol; build 12-Apr-2018 16:00:58 + mspc.time().getColumn(timecol, True); build 12-Apr-2018 16:00:58 + mspc.interval().getColumn(intervalcol, True); build 12-Apr-2018 16:00:58 + mspc.antennaId().getColumn(antcol, True); build 12-Apr-2018 16:00:58 + Double *tcolptr=timecol.getStorage(timcolstor); build 12-Apr-2018 16:00:58 + Double *intcolptr=intervalcol.getStorage(intcolstor); build 12-Apr-2018 16:00:58 + Int * antcolptr=antcol.getStorage(antcolstor); build 12-Apr-2018 16:00:58 + Int npointrow=vb.ms().pointing().nrow(); build 12-Apr-2018 16:00:58 +#pragma omp parallel for firstprivate(nTimes, tuniqptr, tcolptr, antcolptr, intcolptr, npointrow), shared(mspc) build 12-Apr-2018 16:00:58 + for (uInt a=0; a < nAnt; ++a){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //Double wtime1=omp_get_wtime(); build 12-Apr-2018 16:00:58 + Vector indices; build 12-Apr-2018 16:00:58 + Vector theDirs(nTimes); build 12-Apr-2018 16:00:58 + pointingIndex(tcolptr, antcolptr, intcolptr, npointrow, a, nTimes, tuniqptr, indices); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#pragma omp critical build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + for (uInt k=0; k -1 ? cachedPointingDir_p[oldMSId_p].shape()[0] : -1; build 12-Apr-2018 16:00:58 - guessIndex=row; build 12-Apr-2018 16:00:58 - if(row >-1){ build 12-Apr-2018 16:00:58 - cachedPointingDir_p[oldMSId_p].resize(cachedPointingDir_p[oldMSId_p].nelements()+1, true); build 12-Apr-2018 16:00:58 - cachedPointingDir_p[oldMSId_p][cachedPointingDir_p[oldMSId_p].nelements()-1]=mspc.directionMeas(row); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + timeAntIndex_p[oldMSId_p][key]=indices[k] > -1 ? cshape : -1; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if(indices[k] >-1){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + cachedPointingDir_p[oldMSId_p][cshape]=mspc.directionMeas(indices[k]); build 12-Apr-2018 16:00:58 + cshape+=1; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + }//end critical build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + cachedPointingDir_p[oldMSId_p].resize(cshape, True); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - tim.show("After caching all ant pointings"); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ///// build 12-Apr-2018 16:00:58 @@ -723,7 +756,11 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 oss << vb.time()(vbrow) << "_" << antid ; build 12-Apr-2018 16:00:58 String index=oss.str(); build 12-Apr-2018 16:00:58 Int rowincache=timeAntIndex_p[oldMSId_p][index]; build 12-Apr-2018 16:00:58 - //cerr << "key "<< index << " index " << rowincache << endl; build 12-Apr-2018 16:00:58 + ///////TESTOO build 12-Apr-2018 16:00:58 + /* if(rowincache>=0){ build 12-Apr-2018 16:00:58 + cerr << "msid " << oldMSId_p << " key "<< index << " index " << rowincache<< " " << cachedPointingDir_p[oldMSId_p][rowincache] << endl; build 12-Apr-2018 16:00:58 + }*/ build 12-Apr-2018 16:00:58 + ///////////// build 12-Apr-2018 16:00:58 //tim.show("retrieved cache"); build 12-Apr-2018 16:00:58 if(rowincache <0) build 12-Apr-2018 16:00:58 return vb.phaseCenter(); build 12-Apr-2018 16:00:58 @@ -733,6 +770,68 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + void VisBufferUtil::pointingIndex(Double*& timecol, Int*& antcol, Double*& intervalcol, const Int nrow, const Int ant, const Int ntimes, Double*& ptime, Vector& indices){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + indices.resize(ntimes); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + indices.set(-1); build 12-Apr-2018 16:00:58 + Int guessRow=0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + for(Int pt=0; pt < ntimes; ++pt){ build 12-Apr-2018 16:00:58 + //cerr << " " << guessRow ; build 12-Apr-2018 16:00:58 + for (Int k=0; k< 2; ++k){ build 12-Apr-2018 16:00:58 + Int start=guessRow; build 12-Apr-2018 16:00:58 + Int end=nrow; build 12-Apr-2018 16:00:58 + if(k==1){ build 12-Apr-2018 16:00:58 + start=0; build 12-Apr-2018 16:00:58 + end=guessRow; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + for (Int i=start; i0.0) { build 12-Apr-2018 16:00:58 + if (timecol[i] >= ptime[pt] - halfInt && timecol[i] <= ptime[pt] + halfInt) { build 12-Apr-2018 16:00:58 + indices[pt]=i; build 12-Apr-2018 16:00:58 + guessRow=i; build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + // valid for all times (we should also handle interval<0 -> timestamps) build 12-Apr-2018 16:00:58 + indices[pt]=i; build 12-Apr-2018 16:00:58 + guessRow=i; build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + }//if ant build 12-Apr-2018 16:00:58 + }//start end build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + }//k build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + }//pt build 12-Apr-2018 16:00:58 + //cerr << "ant " << ant << " indices " << indices << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 MDirection VisBufferUtil::getPhaseCenter(const vi::VisBuffer2& vb, const Double timeo){ build 12-Apr-2018 16:00:58 //Timer tim; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -798,14 +897,26 @@ void VisBufferUtil::convertFrequency(Vector& outFreq, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 //tim.show("retrieved cache"); build 12-Apr-2018 16:00:58 + //cerr << std::setprecision(12) <<"msid " << oldPCMSId_p << " time "<< timeph << " val " << retval.toString() << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 return retval; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + MDirection VisBufferUtil::getEphemDir(const vi::VisBuffer2& vb, build 12-Apr-2018 16:00:58 + const Double timeo){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Double timeEphem = timeo > 0.0 ? timeo : vb.time()(0); build 12-Apr-2018 16:00:58 + ROMSColumns msc(vb.ms()); build 12-Apr-2018 16:00:58 + const ROMSFieldColumns& msfc=msc.field(); build 12-Apr-2018 16:00:58 + Int fieldId=vb.fieldId()(0); build 12-Apr-2018 16:00:58 + return msfc.ephemerisDirMeas(fieldId, timeEphem); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 //utility to reject consecutive similar value for sorting build 12-Apr-2018 16:00:58 void VisBufferUtil::rejectConsecutive(const Vector& t, Vector& retval){ build 12-Apr-2018 16:00:58 uInt n=t.nelements(); build 12-Apr-2018 16:00:58 diff --git a/code/msvis/MSVis/VisBufferUtil.h b/code/msvis/MSVis/VisBufferUtil.h build 12-Apr-2018 16:00:58 index 4055d29..7c1b10e 100644 build 12-Apr-2018 16:00:58 --- a/code/msvis/MSVis/VisBufferUtil.h build 12-Apr-2018 16:00:58 +++ b/code/msvis/MSVis/VisBufferUtil.h build 12-Apr-2018 16:00:58 @@ -165,11 +165,17 @@ public: build 12-Apr-2018 16:00:58 //get the phaseCenter for a given time ..cached so that it does not need to do small read every time of access build 12-Apr-2018 16:00:58 // time -ve means use the first time in the vb build 12-Apr-2018 16:00:58 casacore::MDirection getPhaseCenter(const vi::VisBuffer2& vb, const casacore::Double time=-1.0); build 12-Apr-2018 16:00:58 + ///Get the ephemeris direction of a source fieldid of vb at time given build 12-Apr-2018 16:00:58 + //or the first time in the visBuffer build 12-Apr-2018 16:00:58 + static casacore::MDirection getEphemDir(const vi::VisBuffer2& vb, const casacore::Double time=-1.0); build 12-Apr-2018 16:00:58 private: build 12-Apr-2018 16:00:58 void swapyz(casacore::Cube& out, const casacore::Cube& in); build 12-Apr-2018 16:00:58 void swapyz(casacore::Cube& out, const casacore::Cube& in); build 12-Apr-2018 16:00:58 void rejectConsecutive(const casacore::Vector& t, casacore::Vector& retval); build 12-Apr-2018 16:00:58 void rejectConsecutive(const casacore::Vector& t, casacore::Vector& retval, casacore::Vector& indx); build 12-Apr-2018 16:00:58 + //A quicker pointing index finder build 12-Apr-2018 16:00:58 + //void pointingIndex(const casacore::MSPointing& pcols, const casacore::Int antenna, const casacore::Int ntimes, casacore::Double*& ptime, casacore::Vector& indices,casacore::Vector& direction ); build 12-Apr-2018 16:00:58 + void pointingIndex( casacore::Double*& timecol, casacore::Int*& antcol, casacore::Double*& intervalcol, const casacore::Int nrow, const casacore::Int antenna, const casacore::Int ntimes, casacore::Double*& ptime, casacore::Vector& indices ); build 12-Apr-2018 16:00:58 // A casacore::MeasFrame for conversions build 12-Apr-2018 16:00:58 casacore::MeasFrame mframe_; build 12-Apr-2018 16:00:58 casacore::Int oldMSId_p; build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Actions/ActionSummary.cc b/code/plotms/Actions/ActionSummary.cc build 12-Apr-2018 16:00:58 index 1a7d353..b2ffdf1 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Actions/ActionSummary.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Actions/ActionSummary.cc build 12-Apr-2018 16:00:58 @@ -29,6 +29,8 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -57,6 +59,10 @@ void ActionSummary::setSummaryType( PMS::SummaryType type ){ build 12-Apr-2018 16:00:58 summaryType = type; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void ActionSummary::setCTSummaryType( PMS::CTSummaryType type ){ build 12-Apr-2018 16:00:58 + CTsummaryType = type; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void ActionSummary::setFile( String file ){ build 12-Apr-2018 16:00:58 filename = file; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -70,58 +76,71 @@ bool ActionSummary::doActionSpecific(PlotMSApp* plotms) { build 12-Apr-2018 16:00:58 bool success = false; build 12-Apr-2018 16:00:58 bool reenableGlobal = false; build 12-Apr-2018 16:00:58 try { build 12-Apr-2018 16:00:58 - // Get MS. build 12-Apr-2018 16:00:58 - MeasurementSet ms; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // If not, exit. build 12-Apr-2018 16:00:58 if(filename.empty()) { build 12-Apr-2018 16:00:58 itsDoActionResult_ = "MS has not been opened/set yet!"; build 12-Apr-2018 16:00:58 return false; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - ms= MeasurementSet(filename, TableLock(TableLock::AutoLocking), build 12-Apr-2018 16:00:58 - Table::Old); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Set up MSSummary object. build 12-Apr-2018 16:00:58 - MSSummary mss(ms); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Set up log objects. build 12-Apr-2018 16:00:58 LogSink sink(LogFilter(plotms->getLogger()->filterMinPriority())); build 12-Apr-2018 16:00:58 if(!plotms->getLogger()->usingGlobalSink()) { build 12-Apr-2018 16:00:58 LogSinkInterface* ic = plotms->getLogger()->localSinkCopy(); build 12-Apr-2018 16:00:58 - sink.localSink(ic); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Temporarily disable global log sink if we're not using it, since build 12-Apr-2018 16:00:58 - // MSSummary posts to both (how annoying). build 12-Apr-2018 16:00:58 - PlotLogger::disableGlobalSink(); build 12-Apr-2018 16:00:58 - reenableGlobal = true; build 12-Apr-2018 16:00:58 + sink.localSink(ic); build 12-Apr-2018 16:00:58 + // Temporarily disable global log sink if we're not using it, build 12-Apr-2018 16:00:58 + // since MSSummary posts to both (how annoying). build 12-Apr-2018 16:00:58 + PlotLogger::disableGlobalSink(); build 12-Apr-2018 16:00:58 + reenableGlobal = true; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 LogIO log(LogOrigin(PMS::LOG_ORIGIN,PMS::LOG_ORIGIN_SUMMARY),sink); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Log summary of the appropriate type and verbosity. build 12-Apr-2018 16:00:58 - //bool vb = client->isMSSummaryVerbose(); build 12-Apr-2018 16:00:58 bool vb = verbose; build 12-Apr-2018 16:00:58 - switch( summaryType ) { build 12-Apr-2018 16:00:58 - case PMS::S_ALL: mss.list(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_WHERE: mss.listWhere(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_WHAT: mss.listWhat(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_HOW: mss.listHow(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_MAIN: mss.listMain(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_TABLES: mss.listTables(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_ANTENNA: mss.listAntenna(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_FEED: mss.listFeed(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_FIELD: mss.listField(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_OBSERVATION: mss.listObservation(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_HISTORY: mss.listHistory(log); break; build 12-Apr-2018 16:00:58 - case PMS::S_POLARIZATION: mss.listPolarization(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_SOURCE: mss.listSource(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_SPW: mss.listSpectralWindow(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_SPW_POL: mss.listSpectralAndPolInfo(log,vb);break; build 12-Apr-2018 16:00:58 - case PMS::S_SYSCAL: mss.listSysCal(log, vb); break; build 12-Apr-2018 16:00:58 - case PMS::S_WEATHER: mss.listWeather(log, vb); break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - success = true; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + Table tab(filename); build 12-Apr-2018 16:00:58 + if (tab.keywordSet().isDefined("ParType")) { build 12-Apr-2018 16:00:58 + NewCalTable ct = NewCalTable(filename, Table::Old, Table::Plain); build 12-Apr-2018 16:00:58 + CTSummary cts(ct); build 12-Apr-2018 16:00:58 + // Log summary of the appropriate type and verbosity. build 12-Apr-2018 16:00:58 + switch( CTsummaryType ) { build 12-Apr-2018 16:00:58 + case PMS::S_ALL_CT: cts.list(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_WHERE_CT: cts.listWhere(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_WHAT_CT: cts.listWhat(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_HOW_CT: cts.listHow(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_MAIN_CT: cts.listMain(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_TABLES_CT: cts.listTables(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_ANTENNA_CT: cts.listAntenna(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_FIELD_CT: cts.listField(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_OBSERVATION_CT: cts.listObservation(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_HISTORY_CT: cts.listHistory(log); break; build 12-Apr-2018 16:00:58 + case PMS::S_SPW_CT: cts.listSpectralWindow(log, vb); break; build 12-Apr-2018 16:00:58 + default: cts.listMain(log, vb); break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + success = true; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + MeasurementSet ms = MeasurementSet(filename, build 12-Apr-2018 16:00:58 + TableLock(TableLock::AutoLocking), Table::Old); build 12-Apr-2018 16:00:58 + MSSummary mss(ms); build 12-Apr-2018 16:00:58 + // Log summary of the appropriate type and verbosity. build 12-Apr-2018 16:00:58 + switch( summaryType ) { build 12-Apr-2018 16:00:58 + case PMS::S_ALL: mss.list(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_WHERE: mss.listWhere(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_WHAT: mss.listWhat(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_HOW: mss.listHow(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_MAIN: mss.listMain(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_TABLES: mss.listTables(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_ANTENNA: mss.listAntenna(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_FEED: mss.listFeed(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_FIELD: mss.listField(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_OBSERVATION: mss.listObservation(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_HISTORY: mss.listHistory(log); break; build 12-Apr-2018 16:00:58 + case PMS::S_POLARIZATION: mss.listPolarization(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_SOURCE: mss.listSource(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_SPW: mss.listSpectralWindow(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_SPW_POL: mss.listSpectralAndPolInfo(log,vb);break; build 12-Apr-2018 16:00:58 + case PMS::S_SYSCAL: mss.listSysCal(log, vb); break; build 12-Apr-2018 16:00:58 + case PMS::S_WEATHER: mss.listWeather(log, vb); break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + success = true; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch(AipsError& x) { build 12-Apr-2018 16:00:58 qDebug()<<"ActionSummary AipsError: "< plots; build 12-Apr-2018 16:00:58 PMS::SummaryType summaryType; build 12-Apr-2018 16:00:58 + PMS::CTSummaryType CTsummaryType; build 12-Apr-2018 16:00:58 casacore::String filename; build 12-Apr-2018 16:00:58 bool verbose; build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Actions/ActionSummaryDialog.cc b/code/plotms/Actions/ActionSummaryDialog.cc build 12-Apr-2018 16:00:58 index dccf887..5dad52b 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Actions/ActionSummaryDialog.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Actions/ActionSummaryDialog.cc build 12-Apr-2018 16:00:58 @@ -63,7 +63,10 @@ bool ActionSummaryDialog::doActionSpecific( PlotMSApp* plotms){ build 12-Apr-2018 16:00:58 if ( result == 1 ){ build 12-Apr-2018 16:00:58 ActionSummary summary( client ); build 12-Apr-2018 16:00:58 summary.setFile( summarizeDialog->getFileName()); build 12-Apr-2018 16:00:58 - summary.setSummaryType( summarizeDialog->getSummaryType()); build 12-Apr-2018 16:00:58 + if (summarizeDialog->isMS()) build 12-Apr-2018 16:00:58 + summary.setSummaryType( summarizeDialog->getSummaryType()); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + summary.setCTSummaryType( summarizeDialog->getCTSummaryType()); build 12-Apr-2018 16:00:58 summary.setVerbose( summarizeDialog->isVerbose()); build 12-Apr-2018 16:00:58 success = summary.doAction( plotms ); build 12-Apr-2018 16:00:58 if ( !success ){ build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Data/CalCache.cc b/code/plotms/Data/CalCache.cc build 12-Apr-2018 16:00:58 index c719816..a94f2c2 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Data/CalCache.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Data/CalCache.cc build 12-Apr-2018 16:00:58 @@ -63,8 +63,18 @@ String CalCache::polname(Int ipol) { build 12-Apr-2018 16:00:58 return ( (ipol%2==0) ? String("X") : String("Y") ); build 12-Apr-2018 16:00:58 else if (basis_=="Circular") build 12-Apr-2018 16:00:58 return ( (ipol%2==0) ? String("R") : String("L") ); build 12-Apr-2018 16:00:58 - else // "unknown" build 12-Apr-2018 16:00:58 - return ( (ipol%2==0) ? String("0") : String("1") ); build 12-Apr-2018 16:00:58 + else { // "unknown", or antenna positions build 12-Apr-2018 16:00:58 + if (calType_=="KAntPos Jones") { build 12-Apr-2018 16:00:58 + switch(ipol) { build 12-Apr-2018 16:00:58 + case 0: return "X"; build 12-Apr-2018 16:00:58 + case 1: return "Y"; build 12-Apr-2018 16:00:58 + case 2: return "Z"; build 12-Apr-2018 16:00:58 + default: return (String::toString(ipol)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + return ( String::toString(ipol) ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -75,14 +85,15 @@ void CalCache::loadIt(vector& loadAxes, build 12-Apr-2018 16:00:58 vector& /*loadData*/, build 12-Apr-2018 16:00:58 ThreadCommunication* thread) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // update cal type build 12-Apr-2018 16:00:58 + // this also sets calType_: build 12-Apr-2018 16:00:58 setFilename(filename_); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - if (calType_=="BPOLY" || calType_=="GSPLINE" || build 12-Apr-2018 16:00:58 - calType_[0]=='A' || calType_[0]=='M' || calType_[0]=='X') build 12-Apr-2018 16:00:58 + // trap unsupported types build 12-Apr-2018 16:00:58 + if (calType_=="BPOLY" || calType_=="GSPLINE" || calType_[0]=='M' || build 12-Apr-2018 16:00:58 + (calType_[0]=='X' && calType_.contains("Mueller"))) { build 12-Apr-2018 16:00:58 throw AipsError("Cal table type " + calType_ + " is unsupported in plotms. Please continue to use plotcal."); build 12-Apr-2018 16:00:58 - if (calType_=="KAntPos Jones") build 12-Apr-2018 16:00:58 - throw AipsError("Cannot plot " + calType_ + " tables."); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 logLoad("Plotting a " + calType_ + " calibration table."); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Warn that averaging will be ignored build 12-Apr-2018 16:00:58 @@ -145,8 +156,9 @@ void CalCache::setUpCalIter(const String& ctname, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // check for invalid caltypes for ratio plots build 12-Apr-2018 16:00:58 if (selection.corr() == "/") { build 12-Apr-2018 16:00:58 - if (calType_ == "BPOLY" || calType_[0] == 'T' || calType_[0] == 'F') build 12-Apr-2018 16:00:58 + if (calType_ == "BPOLY" || calType_[0]=='T' || calType_[0]=='F' || calType_[0]=='X') { build 12-Apr-2018 16:00:58 throw(AipsError("Polarization ratio plots not supported for " + calType_ + " tables.")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 polnRatio_ = true; build 12-Apr-2018 16:00:58 } else { build 12-Apr-2018 16:00:58 polnRatio_ = false; build 12-Apr-2018 16:00:58 @@ -334,7 +346,7 @@ void CalCache::loadCalChunks(ROCTIter& ci, build 12-Apr-2018 16:00:58 logWarn("CalCache::loadIt", "Caught divide-by-zero exception in ratio plots; result(s) set to 1.0 and flagged"); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - void CalCache::loadCalAxis(ROCTIter& cti, Int chunk, PMS::Axis axis, String pol) { build 12-Apr-2018 16:00:58 +void CalCache::loadCalAxis(ROCTIter& cti, Int chunk, PMS::Axis axis, String pol) { build 12-Apr-2018 16:00:58 Slice parSlice1 = Slice(); build 12-Apr-2018 16:00:58 Slice parSlice2 = Slice(); build 12-Apr-2018 16:00:58 if (PMS::axisNeedsCalSlice(axis)) { build 12-Apr-2018 16:00:58 @@ -347,328 +359,325 @@ void CalCache::loadCalChunks(ROCTIter& ci, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - switch(axis) { build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::SCAN: // assumes scan unique build 12-Apr-2018 16:00:58 - scan_(chunk) = cti.thisScan(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::FIELD: build 12-Apr-2018 16:00:58 - field_(chunk) = cti.thisField(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::TIME: { // assumes time unique build 12-Apr-2018 16:00:58 - time_(chunk) = cti.thisTime(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - case PMS::TIME_INTERVAL: // assumes timeInterval unique in VB build 12-Apr-2018 16:00:58 - timeIntr_(chunk) = cti.interval()(0); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - case PMS::SPW: build 12-Apr-2018 16:00:58 - spw_(chunk) = cti.thisSpw(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - case PMS::CHANNEL: { build 12-Apr-2018 16:00:58 - cti.chan(*chan_[chunk]); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - case PMS::FREQUENCY: { build 12-Apr-2018 16:00:58 - // TBD: Convert freq to desired frame build 12-Apr-2018 16:00:58 - cti.freq(*freq_[chunk]); build 12-Apr-2018 16:00:58 - (*freq_[chunk])/=1.0e9; // in GHz build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - case PMS::VELOCITY: { build 12-Apr-2018 16:00:58 - // Convert freq in the vb to velocity build 12-Apr-2018 16:00:58 - vbu_.toVelocity(*vel_[chunk], vb, transformations_.frame(), build 12-Apr-2018 16:00:58 - MVFrequency(transformations_.restFreqHz()), build 12-Apr-2018 16:00:58 - transformations_.veldef()); build 12-Apr-2018 16:00:58 - (*vel_[chunk]) /= 1.0e3; // in km/s build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::CORR: { build 12-Apr-2018 16:00:58 - corr_[chunk]->resize(chshapes_(0,chunk)); build 12-Apr-2018 16:00:58 - if (pol=="" || pol=="RL" || pol=="XY") { build 12-Apr-2018 16:00:58 - indgen(*corr_[chunk]); build 12-Apr-2018 16:00:58 - } else if (pol== "R" || pol=="X") { build 12-Apr-2018 16:00:58 - corr_[chunk]->resize(1); build 12-Apr-2018 16:00:58 - corr_[chunk]->set(0); build 12-Apr-2018 16:00:58 - } else if (pol== "L" || pol=="Y") { build 12-Apr-2018 16:00:58 - corr_[chunk]->resize(1); build 12-Apr-2018 16:00:58 - corr_[chunk]->set(1); build 12-Apr-2018 16:00:58 - } else if (pol=="/") { build 12-Apr-2018 16:00:58 - corr_[chunk]->resize(1); build 12-Apr-2018 16:00:58 - corr_[chunk]->set(-1); // ??? build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::ANTENNA1: build 12-Apr-2018 16:00:58 - *antenna1_[chunk] = cti.antenna1(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - case PMS::ANTENNA2: build 12-Apr-2018 16:00:58 - *antenna2_[chunk] = cti.antenna2(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::BASELINE: { build 12-Apr-2018 16:00:58 - Vector a1(cti.antenna1()); build 12-Apr-2018 16:00:58 - Vector a2(cti.antenna2()); build 12-Apr-2018 16:00:58 - baseline_[chunk]->resize(cti.nrow()); build 12-Apr-2018 16:00:58 - Vector bl(*baseline_[chunk]); build 12-Apr-2018 16:00:58 - for (Int irow=0;irow cArray = cti.cparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array ampRatio = amplitude(cArray(parSlice1, Slice(), Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 - checkRatioArray(ampRatio, chunk); build 12-Apr-2018 16:00:58 - *amp_[chunk] = ampRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *amp_[chunk] = amplitude(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 + switch(axis) { build 12-Apr-2018 16:00:58 + case PMS::SCAN: // assumes scan unique build 12-Apr-2018 16:00:58 + scan_(chunk) = cti.thisScan(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::FIELD: build 12-Apr-2018 16:00:58 + field_(chunk) = cti.thisField(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::TIME: // assumes time unique build 12-Apr-2018 16:00:58 + time_(chunk) = cti.thisTime(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + case PMS::TIME_INTERVAL: // assumes timeInterval unique in VB build 12-Apr-2018 16:00:58 + timeIntr_(chunk) = cti.interval()(0); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + case PMS::SPW: build 12-Apr-2018 16:00:58 + spw_(chunk) = cti.thisSpw(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::CHANNEL: build 12-Apr-2018 16:00:58 + cti.chan(*chan_[chunk]); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::FREQUENCY: { build 12-Apr-2018 16:00:58 + // TBD: Convert freq to desired frame build 12-Apr-2018 16:00:58 + cti.freq(*freq_[chunk]); build 12-Apr-2018 16:00:58 + (*freq_[chunk])/=1.0e9; // in GHz build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array ampRatio = fArray(parSlice1, Slice(), Slice()) / fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - checkRatioArray(ampRatio, chunk); build 12-Apr-2018 16:00:58 - *amp_[chunk] = ampRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *amp_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (calType_[0] == 'F') // TEC table build 12-Apr-2018 16:00:58 - (*amp_[chunk]) /= Float(1e+16); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::GPHASE: build 12-Apr-2018 16:00:58 - case PMS::PHASE: { build 12-Apr-2018 16:00:58 - if (parsAreComplex()) { build 12-Apr-2018 16:00:58 - Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array phaseRatio = phase(cArray(parSlice1, Slice(), Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 - checkRatioArray(phaseRatio, chunk); build 12-Apr-2018 16:00:58 - *pha_[chunk] = phaseRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *pha_[chunk] = phase(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + case PMS::VELOCITY: { build 12-Apr-2018 16:00:58 + // Convert freq in the vb to velocity build 12-Apr-2018 16:00:58 + vbu_.toVelocity(*vel_[chunk], vb, transformations_.frame(), build 12-Apr-2018 16:00:58 + MVFrequency(transformations_.restFreqHz()), build 12-Apr-2018 16:00:58 + transformations_.veldef()); build 12-Apr-2018 16:00:58 + (*vel_[chunk]) /= 1.0e3; // in km/s build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - (*pha_[chunk]) *= Float(180.0/C::pi); build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - throw(AipsError("phase has no meaning for this table")); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::GREAL: build 12-Apr-2018 16:00:58 - case PMS::REAL: { build 12-Apr-2018 16:00:58 - if (parsAreComplex()) { build 12-Apr-2018 16:00:58 - Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array realRatio = real(cArray(parSlice1, Slice(), Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 - checkRatioArray(realRatio, chunk); build 12-Apr-2018 16:00:58 - *real_[chunk] = realRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *real_[chunk] = real(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } else { // allow float for single dish cal tables build 12-Apr-2018 16:00:58 - Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array ampRatio = fArray(parSlice1, Slice(), Slice()) / fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - checkRatioArray(ampRatio, chunk); build 12-Apr-2018 16:00:58 - *real_[chunk] = ampRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *real_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + case PMS::CORR: { build 12-Apr-2018 16:00:58 + corr_[chunk]->resize(chshapes_(0,chunk)); build 12-Apr-2018 16:00:58 + if (pol=="" || pol=="RL" || pol=="XY") { build 12-Apr-2018 16:00:58 + indgen(*corr_[chunk]); build 12-Apr-2018 16:00:58 + } else if (pol== "R" || pol=="X") { build 12-Apr-2018 16:00:58 + corr_[chunk]->resize(1); build 12-Apr-2018 16:00:58 + corr_[chunk]->set(0); build 12-Apr-2018 16:00:58 + } else if (pol== "L" || pol=="Y") { build 12-Apr-2018 16:00:58 + corr_[chunk]->resize(1); build 12-Apr-2018 16:00:58 + corr_[chunk]->set(1); build 12-Apr-2018 16:00:58 + } else if (pol=="/") { build 12-Apr-2018 16:00:58 + corr_[chunk]->resize(1); build 12-Apr-2018 16:00:58 + corr_[chunk]->set(-1); // ??? build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::GIMAG: build 12-Apr-2018 16:00:58 - case PMS::IMAG: { build 12-Apr-2018 16:00:58 - if (parsAreComplex()) { build 12-Apr-2018 16:00:58 - Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array imagRatio = imag(cArray(parSlice1, Slice(), Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 - checkRatioArray(imagRatio, chunk); build 12-Apr-2018 16:00:58 - *imag_[chunk] = imagRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *imag_[chunk] = imag(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } else build 12-Apr-2018 16:00:58 - throw(AipsError("imag has no meaning for this table")); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::DELAY:{ build 12-Apr-2018 16:00:58 - if (!parsAreComplex()) { build 12-Apr-2018 16:00:58 - Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array delayRatio = fArray(parSlice1, Slice(), Slice()) - fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - checkRatioArray(delayRatio, chunk); build 12-Apr-2018 16:00:58 - *par_[chunk] = delayRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + case PMS::ANTENNA1: build 12-Apr-2018 16:00:58 + *antenna1_[chunk] = cti.antenna1(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::ANTENNA2: build 12-Apr-2018 16:00:58 + *antenna2_[chunk] = cti.antenna2(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::BASELINE: { build 12-Apr-2018 16:00:58 + Vector a1(cti.antenna1()); build 12-Apr-2018 16:00:58 + Vector a2(cti.antenna2()); build 12-Apr-2018 16:00:58 + baseline_[chunk]->resize(cti.nrow()); build 12-Apr-2018 16:00:58 + Vector bl(*baseline_[chunk]); build 12-Apr-2018 16:00:58 + for (Int irow=0;irow fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 - } else build 12-Apr-2018 16:00:58 - throw(AipsError( "opacity has no meaning for this table")); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::SWP: { // "SPGAIN" in plotcal build 12-Apr-2018 16:00:58 - if ( !parsAreComplex() && calType_.contains("EVLASWPOW")) { build 12-Apr-2018 16:00:58 - Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array swpRatio = fArray(parSlice1, Slice(), Slice()) / fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - checkRatioArray(swpRatio, chunk); build 12-Apr-2018 16:00:58 - *par_[chunk] = swpRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: { build 12-Apr-2018 16:00:58 + if (!calType_.startsWith("KAntPos")) build 12-Apr-2018 16:00:58 + throw(AipsError( "ANTPOS has no meaning for this table")); build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + *antpos_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - } else build 12-Apr-2018 16:00:58 - throw( AipsError( "SwPower has no meaning for this table")); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::TSYS: { build 12-Apr-2018 16:00:58 - if ( !parsAreComplex() && build 12-Apr-2018 16:00:58 - (calType_.contains("EVLASWPOW") || calType_.contains("TSYS"))) { build 12-Apr-2018 16:00:58 - Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array tsysRatio = fArray(parSlice1, Slice(), Slice()) / fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - checkRatioArray(tsysRatio, chunk); build 12-Apr-2018 16:00:58 - *par_[chunk] = tsysRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + case PMS::GAMP: build 12-Apr-2018 16:00:58 + case PMS::AMP: { build 12-Apr-2018 16:00:58 + if (parsAreComplex()) { build 12-Apr-2018 16:00:58 + Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array ampRatio = amplitude(cArray(parSlice1, Slice(), build 12-Apr-2018 16:00:58 + Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 + checkRatioArray(ampRatio, chunk); build 12-Apr-2018 16:00:58 + *amp_[chunk] = ampRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *amp_[chunk] = amplitude(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array ampRatio = fArray(parSlice1, Slice(), Slice()) / build 12-Apr-2018 16:00:58 + fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + checkRatioArray(ampRatio, chunk); build 12-Apr-2018 16:00:58 + *amp_[chunk] = ampRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *amp_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (calType_[0] == 'F') // TEC table build 12-Apr-2018 16:00:58 + (*amp_[chunk]) /= Float(1e+16); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - } else build 12-Apr-2018 16:00:58 - throw(AipsError( "Tsys has no meaning for this table")); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::SNR: { build 12-Apr-2018 16:00:58 - if (polnRatio_) { build 12-Apr-2018 16:00:58 - Array snrRatio = cti.snr()(parSlice1, Slice(), Slice()) / cti.snr()(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - checkRatioArray(snrRatio, chunk); build 12-Apr-2018 16:00:58 - *snr_[chunk] = snrRatio; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - *snr_[chunk] = cti.snr()(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::TEC: { build 12-Apr-2018 16:00:58 - if ( !parsAreComplex() && calType_[0]=='F') { build 12-Apr-2018 16:00:58 - Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 - *par_[chunk] = (fArray(parSlice1, Slice(), Slice()))/1e+16; build 12-Apr-2018 16:00:58 - } else build 12-Apr-2018 16:00:58 - throw(AipsError( "TEC has no meaning for this table")); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - case PMS::FLAG: build 12-Apr-2018 16:00:58 - if (polnRatio_) build 12-Apr-2018 16:00:58 - *flag_[chunk] = cti.flag()(parSlice1, Slice(), Slice()) | cti.flag()(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 - else build 12-Apr-2018 16:00:58 - *flag_[chunk] = cti.flag()(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - case PMS::WT: { build 12-Apr-2018 16:00:58 - *wt_[chunk] = cti.weightMat(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - case PMS::AZ0: build 12-Apr-2018 16:00:58 - case PMS::EL0: { build 12-Apr-2018 16:00:58 - Vector azel; build 12-Apr-2018 16:00:58 - cti.azel0Vec(cti.time()(0),azel); build 12-Apr-2018 16:00:58 - az0_(chunk) = azel(0); build 12-Apr-2018 16:00:58 - el0_(chunk) = azel(1); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - case PMS::HA0: build 12-Apr-2018 16:00:58 - ha0_(chunk) = cti.hourang(cti.time()(0))*12/C::pi; // in hours build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - case PMS::PA0: { build 12-Apr-2018 16:00:58 - pa0_(chunk) = cti.parang0(cti.time()(0))*180.0/C::pi; // in degrees build 12-Apr-2018 16:00:58 - if (pa0_(chunk)<0.0) pa0_(chunk)+=360.0; build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - case PMS::ANTENNA: { build 12-Apr-2018 16:00:58 - antenna_[chunk]->resize(nAnt_); build 12-Apr-2018 16:00:58 - indgen(*antenna_[chunk]); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - case PMS::AZIMUTH: build 12-Apr-2018 16:00:58 - case PMS::ELEVATION: { build 12-Apr-2018 16:00:58 - Matrix azel; build 12-Apr-2018 16:00:58 - cti.azelMat(cti.time()(0),azel); build 12-Apr-2018 16:00:58 - *az_[chunk] = azel.row(0); build 12-Apr-2018 16:00:58 - *el_[chunk] = azel.row(1); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - case PMS::PARANG: build 12-Apr-2018 16:00:58 - *parang_[chunk] = cti.feed_pa(cti.time()(0))*(180.0/C::pi); // in degrees build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - case PMS::ROW: { build 12-Apr-2018 16:00:58 - *row_[chunk] = cti.rowIds(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - case PMS::OBSERVATION: { build 12-Apr-2018 16:00:58 - (*obsid_[chunk]).resize(1); build 12-Apr-2018 16:00:58 - *obsid_[chunk] = cti.thisObs(); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - case PMS::INTENT: { build 12-Apr-2018 16:00:58 - // metadata axis that always gets loaded so don't want to throw exception build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - case PMS::ATM: build 12-Apr-2018 16:00:58 - case PMS::TSKY: { build 12-Apr-2018 16:00:58 - casacore::Int spw = cti.thisSpw(); build 12-Apr-2018 16:00:58 - casacore::Int scan = cti.thisScan(); build 12-Apr-2018 16:00:58 - casacore::Vector freqsGHz = cti.freq()/1e9; build 12-Apr-2018 16:00:58 - casacore::Vector curve(1, 0.0); build 12-Apr-2018 16:00:58 - bool isAtm = (axis==PMS::ATM); build 12-Apr-2018 16:00:58 - if (plotmsAtm_) { build 12-Apr-2018 16:00:58 - curve.resize(); build 12-Apr-2018 16:00:58 - curve = plotmsAtm_->calcOverlayCurve(spw, scan, freqsGHz, build 12-Apr-2018 16:00:58 - isAtm); build 12-Apr-2018 16:00:58 + case PMS::GPHASE: build 12-Apr-2018 16:00:58 + case PMS::PHASE: { build 12-Apr-2018 16:00:58 + if (parsAreComplex()) { build 12-Apr-2018 16:00:58 + Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array phaseRatio = phase(cArray(parSlice1, Slice(), build 12-Apr-2018 16:00:58 + Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 + checkRatioArray(phaseRatio, chunk); build 12-Apr-2018 16:00:58 + *pha_[chunk] = phaseRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *pha_[chunk] = phase(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + (*pha_[chunk]) *= Float(180.0/C::pi); build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + throw(AipsError("phase has no meaning for this table")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::GREAL: build 12-Apr-2018 16:00:58 + case PMS::REAL: { build 12-Apr-2018 16:00:58 + if (parsAreComplex()) { build 12-Apr-2018 16:00:58 + Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array realRatio = real(cArray(parSlice1, Slice(), build 12-Apr-2018 16:00:58 + Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 + checkRatioArray(realRatio, chunk); build 12-Apr-2018 16:00:58 + *real_[chunk] = realRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *real_[chunk] = real(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { // allow float for single dish cal tables build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array ampRatio = fArray(parSlice1, Slice(), Slice()) / fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + checkRatioArray(ampRatio, chunk); build 12-Apr-2018 16:00:58 + *real_[chunk] = ampRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *real_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::GIMAG: build 12-Apr-2018 16:00:58 + case PMS::IMAG: { build 12-Apr-2018 16:00:58 + if (parsAreComplex()) { build 12-Apr-2018 16:00:58 + Cube cArray = cti.cparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array imagRatio = imag(cArray(parSlice1, Slice(), build 12-Apr-2018 16:00:58 + Slice()) / cArray(parSlice2, Slice(), Slice())); build 12-Apr-2018 16:00:58 + checkRatioArray(imagRatio, chunk); build 12-Apr-2018 16:00:58 + *imag_[chunk] = imagRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *imag_[chunk] = imag(cArray(parSlice1, Slice(), Slice())); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else build 12-Apr-2018 16:00:58 + throw(AipsError("imag has no meaning for this table")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::DELAY:{ build 12-Apr-2018 16:00:58 + if (!parsAreComplex()) { build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array delayRatio = fArray(parSlice1, Slice(), Slice()) build 12-Apr-2018 16:00:58 + - fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + checkRatioArray(delayRatio, chunk); build 12-Apr-2018 16:00:58 + *par_[chunk] = delayRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else build 12-Apr-2018 16:00:58 + throw(AipsError( "delay has no meaning for this table")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::OPAC: { build 12-Apr-2018 16:00:58 + if (!parsAreComplex() && calType_.contains("Opac")) { build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } else build 12-Apr-2018 16:00:58 + throw(AipsError( "opacity has no meaning for this table")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::SWP: { // "SPGAIN" in plotcal build 12-Apr-2018 16:00:58 + if ( !parsAreComplex() && calType_.contains("EVLASWPOW")) { build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array swpRatio = fArray(parSlice1, Slice(), Slice()) / build 12-Apr-2018 16:00:58 + fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + checkRatioArray(swpRatio, chunk); build 12-Apr-2018 16:00:58 + *par_[chunk] = swpRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else build 12-Apr-2018 16:00:58 + throw( AipsError( "SwPower has no meaning for this table")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::TSYS: { build 12-Apr-2018 16:00:58 + if ((!parsAreComplex()) && build 12-Apr-2018 16:00:58 + (calType_.contains("EVLASWPOW") || calType_.contains("TSYS"))) { build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array tsysRatio = fArray(parSlice1, Slice(), Slice()) / build 12-Apr-2018 16:00:58 + fArray(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + checkRatioArray(tsysRatio, chunk); build 12-Apr-2018 16:00:58 + *par_[chunk] = tsysRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *par_[chunk] = fArray(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else build 12-Apr-2018 16:00:58 + throw(AipsError( "Tsys has no meaning for this table")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::SNR: { build 12-Apr-2018 16:00:58 + if (polnRatio_) { build 12-Apr-2018 16:00:58 + Array snrRatio = cti.snr()(parSlice1, Slice(), Slice()) / build 12-Apr-2018 16:00:58 + cti.snr()(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + checkRatioArray(snrRatio, chunk); build 12-Apr-2018 16:00:58 + *snr_[chunk] = snrRatio; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + *snr_[chunk] = cti.snr()(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::TEC: { build 12-Apr-2018 16:00:58 + if ( !parsAreComplex() && calType_[0]=='F') { build 12-Apr-2018 16:00:58 + Cube fArray = cti.fparam(); build 12-Apr-2018 16:00:58 + *par_[chunk] = (fArray(parSlice1, Slice(), Slice()))/1e+16; build 12-Apr-2018 16:00:58 + } else build 12-Apr-2018 16:00:58 + throw(AipsError( "TEC has no meaning for this table")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::FLAG: { build 12-Apr-2018 16:00:58 + if (polnRatio_) build 12-Apr-2018 16:00:58 + *flag_[chunk] = cti.flag()(parSlice1, Slice(), Slice()) | build 12-Apr-2018 16:00:58 + cti.flag()(parSlice2, Slice(), Slice()); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + *flag_[chunk] = cti.flag()(parSlice1, Slice(), Slice()); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + case PMS::WT: { build 12-Apr-2018 16:00:58 + *wt_[chunk] = cti.weightMat(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::AZ0: build 12-Apr-2018 16:00:58 + case PMS::EL0: { build 12-Apr-2018 16:00:58 + Vector azel; build 12-Apr-2018 16:00:58 + cti.azel0Vec(cti.time()(0),azel); build 12-Apr-2018 16:00:58 + az0_(chunk) = azel(0); build 12-Apr-2018 16:00:58 + el0_(chunk) = azel(1); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::HA0: build 12-Apr-2018 16:00:58 + ha0_(chunk) = cti.hourang(cti.time()(0))*12/C::pi; // in hours build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::PA0: { build 12-Apr-2018 16:00:58 + pa0_(chunk) = cti.parang0(cti.time()(0))*180.0/C::pi; // in degrees build 12-Apr-2018 16:00:58 + if (pa0_(chunk)<0.0) pa0_(chunk)+=360.0; build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + case PMS::ANTENNA: { build 12-Apr-2018 16:00:58 + antenna_[chunk]->resize(nAnt_); build 12-Apr-2018 16:00:58 + indgen(*antenna_[chunk]); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + case PMS::AZIMUTH: build 12-Apr-2018 16:00:58 + case PMS::ELEVATION: { build 12-Apr-2018 16:00:58 + Matrix azel; build 12-Apr-2018 16:00:58 + cti.azelMat(cti.time()(0),azel); build 12-Apr-2018 16:00:58 + *az_[chunk] = azel.row(0); build 12-Apr-2018 16:00:58 + *el_[chunk] = azel.row(1); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::PARANG: build 12-Apr-2018 16:00:58 + *parang_[chunk] = cti.feed_pa(cti.time()(0))*(180.0/C::pi); //degrees build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + case PMS::ROW: { build 12-Apr-2018 16:00:58 + *row_[chunk] = cti.rowIds(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + case PMS::OBSERVATION: { build 12-Apr-2018 16:00:58 + (*obsid_[chunk]).resize(1); build 12-Apr-2018 16:00:58 + *obsid_[chunk] = cti.thisObs(); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::INTENT: { build 12-Apr-2018 16:00:58 + // metadata axis that always gets loaded so don't want to throw exception build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + case PMS::ATM: build 12-Apr-2018 16:00:58 + case PMS::TSKY: { build 12-Apr-2018 16:00:58 + casacore::Int spw = cti.thisSpw(); build 12-Apr-2018 16:00:58 + casacore::Int scan = cti.thisScan(); build 12-Apr-2018 16:00:58 + casacore::Vector freqsGHz = cti.freq()/1e9; build 12-Apr-2018 16:00:58 + casacore::Vector curve(1, 0.0); build 12-Apr-2018 16:00:58 + bool isAtm = (axis==PMS::ATM); build 12-Apr-2018 16:00:58 + if (plotmsAtm_) { build 12-Apr-2018 16:00:58 + curve.resize(); build 12-Apr-2018 16:00:58 + curve = plotmsAtm_->calcOverlayCurve(spw, scan, freqsGHz, isAtm); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (isAtm) build 12-Apr-2018 16:00:58 + *atm_[chunk] = curve; build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + *tsky_[chunk] = curve; build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + default: build 12-Apr-2018 16:00:58 + throw(AipsError("Axis choice not supported for Cal Tables")); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - if (isAtm) build 12-Apr-2018 16:00:58 - *atm_[chunk] = curve; build 12-Apr-2018 16:00:58 - else build 12-Apr-2018 16:00:58 - *tsky_[chunk] = curve; build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - default: build 12-Apr-2018 16:00:58 - throw(AipsError("Axis choice not supported for Cal Tables")); build 12-Apr-2018 16:00:58 - break; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void CalCache::flagToDisk(const PlotMSFlagging& flagging, build 12-Apr-2018 16:00:58 @@ -850,7 +859,8 @@ String CalCache::toVisCalAxis(PMS::Axis axis) { build 12-Apr-2018 16:00:58 case PMS::SNR: build 12-Apr-2018 16:00:58 if (calType_.contains("EVLASWP")) return "GAINAMP"; build 12-Apr-2018 16:00:58 if (calType_.contains("TSYS")) return "TSYS"; build 12-Apr-2018 16:00:58 - if (calType_[0] == 'K') return "DELAY"; build 12-Apr-2018 16:00:58 + if (calType_[0] == 'K' && !calType_.startsWith("KAntPos")) build 12-Apr-2018 16:00:58 + return "DELAY"; build 12-Apr-2018 16:00:58 if (calType_[0] == 'F') return "TEC"; build 12-Apr-2018 16:00:58 if (calType_ == "TOpac") return "OPAC"; build 12-Apr-2018 16:00:58 return "AMP"; build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Data/MSCacheVolMeter.cc b/code/plotms/Data/MSCacheVolMeter.cc build 12-Apr-2018 16:00:58 index 5a4e2ea..4bdbaa4 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Data/MSCacheVolMeter.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Data/MSCacheVolMeter.cc build 12-Apr-2018 16:00:58 @@ -264,6 +264,7 @@ String MSCacheVolMeter::evalVolume(map axes, Vector axesma build 12-Apr-2018 16:00:58 case PMS::SNR: build 12-Apr-2018 16:00:58 case PMS::TEC: build 12-Apr-2018 16:00:58 case PMS::WTxAMP: build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: build 12-Apr-2018 16:00:58 case PMS::ATM: build 12-Apr-2018 16:00:58 case PMS::TSKY: build 12-Apr-2018 16:00:58 case PMS::NONE: build 12-Apr-2018 16:00:58 @@ -450,6 +451,7 @@ String MSCacheVolMeter::evalVolume(std::vector vbShapes, build 12-Apr-2018 16:00:58 case PMS::OPAC: build 12-Apr-2018 16:00:58 case PMS::SNR: build 12-Apr-2018 16:00:58 case PMS::TEC: build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: build 12-Apr-2018 16:00:58 case PMS::ATM: build 12-Apr-2018 16:00:58 case PMS::TSKY: build 12-Apr-2018 16:00:58 case PMS::NONE: build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Data/PlotMSAtm.cc b/code/plotms/Data/PlotMSAtm.cc build 12-Apr-2018 16:00:58 index 65521c6..e3f1ceb 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Data/PlotMSAtm.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Data/PlotMSAtm.cc build 12-Apr-2018 16:00:58 @@ -326,17 +326,17 @@ void PlotMSAtm::getMedianPwv() { build 12-Apr-2018 16:00:58 if (mstab.keywordSet().fieldNumber("ASDM_CALWVR") > -1) { build 12-Apr-2018 16:00:58 subname = tableName_ + "::ASDM_CALWVR"; build 12-Apr-2018 16:00:58 subtable = Table::openTable(subname); build 12-Apr-2018 16:00:58 - if (subtable.nrow() > 0) { build 12-Apr-2018 16:00:58 + if (subtable.nrow() > 0) { build 12-Apr-2018 16:00:58 waterCol = ScalarColumn(subtable, "water").getColumn(); build 12-Apr-2018 16:00:58 timesCol = ScalarColumn(subtable, "startValidTime").getColumn(); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (waterCol.empty() && mstab.keywordSet().fieldNumber("ASDM_CALATMOSPHERE") > -1) { build 12-Apr-2018 16:00:58 subname = tableName_ + "::ASDM_CALATMOSPHERE"; build 12-Apr-2018 16:00:58 subtable = Table::openTable(subname); build 12-Apr-2018 16:00:58 - if (subtable.nrow() > 0) { build 12-Apr-2018 16:00:58 + if (subtable.nrow() > 0) { build 12-Apr-2018 16:00:58 Array waterColArray = ArrayColumn(subtable, "water").getColumn(); build 12-Apr-2018 16:00:58 - waterCol = waterColArray(Slicer(Slice(0), Slice())); build 12-Apr-2018 16:00:58 + waterCol = waterColArray(Slicer(Slice(0), Slice())); build 12-Apr-2018 16:00:58 timesCol = ScalarColumn(subtable, "startValidTime").getColumn(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -369,8 +369,7 @@ void PlotMSAtm::getMeanWeather() { build 12-Apr-2018 16:00:58 casacore::Float pressure, humidity(20.0), temperature(273.15); build 12-Apr-2018 16:00:58 // NB: plotbandpass uses default pressure 563 in all cases; build 12-Apr-2018 16:00:58 // see CAS-9053 algorithm #2 build 12-Apr-2018 16:00:58 - if (telescopeName_=="ALMA") pressure = 563.0; // mb build 12-Apr-2018 16:00:58 - else pressure = 786.0; // mb build 12-Apr-2018 16:00:58 + pressure = (telescopeName_=="ALMA" ? 563.0 : 786.0); // mb build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // values from WEATHER table if it exists build 12-Apr-2018 16:00:58 bool noWeather(false); build 12-Apr-2018 16:00:58 @@ -428,7 +427,19 @@ void PlotMSAtm::getMeanWeather() { build 12-Apr-2018 16:00:58 if (noWeather) { build 12-Apr-2018 16:00:58 parent_->logmesg("load_cache", "Could not open WEATHER table, using default values: humidity " + casacore::String::toString(humidity) + ", pressure " + casacore::String::toString(pressure) + ", temperature " + casacore::String::toString(temperature) + " for Atm/Tsky"); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + // reset to defaults build 12-Apr-2018 16:00:58 + if (humidity==0.0) { build 12-Apr-2018 16:00:58 + humidity = 20.0; build 12-Apr-2018 16:00:58 + parent_->logmesg("load_cache", "WEATHER table humidity is 0.0, using default value " + casacore::String::toString(humidity)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (pressure==0.0) { build 12-Apr-2018 16:00:58 + pressure = (telescopeName_=="ALMA" ? 563.0 : 786.0); // mb build 12-Apr-2018 16:00:58 + parent_->logmesg("load_cache", "WEATHER table pressure is 0.0, using default value " + casacore::String::toString(pressure)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (temperature==0.0) { build 12-Apr-2018 16:00:58 + temperature = 273.15; build 12-Apr-2018 16:00:58 + parent_->logmesg("load_cache", "WEATHER table temperature is 0.0, using default value " + casacore::String::toString(temperature)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 // to use in atmosphere.initAtmProfile (tool) build 12-Apr-2018 16:00:58 weather_.define("humidity", humidity); // % build 12-Apr-2018 16:00:58 weather_.define("pressure", pressure); // mb build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Data/PlotMSCacheBase.cc b/code/plotms/Data/PlotMSCacheBase.cc build 12-Apr-2018 16:00:58 index ae80d78..5ec24b5 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Data/PlotMSCacheBase.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Data/PlotMSCacheBase.cc build 12-Apr-2018 16:00:58 @@ -791,6 +791,8 @@ void PlotMSCacheBase::release(const vector& axes) { build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 case PMS::SNR: PMSC_DELETE(snr_) build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: PMSC_DELETE(antpos_) build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 case PMS::RADIAL_VELOCITY: radialVelocity_.resize(0); build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 case PMS::RHO: rho_.resize(0); build 12-Apr-2018 16:00:58 @@ -1527,6 +1529,9 @@ void PlotMSCacheBase::setCache(Int newnChunk, build 12-Apr-2018 16:00:58 case PMS::TEC: build 12-Apr-2018 16:00:58 addArrays(par_); build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: build 12-Apr-2018 16:00:58 + addArrays(antpos_); build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 case PMS::RADIAL_VELOCITY: { build 12-Apr-2018 16:00:58 radialVelocity_.resize(nChunk_,true); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1630,6 +1635,7 @@ void PlotMSCacheBase::setAxesMask(PMS::Axis axis,Vector& axismask) { build 12-Apr-2018 16:00:58 case PMS::OPAC: build 12-Apr-2018 16:00:58 case PMS::SNR: build 12-Apr-2018 16:00:58 case PMS::TEC: build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: build 12-Apr-2018 16:00:58 case PMS::FLAG: build 12-Apr-2018 16:00:58 case PMS::WTxAMP: build 12-Apr-2018 16:00:58 case PMS::WTSP: build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Data/PlotMSCacheBase.h b/code/plotms/Data/PlotMSCacheBase.h build 12-Apr-2018 16:00:58 index 76a3a09..2a2b940 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Data/PlotMSCacheBase.h build 12-Apr-2018 16:00:58 +++ b/code/plotms/Data/PlotMSCacheBase.h build 12-Apr-2018 16:00:58 @@ -278,6 +278,9 @@ public: build 12-Apr-2018 16:00:58 // These support generic non-complex calibration build 12-Apr-2018 16:00:58 inline casacore::Double getPar(casacore::Int chnk,casacore::Int irel) { return *(par_[chnk]->data()+irel); }; build 12-Apr-2018 16:00:58 inline casacore::Double getSnr(casacore::Int chnk,casacore::Int irel) { return *(snr_[chnk]->data()+irel); }; build 12-Apr-2018 16:00:58 + inline casacore::Double getAntPos(casacore::Int chnk,casacore::Int irel) { return *(antpos_[chnk]->data()+irel); }; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Curve overlays build 12-Apr-2018 16:00:58 inline casacore::Double getAtm(casacore::Int chnk,casacore::Int irel) { return *(atm_[chnk]->data()+irel); }; build 12-Apr-2018 16:00:58 inline casacore::Double getTsky(casacore::Int chnk,casacore::Int irel) { return *(tsky_[chnk]->data()+irel); }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -473,6 +476,7 @@ protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // for cal tables build 12-Apr-2018 16:00:58 casacore::PtrBlock*> par_, snr_; build 12-Apr-2018 16:00:58 + casacore::PtrBlock*> antpos_; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Current setup/state. build 12-Apr-2018 16:00:58 bool dataLoaded_; build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Data/PlotMSIndexer.cc b/code/plotms/Data/PlotMSIndexer.cc build 12-Apr-2018 16:00:58 index 2ed73c0..431705a 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Data/PlotMSIndexer.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Data/PlotMSIndexer.cc build 12-Apr-2018 16:00:58 @@ -1031,6 +1031,9 @@ void PlotMSIndexer::setMethod(CacheMemPtr& getmethod,PMS::Axis axis, build 12-Apr-2018 16:00:58 case PMS::RHO: build 12-Apr-2018 16:00:58 getmethod = &PlotMSCacheBase::getRHO0; build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: build 12-Apr-2018 16:00:58 + getmethod = &PlotMSCacheBase::getAntPos; build 12-Apr-2018 16:00:58 + break; build 12-Apr-2018 16:00:58 case PMS::ATM: build 12-Apr-2018 16:00:58 getmethod = &PlotMSCacheBase::getAtm; build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 @@ -1089,6 +1092,7 @@ void PlotMSIndexer::setIndexer(IndexerMethPtr& indexmethod,PMS::Axis axis) { build 12-Apr-2018 16:00:58 case PMS::OPAC: build 12-Apr-2018 16:00:58 case PMS::SNR: build 12-Apr-2018 16:00:58 case PMS::TEC: build 12-Apr-2018 16:00:58 + case PMS::ANTPOS: build 12-Apr-2018 16:00:58 case PMS::WTxAMP: build 12-Apr-2018 16:00:58 case PMS::WTSP: build 12-Apr-2018 16:00:58 case PMS::SIGMASP: build 12-Apr-2018 16:00:58 @@ -1484,7 +1488,9 @@ void PlotMSIndexer::reportMeta(Double x, Double y, Bool masked,stringstream& ss) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (isMS) build 12-Apr-2018 16:00:58 ss << "Corr="; build 12-Apr-2018 16:00:58 - else build 12-Apr-2018 16:00:58 + else if (plotmscache_->calType() == "KAntPos Jones") build 12-Apr-2018 16:00:58 + ss << "Coordinate="; build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 ss << "Poln="; build 12-Apr-2018 16:00:58 if (plotmscache_->netAxesMask_[dataIndex](0)) build 12-Apr-2018 16:00:58 ss << plotmscache_->polname(Int(plotmscache_->getCorr(currChunk_,getIndex1000(currChunk_,irel_)))); build 12-Apr-2018 16:00:58 @@ -1594,9 +1600,12 @@ String PlotMSIndexer::iterValue() { build 12-Apr-2018 16:00:58 case PMS::SPW: build 12-Apr-2018 16:00:58 return String::toString(iterValue_); build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 - case PMS::FIELD: build 12-Apr-2018 16:00:58 - return plotmscache_->fldnames_(iterValue_); build 12-Apr-2018 16:00:58 + case PMS::FIELD: { build 12-Apr-2018 16:00:58 + // for cal tables, field id can be -1 build 12-Apr-2018 16:00:58 + return (iterValue_ < 0 ? String::toString(iterValue_) : build 12-Apr-2018 16:00:58 + plotmscache_->fldnames_(iterValue_)); build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 case PMS::TIME:{ build 12-Apr-2018 16:00:58 return plotmscache_->getTimeBounds( iterValue_); build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 @@ -1609,7 +1618,7 @@ String PlotMSIndexer::iterValue() { build 12-Apr-2018 16:00:58 label += (ant1>-1 ? plotmscache_->antstanames_(ant1) : "*")+" & "; build 12-Apr-2018 16:00:58 label += (ant2>-1 ? plotmscache_->antstanames_(ant2) : "*"); build 12-Apr-2018 16:00:58 // CAS-4239 add baseline length to plot title build 12-Apr-2018 16:00:58 - String bsnLen = ((ant1>-1 && ant2>-1) ? String::format("_%.0fm", computeBaselineLength(ant1, ant2)) : "_*m"); build 12-Apr-2018 16:00:58 + String bsnLen = ((ant1>-1 && ant2>-1) ? String::format("_%.0fm", computeBaselineLength(ant1, ant2)) : ""); build 12-Apr-2018 16:00:58 label += bsnLen; build 12-Apr-2018 16:00:58 return label; build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Gui/PlotMSSummaryDialog.cc b/code/plotms/Gui/PlotMSSummaryDialog.cc build 12-Apr-2018 16:00:58 index f9d3224..809475e 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Gui/PlotMSSummaryDialog.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Gui/PlotMSSummaryDialog.cc build 12-Apr-2018 16:00:58 @@ -24,6 +24,8 @@ build 12-Apr-2018 16:00:58 //# build 12-Apr-2018 16:00:58 //# $Id: $ build 12-Apr-2018 16:00:58 #include "PlotMSSummaryDialog.qo.h" build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -39,11 +41,12 @@ PlotMSSummaryDialog::PlotMSSummaryDialog(QDialog *parent) build 12-Apr-2018 16:00:58 connect( ui.closeButton, SIGNAL(clicked()), this, SLOT(closeDialog())); build 12-Apr-2018 16:00:58 connect( ui.summaryButton, SIGNAL(clicked()), this, SLOT(summarize())); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Set up summary choices build 12-Apr-2018 16:00:58 + // Set up summary choices for MS build 12-Apr-2018 16:00:58 const vector& types = PMS::summaryTypeStrings(); build 12-Apr-2018 16:00:58 for(unsigned int i = 0; i < types.size(); i++){ build 12-Apr-2018 16:00:58 ui.summaryType->addItem(types[i].c_str()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + isMS_ = true; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void PlotMSSummaryDialog::closeDialog(){ build 12-Apr-2018 16:00:58 @@ -62,6 +65,20 @@ void PlotMSSummaryDialog::filesChanged(const vector& fileNames){ build 12-Apr-2018 16:00:58 QString oldSelection = ui.fileCombo->currentText(); build 12-Apr-2018 16:00:58 ui.fileCombo->clear(); build 12-Apr-2018 16:00:58 int fileNameCount = fileNames.size(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Revise summary choices for cal tables build 12-Apr-2018 16:00:58 + Table tab = Table(fileNames[0]); build 12-Apr-2018 16:00:58 + if (tab.keywordSet().isDefined("ParType")) { build 12-Apr-2018 16:00:58 + isMS_ = false; build 12-Apr-2018 16:00:58 + ui.summaryType->clear(); build 12-Apr-2018 16:00:58 + const vector& types = PMS::CTsummaryTypeStrings(); build 12-Apr-2018 16:00:58 + for(unsigned int i = 0; i < types.size(); i++){ build 12-Apr-2018 16:00:58 + ui.summaryType->addItem(types[i].c_str()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + isMS_ = true; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for ( int i = 0; i < fileNameCount; i++ ){ build 12-Apr-2018 16:00:58 ui.fileCombo->addItem( fileNames[i].c_str()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -86,6 +103,16 @@ PMS::SummaryType PlotMSSummaryDialog::getSummaryType() const { build 12-Apr-2018 16:00:58 return type; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +PMS::CTSummaryType PlotMSSummaryDialog::getCTSummaryType() const { build 12-Apr-2018 16:00:58 + QString summaryStr = ui.summaryType->currentText(); build 12-Apr-2018 16:00:58 + bool valid = false; build 12-Apr-2018 16:00:58 + PMS::CTSummaryType type = PMS::CTsummaryType( summaryStr.toStdString(), &valid ); build 12-Apr-2018 16:00:58 + if ( !valid ){ build 12-Apr-2018 16:00:58 + type = PMS::S_ALL_CT; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return type; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 PlotMSSummaryDialog::~PlotMSSummaryDialog(){ build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Gui/PlotMSSummaryDialog.qo.h b/code/plotms/Gui/PlotMSSummaryDialog.qo.h build 12-Apr-2018 16:00:58 index eddd6f0..a0f3148 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Gui/PlotMSSummaryDialog.qo.h build 12-Apr-2018 16:00:58 +++ b/code/plotms/Gui/PlotMSSummaryDialog.qo.h build 12-Apr-2018 16:00:58 @@ -51,6 +51,8 @@ public: build 12-Apr-2018 16:00:58 void filesChanged(const vector& fileNamees); build 12-Apr-2018 16:00:58 //Return the summary type. build 12-Apr-2018 16:00:58 PMS::SummaryType getSummaryType() const; build 12-Apr-2018 16:00:58 + PMS::CTSummaryType getCTSummaryType() const; build 12-Apr-2018 16:00:58 + inline bool isMS() { return isMS_; } build 12-Apr-2018 16:00:58 ~PlotMSSummaryDialog(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 private slots: build 12-Apr-2018 16:00:58 @@ -60,6 +62,8 @@ private slots: build 12-Apr-2018 16:00:58 private: build 12-Apr-2018 16:00:58 PlotMSSummaryDialog* summarizeDialog; build 12-Apr-2018 16:00:58 Ui::PlotMSSummaryDialogClass ui; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + bool isMS_; build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/plotms/PlotMS/PlotMSConstants.cc b/code/plotms/PlotMS/PlotMSConstants.cc build 12-Apr-2018 16:00:58 index 7ddb358..12fe50e 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/PlotMS/PlotMSConstants.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/PlotMS/PlotMSConstants.cc build 12-Apr-2018 16:00:58 @@ -62,7 +62,7 @@ bool PMS::axisNeedsCalSlice(Axis axis) { build 12-Apr-2018 16:00:58 case AMP: case PHASE: case REAL: case IMAG: build 12-Apr-2018 16:00:58 case GAMP: case GPHASE: case GREAL: case GIMAG: build 12-Apr-2018 16:00:58 case DELAY: case SWP: case TSYS: case OPAC: case SNR: case TEC: build 12-Apr-2018 16:00:58 - case FLAG: build 12-Apr-2018 16:00:58 + case ANTPOS: case FLAG: build 12-Apr-2018 16:00:58 return true; build 12-Apr-2018 16:00:58 default: return false; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -118,6 +118,7 @@ PMS::AxisUnit PMS::axisUnit(Axis axis) { build 12-Apr-2018 16:00:58 case U: build 12-Apr-2018 16:00:58 case V: build 12-Apr-2018 16:00:58 case W: build 12-Apr-2018 16:00:58 + case ANTPOS: build 12-Apr-2018 16:00:58 return METERS; build 12-Apr-2018 16:00:58 case UVDIST_L: build 12-Apr-2018 16:00:58 case UWAVE: build 12-Apr-2018 16:00:58 diff --git a/code/plotms/PlotMS/PlotMSConstants.h b/code/plotms/PlotMS/PlotMSConstants.h build 12-Apr-2018 16:00:58 index 5770117..c9d8769 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/PlotMS/PlotMSConstants.h build 12-Apr-2018 16:00:58 +++ b/code/plotms/PlotMS/PlotMSConstants.h build 12-Apr-2018 16:00:58 @@ -107,37 +107,50 @@ public: build 12-Apr-2018 16:00:58 // xmlcasa/scripts/task_plotms.py.** build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 PMS_ENUM1(Axis, axes, axesStrings, axis, build 12-Apr-2018 16:00:58 + // Metadata build 12-Apr-2018 16:00:58 SCAN,FIELD,TIME,TIME_INTERVAL, build 12-Apr-2018 16:00:58 SPW,CHANNEL,FREQUENCY,VELOCITY,CORR, build 12-Apr-2018 16:00:58 ANTENNA1,ANTENNA2,BASELINE,ROW, build 12-Apr-2018 16:00:58 OBSERVATION,INTENT,FEED1,FEED2, build 12-Apr-2018 16:00:58 + // Visibilities and flags build 12-Apr-2018 16:00:58 AMP,PHASE,REAL,IMAG,WT,WTxAMP,WTSP, build 12-Apr-2018 16:00:58 SIGMA, SIGMASP, build 12-Apr-2018 16:00:58 FLAG,FLAG_ROW, build 12-Apr-2018 16:00:58 + // Observational geometry build 12-Apr-2018 16:00:58 UVDIST,UVDIST_L,U,V,W,UWAVE,VWAVE,WWAVE, build 12-Apr-2018 16:00:58 AZ0,EL0,HA0,PA0, build 12-Apr-2018 16:00:58 + // Antenna-based build 12-Apr-2018 16:00:58 ANTENNA,AZIMUTH,ELEVATION, build 12-Apr-2018 16:00:58 PARANG, build 12-Apr-2018 16:00:58 + // Calibration build 12-Apr-2018 16:00:58 GAMP,GPHASE,GREAL,GIMAG, build 12-Apr-2018 16:00:58 - DELAY,SWP,TSYS,OPAC, SNR, TEC, build 12-Apr-2018 16:00:58 - RADIAL_VELOCITY, RHO, build 12-Apr-2018 16:00:58 + DELAY,SWP,TSYS,OPAC, SNR, TEC, ANTPOS, build 12-Apr-2018 16:00:58 + // Ephemeris build 12-Apr-2018 16:00:58 + RADIAL_VELOCITY, RHO, build 12-Apr-2018 16:00:58 + // Overlays build 12-Apr-2018 16:00:58 ATM, TSKY, NONE) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 PMS_ENUM2(Axis, axes, axesStrings, axis, build 12-Apr-2018 16:00:58 + // Metadata build 12-Apr-2018 16:00:58 "Scan","Field","Time","Interval", build 12-Apr-2018 16:00:58 "Spw","Channel","Frequency","Velocity","Corr", build 12-Apr-2018 16:00:58 "Antenna1","Antenna2","Baseline","Row", build 12-Apr-2018 16:00:58 "Observation", "Intent", "Feed1", "Feed2", build 12-Apr-2018 16:00:58 + // Visibilities and flags build 12-Apr-2018 16:00:58 "Amp","Phase","Real","Imag","Wt","Wt*Amp","WtSp", build 12-Apr-2018 16:00:58 "Sigma", "SigmaSp", "Flag","FlagRow", build 12-Apr-2018 16:00:58 + // Observational geometry build 12-Apr-2018 16:00:58 "UVdist","UVwave","U","V","W","Uwave","Vwave","Wwave", build 12-Apr-2018 16:00:58 "Azimuth","Elevation","HourAngle","ParAngle", build 12-Apr-2018 16:00:58 + // Antenna-based build 12-Apr-2018 16:00:58 "Antenna","Ant-Azimuth","Ant-Elevation","Ant-ParAngle", build 12-Apr-2018 16:00:58 + // Calibration build 12-Apr-2018 16:00:58 "Gain Amp","Gain Phase","Gain Real","Gain Imag", build 12-Apr-2018 16:00:58 "Delay","SwPower","Tsys","Opac", "SNR", "TEC", build 12-Apr-2018 16:00:58 - "Radial Velocity [km/s]", "Distance (rho) [km]", build 12-Apr-2018 16:00:58 + "Antenna Positions", build 12-Apr-2018 16:00:58 + // Ephemeris build 12-Apr-2018 16:00:58 + "Radial Velocity", "Distance (rho)", build 12-Apr-2018 16:00:58 "Atm Transmission", "Tsky", "None") build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Returns the axes scale for the given axis. Currently NORMAL unless the build 12-Apr-2018 16:00:58 @@ -208,15 +221,17 @@ public: build 12-Apr-2018 16:00:58 double& sec, PlotAxisScale scale = DATE_MJ_SEC); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Returns true if the given Strings are equals, false otherwise. If build 12-Apr-2018 16:00:58 - // ignoreCase is false then it is a direct casacore::String comparison using ==; build 12-Apr-2018 16:00:58 - // otherwise the casacore::String characters are compared while ignoring case for build 12-Apr-2018 16:00:58 - // letters. build 12-Apr-2018 16:00:58 - static bool strEq(const casacore::String& str1, const casacore::String& str2, build 12-Apr-2018 16:00:58 + // Returns true if the given Strings are equals, false otherwise. build 12-Apr-2018 16:00:58 + // If ignoreCase is false then it is a direct casacore::String comparison build 12-Apr-2018 16:00:58 + // using ==; otherwise the casacore::String characters are compared while build 12-Apr-2018 16:00:58 + // ignoring case for letters. build 12-Apr-2018 16:00:58 + static bool strEq(const casacore::String& str1, build 12-Apr-2018 16:00:58 + const casacore::String& str2, build 12-Apr-2018 16:00:58 bool ignoreCase = false); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Returns true if the given Records are equals, false otherwise. build 12-Apr-2018 16:00:58 - static bool recEq(const casacore::Record& rec1, const casacore::Record& rec2); build 12-Apr-2018 16:00:58 + static bool recEq(const casacore::Record& rec1, build 12-Apr-2018 16:00:58 + const casacore::Record& rec2); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Converts the given templated vector to/from an int Vector. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -251,7 +266,17 @@ public: build 12-Apr-2018 16:00:58 "SysCal", "Weather") build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Enum for the different CalTable summary types. build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + PMS_ENUM1(CTSummaryType, CTsummaryTypes, CTsummaryTypeStrings, CTsummaryType, build 12-Apr-2018 16:00:58 + S_ALL_CT, S_WHERE_CT, S_WHAT_CT, S_HOW_CT, S_MAIN_CT, S_TABLES_CT, build 12-Apr-2018 16:00:58 + S_ANTENNA_CT, S_FIELD_CT, S_OBSERVATION_CT, S_HISTORY_CT, S_SPW_CT) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + PMS_ENUM2(CTSummaryType, CTsummaryTypes, CTsummaryTypeStrings, CTsummaryType, build 12-Apr-2018 16:00:58 + "All", "Where", "What", "How", "Main", "Tables", "Antenna", build 12-Apr-2018 16:00:58 + "Field", "Observation", "History", "Spectral Window") build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Enum for export range. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 PMS_ENUM1(ExportRange, exportRanges, exportRangeStrings, exportRange, PAGE_CURRENT, PAGE_ALL) build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Plots/PlotMSPlot.cc b/code/plotms/Plots/PlotMSPlot.cc build 12-Apr-2018 16:00:58 index 37acfad..691b642 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Plots/PlotMSPlot.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Plots/PlotMSPlot.cc build 12-Apr-2018 16:00:58 @@ -82,6 +82,7 @@ void PlotMSPlot::makeParameters(PlotMSPlotParameters& params, PlotMSApp* /*plotm build 12-Apr-2018 16:00:58 const uInt PlotMSPlot::PIXEL_THRESHOLD = 1000000; build 12-Apr-2018 16:00:58 const uInt PlotMSPlot::MEDIUM_THRESHOLD = 10000; build 12-Apr-2018 16:00:58 const uInt PlotMSPlot::LARGE_THRESHOLD = 1000; build 12-Apr-2018 16:00:58 +const uInt PlotMSPlot::XLARGE_THRESHOLD = 50; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Constructors/Destructors // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -125,6 +126,18 @@ void PlotMSPlot::customizeAutoSymbol( const PlotSymbolPtr& baseSymbol, uInt data build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void PlotMSPlot::customizeOverlaySymbol( const PlotSymbolPtr& baseSymbol, uInt dataSize ){ build 12-Apr-2018 16:00:58 + if( dataSize > MEDIUM_THRESHOLD ) { build 12-Apr-2018 16:00:58 + baseSymbol->setSize(2,2); build 12-Apr-2018 16:00:58 + } else if( dataSize > LARGE_THRESHOLD ) { build 12-Apr-2018 16:00:58 + baseSymbol->setSize(3,3); build 12-Apr-2018 16:00:58 + } else if( dataSize > XLARGE_THRESHOLD ) { build 12-Apr-2018 16:00:58 + baseSymbol->setSize(4,4); build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + baseSymbol->setSize(6,6); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Public Methods // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void PlotMSPlot::resize(PlotMSPages &pages, uInt rows, uInt cols) { build 12-Apr-2018 16:00:58 @@ -299,16 +312,20 @@ vector PlotMSPlot::getCachedData(){ build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 vector PlotMSPlot::getCachedAxes() { build 12-Apr-2018 16:00:58 - PMS_PP_Cache* c = itsParams_.typedGroup(); build 12-Apr-2018 16:00:58 + PMS_PP_Cache* c = itsParams_.typedGroup(); build 12-Apr-2018 16:00:58 // get default axes if not given by user build 12-Apr-2018 16:00:58 - for(uInt i=0; inumXAxes(); i++){ build 12-Apr-2018 16:00:58 + for(uInt i=0; inumXAxes(); i++){ build 12-Apr-2018 16:00:58 if (c->xAxis(i) == PMS::NONE) build 12-Apr-2018 16:00:58 c->setXAxis(getDefaultXAxis(), i); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - for(uInt i=0; inumYAxes(); i++){ build 12-Apr-2018 16:00:58 - if (c->yAxis(i) == PMS::NONE) build 12-Apr-2018 16:00:58 - c->setYAxis(PMS::DEFAULT_YAXIS, i); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + for(uInt i=0; inumYAxes(); i++){ build 12-Apr-2018 16:00:58 + if (c->yAxis(i) == PMS::NONE) { build 12-Apr-2018 16:00:58 + if (itsCache_->calType().startsWith("Xf")) build 12-Apr-2018 16:00:58 + c->setYAxis(PMS::GPHASE, i); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + c->setYAxis(PMS::DEFAULT_YAXIS, i); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // add ATM/TSKY yaxis "under the hood" if valid xaxis build 12-Apr-2018 16:00:58 if (c->showAtm() || c->showTsky()) { build 12-Apr-2018 16:00:58 @@ -344,7 +361,7 @@ vector PlotMSPlot::getCachedAxes() { build 12-Apr-2018 16:00:58 PMS_PP_Display* disp = itsParams_.typedGroup(); build 12-Apr-2018 16:00:58 PlotSymbolPtr atmSymbol = disp->unflaggedSymbol(index); build 12-Apr-2018 16:00:58 atmSymbol->setSymbol("circle"); build 12-Apr-2018 16:00:58 - atmSymbol->setSize(3,3); build 12-Apr-2018 16:00:58 + atmSymbol->setSize(2,2); build 12-Apr-2018 16:00:58 atmSymbol->setColor("#FF00FF"); build 12-Apr-2018 16:00:58 disp->setUnflaggedSymbol(atmSymbol, index); build 12-Apr-2018 16:00:58 PlotSymbolPtr flaggedSymbol = disp->flaggedSymbol(); build 12-Apr-2018 16:00:58 @@ -549,18 +566,26 @@ bool PlotMSPlot::updateDisplay() { build 12-Apr-2018 16:00:58 nIter = 1; build 12-Apr-2018 16:00:58 uInt rows = itsPlots_.size(); build 12-Apr-2018 16:00:58 for(uInt row = 0; row < rows; ++row) { build 12-Apr-2018 16:00:58 + PMS::Axis x = cache->xAxis(row); build 12-Apr-2018 16:00:58 + PMS::Axis y = cache->yAxis(row); build 12-Apr-2018 16:00:58 uInt cols = itsPlots_[row].size(); build 12-Apr-2018 16:00:58 for(uInt col = 0; col < cols; ++col) { build 12-Apr-2018 16:00:58 // Set symbols. build 12-Apr-2018 16:00:58 PlotSymbolPtr unflaggedSym = display->unflaggedSymbol(row); build 12-Apr-2018 16:00:58 PlotSymbolPtr symbolUnmasked = itsParent_->createSymbol(unflaggedSym); build 12-Apr-2018 16:00:58 uInt dataSize = itsCache_->indexer(row,col).sizeUnmasked(); build 12-Apr-2018 16:00:58 - customizeAutoSymbol( symbolUnmasked, dataSize ); build 12-Apr-2018 16:00:58 + if (y==PMS::ATM || y==PMS::TSKY) build 12-Apr-2018 16:00:58 + customizeOverlaySymbol( symbolUnmasked, dataSize ); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + customizeAutoSymbol( symbolUnmasked, dataSize ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 PlotSymbolPtr flaggedSym = display->flaggedSymbol(row); build 12-Apr-2018 16:00:58 PlotSymbolPtr symbolMasked = itsParent_->createSymbol(flaggedSym); build 12-Apr-2018 16:00:58 dataSize = itsCache_->indexer(row,col).sizeMasked(); build 12-Apr-2018 16:00:58 - customizeAutoSymbol( symbolMasked, dataSize ); build 12-Apr-2018 16:00:58 + if (y==PMS::ATM || y==PMS::TSKY) build 12-Apr-2018 16:00:58 + customizeOverlaySymbol( symbolMasked, dataSize ); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + customizeAutoSymbol( symbolMasked, dataSize ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 plot = itsPlots_[row][col]; build 12-Apr-2018 16:00:58 if (plot.null()) continue; build 12-Apr-2018 16:00:58 @@ -576,8 +601,6 @@ bool PlotMSPlot::updateDisplay() { build 12-Apr-2018 16:00:58 plot->setAxes(axes->xAxis(row), axes->yAxis(row)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set plot title for legend; convert axes for cal table build 12-Apr-2018 16:00:58 - PMS::Axis x = cache->xAxis(row); build 12-Apr-2018 16:00:58 - PMS::Axis y = cache->yAxis(row); build 12-Apr-2018 16:00:58 if (itsCache_->cacheType()==PlotMSCacheBase::CAL) { build 12-Apr-2018 16:00:58 String caltype = itsCache_->calType(); build 12-Apr-2018 16:00:58 x = getCalAxis(caltype, x); build 12-Apr-2018 16:00:58 @@ -1585,23 +1608,6 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 int yAxisCount = axesParams->numYAxes(); build 12-Apr-2018 16:00:58 bool set = dataParams->isSet(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Legend build 12-Apr-2018 16:00:58 - canvas->showLegend(set && canvParams->legendShown(), canvParams->legendPosition()); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Grid lines build 12-Apr-2018 16:00:58 - canvas->showGrid(canvParams->gridMajorShown(), canvParams->gridMinorShown(), build 12-Apr-2018 16:00:58 - canvParams->gridMajorShown(), canvParams->gridMinorShown()); build 12-Apr-2018 16:00:58 - // major build 12-Apr-2018 16:00:58 - PlotLinePtr major_line = itsFactory_->line(canvParams->gridMajorLine()); build 12-Apr-2018 16:00:58 - if (!canvParams->gridMajorShown()) build 12-Apr-2018 16:00:58 - major_line->setStyle(PlotLine::NOLINE); build 12-Apr-2018 16:00:58 - canvas->setGridMajorLine(major_line); build 12-Apr-2018 16:00:58 - // minor build 12-Apr-2018 16:00:58 - PlotLinePtr minor_line = itsFactory_->line(canvParams->gridMinorLine()); build 12-Apr-2018 16:00:58 - if (!canvParams->gridMinorShown()) build 12-Apr-2018 16:00:58 - minor_line->setStyle(PlotLine::NOLINE); build 12-Apr-2018 16:00:58 - canvas->setGridMinorLine(minor_line); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Whether to share common axes for iterated plots on grid build 12-Apr-2018 16:00:58 bool commonX = iterParams->isCommonAxisX(); build 12-Apr-2018 16:00:58 bool commonY = iterParams->isCommonAxisY(); build 12-Apr-2018 16:00:58 @@ -1615,29 +1621,7 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 PlotAxis cy = axesParams->yAxis( i ); build 12-Apr-2018 16:00:58 canvas->showAxis(cy, showY); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - // title font build 12-Apr-2018 16:00:58 - casacore::Int pointsize; build 12-Apr-2018 16:00:58 - PlotFontPtr font = canvas->titleFont(); build 12-Apr-2018 16:00:58 - pointsize = (canvParams->titleFontSet()) ? canvParams->titleFont() : std::max(16.-numplots+1., 8.); build 12-Apr-2018 16:00:58 - font->setPointSize(pointsize); build 12-Apr-2018 16:00:58 - font->setBold(true); build 12-Apr-2018 16:00:58 - canvas->setTitleFont(font); build 12-Apr-2018 16:00:58 - // if shown, set axis fonts build 12-Apr-2018 16:00:58 - if (set && showX) { build 12-Apr-2018 16:00:58 - PlotFontPtr xFont = canvas->axisFont(cx); build 12-Apr-2018 16:00:58 - pointsize = (canvParams->xFontSet()) ? canvParams->xAxisFont(): std::max(12.-numplots+1., 8.); build 12-Apr-2018 16:00:58 - xFont->setPointSize(pointsize); build 12-Apr-2018 16:00:58 - canvas->setAxisFont(cx, xFont); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (set && showY) { build 12-Apr-2018 16:00:58 - pointsize = (canvParams->yFontSet()) ? canvParams->yAxisFont(): std::max(12.-numplots+1., 8.); build 12-Apr-2018 16:00:58 - PlotFontPtr yFont = canvas->axisFont(Y_LEFT); build 12-Apr-2018 16:00:58 - yFont->setPointSize(pointsize); build 12-Apr-2018 16:00:58 - canvas->setAxisFont(Y_LEFT, yFont); build 12-Apr-2018 16:00:58 - yFont = canvas->axisFont(Y_RIGHT); build 12-Apr-2018 16:00:58 - yFont->setPointSize(pointsize); build 12-Apr-2018 16:00:58 - canvas->setAxisFont(Y_RIGHT, yFont); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // xaxis, scale (TIME/NORMAL), ref value build 12-Apr-2018 16:00:58 PMS::Axis x = cacheParams->xAxis(); build 12-Apr-2018 16:00:58 if (x==PMS::NONE) { build 12-Apr-2018 16:00:58 @@ -1648,11 +1632,15 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 bool xref = itsCache_->hasReferenceValue(x); build 12-Apr-2018 16:00:58 double xrefval = itsCache_->referenceValue(x); build 12-Apr-2018 16:00:58 canvas->setAxisReferenceValue(cx, xref, xrefval); build 12-Apr-2018 16:00:58 - // yaxis/axes, scale, ref value build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // yaxis scale(s), ref value build 12-Apr-2018 16:00:58 for ( int i = 0; i < yAxisCount; i++ ){ build 12-Apr-2018 16:00:58 PMS::Axis y = cacheParams->yAxis( i ); build 12-Apr-2018 16:00:58 if (y==PMS::NONE) { build 12-Apr-2018 16:00:58 - y = PMS::DEFAULT_YAXIS; build 12-Apr-2018 16:00:58 + if (itsCache_->calType().startsWith("Xf")) build 12-Apr-2018 16:00:58 + y = PMS::GPHASE; build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + y = PMS::DEFAULT_YAXIS; build 12-Apr-2018 16:00:58 cacheParams->setYAxis(y, i); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // yaxis scale build 12-Apr-2018 16:00:58 @@ -1663,13 +1651,30 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 double yrefval = itsCache_->referenceValue(y); build 12-Apr-2018 16:00:58 canvas->setAxisReferenceValue(cy, yref, yrefval); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // if shown, set axis fonts build 12-Apr-2018 16:00:58 + casacore::Int pointsize; build 12-Apr-2018 16:00:58 + if (set && showX) { build 12-Apr-2018 16:00:58 + PlotFontPtr xFont = canvas->axisFont(cx); build 12-Apr-2018 16:00:58 + pointsize = (canvParams->xFontSet()) ? canvParams->xAxisFont(): std::max(12.-numplots+1., 8.); build 12-Apr-2018 16:00:58 + xFont->setPointSize(pointsize); build 12-Apr-2018 16:00:58 + canvas->setAxisFont(cx, xFont); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (set && showY) { build 12-Apr-2018 16:00:58 + pointsize = (canvParams->yFontSet()) ? canvParams->yAxisFont(): std::max(12.-numplots+1., 8.); build 12-Apr-2018 16:00:58 + PlotFontPtr yFont = canvas->axisFont(Y_LEFT); build 12-Apr-2018 16:00:58 + yFont->setPointSize(pointsize); build 12-Apr-2018 16:00:58 + canvas->setAxisFont(Y_LEFT, yFont); build 12-Apr-2018 16:00:58 + yFont = canvas->axisFont(Y_RIGHT); build 12-Apr-2018 16:00:58 + yFont->setPointSize(pointsize); build 12-Apr-2018 16:00:58 + canvas->setAxisFont(Y_RIGHT, yFont); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // x and y axis ranges build 12-Apr-2018 16:00:58 canvas->setAxesAutoRescale(true); build 12-Apr-2018 16:00:58 + bool makeSquare(false), waveplot(false); // true if uv/uvwave plot build 12-Apr-2018 16:00:58 if (set) { build 12-Apr-2018 16:00:58 - double xmin, xmax, ymin, ymax; build 12-Apr-2018 16:00:58 - double maxval(0), xymax(0); build 12-Apr-2018 16:00:58 - bool makeSquare(false), waveplot(false); // true if uv/uvwave plot build 12-Apr-2018 16:00:58 - bool xIsUV(false), xIsUVwave(false); build 12-Apr-2018 16:00:58 + double xmin, xmax, ymin, ymax, xymax; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 bool displayUnflagged = (displayParams->unflaggedSymbol()->symbol() != PlotSymbol::NOSYMBOL); build 12-Apr-2018 16:00:58 bool displayFlagged = (displayParams->flaggedSymbol()->symbol() != PlotSymbol::NOSYMBOL); build 12-Apr-2018 16:00:58 @@ -1683,29 +1688,17 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 bool xPtsToPlot(xmin != DBL_MAX), yPtsToPlot(ymin != DBL_MAX); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // x range build 12-Apr-2018 16:00:58 + bool xIsUV(false), xIsUVwave(false); build 12-Apr-2018 16:00:58 if ( axesParams->xRangeSet() ){ build 12-Apr-2018 16:00:58 // Custom axes ranges set by user build 12-Apr-2018 16:00:58 canvas->setAxisRange(cx, axesParams->xRange()); build 12-Apr-2018 16:00:58 } else if (xPtsToPlot) { build 12-Apr-2018 16:00:58 - // CAS-3263 points near zero are not plotted, so add lower margin build 12-Apr-2018 16:00:58 - if ((xmin > -0.5) && (xmin < 1.0) && (xmax > 10.0)) { build 12-Apr-2018 16:00:58 - if (xmax > 100.0) xmin -= 1.0; // add larger margin for larger range build 12-Apr-2018 16:00:58 - else xmin -= 0.1; build 12-Apr-2018 16:00:58 - pair xbounds = make_pair(xmin, xmax); build 12-Apr-2018 16:00:58 - canvas->setAxisRange(cx, xbounds); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // make range symmetrical for uv plot build 12-Apr-2018 16:00:58 + setAxisRange(x, cx, xmin, xmax, canvas); build 12-Apr-2018 16:00:58 if (PMS::axisIsUV(x)) { build 12-Apr-2018 16:00:58 - if ((xmin != DBL_MAX) && (xmax != -DBL_MAX)) { build 12-Apr-2018 16:00:58 - xIsUV = true; build 12-Apr-2018 16:00:58 - if (x==PMS::UWAVE || x==PMS::VWAVE) xIsUVwave = true; build 12-Apr-2018 16:00:58 - maxval = round(max(abs(xmin),xmax)) + 10.0; build 12-Apr-2018 16:00:58 - xmin = -maxval; build 12-Apr-2018 16:00:58 - xmax = maxval; build 12-Apr-2018 16:00:58 - xymax = max(xymax, maxval); build 12-Apr-2018 16:00:58 - pair xbounds = make_pair(xmin, xmax); build 12-Apr-2018 16:00:58 - canvas->setAxisRange(cx, xbounds); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + xIsUV = true; build 12-Apr-2018 16:00:58 + if (x==PMS::UWAVE || x==PMS::VWAVE) build 12-Apr-2018 16:00:58 + xIsUVwave = true; build 12-Apr-2018 16:00:58 + xymax = canvas->axisRange(cx).second; // should be equal build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // y range build 12-Apr-2018 16:00:58 @@ -1723,34 +1716,17 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 pair ybounds = make_pair(ymin, ymax); build 12-Apr-2018 16:00:58 canvas->setAxisRange(cy, ybounds); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - // add margin if values close to zero build 12-Apr-2018 16:00:58 - if ((ymin > -0.5) && (ymin < 1.0) && (ymax > 10.0)) { build 12-Apr-2018 16:00:58 - if (ymax > 100.0) ymin -= 1.0; // add larger margin for larger range build 12-Apr-2018 16:00:58 - else ymin -= 0.1; build 12-Apr-2018 16:00:58 - pair ybounds = make_pair(ymin, ymax); build 12-Apr-2018 16:00:58 - canvas->setAxisRange(cy, ybounds); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // make range symmetrical for uvplot build 12-Apr-2018 16:00:58 - if (PMS::axisIsUV(y)) { build 12-Apr-2018 16:00:58 - if ((ymin != DBL_MAX) && (ymax != -DBL_MAX)) { build 12-Apr-2018 16:00:58 - maxval = round(max(abs(ymin),ymax)) + 10.0; build 12-Apr-2018 16:00:58 - if (xIsUV) { build 12-Apr-2018 16:00:58 - // set x and y ranges equally build 12-Apr-2018 16:00:58 - xymax = max(xymax, maxval); build 12-Apr-2018 16:00:58 - pair xybounds = make_pair(-xymax, xymax); build 12-Apr-2018 16:00:58 - canvas->setAxisRange(cx, xybounds); build 12-Apr-2018 16:00:58 - canvas->setAxisRange(cy, xybounds); build 12-Apr-2018 16:00:58 - makeSquare = true; build 12-Apr-2018 16:00:58 - if (xIsUVwave && (y==PMS::UWAVE || y==PMS::VWAVE)) build 12-Apr-2018 16:00:58 - waveplot=true; build 12-Apr-2018 16:00:58 - } else { build 12-Apr-2018 16:00:58 - // just set yrange equally build 12-Apr-2018 16:00:58 - ymin = -maxval; build 12-Apr-2018 16:00:58 - ymax = maxval; build 12-Apr-2018 16:00:58 - pair ybounds = make_pair(ymin, ymax); build 12-Apr-2018 16:00:58 - canvas->setAxisRange(cy, ybounds); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + setAxisRange(y, cy, ymin, ymax, canvas); build 12-Apr-2018 16:00:58 + if (PMS::axisIsUV(y) && xIsUV) { build 12-Apr-2018 16:00:58 + // set x and y ranges equally build 12-Apr-2018 16:00:58 + double ymax = canvas->axisRange(cy).first; build 12-Apr-2018 16:00:58 + xymax = max(xymax, ymax); build 12-Apr-2018 16:00:58 + pair xybounds = make_pair(-xymax, xymax); build 12-Apr-2018 16:00:58 + canvas->setAxisRange(cx, xybounds); build 12-Apr-2018 16:00:58 + canvas->setAxisRange(cy, xybounds); build 12-Apr-2018 16:00:58 + makeSquare = true; build 12-Apr-2018 16:00:58 + if (xIsUVwave && (y==PMS::UWAVE || y==PMS::VWAVE)) build 12-Apr-2018 16:00:58 + waveplot=true; build 12-Apr-2018 16:00:58 } else if (y==PMS::ATM || y==PMS::TSKY) { build 12-Apr-2018 16:00:58 itsCache_->indexer(1,iteration).minsMaxes(xmin, xmax, ymin, ymax); build 12-Apr-2018 16:00:58 pair atmrange; build 12-Apr-2018 16:00:58 @@ -1760,9 +1736,8 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - // make plot square or not build 12-Apr-2018 16:00:58 - itsParent_->getPlotter()->makeSquarePlot(makeSquare, waveplot); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + itsParent_->getPlotter()->makeSquarePlot(makeSquare, waveplot); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // For title and axis labels, need all plots on this canvas build 12-Apr-2018 16:00:58 int gridRow(iterParams->getGridRow()); build 12-Apr-2018 16:00:58 @@ -1794,7 +1769,6 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 bool polnRatio = itsCache_->polnRatio(); build 12-Apr-2018 16:00:58 PlotMSAveraging averaging = dataParams->averaging(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Title build 12-Apr-2018 16:00:58 if (set) { build 12-Apr-2018 16:00:58 PMS::DataColumn xDataColumn(itsCache_->getXDataColumn()); build 12-Apr-2018 16:00:58 vector yAxes; build 12-Apr-2018 16:00:58 @@ -1807,11 +1781,13 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 x = getCalAxis(calTypes(0), x); build 12-Apr-2018 16:00:58 // data col may have been changed during loading if no col build 12-Apr-2018 16:00:58 casacore::String xLabelSingle = canvParams->xLabelFormat().getLabel(x, xref, xrefval, xDataColumn, polnRatio); build 12-Apr-2018 16:00:58 + if (x==PMS::TIME && xLabelSingle.contains("1858")) // xrefval==0 build 12-Apr-2018 16:00:58 + xLabelSingle.gsub("(from 1858/11/17)", ""); build 12-Apr-2018 16:00:58 if (x == PMS::FREQUENCY) build 12-Apr-2018 16:00:58 xLabelSingle = addFreqFrame(xLabelSingle); build 12-Apr-2018 16:00:58 if (axisIsAveraged(x, averaging) && !allCalTables) build 12-Apr-2018 16:00:58 xLabelSingle = "Average " + xLabelSingle; build 12-Apr-2018 16:00:58 - if (xLabelSingle.contains("Corr") && allCalTables) build 12-Apr-2018 16:00:58 + if (allCalTables && xLabelSingle.contains("Corr")) build 12-Apr-2018 16:00:58 xLabelSingle.gsub("Corr", "Poln"); build 12-Apr-2018 16:00:58 canvas->setAxisLabel(cx, xLabelSingle); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1841,11 +1817,13 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 PMS::DataColumn yDataColumn = plotCacheBase.getYDataColumn(j); build 12-Apr-2018 16:00:58 yDatas.push_back(yDataColumn); // save for title build 12-Apr-2018 16:00:58 casacore::String yLabelSingle = canvParams->yLabelFormat( ).getLabel(y, yref, yrefval, yDataColumn, polnRatio); build 12-Apr-2018 16:00:58 + if (y==PMS::TIME && yLabelSingle.contains("1858")) // yrefval==0 build 12-Apr-2018 16:00:58 + yLabelSingle.gsub("(from 1858/11/17)", ""); build 12-Apr-2018 16:00:58 if (y == PMS::FREQUENCY) build 12-Apr-2018 16:00:58 yLabelSingle = addFreqFrame(yLabelSingle); build 12-Apr-2018 16:00:58 if (axisIsAveraged(y, averaging) && !isCalTable) build 12-Apr-2018 16:00:58 yLabelSingle = "Average " + yLabelSingle; build 12-Apr-2018 16:00:58 - if (yLabelSingle.contains("Corr") && isCalTable) build 12-Apr-2018 16:00:58 + if (isCalTable && yLabelSingle.contains("Corr")) build 12-Apr-2018 16:00:58 yLabelSingle.gsub("Corr", "Poln"); build 12-Apr-2018 16:00:58 if ( cy == Y_LEFT ){ build 12-Apr-2018 16:00:58 if ( yLabelLeft.size() > 0 ) build 12-Apr-2018 16:00:58 @@ -1861,12 +1839,20 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 canvas->setAxisLabel(Y_LEFT, yLabelLeft); build 12-Apr-2018 16:00:58 canvas->setAxisLabel(Y_RIGHT, yLabelRight); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - // title build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Title font build 12-Apr-2018 16:00:58 + PlotFontPtr font = canvas->titleFont(); build 12-Apr-2018 16:00:58 + pointsize = (canvParams->titleFontSet()) ? canvParams->titleFont() : build 12-Apr-2018 16:00:58 + std::max(16.-numplots+1., 8.); build 12-Apr-2018 16:00:58 + font->setPointSize(pointsize); build 12-Apr-2018 16:00:58 + font->setBold(true); build 12-Apr-2018 16:00:58 + canvas->setTitleFont(font); build 12-Apr-2018 16:00:58 + // Title text build 12-Apr-2018 16:00:58 casacore::String iterTxt(""); build 12-Apr-2018 16:00:58 if((iterParams->iterationAxis()!=PMS::NONE) && itsCache_->nIter(0) > 0) build 12-Apr-2018 16:00:58 iterTxt = itsCache_->indexer(0,iteration).iterLabel(); build 12-Apr-2018 16:00:58 - casacore::String title = canvParams->titleFormat().getLabel(x, yAxes, xref, xrefval, yRefs, yRefVals, build 12-Apr-2018 16:00:58 - xDataColumn, yDatas, polnRatio) + " " + iterTxt; build 12-Apr-2018 16:00:58 + casacore::String title = canvParams->titleFormat().getLabel(x, yAxes, xref, xrefval, build 12-Apr-2018 16:00:58 + yRefs, yRefVals, xDataColumn, yDatas, polnRatio) + " " + iterTxt; build 12-Apr-2018 16:00:58 // change "Corr" ->"Poln" for cal tables: build 12-Apr-2018 16:00:58 if (title.contains("Corr") && anyEQ(cacheTypes, calTableType)) { build 12-Apr-2018 16:00:58 if (allCalTables) { build 12-Apr-2018 16:00:58 @@ -1881,6 +1867,60 @@ void PlotMSPlot::setCanvasProperties (int row, int col, int numplots, uInt itera build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 canvas->setTitle(title); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Legend build 12-Apr-2018 16:00:58 + canvas->showLegend(set && canvParams->legendShown(), canvParams->legendPosition()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Grid lines build 12-Apr-2018 16:00:58 + canvas->showGrid(canvParams->gridMajorShown(), canvParams->gridMinorShown(), build 12-Apr-2018 16:00:58 + canvParams->gridMajorShown(), canvParams->gridMinorShown()); build 12-Apr-2018 16:00:58 + // major build 12-Apr-2018 16:00:58 + PlotLinePtr major_line = itsFactory_->line(canvParams->gridMajorLine()); build 12-Apr-2018 16:00:58 + if (!canvParams->gridMajorShown()) build 12-Apr-2018 16:00:58 + major_line->setStyle(PlotLine::NOLINE); build 12-Apr-2018 16:00:58 + canvas->setGridMajorLine(major_line); build 12-Apr-2018 16:00:58 + // minor build 12-Apr-2018 16:00:58 + PlotLinePtr minor_line = itsFactory_->line(canvParams->gridMinorLine()); build 12-Apr-2018 16:00:58 + if (!canvParams->gridMinorShown()) build 12-Apr-2018 16:00:58 + minor_line->setStyle(PlotLine::NOLINE); build 12-Apr-2018 16:00:58 + canvas->setGridMinorLine(minor_line); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void PlotMSPlot::setAxisRange(PMS::Axis axis, PlotAxis paxis, build 12-Apr-2018 16:00:58 + double minval, double maxval, PlotCanvasPtr& canvas) { build 12-Apr-2018 16:00:58 + pair bounds; build 12-Apr-2018 16:00:58 + // CAS-3263 points near zero are not plotted, so add lower margin build 12-Apr-2018 16:00:58 + if ((minval > -0.5) && (minval < 1.0) && (maxval > 10.0)) { build 12-Apr-2018 16:00:58 + if (maxval > 100.0) minval -= 1.0; // add larger margin for larger range build 12-Apr-2018 16:00:58 + else minval -= 0.1; build 12-Apr-2018 16:00:58 + bounds = make_pair(minval, maxval); build 12-Apr-2018 16:00:58 + canvas->setAxisRange(paxis, bounds); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // explicitly set range so can set time scale build 12-Apr-2018 16:00:58 + if (axis==PMS::TIME) { build 12-Apr-2018 16:00:58 + double diff = maxval - minval; build 12-Apr-2018 16:00:58 + if (diff>120.0) { build 12-Apr-2018 16:00:58 + bounds = make_pair(minval, maxval); build 12-Apr-2018 16:00:58 + canvas->setAxisRange(paxis, bounds); build 12-Apr-2018 16:00:58 + } else if (diff==0.0) { build 12-Apr-2018 16:00:58 + // override autoscale which sets crazy tick marks; build 12-Apr-2018 16:00:58 + // add 2-sec margins build 12-Apr-2018 16:00:58 + bounds = make_pair(minval-2.0, maxval+2.0); build 12-Apr-2018 16:00:58 + canvas->setAxisRange(paxis, bounds); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // make range symmetrical for uv plot build 12-Apr-2018 16:00:58 + if (PMS::axisIsUV(axis)) { build 12-Apr-2018 16:00:58 + if ((minval != DBL_MAX) && (maxval != -DBL_MAX)) { build 12-Apr-2018 16:00:58 + double maximum = round(max(abs(minval),maxval)) + 10.0; build 12-Apr-2018 16:00:58 + minval = -maximum; build 12-Apr-2018 16:00:58 + maxval = maximum; build 12-Apr-2018 16:00:58 + bounds = make_pair(minval, maxval); build 12-Apr-2018 16:00:58 + canvas->setAxisRange(paxis, bounds); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 bool PlotMSPlot::axisIsAveraged(PMS::Axis axis, PlotMSAveraging averaging) { build 12-Apr-2018 16:00:58 @@ -1917,7 +1957,8 @@ PMS::Axis PlotMSPlot::getCalAxis(String calType, PMS::Axis axis) { build 12-Apr-2018 16:00:58 if (calType.contains("Opac")) return PMS::OPAC; build 12-Apr-2018 16:00:58 if (calType.contains("SD")) return PMS::GREAL; build 12-Apr-2018 16:00:58 if (calType[0]=='F') return PMS::TEC; build 12-Apr-2018 16:00:58 - if (calType[0]=='K' && calType!="KAntPos") return PMS::DELAY; build 12-Apr-2018 16:00:58 + if (calType.startsWith("KAntPos")) return PMS::ANTPOS; build 12-Apr-2018 16:00:58 + if (calType[0]=='K') return PMS::DELAY; build 12-Apr-2018 16:00:58 return PMS::GAMP; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if (axis==PMS::PHASE) return PMS::GPHASE; build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Plots/PlotMSPlot.h b/code/plotms/Plots/PlotMSPlot.h build 12-Apr-2018 16:00:58 index 77e58bd..3fc31ec 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Plots/PlotMSPlot.h build 12-Apr-2018 16:00:58 +++ b/code/plotms/Plots/PlotMSPlot.h build 12-Apr-2018 16:00:58 @@ -65,6 +65,7 @@ public: build 12-Apr-2018 16:00:58 static void makeParameters(PlotMSPlotParameters& params, PlotMSApp* plotms); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void customizeAutoSymbol( const PlotSymbolPtr& baseSymbol, casacore::uInt dataSize ); build 12-Apr-2018 16:00:58 + void customizeOverlaySymbol( const PlotSymbolPtr& baseSymbol, casacore::uInt dataSize ); build 12-Apr-2018 16:00:58 // Non-Static // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Constructor which takes the parent PlotMS object. Starts out with build 12-Apr-2018 16:00:58 @@ -330,10 +331,14 @@ private: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void clearCanvasProperties( int row, int col); build 12-Apr-2018 16:00:58 void setCanvasProperties (int row, int col, int numplots, uInt iteration, build 12-Apr-2018 16:00:58 - PMS_PP_Axes* axesParams, PMS_PP_Cache* cacheParams, build 12-Apr-2018 16:00:58 + PMS_PP_Axes* axesParams, PMS_PP_Cache* cacheParams, build 12-Apr-2018 16:00:58 PMS_PP_Canvas *canvParams, PMS_PP_Iteration *iterParams, build 12-Apr-2018 16:00:58 PMS_PP_MSData* dataParams, PMS_PP_Display* displayParams ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // range must be modified in certain cases build 12-Apr-2018 16:00:58 + void setAxisRange(PMS::Axis axis, PlotAxis paxis, double min, double max, build 12-Apr-2018 16:00:58 + PlotCanvasPtr& canvas); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // To modify axis label if needed: build 12-Apr-2018 16:00:58 bool axisIsAveraged(PMS::Axis axis, PlotMSAveraging averaging); build 12-Apr-2018 16:00:58 casacore::String addFreqFrame(casacore::String freqLabel); build 12-Apr-2018 16:00:58 @@ -359,6 +364,7 @@ private: build 12-Apr-2018 16:00:58 static const casacore::uInt PIXEL_THRESHOLD; build 12-Apr-2018 16:00:58 static const casacore::uInt MEDIUM_THRESHOLD; build 12-Apr-2018 16:00:58 static const casacore::uInt LARGE_THRESHOLD; build 12-Apr-2018 16:00:58 + static const casacore::uInt XLARGE_THRESHOLD; build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Plots/PlotMSPlotParameterGroups.cc b/code/plotms/Plots/PlotMSPlotParameterGroups.cc build 12-Apr-2018 16:00:58 index abcd07d..9a48dea 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Plots/PlotMSPlotParameterGroups.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Plots/PlotMSPlotParameterGroups.cc build 12-Apr-2018 16:00:58 @@ -381,9 +381,8 @@ void PMS_PP_Cache::setDefaults(){ build 12-Apr-2018 16:00:58 // With cal tables, cannot use MS default axes (AMP vs TIME); build 12-Apr-2018 16:00:58 // cannot tell if user-specified (do not change) build 12-Apr-2018 16:00:58 // or default (then change x-axis based on cal table type) build 12-Apr-2018 16:00:58 - //itsXAxes_ = vector(1, PMS::DEFAULT_XAXIS); build 12-Apr-2018 16:00:58 itsXAxes_ = vector(1, PMS::NONE); build 12-Apr-2018 16:00:58 - itsYAxes_ = vector(1, PMS::DEFAULT_YAXIS); build 12-Apr-2018 16:00:58 + itsYAxes_ = vector(1, PMS::NONE); build 12-Apr-2018 16:00:58 itsXData_ = vector(1, PMS::DEFAULT_DATACOLUMN); build 12-Apr-2018 16:00:58 itsYData_ = vector(1, PMS::DEFAULT_DATACOLUMN); build 12-Apr-2018 16:00:58 itsShowAtm_ = false; build 12-Apr-2018 16:00:58 @@ -392,8 +391,7 @@ void PMS_PP_Cache::setDefaults(){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void PMS_PP_Cache::resize( int count ){ build 12-Apr-2018 16:00:58 itsXAxes_ = vector(1, PMS::NONE); build 12-Apr-2018 16:00:58 - //itsXAxes_ = vector(count, PMS::DEFAULT_XAXIS); build 12-Apr-2018 16:00:58 - itsYAxes_ = vector(count, PMS::DEFAULT_YAXIS); build 12-Apr-2018 16:00:58 + itsYAxes_ = vector(count, PMS::NONE); build 12-Apr-2018 16:00:58 itsXData_ = vector(count, PMS::DEFAULT_DATACOLUMN); build 12-Apr-2018 16:00:58 itsYData_ = vector(count, PMS::DEFAULT_DATACOLUMN); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/plotms/Threads/Gui/PlotMSCacheThread.cc b/code/plotms/Threads/Gui/PlotMSCacheThread.cc build 12-Apr-2018 16:00:58 index 177fb49..95d22c6 100644 build 12-Apr-2018 16:00:58 --- a/code/plotms/Threads/Gui/PlotMSCacheThread.cc build 12-Apr-2018 16:00:58 +++ b/code/plotms/Threads/Gui/PlotMSCacheThread.cc build 12-Apr-2018 16:00:58 @@ -88,9 +88,9 @@ void PlotMSCacheThread::threadFinished() { build 12-Apr-2018 16:00:58 // that the plot won't update the display. build 12-Apr-2018 16:00:58 bool success = getResult(); build 12-Apr-2018 16:00:58 if( !success ) { build 12-Apr-2018 16:00:58 - errorTitle = "Load Error "; build 12-Apr-2018 16:00:58 + errorTitle = PMS::LOG_ORIGIN_LOAD_CACHE; build 12-Apr-2018 16:00:58 if ( !itsLoad_ ){ build 12-Apr-2018 16:00:58 - errorTitle = "ReleaseError"; build 12-Apr-2018 16:00:58 + errorTitle = PMS::LOG_ORIGIN_RELEASE_CACHE; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 errorWarning = true; build 12-Apr-2018 16:00:58 wasCanceled_ = true; build 12-Apr-2018 16:00:58 diff --git a/code/singledish/SingleDish/SingleDishMS.cc b/code/singledish/SingleDish/SingleDishMS.cc build 12-Apr-2018 16:00:58 index b3e5a79..cdfe5c7 100644 build 12-Apr-2018 16:00:58 --- a/code/singledish/SingleDish/SingleDishMS.cc build 12-Apr-2018 16:00:58 +++ b/code/singledish/SingleDish/SingleDishMS.cc build 12-Apr-2018 16:00:58 @@ -1262,11 +1262,11 @@ void SingleDishMS::doSubtractBaseline(string const& in_column_name, build 12-Apr-2018 16:00:58 size_t const num_chan = static_cast(vb->nChannels()); build 12-Apr-2018 16:00:58 size_t const num_pol = static_cast(vb->nCorrelations()); build 12-Apr-2018 16:00:58 size_t const num_row = static_cast(vb->nRows()); build 12-Apr-2018 16:00:58 - Cube data_chunk(num_pol, num_chan, num_row, ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Vector spec(num_chan, ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Cube flag_chunk(num_pol, num_chan, num_row, ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Vector mask(num_chan, ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Vector mask2(num_chan, ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + Cube data_chunk(num_pol, num_chan, num_row, ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Vector spec(num_chan, ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Cube flag_chunk(num_pol, num_chan, num_row, ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Vector mask(num_chan, ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Vector mask2(num_chan, ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 float *spec_data = spec.data(); build 12-Apr-2018 16:00:58 bool *mask_data = mask.data(); build 12-Apr-2018 16:00:58 bool *mask2_data = mask2.data(); build 12-Apr-2018 16:00:58 @@ -1336,12 +1336,12 @@ void SingleDishMS::doSubtractBaseline(string const& in_column_name, build 12-Apr-2018 16:00:58 std::vector > coeff_mtx_tmp(num_pol); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Array rms_mtx(IPosition(2, num_pol, 1), (Float)0); build 12-Apr-2018 16:00:58 - Array cthres_mtx(IPosition(2, num_pol, 1), ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Array citer_mtx(IPosition(2, num_pol, 1), ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Array uself_mtx(IPosition(2, num_pol, 1), ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Array lfthres_mtx(IPosition(2, num_pol, 1), ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Array lfavg_mtx(IPosition(2, num_pol, 1), ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 - Array lfedge_mtx(IPosition(2, num_pol, 2), ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + Array cthres_mtx(IPosition(2, num_pol, 1), ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Array citer_mtx(IPosition(2, num_pol, 1), ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Array uself_mtx(IPosition(2, num_pol, 1), ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Array lfthres_mtx(IPosition(2, num_pol, 1), ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Array lfavg_mtx(IPosition(2, num_pol, 1), ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 + Array lfedge_mtx(IPosition(2, num_pol, 2), ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 size_t num_apply_true = 0; build 12-Apr-2018 16:00:58 size_t num_fpar_max = 0; build 12-Apr-2018 16:00:58 @@ -1512,19 +1512,19 @@ void SingleDishMS::doSubtractBaseline(string const& in_column_name, build 12-Apr-2018 16:00:58 if (num_apply_true == 0) continue; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Array fpar_mtx(IPosition(2, num_pol, num_fpar_max), build 12-Apr-2018 16:00:58 - ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 set_matrix_for_bltable(num_pol, num_fpar_max, build 12-Apr-2018 16:00:58 fpar_mtx_tmp, fpar_mtx); build 12-Apr-2018 16:00:58 Array ffpar_mtx(IPosition(2, num_pol, num_ffpar_max), build 12-Apr-2018 16:00:58 - ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 set_matrix_for_bltable(num_pol, num_ffpar_max, build 12-Apr-2018 16:00:58 ffpar_mtx_tmp, ffpar_mtx); build 12-Apr-2018 16:00:58 Array masklist_mtx(IPosition(2, num_pol, num_masklist_max), build 12-Apr-2018 16:00:58 - ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 set_matrix_for_bltable(num_pol, num_masklist_max, build 12-Apr-2018 16:00:58 masklist_mtx_tmp, masklist_mtx); build 12-Apr-2018 16:00:58 Array coeff_mtx(IPosition(2, num_pol, num_coeff_max), build 12-Apr-2018 16:00:58 - ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 set_matrix_for_bltable(num_pol, num_coeff_max, build 12-Apr-2018 16:00:58 coeff_mtx_tmp, coeff_mtx); build 12-Apr-2018 16:00:58 Matrix masklist_mtx2 = masklist_mtx; build 12-Apr-2018 16:00:58 @@ -1864,7 +1864,7 @@ void SingleDishMS::subtractBaselineCspline(string const& in_column_name, build 12-Apr-2018 16:00:58 std::vector bl_contexts; build 12-Apr-2018 16:00:58 bl_contexts.clear(); build 12-Apr-2018 16:00:58 size_t const bltype = BaselineType_kCubicSpline; build 12-Apr-2018 16:00:58 - Vector boundary(npiece+1, ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + Vector boundary(npiece+1, ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 size_t *boundary_data = boundary.data(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 doSubtractBaseline(in_column_name, build 12-Apr-2018 16:00:58 @@ -2849,7 +2849,7 @@ void SingleDishMS::subtractBaselineVariable(string const& in_column_name, build 12-Apr-2018 16:00:58 if (bltype == BaselineType_kCubicSpline) { build 12-Apr-2018 16:00:58 num_boundary = fit_param.npiece+1; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - Vector boundary(num_boundary,ArrayInitPolicy::NO_INIT); build 12-Apr-2018 16:00:58 + Vector boundary(num_boundary,ArrayInitPolicies::NO_INIT); build 12-Apr-2018 16:00:58 size_t *boundary_data = boundary.data(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (write_baseline_text || write_baseline_csv || write_baseline_table) { build 12-Apr-2018 16:00:58 diff --git a/code/singledishfiller/Filler/SingleDishMSFiller.tcc b/code/singledishfiller/Filler/SingleDishMSFiller.tcc build 12-Apr-2018 16:00:58 index 5c32fe3..1a0ff27 100644 build 12-Apr-2018 16:00:58 --- a/code/singledishfiller/Filler/SingleDishMSFiller.tcc build 12-Apr-2018 16:00:58 +++ b/code/singledishfiller/Filler/SingleDishMSFiller.tcc build 12-Apr-2018 16:00:58 @@ -944,6 +944,8 @@ Int SingleDishMSFiller::updateFeed(casacore::Int const &feed_id, casacore::In build 12-Apr-2018 16:00:58 polarization_type = &linear_type; build 12-Apr-2018 16:00:58 } else if (pol_type == "circular") { build 12-Apr-2018 16:00:58 polarization_type = &circular_type; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + polarization_type = &linear_type; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 //static std::vector< casacore::Vector *> polarization_type_pool; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/stdcasa/StdCasa/CrashReporter.cc b/code/stdcasa/StdCasa/CrashReporter.cc build 12-Apr-2018 16:00:58 index 176d4fd..6442a49 100644 build 12-Apr-2018 16:00:58 --- a/code/stdcasa/StdCasa/CrashReporter.cc build 12-Apr-2018 16:00:58 +++ b/code/stdcasa/StdCasa/CrashReporter.cc build 12-Apr-2018 16:00:58 @@ -7,6 +7,7 @@ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include "CrashReporter.h" build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //#warning "Defining UseCrashReport to compile main code" build 12-Apr-2018 16:00:58 //#define UseCrashReporter build 12-Apr-2018 16:00:58 @@ -288,6 +289,14 @@ CrashReporter::initializeFromApplication (const char * applicationArg0) build 12-Apr-2018 16:00:58 std::regex spaces (" +"); build 12-Apr-2018 16:00:58 exePath = regex_replace (exePath, spaces, "/"); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Is the exePath doesn't exist, try removing the tail f.e. "linux" build 12-Apr-2018 16:00:58 + // Tail is only useful for developer builds build 12-Apr-2018 16:00:58 + struct stat info; build 12-Apr-2018 16:00:58 + if( stat( exePath.c_str(), &info ) != 0 ) { build 12-Apr-2018 16:00:58 + const char *tail = std::strrchr(exePath.c_str() , '/'); build 12-Apr-2018 16:00:58 + size_t pos = exePath.find(tail); build 12-Apr-2018 16:00:58 + exePath = exePath.replace(pos, exePath.size(),""); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 exePath += "/bin/bogusExe"; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CMakeLists.txt b/code/synthesis/CMakeLists.txt build 12-Apr-2018 16:00:58 index a37b847..05b8333 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CMakeLists.txt build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CMakeLists.txt build 12-Apr-2018 16:00:58 @@ -167,11 +167,12 @@ casa_add_library( synthesis build 12-Apr-2018 16:00:58 CalTables/CTEnums.cc build 12-Apr-2018 16:00:58 CalTables/CTGlobals.cc build 12-Apr-2018 16:00:58 CalTables/CTInterface.cc build 12-Apr-2018 16:00:58 - CalTables/CTSelection.cc build 12-Apr-2018 16:00:58 CalTables/CTIter.cc build 12-Apr-2018 16:00:58 CalTables/CTMainColumns.cc build 12-Apr-2018 16:00:58 CalTables/CTMainRecord.cc build 12-Apr-2018 16:00:58 CalTables/CTPatchedInterp.cc build 12-Apr-2018 16:00:58 + CalTables/CTSelection.cc build 12-Apr-2018 16:00:58 + CalTables/CTSummary.cc build 12-Apr-2018 16:00:58 CalTables/CTTimeInterp1.cc build 12-Apr-2018 16:00:58 CalTables/EPointDesc.cc build 12-Apr-2018 16:00:58 CalTables/EPointMBuf.cc build 12-Apr-2018 16:00:58 @@ -394,12 +395,13 @@ install (FILES build 12-Apr-2018 16:00:58 CalTables/CTDesc.h build 12-Apr-2018 16:00:58 CalTables/CTEnums.h build 12-Apr-2018 16:00:58 CalTables/CTInterface.h build 12-Apr-2018 16:00:58 - CalTables/CTSelection.h build 12-Apr-2018 16:00:58 - CalTables/CTMainColInterface.h build 12-Apr-2018 16:00:58 CalTables/CTIter.h build 12-Apr-2018 16:00:58 + CalTables/CTMainColInterface.h build 12-Apr-2018 16:00:58 CalTables/CTMainColumns.h build 12-Apr-2018 16:00:58 CalTables/CTMainRecord.h build 12-Apr-2018 16:00:58 CalTables/CTPatchedInterp.h build 12-Apr-2018 16:00:58 + CalTables/CTSelection.h build 12-Apr-2018 16:00:58 + CalTables/CTSummary.h build 12-Apr-2018 16:00:58 CalTables/CTTimeInterp1.h build 12-Apr-2018 16:00:58 CalTables/CalBuffer.h build 12-Apr-2018 16:00:58 CalTables/CalDescBuffer.h build 12-Apr-2018 16:00:58 @@ -870,6 +872,9 @@ casa_add_unit_test( MODULES synthesis SOURCES ImagerObjects/test/tSynthesisImage build 12-Apr-2018 16:00:58 casa_add_unit_test( MODULES synthesis SOURCES Utilities/test/tFFT2D.cc ) build 12-Apr-2018 16:00:58 casa_add_unit_test( MODULES synthesis SOURCES CalTables/test/tCTPatchedInterp.cc ) build 12-Apr-2018 16:00:58 casa_add_unit_test( MODULES synthesis SOURCES ImagerObjects/test/tLabelandFindRegions.cc ) build 12-Apr-2018 16:00:58 +casa_add_unit_test( MODULES synthesis SOURCES ImagerObjects/test/tLabelandFindRegionsFullCube.cc ) build 12-Apr-2018 16:00:58 +casa_add_unit_test( MODULES synthesis SOURCES ImagerObjects/test/tBinaryDilation.cc ) build 12-Apr-2018 16:00:58 +casa_add_unit_test( MODULES synthesis SOURCES ImagerObjects/test/tSkipChannels.cc ) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CLPatchPanel.cc b/code/synthesis/CalTables/CLPatchPanel.cc build 12-Apr-2018 16:00:58 index 700e7c2..3ae7736 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CLPatchPanel.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CLPatchPanel.cc build 12-Apr-2018 16:00:58 @@ -546,8 +546,6 @@ CLPatchPanel::CLPatchPanel(const String& ctname, build 12-Apr-2018 16:00:58 // The current callib slice build 12-Apr-2018 16:00:58 CalLibSlice cls(callib.asRecord(ikey)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << endl << "CalLib slice " << icls << " ----------------" << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 logsink_ << LogIO::NORMAL << ". " << icls << ":" << endl build 12-Apr-2018 16:00:58 << cls.state() << LogIO::POST; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -645,8 +643,6 @@ CLPatchPanel::CLPatchPanel(const String& ctname, build 12-Apr-2018 16:00:58 // Apply thisCTspw selection to CT build 12-Apr-2018 16:00:58 this->selectOnCT(spwselCT,fldselCT,"","",String::toString(thisCTspw),""); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // (if null, warn and continue, or throw?) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // Create time-dep interp result container build 12-Apr-2018 16:00:58 CTCalPatchKey iclTres(icls,thisCTobs,thisCTfld,thisMSspw,-1); build 12-Apr-2018 16:00:58 clTres_[iclTres]=CLPPResult(nPar_,nFPar_,nChanIn_[thisCTspw],nMSElem_); build 12-Apr-2018 16:00:58 @@ -806,13 +802,14 @@ CLPatchPanel::CLPatchPanel(const String& ctname, build 12-Apr-2018 16:00:58 Int icls=-1; build 12-Apr-2018 16:00:58 for (uInt ikey=0;ikey theseMSint(1,-1); // Details TBD build 12-Apr-2018 16:00:58 - // cout << "theseMSint = " << theseMSint << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // What MS indices will be calibrated by this CL instance? build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // TBD: we will want to calculate these within the loops below build 12-Apr-2018 16:00:58 // so that per-obs and per-fld subsets will be correctly resolved build 12-Apr-2018 16:00:58 - // (and, e.g., nearest field can be obs-dep, build 12-Apr-2018 16:00:58 + // (and, e.g., nearest field can be obs-dep, etc.) build 12-Apr-2018 16:00:58 + // (gmoellen 2018/02/05: still true? Doesn't selection above build 12-Apr-2018 16:00:58 + // reduce requirements to the union of obs/fld/intent accounted build 12-Apr-2018 16:00:58 + // for by the current cl?) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // obs build 12-Apr-2018 16:00:58 + // OBS Ids in selected MS to be calibrated by this cl instance build 12-Apr-2018 16:00:58 Vector reqMSobs(1,-1); // assume all, indescriminately build 12-Apr-2018 16:00:58 if (cls.obs.length()>0) build 12-Apr-2018 16:00:58 // if CL is obs-specific, we must not be indescriminate build 12-Apr-2018 16:00:58 reqMSobs.reference(this->getMSuniqueIds(clsms,"obs")); build 12-Apr-2018 16:00:58 - // cout << "reqMSobs = " << reqMSobs << endl; build 12-Apr-2018 16:00:58 + //cout << "reqMSobs = " << reqMSobs << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // fld build 12-Apr-2018 16:00:58 + // FIELD Ids in selected MS to be calibrated by this cl instance build 12-Apr-2018 16:00:58 Vector reqMSfld(1,-1); // assume all, indescriminately build 12-Apr-2018 16:00:58 if (cls.fld.length()>0) // if selected, maybe we only need a subset build 12-Apr-2018 16:00:58 // if CL is fld-specific, we must not be indescriminate build 12-Apr-2018 16:00:58 reqMSfld.reference(this->getMSuniqueIds(clsms,"fld")); build 12-Apr-2018 16:00:58 - // cout << "reqMSfld = " << reqMSfld << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // spw build 12-Apr-2018 16:00:58 + //cout << "reqMSfld = " << reqMSfld << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // INTENT Ids in selected MS to be calibrated by this cl instance build 12-Apr-2018 16:00:58 + Vector reqMSint(1,-1); // assume all build 12-Apr-2018 16:00:58 + if (cls.ent.length()>0) build 12-Apr-2018 16:00:58 + reqMSint.reference(this->getMSuniqueIds(clsms,"intent")); build 12-Apr-2018 16:00:58 + //cout << "reqMSint = " << reqMSint << endl; build 12-Apr-2018 16:00:58 + Vector theseMSint(reqMSint); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // SPW Ids in selected MS to be calibrated by this cl instance build 12-Apr-2018 16:00:58 // We are never indescriminate about spw build 12-Apr-2018 16:00:58 Vector reqMSspw(this->getMSuniqueIds(clsms,"spw")); build 12-Apr-2018 16:00:58 - // cout << "reqMSspw = " << reqMSspw << endl; build 12-Apr-2018 16:00:58 + //cout << "reqMSspw = " << reqMSspw << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // ant build 12-Apr-2018 16:00:58 + // ANTENNA in selected MS to be calibrated by this cl instance build 12-Apr-2018 16:00:58 // We are never indescriminate about ant build 12-Apr-2018 16:00:58 // (For now, we will do all MS ants) build 12-Apr-2018 16:00:58 Vector reqMSant(nMSAnt_); build 12-Apr-2018 16:00:58 indgen(reqMSant); build 12-Apr-2018 16:00:58 - // cout << "reqMSant = " << reqMSant << endl; build 12-Apr-2018 16:00:58 + //cout << "reqMSant = " << reqMSant << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // WE DO TIME-ISH (OBS,FLD) AXES IN OUTER LOOPS build 12-Apr-2018 16:00:58 + // SLICE CalTable by OBS, FIELD, SPW, ANT, and map to build 12-Apr-2018 16:00:58 + // the corresponding MS indicies build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // WE DO TIME-ISH (OBS,FLD) AXES IN OUTER LOOPS build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + NewCalTable obsselCT(ct_); build 12-Apr-2018 16:00:58 // The net CT obs required for the MS obs according to the obsmap build 12-Apr-2018 16:00:58 // We will create separate interpolator groups for each build 12-Apr-2018 16:00:58 Vector reqCTobs=cls.obsmap.ctids(reqMSobs); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // cout << "reqCTobs = " << reqCTobs << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + //cout << "reqCTobs = " << reqCTobs << endl; build 12-Apr-2018 16:00:58 // For each required CT obs (and thus the MS obs ids requiring it) build 12-Apr-2018 16:00:58 - NewCalTable obsselCT(ct_); build 12-Apr-2018 16:00:58 for (uInt iCTobs=0;iCTobsselectOnCT(obsselCT,ct_,String::toString(thisCTobs),"","",""); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // The MS obss to be calibrated by thisCTobs (limited by the req superset) build 12-Apr-2018 16:00:58 + // The MS OBSs (subset of reqMSobs) to be calibrated by thisCTobs build 12-Apr-2018 16:00:58 // (could be [-1], which means all) build 12-Apr-2018 16:00:58 Vector theseMSobs=cls.obsmap.msids(thisCTobs,reqMSobs); build 12-Apr-2018 16:00:58 if (theseMSobs.nelements()==1 && theseMSobs[0]<0) build 12-Apr-2018 16:00:58 theseMSobs.reference(reqMSobs); build 12-Apr-2018 16:00:58 - // cout << " thisCTobs = " << thisCTobs << ": theseMSobs = " << theseMSobs << endl; build 12-Apr-2018 16:00:58 + //cout << " thisCTobs = " << thisCTobs << ": theseMSobs = " << theseMSobs << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Apply thisCTobs selection to the CT build 12-Apr-2018 16:00:58 + // (only if a meaningful obsid is specified) build 12-Apr-2018 16:00:58 + try { build 12-Apr-2018 16:00:58 + if (thisCTobs!=-1) build 12-Apr-2018 16:00:58 + this->selectOnCT(obsselCT,ct_,String::toString(thisCTobs),"","",""); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + catch (...) { // MSSelectionNullSelection x ) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Required CT obs does not exist in the caltable build 12-Apr-2018 16:00:58 + recordBadMSIndices(theseMSobs,reqMSfld,reqMSint,Vector(1,-1)); // all spws build 12-Apr-2018 16:00:58 + continue; // jump to next CT obs build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // The net CT fld required for the MS fld according to the fldmap build 12-Apr-2018 16:00:58 - // (in principle, this may contain CT fld ids that aren't available) build 12-Apr-2018 16:00:58 // NB: currently all [-1] or singles; "some" is TBD build 12-Apr-2018 16:00:58 Vector reqCTfld=cls.fldmap.ctids(reqMSfld); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // cout << " reqCTfld = " << reqCTfld << endl; build 12-Apr-2018 16:00:58 + //cout << " reqCTfld = " << reqCTfld << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // For each required CT fld: build 12-Apr-2018 16:00:58 NewCalTable fldselCT(obsselCT); build 12-Apr-2018 16:00:58 for (uInt iCTfld=0;iCTfldselectOnCT(fldselCT,obsselCT,"",String::toString(thisCTfld),"",""); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // The MS flds to be calibrated by thisCTfld build 12-Apr-2018 16:00:58 // (could be [-1], which means all) build 12-Apr-2018 16:00:58 Vector theseMSfld=cls.fldmap.msids(thisCTfld,reqMSfld); build 12-Apr-2018 16:00:58 if (theseMSfld.nelements()==1 && theseMSfld[0]<0) build 12-Apr-2018 16:00:58 theseMSfld.reference(reqMSfld); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << " thisCTfld = " << thisCTfld << ": theseMSfld = " << theseMSfld << endl; build 12-Apr-2018 16:00:58 + //cout << " thisCTfld = " << thisCTfld << ": theseMSfld = " << theseMSfld << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Apply thisCTfld selection to the CT build 12-Apr-2018 16:00:58 + try { build 12-Apr-2018 16:00:58 + if (thisCTfld!=-1) build 12-Apr-2018 16:00:58 + this->selectOnCT(fldselCT,obsselCT,"",String::toString(thisCTfld),"",""); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + catch (...) { // MSSelectionNullSelection x ) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Required CT fld does not exist in the caltable (for current CT obs) build 12-Apr-2018 16:00:58 + recordBadMSIndices(theseMSobs,theseMSfld,reqMSint,Vector(1,-1)); // all spws build 12-Apr-2018 16:00:58 + continue; // jump to next fld build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // ...AND HARDWARE AXES (SPW,ANT) IN INNER LOOPS build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -935,14 +954,28 @@ CLPatchPanel::CLPatchPanel(const String& ctname, build 12-Apr-2018 16:00:58 Int thisCTspw=cls.spwmap(thisMSspw); build 12-Apr-2018 16:00:58 if (thisCTspw<0) thisCTspw=thisMSspw; // MUST BE DEFINITE! build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << " thisCTspw=" << thisCTspw << "; thisMSspw="< thisMSspw="<selectOnCT(spwselCT,fldselCT,"","",String::toString(thisCTspw),""); build 12-Apr-2018 16:00:58 + try { build 12-Apr-2018 16:00:58 + this->selectOnCT(spwselCT,fldselCT,"","",String::toString(thisCTspw),""); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + catch (...) { // MSSelectionNullSelection x ) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Required CT spw does not exist in the caltable (for current CT obs, fld) build 12-Apr-2018 16:00:58 + recordBadMSIndices(theseMSobs,theseMSfld,reqMSint,Vector(1,thisMSspw)); // current spw build 12-Apr-2018 16:00:58 + continue; // jump to next spw build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // If this selection fails (zero rows), and exception is thrown. build 12-Apr-2018 16:00:58 + // What is the state of antselCT? build 12-Apr-2018 16:00:58 + // Is it still the unselected-upon spwselCT? build 12-Apr-2018 16:00:58 + // Or is an empty table? build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // (if null, warn and continue, or throw?) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Create time-dep interp result container build 12-Apr-2018 16:00:58 + // Indexed by CTobs, CTfld, MSspw (for all antennas) build 12-Apr-2018 16:00:58 CTCalPatchKey iclTres(icls,thisCTobs,thisCTfld,thisMSspw,-1); build 12-Apr-2018 16:00:58 clTres_[iclTres]=CLPPResult(nPar_,nFPar_,nChanIn_[thisCTspw],nMSElem_); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -962,14 +995,12 @@ CLPatchPanel::CLPatchPanel(const String& ctname, build 12-Apr-2018 16:00:58 CTCalPatchKey ici1(icls,thisCTobs,thisCTfld,thisMSspw,thisMSant); // spw,ant are MS indices build 12-Apr-2018 16:00:58 // (NB: Must use thisMSspw,thisMSant above to avoid duplication in resolved spwmap,antmap) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - if (ci_.count(ici1)<1) { build 12-Apr-2018 16:00:58 + if (ci_.count(ici1)<1) { build 12-Apr-2018 16:00:58 ciname_[ici1]=ici0.print()+" rows="+String::toString(antselCT.nrow()); build 12-Apr-2018 16:00:58 Array r(clTres_[iclTres].result(thisMSant)); build 12-Apr-2018 16:00:58 Array rf(clTres_[iclTres].resultFlag(thisMSant)); build 12-Apr-2018 16:00:58 ci_[ici1]=(*cttifactoryptr_)(antselCT,cls.tinterp,r,rf); build 12-Apr-2018 16:00:58 - // cout << "Creating: CT("< CT(" << ici0.print() << ")" << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + //if (iMSant==0) cout << " Creating: CT("< CT(" << ici0.print() << ") (all antennas)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 throw(AipsError("Attempted duplicate CTCalPatchKey!")); build 12-Apr-2018 16:00:58 @@ -1009,13 +1040,36 @@ CLPatchPanel::CLPatchPanel(const String& ctname, build 12-Apr-2018 16:00:58 } // iMSspw build 12-Apr-2018 16:00:58 } // iCTfld build 12-Apr-2018 16:00:58 } // iCTobs build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } // icls build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } // ctor build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void CLPatchPanel::recordBadMSIndices(const Vector& obs, const Vector& fld, build 12-Apr-2018 16:00:58 + const Vector& ent, const Vector& spw) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Record bad _MS_ indices build 12-Apr-2018 16:00:58 + for (uInt iobs=0;iobs CLPatchPanel::getMSuniqueIds(MeasurementSet& ms, String which) { build 12-Apr-2018 16:00:58 msc.observationId().getColumn(colv); build 12-Apr-2018 16:00:58 else if (which=="fld") build 12-Apr-2018 16:00:58 msc.fieldId().getColumn(colv); build 12-Apr-2018 16:00:58 + else if (which=="intent") build 12-Apr-2018 16:00:58 + msc.stateId().getColumn(colv); build 12-Apr-2018 16:00:58 else if (which=="spw") build 12-Apr-2018 16:00:58 msc.dataDescId().getColumn(colv); // these are actually ddids! build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 @@ -1137,6 +1193,47 @@ CLPatchPanel::~CLPatchPanel() { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +// Is specific calibration explicitly available for a obs,fld,intent,spw,ant combination? build 12-Apr-2018 16:00:58 +Bool CLPatchPanel::calAvailable(casacore::Int msobs, casacore::Int msfld, casacore::Int msent, build 12-Apr-2018 16:00:58 + casacore::Int msspw, casacore::Int msant) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + const MSCalPatchKey key(msobs,msfld,msent,msspw,msant); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Bool avail=msTres_.count(key)>0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // if (!avail) { build 12-Apr-2018 16:00:58 + // cout << Path(ct_.tableName()).baseName().before(".tempMem") << " stepped over: " << key.print() << endl; build 12-Apr-2018 16:00:58 + // } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + return avail; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// The specified MS indices are "OK" if not recorded as expected-but-absent as per build 12-Apr-2018 16:00:58 +// the callibrary specification. Expected-but-absent occurs when a CL entry build 12-Apr-2018 16:00:58 +// indicates (even implicitly) that the MS index combination is supported but build 12-Apr-2018 16:00:58 +// the required CalTable indices (via *map params) are not actually available build 12-Apr-2018 16:00:58 +// in the CalTable, e.g., a missing spw. build 12-Apr-2018 16:00:58 +// Such data cannot be calibrated and this CL cannot be agnostic about it... build 12-Apr-2018 16:00:58 +// Note that MSIndicesOK can return true for MS index combinations for which build 12-Apr-2018 16:00:58 +// calibration is not actually available, if the CL entry does not purport build 12-Apr-2018 16:00:58 +// to support calibrating them. In such cases, calAvailable() returns false, and build 12-Apr-2018 16:00:58 +// this CL is agnostic w.r.t. such data and lets it pass thru unchanged. build 12-Apr-2018 16:00:58 +// Returns TRUE when the specified MS indices are calibrateable or passable. build 12-Apr-2018 16:00:58 +Bool CLPatchPanel::MSIndicesOK(casacore::Int msobs, casacore::Int msfld, casacore::Int msent, build 12-Apr-2018 16:00:58 + casacore::Int msspw, casacore::Int msant) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + const MSCalPatchKey key(msobs,msfld,msent,msspw,msant); build 12-Apr-2018 16:00:58 + Bool bad=badmsciname_.count(key)>0; build 12-Apr-2018 16:00:58 + // if (bad) { build 12-Apr-2018 16:00:58 + // cout << Path(ct_.tableName()).baseName().before(".tempMem") << " should but can't calibrate: " << key.print() << endl; build 12-Apr-2018 16:00:58 + // } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Return TRUE if NOT bad build 12-Apr-2018 16:00:58 + return !bad; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 Bool CLPatchPanel::interpolate(Cube& resultC, Cube& resFlag, build 12-Apr-2018 16:00:58 Int msobs, Int msfld, Int msent, Int msspw, build 12-Apr-2018 16:00:58 Double time, Double freq) { build 12-Apr-2018 16:00:58 @@ -1318,10 +1415,16 @@ void CLPatchPanel::listmappings() { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 cout << "CalTable: " << ct_.tableName() << endl; build 12-Apr-2018 16:00:58 cout << "There are " << ci_.size() << " cal interpolation engines." << endl; build 12-Apr-2018 16:00:58 - cout << "There are " << msci_.size() << " unique MS id combinations mapped to them." << endl; build 12-Apr-2018 16:00:58 + cout << "There are " << msci_.size() << " unique MS id combinations mapped to them:" << endl; build 12-Apr-2018 16:00:58 for (std::map::iterator it=msciname_.begin(); it!=msciname_.end(); ++it) build 12-Apr-2018 16:00:58 cout << "MS (" << it->first.print() << ") --> CL (" << it->second << ")" << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + cout << endl << "There are " << badmsciname_.size() << " expected but ABSENT MS id combinations (all ants):" << endl; build 12-Apr-2018 16:00:58 + for (std::map::iterator it=badmsciname_.begin(); it!=badmsciname_.end(); ++it) build 12-Apr-2018 16:00:58 + cout << "MS (" << it->first.print() << ")" << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + cout << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1531,6 +1634,18 @@ void CLPatchPanel::resampleFlagsInFreq(Vector& flgout,const Vector build 12-Apr-2018 16:00:58 // Find nominal registration (the _index_ just left) build 12-Apr-2018 16:00:58 Bool exact(false); build 12-Apr-2018 16:00:58 ireg=binarySearch(exact,finGHz,fout(iflgout),nflg,0); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // If registration is exact, assign verbatim build 12-Apr-2018 16:00:58 + // NB: the calibration value calculation occurs agnostically w.r.t. flags, build 12-Apr-2018 16:00:58 + // so the calculated value should also match build 12-Apr-2018 16:00:58 + // TBD: Add "|| near(finGHz[ireg],fout(iflgout),1e-10) in case "exact" has build 12-Apr-2018 16:00:58 + // precision issues? build 12-Apr-2018 16:00:58 + if (exact) { build 12-Apr-2018 16:00:58 + flgout[iflgout]=flgin[ireg]; build 12-Apr-2018 16:00:58 + continue; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Not exact, so carefully handle bracketing build 12-Apr-2018 16:00:58 if (ireg>0) build 12-Apr-2018 16:00:58 ireg-=1; build 12-Apr-2018 16:00:58 ireg=min(ireg,nflg-1); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CLPatchPanel.h b/code/synthesis/CalTables/CLPatchPanel.h build 12-Apr-2018 16:00:58 index f320fa9..5613523 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CLPatchPanel.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CLPatchPanel.h build 12-Apr-2018 16:00:58 @@ -238,6 +238,14 @@ public: build 12-Apr-2018 16:00:58 // Destructor build 12-Apr-2018 16:00:58 virtual ~CLPatchPanel(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Is specific calibration explicitly available for a obs,fld,intent,spw,ant combination? build 12-Apr-2018 16:00:58 + casacore::Bool calAvailable(casacore::Int obs, casacore::Int fld, casacore::Int ent, build 12-Apr-2018 16:00:58 + casacore::Int spw, casacore::Int ant=-1); build 12-Apr-2018 16:00:58 + // Are specified indices OK for this CL (i.e., not explicitly marked as expected but absent) build 12-Apr-2018 16:00:58 + // Will be calibrated if calAvailable=true, will be ignored if calAvailable()=false build 12-Apr-2018 16:00:58 + casacore::Bool MSIndicesOK(casacore::Int obs, casacore::Int fld, casacore::Int ent, build 12-Apr-2018 16:00:58 + casacore::Int spw, casacore::Int ant=-1); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Interpolate, given input obs, field, intent, spw, timestamp, & (optionally) freq build 12-Apr-2018 16:00:58 // returns T if new result (anywhere,anyhow) build 12-Apr-2018 16:00:58 // For casacore::Complex params (calls casacore::Float version) build 12-Apr-2018 16:00:58 @@ -269,13 +277,16 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Access to CalTable's freq info build 12-Apr-2018 16:00:58 - //casacore::Vector freqIn(casacore::Int spw); // NYI build 12-Apr-2018 16:00:58 + const casacore::Vector& freqIn(casacore::Int spw) {return freqIn_[spw]; }; // per spw build 12-Apr-2018 16:00:58 const casacore::Vector& refFreqIn() { return refFreqIn_; }; // indexed by spw build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Report state build 12-Apr-2018 16:00:58 void listmappings(); build 12-Apr-2018 16:00:58 void state(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // CASA version of the internal caltable build 12-Apr-2018 16:00:58 + casacore::String CTCASAvers() { return ct_.CASAvers(); }; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 private: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Null ctor does nothing build 12-Apr-2018 16:00:58 @@ -324,6 +335,10 @@ private: build 12-Apr-2018 16:00:58 casacore::InterpolateArray1D::InterpolationMethod ftype(casacore::String& strtype); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + void recordBadMSIndices(const casacore::Vector& obs, const casacore::Vector& fld, build 12-Apr-2018 16:00:58 + const casacore::Vector& ent, const casacore::Vector& spw); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // PRIVATE DATA: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -365,6 +380,7 @@ private: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 std::map msTres_,msFres_; build 12-Apr-2018 16:00:58 std::map msciname_; build 12-Apr-2018 16:00:58 + std::map badmsciname_; build 12-Apr-2018 16:00:58 std::map ctspw_; build 12-Apr-2018 16:00:58 std::map finterp_; build 12-Apr-2018 16:00:58 std::map msci_; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTDesc.cc b/code/synthesis/CalTables/CTDesc.cc build 12-Apr-2018 16:00:58 index 60dfe14..17ae936 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CTDesc.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTDesc.cc build 12-Apr-2018 16:00:58 @@ -41,6 +41,7 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 using namespace casacore; build 12-Apr-2018 16:00:58 namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 @@ -135,6 +136,7 @@ TableDesc CTDesc::defaultCalMain (const String& partype, build 12-Apr-2018 16:00:58 keyWordRec.define ("MSName",msname); build 12-Apr-2018 16:00:58 keyWordRec.define ("VisCal",viscal); build 12-Apr-2018 16:00:58 keyWordRec.define ("PolBasis",polbasis); build 12-Apr-2018 16:00:58 + keyWordRec.define ("CASA_Version",VersionInfo::str()); // Basic CASA version string build 12-Apr-2018 16:00:58 // Add to table descriptor build 12-Apr-2018 16:00:58 td.rwKeywordSet().assign (keyWordRec); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTIter.cc b/code/synthesis/CalTables/CTIter.cc build 12-Apr-2018 16:00:58 index b8073b8..199cd52 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CTIter.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTIter.cc build 12-Apr-2018 16:00:58 @@ -118,6 +118,10 @@ Int ROCTIter::thisAntenna2() const { return iROCTMainCols_->antenna2()(0); }; build 12-Apr-2018 16:00:58 Vector ROCTIter::antenna2() const { return iROCTMainCols_->antenna2().getColumn(); }; build 12-Apr-2018 16:00:58 void ROCTIter::antenna2(Vector& v) const { iROCTMainCols_->antenna2().getColumn(v); }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +Double ROCTIter::thisInterval() const { return iROCTMainCols_->interval()(0); }; build 12-Apr-2018 16:00:58 +Vector ROCTIter::interval() const { return iROCTMainCols_->interval().getColumn(); }; build 12-Apr-2018 16:00:58 +void ROCTIter::interval(Vector& v) const { iROCTMainCols_->interval().getColumn(v); }; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 Cube ROCTIter::cparam() const { return iROCTMainCols_->cparam().getColumn(); }; build 12-Apr-2018 16:00:58 void ROCTIter::cparam(Cube& c) const { iROCTMainCols_->cparam().getColumn(c); }; build 12-Apr-2018 16:00:58 Cube ROCTIter::fparam() const { return iROCTMainCols_->fparam().getColumn(); }; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTIter.h b/code/synthesis/CalTables/CTIter.h build 12-Apr-2018 16:00:58 index 0ff3471..fc93ccc 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CTIter.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTIter.h build 12-Apr-2018 16:00:58 @@ -127,6 +127,10 @@ public: build 12-Apr-2018 16:00:58 casacore::Vector antenna2() const; build 12-Apr-2018 16:00:58 void antenna2(casacore::Vector& v) const; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + casacore::Double thisInterval() const; build 12-Apr-2018 16:00:58 + casacore::Vector interval() const; build 12-Apr-2018 16:00:58 + void interval(casacore::Vector& v) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 casacore::Cube cparam() const; build 12-Apr-2018 16:00:58 void cparam(casacore::Cube& c) const; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTPatchedInterp.cc b/code/synthesis/CalTables/CTPatchedInterp.cc build 12-Apr-2018 16:00:58 index 296ebd9..6f26e0c 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CTPatchedInterp.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTPatchedInterp.cc build 12-Apr-2018 16:00:58 @@ -1247,6 +1247,18 @@ void CTPatchedInterp::resampleFlagsInFreq(Vector& flgout,const Vector0) build 12-Apr-2018 16:00:58 ireg-=1; build 12-Apr-2018 16:00:58 ireg=min(ireg,nflg-1); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTSummary.cc b/code/synthesis/CalTables/CTSummary.cc build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..4da1060 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTSummary.cc build 12-Apr-2018 16:00:58 @@ -0,0 +1,821 @@ build 12-Apr-2018 16:00:58 +//# CTSummary.cc: Helper class for listing a NewCalTable build 12-Apr-2018 16:00:58 +//# Copyright (C) 2017 build 12-Apr-2018 16:00:58 +//# Associated Universities, Inc. Washington DC, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This library is free software; you can redistribute it and/or modify it build 12-Apr-2018 16:00:58 +//# under the terms of the GNU Library General Public License as published by build 12-Apr-2018 16:00:58 +//# the Free Software Foundation; either version 2 of the License, or (at your build 12-Apr-2018 16:00:58 +//# option) any later version. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This library is distributed in the hope that it will be useful, but WITHOUT build 12-Apr-2018 16:00:58 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 12-Apr-2018 16:00:58 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public build 12-Apr-2018 16:00:58 +//# License for more details. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# You should have received a copy of the GNU Library General Public License build 12-Apr-2018 16:00:58 +//# along with this library; if not, write to the Free Software Foundation, build 12-Apr-2018 16:00:58 +//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# Correspondence concerning AIPS++ should be addressed as follows: build 12-Apr-2018 16:00:58 +//# Internet email: aips2-request@nrao.edu. build 12-Apr-2018 16:00:58 +//# Postal address: AIPS++ Project Office build 12-Apr-2018 16:00:58 +//# National Radio Astronomy Observatory build 12-Apr-2018 16:00:58 +//# 520 Edgemont Road build 12-Apr-2018 16:00:58 +//# Charlottesville, VA 22903-2475 USA build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +using namespace casacore; build 12-Apr-2018 16:00:58 +namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// Constructor assigns pointer. If NCT goes out of scope you build 12-Apr-2018 16:00:58 +// will get rubbish. Also sets string to separate subtable output. build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +CTSummary::CTSummary (const NewCalTable& nct) build 12-Apr-2018 16:00:58 +: pNCT(&nct), build 12-Apr-2018 16:00:58 + dashlin1(replicate("-",80)), build 12-Apr-2018 16:00:58 + dashlin2(replicate("=",80)) build 12-Apr-2018 16:00:58 +{} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +CTSummary::CTSummary (const NewCalTable* nct) build 12-Apr-2018 16:00:58 +: pNCT(nct), build 12-Apr-2018 16:00:58 + dashlin1(replicate("-",80)), build 12-Apr-2018 16:00:58 + dashlin2(replicate("=",80)) build 12-Apr-2018 16:00:58 +{} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +CTSummary::~CTSummary () build 12-Apr-2018 16:00:58 +{ } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// Retrieve number of rows build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +Int CTSummary::nrow () const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + return pNCT->nrow(); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// Get ms name build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +String CTSummary::name () const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + return pNCT->tableName(); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// Reassign pointer. build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +Bool CTSummary::setNCT (const NewCalTable& nct) build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + const NewCalTable* pTemp; build 12-Apr-2018 16:00:58 + pTemp = &nct; build 12-Apr-2018 16:00:58 + if (pTemp == 0) { build 12-Apr-2018 16:00:58 + return False; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + pNCT = pTemp; build 12-Apr-2018 16:00:58 + return True; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// List information about a ct to the logger build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +void CTSummary::list (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + // List a title for the Summary build 12-Apr-2018 16:00:58 + listTitle (os); build 12-Apr-2018 16:00:58 + // List the main table and subtables in a useful order and format build 12-Apr-2018 16:00:58 + listWhere(os, verbose); build 12-Apr-2018 16:00:58 + os << dashlin1 << endl; build 12-Apr-2018 16:00:58 + listWhat(os, verbose); build 12-Apr-2018 16:00:58 + os << dashlin1 << endl; build 12-Apr-2018 16:00:58 + listHow(os, verbose); build 12-Apr-2018 16:00:58 + os << dashlin1 << endl; build 12-Apr-2018 16:00:58 + // Post it build 12-Apr-2018 16:00:58 + os.post(); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// List a title for the Summary build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +void CTSummary::listTitle (LogIO& os) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL; build 12-Apr-2018 16:00:58 + // Type of cal table build 12-Apr-2018 16:00:58 + casacore::String type("unknown"); build 12-Apr-2018 16:00:58 + os << dashlin2 << endl << "Cal Table Name: " << this->name(); build 12-Apr-2018 16:00:58 + if (pNCT->keywordSet().isDefined("VisCal")) { build 12-Apr-2018 16:00:58 + type = pNCT->keywordSet().asString("VisCal"); build 12-Apr-2018 16:00:58 + // List the CT name and type as the title of the Summary build 12-Apr-2018 16:00:58 + os << " Cal Type: " << type; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << endl << dashlin2 << endl; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// Convenient table groupings build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +void CTSummary::listWhere (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + listObservation (os,verbose); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listWhat (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + listMain(os, verbose); build 12-Apr-2018 16:00:58 + os << dashlin1 << endl; build 12-Apr-2018 16:00:58 + listField(os, verbose); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listHow (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + listSpectralWindow(os, verbose); build 12-Apr-2018 16:00:58 + os << dashlin1 << endl; build 12-Apr-2018 16:00:58 + listAntenna(os, verbose); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// SUBTABLES build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +void CTSummary::listMain (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + if (nrow()<=0) { build 12-Apr-2018 16:00:58 + os << "The MAIN table is empty: there are no data!!!" << endl << LogIO::POST; build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // to get columns from main and subtables build 12-Apr-2018 16:00:58 + ROCTMainColumns ctmain(*pNCT); build 12-Apr-2018 16:00:58 + ROCTColumns ctsub(*pNCT); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Time: build 12-Apr-2018 16:00:58 + casacore::Vector times = ctmain.time().getColumn(); build 12-Apr-2018 16:00:58 + casacore::Double startTime = times(0); build 12-Apr-2018 16:00:58 + casacore::Double stopTime = times(times.size()-1); build 12-Apr-2018 16:00:58 + casacore::Double exposTime = stopTime - startTime; build 12-Apr-2018 16:00:58 + MVTime startMVT(startTime/86400.0), stopMVT(stopTime/86400.0); build 12-Apr-2018 16:00:58 + casacore::String timeref = ctmain.time().keywordSet().subRecord("MEASINFO").asString("Ref"); build 12-Apr-2018 16:00:58 + // Output info build 12-Apr-2018 16:00:58 + os << " Data records: " << nrow() << " Total elapsed time = " build 12-Apr-2018 16:00:58 + << exposTime << " seconds" << endl build 12-Apr-2018 16:00:58 + << " Observed from " build 12-Apr-2018 16:00:58 + << MVTime(startTime/C::day).string(MVTime::DMY,7) //startMVT.string() build 12-Apr-2018 16:00:58 + << " to " build 12-Apr-2018 16:00:58 + << MVTime(stopTime/C::day).string(MVTime::DMY,7) // stopMVT.string() build 12-Apr-2018 16:00:58 + << " (" << timeref << ")" build 12-Apr-2018 16:00:58 + << endl << endl; build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (verbose) { build 12-Apr-2018 16:00:58 + // Field names: build 12-Apr-2018 16:00:58 + casacore::Vector fieldnames = ctsub.field().name().getColumn(); build 12-Apr-2018 16:00:58 + // Spw Ids build 12-Apr-2018 16:00:58 + casacore::Vector specwindids(ctmain.spwId().getColumn()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Field widths for printing: build 12-Apr-2018 16:00:58 + casacore::Int width_lead(2), build 12-Apr-2018 16:00:58 + width_scan(4), build 12-Apr-2018 16:00:58 + width_btime(22), build 12-Apr-2018 16:00:58 + width_etime(10), build 12-Apr-2018 16:00:58 + width_fieldId(5), build 12-Apr-2018 16:00:58 + width_fieldname(20), build 12-Apr-2018 16:00:58 + width_nrow(10); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Set up iteration over OBSID build 12-Apr-2018 16:00:58 + casacore::Block icols(3); build 12-Apr-2018 16:00:58 + icols[0] = "OBSERVATION_ID"; build 12-Apr-2018 16:00:58 + icols[1] = "SCAN_NUMBER"; build 12-Apr-2018 16:00:58 + icols[2] = "FIELD_ID"; build 12-Apr-2018 16:00:58 + ROCTIter* iter = new ROCTIter(*pNCT, icols); build 12-Apr-2018 16:00:58 + iter->reset(); build 12-Apr-2018 16:00:58 + casacore::Int obsid(-2); // print obsid when changes build 12-Apr-2018 16:00:58 + casacore::Double lastday(0.0); // print date when changes build 12-Apr-2018 16:00:58 + while (!iter->pastEnd()) { build 12-Apr-2018 16:00:58 + casacore::Int thisobs = iter->thisObs(); build 12-Apr-2018 16:00:58 + if (thisobs != obsid) { build 12-Apr-2018 16:00:58 + obsid = thisobs; build 12-Apr-2018 16:00:58 + lastday = 0.0; // force printing date build 12-Apr-2018 16:00:58 + os << endl << " ObservationID = " << thisobs << endl; build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + // print header for output columns build 12-Apr-2018 16:00:58 + casacore::String datetime = " Date Timerange ( "; build 12-Apr-2018 16:00:58 + // variable-len timeref string build 12-Apr-2018 16:00:58 + datetime.replace(25,timeref.length(),timeref); build 12-Apr-2018 16:00:58 + datetime.replace(25+timeref.length(),1,")"); build 12-Apr-2018 16:00:58 + os << datetime; build 12-Apr-2018 16:00:58 + os << "Scan FldId FieldName nRows "; build 12-Apr-2018 16:00:58 + os << "SpwIds Avg Intervals" << endl; build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os.output().precision(3); build 12-Apr-2018 16:00:58 + // get values for this iteration build 12-Apr-2018 16:00:58 + casacore::Vector times = iter->time(); build 12-Apr-2018 16:00:58 + casacore::Double btime = times(0); build 12-Apr-2018 16:00:58 + casacore::Double etime = times(times.size()-1); build 12-Apr-2018 16:00:58 + casacore::Double day = floor(MVTime(btime/C::day).day()); build 12-Apr-2018 16:00:58 + casacore::Int scan = iter->thisScan(); build 12-Apr-2018 16:00:58 + casacore::Int fieldid = iter->thisField(); build 12-Apr-2018 16:00:58 + casacore::String fieldname; build 12-Apr-2018 16:00:58 + if (fieldid >= 0) build 12-Apr-2018 16:00:58 + fieldname = fieldnames(fieldid); build 12-Apr-2018 16:00:58 + casacore::Int nrow = iter->nrow(); build 12-Apr-2018 16:00:58 + std::vector spws = iter->spw().tovector(); build 12-Apr-2018 16:00:58 + std::set spwset = std::set(spws.begin(), spws.end()); build 12-Apr-2018 16:00:58 + std::vector intervals = iter->interval().tovector(); build 12-Apr-2018 16:00:58 + std::set intervalset = std::set(intervals.begin(), intervals.end()); build 12-Apr-2018 16:00:58 + // print line build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(width_lead); os << " "; build 12-Apr-2018 16:00:58 + // Timerange beginning time build 12-Apr-2018 16:00:58 + os.output().width(width_btime); build 12-Apr-2018 16:00:58 + if (day!=lastday) { // print date build 12-Apr-2018 16:00:58 + os << MVTime(btime/C::day).string(MVTime::DMY,7); build 12-Apr-2018 16:00:58 + } else { // omit date build 12-Apr-2018 16:00:58 + os << MVTime(btime/C::day).string(MVTime::TIME,7); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os.output().width(3); os << " - "; build 12-Apr-2018 16:00:58 + // Timerange end time build 12-Apr-2018 16:00:58 + os.output().width(width_etime); build 12-Apr-2018 16:00:58 + os << MVTime(etime/C::day).string(MVTime::TIME,7); build 12-Apr-2018 16:00:58 + // Scan build 12-Apr-2018 16:00:58 + os.output().width(width_lead); os << " "; build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(width_scan); build 12-Apr-2018 16:00:58 + os << scan; build 12-Apr-2018 16:00:58 + // FldId build 12-Apr-2018 16:00:58 + os.output().width(width_lead); os << " "; build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(width_fieldId); build 12-Apr-2018 16:00:58 + os << fieldid << " "; build 12-Apr-2018 16:00:58 + // FieldName build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + if (fieldname.length()>20) build 12-Apr-2018 16:00:58 + fieldname.replace(19,1,'*'); build 12-Apr-2018 16:00:58 + os.output().width(width_fieldname); build 12-Apr-2018 16:00:58 + os << fieldname.at(0,20); build 12-Apr-2018 16:00:58 + // nRows build 12-Apr-2018 16:00:58 + os.output().width(width_nrow); build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os << nrow; build 12-Apr-2018 16:00:58 + // SpwIds build 12-Apr-2018 16:00:58 + os.output().width(width_lead); os << " "; build 12-Apr-2018 16:00:58 + os << spwset; // set includes "[ ]" build 12-Apr-2018 16:00:58 + // Avg Intervals build 12-Apr-2018 16:00:58 + os.output().width(width_lead); os << " "; build 12-Apr-2018 16:00:58 + os << intervalset; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // next lastday is this day build 12-Apr-2018 16:00:58 + lastday = day; build 12-Apr-2018 16:00:58 + iter->next(); build 12-Apr-2018 16:00:58 + } // while build 12-Apr-2018 16:00:58 + os << "(nRows = Total number of rows per scan) " << endl; build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + clearFormatFlags(os); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listAntenna (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + // Is field table present? build 12-Apr-2018 16:00:58 + ROCTColumns ctc(*pNCT); build 12-Apr-2018 16:00:58 + const ROCTAntennaColumns& ctAC(ctc.antenna()); build 12-Apr-2018 16:00:58 + if (ctAC.nrow()<=0) { build 12-Apr-2018 16:00:58 + os << "The ANTENNA table is empty" << endl; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + // Determine antennas present in the main table build 12-Apr-2018 16:00:58 + ROCTMainColumns ctmain(*pNCT); build 12-Apr-2018 16:00:58 + std::vector ant1col = ctmain.antenna1().getColumn().tovector(); build 12-Apr-2018 16:00:58 + std::set antIds = std::set(ant1col.begin(), ant1col.end()); build 12-Apr-2018 16:00:58 + std::vector ant2col = ctmain.antenna2().getColumn().tovector(); build 12-Apr-2018 16:00:58 + std::set ant2ids = std::set(ant2col.begin(), ant2col.end()); build 12-Apr-2018 16:00:58 + for (std::set::const_iterator iter=ant2ids.begin(); iter!= ant2ids.end(); ++iter) { build 12-Apr-2018 16:00:58 + antIds.insert(*iter); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + antIds.erase(-1); // remove invalid antenna id build 12-Apr-2018 16:00:58 + uInt nAnt = antIds.size(); build 12-Apr-2018 16:00:58 + casacore::Vector names = ctAC.name().getColumn(); build 12-Apr-2018 16:00:58 + casacore::Vector stations = ctAC.station().getColumn(); build 12-Apr-2018 16:00:58 + if (verbose) { build 12-Apr-2018 16:00:58 + // Detailed antenna list build 12-Apr-2018 16:00:58 + casacore::String indent(" "); build 12-Apr-2018 16:00:58 + casacore::uInt indwidth(5), build 12-Apr-2018 16:00:58 + namewidth(6), build 12-Apr-2018 16:00:58 + statwidth(10), build 12-Apr-2018 16:00:58 + diamwidth(5), build 12-Apr-2018 16:00:58 + latwidth(13), build 12-Apr-2018 16:00:58 + longwidth(14), build 12-Apr-2018 16:00:58 + offsetwidth(14), build 12-Apr-2018 16:00:58 + positionwidth(17); build 12-Apr-2018 16:00:58 + casacore::Int diamprec(1); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Position and diameter values for each antenna build 12-Apr-2018 16:00:58 + casacore::ROScalarMeasColumn antPos = ctAC.positionMeas(); build 12-Apr-2018 16:00:58 + Bool posIsITRF = (antPos(0).type() == MPosition::ITRF); build 12-Apr-2018 16:00:58 + casacore::ROScalarQuantColumn diameters = ctAC.dishDiameterQuant(); build 12-Apr-2018 16:00:58 + // Get observatory position info for antenna offsets build 12-Apr-2018 16:00:58 + // *not read from antenna table OFFSET column!* build 12-Apr-2018 16:00:58 + casacore::MPosition obsPos; build 12-Apr-2018 16:00:58 + casacore::String telname; build 12-Apr-2018 16:00:58 + bool doOffset = getObservatoryPosition(obsPos, telname); build 12-Apr-2018 16:00:58 + casacore::Double rObs, longObs, latObs; build 12-Apr-2018 16:00:58 + if (!doOffset) { build 12-Apr-2018 16:00:58 + os << "Warning: Telescope name '" << telname << "' is not recognized by CASA. Cannot compute offsets." << endl << endl; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + casacore::Vector obsXYZ = obsPos.get("m").getValue(); build 12-Apr-2018 16:00:58 + casacore::Double xo(obsXYZ[0]), yo(obsXYZ[1]), zo(obsXYZ[2]); build 12-Apr-2018 16:00:58 + rObs = sqrt(xo*xo + yo*yo + zo*zo); build 12-Apr-2018 16:00:58 + casacore::Vector obsLongLat = obsPos.getAngle("rad").getValue(); build 12-Apr-2018 16:00:58 + longObs = obsLongLat[0]; build 12-Apr-2018 16:00:58 + latObs = obsLongLat[1]; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os.output().setf(ios::fixed, ios::floatfield); build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + // Write the title: build 12-Apr-2018 16:00:58 + casacore::String title("Antennas: "+String::toString(nAnt)+":"); build 12-Apr-2018 16:00:58 + os << title << endl; build 12-Apr-2018 16:00:58 + // Write the column headings: build 12-Apr-2018 16:00:58 + os << indent; build 12-Apr-2018 16:00:58 + os.output().width(indwidth); os << "ID"; build 12-Apr-2018 16:00:58 + os.output().width(namewidth); os << "Name"; build 12-Apr-2018 16:00:58 + os.output().width(statwidth); os << "Station"; build 12-Apr-2018 16:00:58 + os.output().width(diamwidth+4); os << "Diam."; build 12-Apr-2018 16:00:58 + os.output().width(longwidth); os << "Long."; build 12-Apr-2018 16:00:58 + os.output().width(latwidth); os << "Lat."; build 12-Apr-2018 16:00:58 + if (doOffset) { build 12-Apr-2018 16:00:58 + os.output().width(3 * offsetwidth); build 12-Apr-2018 16:00:58 + os << " Offset from array center (m)"; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os.output().width(3 * positionwidth); build 12-Apr-2018 16:00:58 + os << " ITRF Geocentric coordinates (m)"; build 12-Apr-2018 16:00:58 + os << endl << indent; build 12-Apr-2018 16:00:58 + os.output().width(indwidth + namewidth + statwidth + diamwidth + 4 + longwidth + latwidth); build 12-Apr-2018 16:00:58 + os << " "; build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + if (doOffset) { build 12-Apr-2018 16:00:58 + os.output().width(offsetwidth); os << "East"; build 12-Apr-2018 16:00:58 + os.output().width(offsetwidth); os << "North"; build 12-Apr-2018 16:00:58 + os.output().width(offsetwidth); os << "Elevation"; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os.output().width(positionwidth); os << "x"; build 12-Apr-2018 16:00:58 + os.output().width(positionwidth); os << "y"; build 12-Apr-2018 16:00:58 + os.output().width(positionwidth); os << "z"; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + // Iterator through antennas and log info for each build 12-Apr-2018 16:00:58 + const static Unit diamUnit("m"); build 12-Apr-2018 16:00:58 + std::set::const_iterator iter = antIds.begin(); build 12-Apr-2018 16:00:58 + std::set::const_iterator end = antIds.end(); build 12-Apr-2018 16:00:58 + for (; iter!=end; ++iter) { build 12-Apr-2018 16:00:58 + Int antId = *iter; build 12-Apr-2018 16:00:58 + // diameter build 12-Apr-2018 16:00:58 + const Quantity& diam = diameters(antId); build 12-Apr-2018 16:00:58 + // xyz build 12-Apr-2018 16:00:58 + casacore::Vector xyz = antPos(antId).get("m").getValue(); build 12-Apr-2018 16:00:58 + casacore::Double x = xyz(0); build 12-Apr-2018 16:00:58 + casacore::Double y = xyz(1); build 12-Apr-2018 16:00:58 + casacore::Double z = xyz(2); build 12-Apr-2018 16:00:58 + casacore::Double rAnt = sqrt(x*x + y*y + z*z); build 12-Apr-2018 16:00:58 + // offsets build 12-Apr-2018 16:00:58 + const MPosition& mLongLat = antPos(antId); build 12-Apr-2018 16:00:58 + casacore::Vector antOffset; build 12-Apr-2018 16:00:58 + if (doOffset) { build 12-Apr-2018 16:00:58 + casacore::Vector longLatRad = mLongLat.getAngle("rad").getValue(); build 12-Apr-2018 16:00:58 + casacore::Double longAnt = longLatRad(0); build 12-Apr-2018 16:00:58 + casacore::Double latAnt = longLatRad(1); build 12-Apr-2018 16:00:58 + casacore::Vector offset(3); build 12-Apr-2018 16:00:58 + offset[0] = (longAnt - longObs) * rObs * cos(latObs); build 12-Apr-2018 16:00:58 + offset[1] = (latAnt - latObs) * rObs; build 12-Apr-2018 16:00:58 + offset[2] = rAnt - rObs; build 12-Apr-2018 16:00:58 + casacore::QVD qoffset(offset, "m"); build 12-Apr-2018 16:00:58 + antOffset = qoffset.getValue("m"); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // lat/long build 12-Apr-2018 16:00:58 + MVAngle mvLong = mLongLat.getAngle().getValue()(0); build 12-Apr-2018 16:00:58 + MVAngle mvLat = mLongLat.getAngle().getValue()(1); build 12-Apr-2018 16:00:58 + if (!posIsITRF) { build 12-Apr-2018 16:00:58 + MeasConvert toItrf(antPos(antId), MPosition::ITRF); build 12-Apr-2018 16:00:58 + antPos(antId) = toItrf(antPos(antId)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // write the row build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os << indent; build 12-Apr-2018 16:00:58 + // ID, Name, Station build 12-Apr-2018 16:00:58 + os.output().width(indwidth); os << antId; build 12-Apr-2018 16:00:58 + os.output().width(namewidth); os << names(antId); build 12-Apr-2018 16:00:58 + os.output().width(statwidth); os << stations(antId); build 12-Apr-2018 16:00:58 + // Diam. build 12-Apr-2018 16:00:58 + os.output().precision(diamprec); build 12-Apr-2018 16:00:58 + os.output().width(diamwidth); build 12-Apr-2018 16:00:58 + os << diam.getValue(diamUnit) << "m "; build 12-Apr-2018 16:00:58 + // Long. and Lat. build 12-Apr-2018 16:00:58 + os.output().width(longwidth); build 12-Apr-2018 16:00:58 + os << mvLong.string(MVAngle::ANGLE,7); build 12-Apr-2018 16:00:58 + os.output().width(latwidth); build 12-Apr-2018 16:00:58 + os << mvLat.string(MVAngle::DIG2,7); build 12-Apr-2018 16:00:58 + if (doOffset) { build 12-Apr-2018 16:00:58 + // Offset from array center (m) (East, North, Elevation) build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().precision(4); build 12-Apr-2018 16:00:58 + os.output().width(offsetwidth); os << antOffset(0); build 12-Apr-2018 16:00:58 + os.output().width(offsetwidth); os << antOffset(1); build 12-Apr-2018 16:00:58 + os.output().width(offsetwidth); os << antOffset(2); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // ITRF Geocentric coordinates (m) (x, y, z) build 12-Apr-2018 16:00:58 + os.output().precision(6); build 12-Apr-2018 16:00:58 + os.output().width(positionwidth); os << x; build 12-Apr-2018 16:00:58 + os.output().width(positionwidth); os << y; build 12-Apr-2018 16:00:58 + os.output().width(positionwidth); os << z; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + // Horizontal list of the stations names: build 12-Apr-2018 16:00:58 + os << "Antennas: " << nAnt << " ('name'='station') " << endl; build 12-Apr-2018 16:00:58 + casacore::String line, leader; build 12-Apr-2018 16:00:58 + // track last id of previous line for leader build 12-Apr-2018 16:00:58 + casacore::Int lastIdInLine = *antIds.begin() - 1; build 12-Apr-2018 16:00:58 + std::set::const_iterator iter = antIds.begin(); build 12-Apr-2018 16:00:58 + std::set::const_iterator end = antIds.end(); build 12-Apr-2018 16:00:58 + casacore::Int maxAnt = *std::max_element(antIds.begin(), antIds.end()); build 12-Apr-2018 16:00:58 + for (; iter!=end; ++iter) { build 12-Apr-2018 16:00:58 + Int antId = *iter; build 12-Apr-2018 16:00:58 + // Build the line build 12-Apr-2018 16:00:58 + line = line + "'" + names(antId) + "'" + "="; build 12-Apr-2018 16:00:58 + line = line + "'" + stations(antId) + "'"; build 12-Apr-2018 16:00:58 + // Add comma if not at the end build 12-Apr-2018 16:00:58 + if (antId != maxAnt) line = line + ", "; build 12-Apr-2018 16:00:58 + if (line.length() > 55 || antId == maxAnt) { build 12-Apr-2018 16:00:58 + // This line is finished, dump it after the line leader build 12-Apr-2018 16:00:58 + leader = String::toString(lastIdInLine+1) + "-" + String::toString(antId) +": "; build 12-Apr-2018 16:00:58 + os << " ID="; build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(8); os << leader; build 12-Apr-2018 16:00:58 + os << line << endl; build 12-Apr-2018 16:00:58 + line = ""; build 12-Apr-2018 16:00:58 + lastIdInLine = antId; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + clearFormatFlags(os); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +bool CTSummary::getObservatoryPosition(casacore::MPosition& obspos, build 12-Apr-2018 16:00:58 + casacore::String& name) const { build 12-Apr-2018 16:00:58 + // Returns observatory position in ITRF build 12-Apr-2018 16:00:58 + // get telescope name build 12-Apr-2018 16:00:58 + bool obsposOk; build 12-Apr-2018 16:00:58 + ROCTColumns ctc(*pNCT); build 12-Apr-2018 16:00:58 + const ROCTObservationColumns& ctOC(ctc.observation()); build 12-Apr-2018 16:00:58 + name = ctOC.telescopeName().getColumn()(0); build 12-Apr-2018 16:00:58 + obsposOk = MeasTable::Observatory(obspos, name); build 12-Apr-2018 16:00:58 + if (obsposOk && (obspos.type() != MPosition::ITRF)) { build 12-Apr-2018 16:00:58 + MeasConvert toItrf(obspos, MPosition::ITRF); build 12-Apr-2018 16:00:58 + obspos = toItrf(obspos); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return obsposOk; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listField (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + // Is field table present? build 12-Apr-2018 16:00:58 + ROCTColumns ctc(*pNCT); build 12-Apr-2018 16:00:58 + const ROCTFieldColumns& ctFC(ctc.field()); build 12-Apr-2018 16:00:58 + if (ctFC.nrow() <= 0) { build 12-Apr-2018 16:00:58 + os << "The FIELD table is empty" << endl; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + // only list fields in main table build 12-Apr-2018 16:00:58 + ROCTMainColumns ctmain(*pNCT); build 12-Apr-2018 16:00:58 + std::vector fieldcol = ctmain.fieldId().getColumn().tovector(); build 12-Apr-2018 16:00:58 + std::set fieldIds = std::set(fieldcol.begin(), fieldcol.end()); build 12-Apr-2018 16:00:58 + os << "Fields: " << fieldIds.size() << endl; build 12-Apr-2018 16:00:58 + casacore::Int widthLead(2), build 12-Apr-2018 16:00:58 + widthField(6), build 12-Apr-2018 16:00:58 + widthCode(5), build 12-Apr-2018 16:00:58 + widthName(20), build 12-Apr-2018 16:00:58 + widthRA(16), build 12-Apr-2018 16:00:58 + widthDec(16), build 12-Apr-2018 16:00:58 + widthType(8), build 12-Apr-2018 16:00:58 + widthSrc(6); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (verbose) {} // null, always same output build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Line is ID Code Name Name RA Dec Type build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(widthLead); os << " "; build 12-Apr-2018 16:00:58 + os.output().width(widthField); os << "FldId"; build 12-Apr-2018 16:00:58 + os.output().width(widthCode); os << "Code"; build 12-Apr-2018 16:00:58 + os.output().width(widthName); os << "Name"; build 12-Apr-2018 16:00:58 + os.output().width(widthRA); os << "RA"; build 12-Apr-2018 16:00:58 + os.output().width(widthDec); os << " Decl"; build 12-Apr-2018 16:00:58 + os.output().width(widthType); os << "Epoch"; build 12-Apr-2018 16:00:58 + os.output().width(widthSrc); os << "SrcId"; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + // get column values build 12-Apr-2018 16:00:58 + casacore::Vector fieldNames = ctFC.name().getColumn(); build 12-Apr-2018 16:00:58 + casacore::Vector codes = ctFC.code().getColumn(); build 12-Apr-2018 16:00:58 + casacore::ROArrayMeasColumn phaseDirs = ctFC.phaseDirMeasCol(); build 12-Apr-2018 16:00:58 + casacore::Vector sourceIds = ctFC.sourceId().getColumn(); build 12-Apr-2018 16:00:58 + // loop through fields build 12-Apr-2018 16:00:58 + std::set::const_iterator fiter = fieldIds.begin(); build 12-Apr-2018 16:00:58 + std::set::const_iterator fend = fieldIds.end(); build 12-Apr-2018 16:00:58 + static const MEpoch ezero(Quantity(0, "s")); build 12-Apr-2018 16:00:58 + //vector sourceIDs = _msmd->getFieldTableSourceIDs(); build 12-Apr-2018 16:00:58 + for (; fiter!=fend; ++fiter) { build 12-Apr-2018 16:00:58 + Int fieldId = *fiter; build 12-Apr-2018 16:00:58 + if (fieldId >=0) { build 12-Apr-2018 16:00:58 + casacore::MDirection mRaDec = phaseDirs(fieldId)(IPosition(1,0)); build 12-Apr-2018 16:00:58 + MVAngle mvRa = mRaDec.getAngle().getValue()(0); build 12-Apr-2018 16:00:58 + MVAngle mvDec = mRaDec.getAngle().getValue()(1); build 12-Apr-2018 16:00:58 + String name = fieldNames(fieldId); build 12-Apr-2018 16:00:58 + if (name.length()>20) build 12-Apr-2018 16:00:58 + name.replace(19,1,"*"); build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(widthLead); os << " "; build 12-Apr-2018 16:00:58 + os.output().width(widthField); os << fieldId; build 12-Apr-2018 16:00:58 + os.output().width(widthCode); os << codes(fieldId); build 12-Apr-2018 16:00:58 + os.output().width(widthName); os << name.at(0,20); build 12-Apr-2018 16:00:58 + os.output().width(widthRA); os << mvRa(0.0).string(MVAngle::TIME,12); build 12-Apr-2018 16:00:58 + os.output().width(widthDec); os << mvDec.string(MVAngle::DIG2,11); build 12-Apr-2018 16:00:58 + os.output().width(widthType); build 12-Apr-2018 16:00:58 + os << MDirection::showType(mRaDec.getRefPtr()->getType()); build 12-Apr-2018 16:00:58 + os.output().width(widthSrc); os << sourceIds[fieldId]; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(widthLead); os << " "; build 12-Apr-2018 16:00:58 + os.output().width(widthField); os << fieldId; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << endl << LogIO::POST; build 12-Apr-2018 16:00:58 + clearFormatFlags(os); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listObservation (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + ROCTColumns ctc(*pNCT); build 12-Apr-2018 16:00:58 + const ROCTObservationColumns& ctOC(ctc.observation()); build 12-Apr-2018 16:00:58 + if (ctOC.nrow() <= 0) { build 12-Apr-2018 16:00:58 + os << "The OBSERVATION table is empty" << endl; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + os << " Observer: " << ctOC.observer()(0) << " " build 12-Apr-2018 16:00:58 + << " Project: " << ctOC.project()(0) << " " << endl; build 12-Apr-2018 16:00:58 + os << " Observation: " << ctOC.telescopeName()(0) << endl << endl; build 12-Apr-2018 16:00:58 + if (verbose) { build 12-Apr-2018 16:00:58 + // only list obsids in main table build 12-Apr-2018 16:00:58 + ROCTMainColumns ctmain(*pNCT); build 12-Apr-2018 16:00:58 + std::vector obsidcol = ctmain.obsId().getColumn().tovector(); build 12-Apr-2018 16:00:58 + std::set obsIds = std::set(obsidcol.begin(), obsidcol.end()); build 12-Apr-2018 16:00:58 + // for timeranges build 12-Apr-2018 16:00:58 + casacore::IPosition first(1,0); build 12-Apr-2018 16:00:58 + casacore::IPosition second(1,1); build 12-Apr-2018 16:00:58 + casacore::String timeref = ctOC.timeRange().keywordSet().subRecord("MEASINFO").asString("Ref"); build 12-Apr-2018 16:00:58 + // time range (Date) format is e.g. 00:00:46.0-01:43:50.2 build 12-Apr-2018 16:00:58 + casacore::Int widthTel(10), widthDate(36), widthObs(20), widthProj(15); build 12-Apr-2018 16:00:58 + // column headings build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(widthTel); os << "Telescope"; build 12-Apr-2018 16:00:58 + casacore::String timeHeader = "Timerange (" + timeref + ")"; build 12-Apr-2018 16:00:58 + os.output().width(widthDate); os << timeHeader; build 12-Apr-2018 16:00:58 + os.output().width(widthObs); os << "Observer"; build 12-Apr-2018 16:00:58 + os.output().width(widthProj); os << "Project"; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + // get columns build 12-Apr-2018 16:00:58 + casacore::Vector telname = ctOC.telescopeName().getColumn(); build 12-Apr-2018 16:00:58 + casacore::Array timerange = ctOC.timeRange().getColumn(); build 12-Apr-2018 16:00:58 + casacore::Vector observer = ctOC.observer().getColumn(); build 12-Apr-2018 16:00:58 + casacore::Vector project = ctOC.project().getColumn(); build 12-Apr-2018 16:00:58 + // print each obsid row build 12-Apr-2018 16:00:58 + std::set::const_iterator iter = obsIds.begin(); build 12-Apr-2018 16:00:58 + std::set::const_iterator end = obsIds.end(); build 12-Apr-2018 16:00:58 + for (; iter!=end; ++iter) { build 12-Apr-2018 16:00:58 + casacore::Int obsid = *iter; build 12-Apr-2018 16:00:58 + if (obsid >= 0) { build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(widthTel); os << telname(obsid); build 12-Apr-2018 16:00:58 + casacore::Double start = timerange(IPosition(2, 0, obsid)); build 12-Apr-2018 16:00:58 + casacore::Double end = timerange(IPosition(2, 1, obsid)); build 12-Apr-2018 16:00:58 + casacore::String range = MVTime(start/C::day).string(MVTime::YMD,7) + " - " build 12-Apr-2018 16:00:58 + + MVTime(end/C::day).string(MVTime::TIME,7); build 12-Apr-2018 16:00:58 + os.output().width(widthDate); os << range; build 12-Apr-2018 16:00:58 + os.output().width(widthObs); os << observer(obsid); build 12-Apr-2018 16:00:58 + os.output().width(widthProj); os << project(obsid); build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + clearFormatFlags(os); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +String formatTime(const Double time) { build 12-Apr-2018 16:00:58 + MVTime mvtime(Quantity(time, "s")); build 12-Apr-2018 16:00:58 + Time t=mvtime.getTime(); build 12-Apr-2018 16:00:58 + ostringstream os; build 12-Apr-2018 16:00:58 + os << t; build 12-Apr-2018 16:00:58 + return os.str(); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listHistory (LogIO& os) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + // Create a history object build 12-Apr-2018 16:00:58 + ROCTHistoryColumns ctHist(pNCT->history()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (ctHist.nrow()<=0) { build 12-Apr-2018 16:00:58 + os << "The HISTORY table is empty" << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + uInt nmessages = ctHist.time().nrow(); build 12-Apr-2018 16:00:58 + os << "History table entries: " << nmessages << endl << LogIO::POST; build 12-Apr-2018 16:00:58 + const ROScalarColumn &theTimes((ctHist.time())); build 12-Apr-2018 16:00:58 + const ROScalarColumn &messOrigin((ctHist.origin())); build 12-Apr-2018 16:00:58 + const ROScalarColumn &messString((ctHist.message())); build 12-Apr-2018 16:00:58 + const ROScalarColumn &messPriority((ctHist.priority())); build 12-Apr-2018 16:00:58 + for (uInt i=0 ; i < nmessages; i++) { build 12-Apr-2018 16:00:58 + Quantity tmpq(theTimes(i), "s"); build 12-Apr-2018 16:00:58 + MVTime mvtime(tmpq); build 12-Apr-2018 16:00:58 + Time messTime(mvtime.getTime()); build 12-Apr-2018 16:00:58 + LogMessage::Priority itsPriority(LogMessage::NORMAL); build 12-Apr-2018 16:00:58 + if(messPriority(i) == "DEBUGGING"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::DEBUGGING; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "DEBUG2"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::DEBUG2; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "DEBUG1"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::DEBUG1; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "NORMAL5" || build 12-Apr-2018 16:00:58 + messPriority(i) == "INFO5"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::NORMAL5; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "NORMAL4" || build 12-Apr-2018 16:00:58 + messPriority(i) == "INFO4"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::NORMAL4; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "NORMAL3" || build 12-Apr-2018 16:00:58 + messPriority(i) == "INFO3"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::NORMAL3; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "NORMAL2" || build 12-Apr-2018 16:00:58 + messPriority(i) == "INFO2"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::NORMAL2; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "NORMAL1" || build 12-Apr-2018 16:00:58 + messPriority(i) == "INFO1"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::NORMAL1; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "NORMAL" || build 12-Apr-2018 16:00:58 + messPriority(i) == "INFO"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::NORMAL; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "WARN"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::WARN; build 12-Apr-2018 16:00:58 + } else if(messPriority(i) == "SEVERE"){ build 12-Apr-2018 16:00:58 + itsPriority = LogMessage::SEVERE; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + LogOrigin orhist(messOrigin(i)); build 12-Apr-2018 16:00:58 + LogMessage histMessage(messString(i), orhist.taskName("listHistory"), itsPriority); build 12-Apr-2018 16:00:58 + histMessage.messageTime(messTime); build 12-Apr-2018 16:00:58 + os.post(histMessage); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void CTSummary::listSpectralWindow (LogIO& os, Bool verbose) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + ROCTColumns ctc(*pNCT); build 12-Apr-2018 16:00:58 + const ROCTSpWindowColumns& ctSW(ctc.spectralWindow()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (verbose) {} //null; always the same output build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (ctSW.refFrequency().nrow()<=0) { build 12-Apr-2018 16:00:58 + os << "The SPECTRAL_WINDOW table is empty" << endl; build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + casacore::uInt nrow = ctSW.refFrequency().nrow(); build 12-Apr-2018 16:00:58 + os << "Spectral Windows: " << nrow << endl; build 12-Apr-2018 16:00:58 + // Header: SpwId Ref.Freq #Chans Resolution TotalBW build 12-Apr-2018 16:00:58 + casacore::Int widthLead(2), widthId(7), widthFreq(18), widthNumChan(8); build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(widthLead); os << " "; build 12-Apr-2018 16:00:58 + os.output().width(widthId); os << "SpwId"; build 12-Apr-2018 16:00:58 + os.output().width(widthFreq); os << "Ref.Freq (MHz)"; build 12-Apr-2018 16:00:58 + os.output().width(widthNumChan); os << "#Chans"; build 12-Apr-2018 16:00:58 + os.output().width(widthFreq); os << "Resolution (kHz)"; build 12-Apr-2018 16:00:58 + os.output().width(widthFreq); os << "TotalBW (kHz)"; build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // For each row of the SpWin subtable, write the info build 12-Apr-2018 16:00:58 + for (uInt row=0; row tableRows(6); build 12-Apr-2018 16:00:58 + tableRows(0) = nrow(); build 12-Apr-2018 16:00:58 + tableRows(1) = pNCT->observation().nrow(); build 12-Apr-2018 16:00:58 + tableRows(2) = pNCT->antenna().nrow(); build 12-Apr-2018 16:00:58 + tableRows(3) = pNCT->field().nrow(); build 12-Apr-2018 16:00:58 + tableRows(4) = pNCT->spectralWindow().nrow(); build 12-Apr-2018 16:00:58 + tableRows(5) = pNCT->history().nrow(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + casacore::Vector tableStrings(6); build 12-Apr-2018 16:00:58 + tableStrings(0) = "MAIN"; build 12-Apr-2018 16:00:58 + tableStrings(1) = "OBSERVATION"; build 12-Apr-2018 16:00:58 + tableStrings(2) = "ANTENNA"; build 12-Apr-2018 16:00:58 + tableStrings(3) = "FIELD"; build 12-Apr-2018 16:00:58 + tableStrings(4) = "SPECTRAL_WINDOW"; build 12-Apr-2018 16:00:58 + tableStrings(5) = "HISTORY"; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Just to make things read better build 12-Apr-2018 16:00:58 + casacore::Vector rowStrings(6); build 12-Apr-2018 16:00:58 + rowStrings = " rows"; build 12-Apr-2018 16:00:58 + for (uInt i=0; i<6; i++) { build 12-Apr-2018 16:00:58 + if (tableRows(i)==1) rowStrings(i) = " row"; build 12-Apr-2018 16:00:58 + // if table exists, but empty: build 12-Apr-2018 16:00:58 + if (tableRows(i)==0) rowStrings(i) = " "; build 12-Apr-2018 16:00:58 + // if table absent: build 12-Apr-2018 16:00:58 + if (tableRows(i)==-1) rowStrings(i) = ""; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (verbose) { build 12-Apr-2018 16:00:58 + os << " Tables" << endl; build 12-Apr-2018 16:00:58 + for (uInt i=0; i<6; i++) { build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(3); os << " "; build 12-Apr-2018 16:00:58 + os.output().width(20); os << tableStrings(i); build 12-Apr-2018 16:00:58 + os.output().setf(ios::right, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(8); os << tableRows(i); build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + os.output().width(10); os << rowStrings(i); build 12-Apr-2018 16:00:58 + os << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 + os << " Tables (rows): (-1 = table absent)" << endl; build 12-Apr-2018 16:00:58 + for (uInt i=0; i<6; i++) { build 12-Apr-2018 16:00:58 + casacore::String tableinfo = tableStrings(i) + " (" + build 12-Apr-2018 16:00:58 + casacore::String::toString(tableRows(i)) + ")"; build 12-Apr-2018 16:00:58 + os.output().setf(ios::left, ios::adjustfield); build 12-Apr-2018 16:00:58 + casacore::Int infowidth = 15; build 12-Apr-2018 16:00:58 + if (i==1 || i==4) infowidth = 25; build 12-Apr-2018 16:00:58 + os.output().width(infowidth); build 12-Apr-2018 16:00:58 + os << tableinfo; build 12-Apr-2018 16:00:58 + if ((i+1) % 3==0) os << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << LogIO::POST; build 12-Apr-2018 16:00:58 + clearFormatFlags(os); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// Clear all the formatting flags build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +void CTSummary::clearFormatFlags(LogIO& os) const build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::left); build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::right); build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::internal); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::dec); build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::oct); build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::hex); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::showbase | ios::showpos | ios::uppercase | ios::showpoint); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::scientific); build 12-Apr-2018 16:00:58 + os.output().unsetf(ios::fixed); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTSummary.h b/code/synthesis/CalTables/CTSummary.h build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..9bfb023 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTSummary.h build 12-Apr-2018 16:00:58 @@ -0,0 +1,159 @@ build 12-Apr-2018 16:00:58 +//# CTSummary.h: Helper class for listing a NewCalHeader build 12-Apr-2018 16:00:58 +//# Copyright (C) 2017 build 12-Apr-2018 16:00:58 +//# Associated Universities, Inc. Washington DC, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This library is free software; you can redistribute it and/or modify it build 12-Apr-2018 16:00:58 +//# under the terms of the GNU Library General Public License as published by build 12-Apr-2018 16:00:58 +//# the Free Software Foundation; either version 2 of the License, or (at your build 12-Apr-2018 16:00:58 +//# option) any later version. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This library is distributed in the hope that it will be useful, but WITHOUT build 12-Apr-2018 16:00:58 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 12-Apr-2018 16:00:58 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public build 12-Apr-2018 16:00:58 +//# License for more details. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# You should have received a copy of the GNU Library General Public License build 12-Apr-2018 16:00:58 +//# along with this library; if not, write to the Free Software Foundation, build 12-Apr-2018 16:00:58 +//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# Correspondence concerning AIPS++ should be addressed as follows: build 12-Apr-2018 16:00:58 +//# Internet email: aips2-request@nrao.edu. build 12-Apr-2018 16:00:58 +//# Postal address: AIPS++ Project Office build 12-Apr-2018 16:00:58 +//# National Radio Astronomy Observatory build 12-Apr-2018 16:00:58 +//# 520 Edgemont Road build 12-Apr-2018 16:00:58 +//# Charlottesville, VA 22903-2475 USA build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# $Id$ build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +#ifndef CALIBRATION_CTSUMMARY_H build 12-Apr-2018 16:00:58 +#define CALIBRATION_CTSUMMARY_H build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +class NewCalTable; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Provides and lists information about the header of a build 12-Apr-2018 16:00:58 +// calibration table. Based on MSSummary build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +//
  • NewCalTable build 12-Apr-2018 16:00:58 +//
  • MSSummary build 12-Apr-2018 16:00:58 +//
  • Coordinates build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// This class lists the ancilliary or header information from a build 12-Apr-2018 16:00:58 +// NewCalTable in a Summary format. build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// NCTs consist of pixels and descriptive information stored in what build 12-Apr-2018 16:00:58 +// is loosely termed the header. This is information describing the build 12-Apr-2018 16:00:58 +// coordinate system, the image units etc. This class enables you to build 12-Apr-2018 16:00:58 +// retrieve the descriptive header information and/or list it. build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// NewCalTable inputCT(fileName); build 12-Apr-2018 16:00:58 +// CTSummary header(inputCT); build 12-Apr-2018 16:00:58 +// LogOrigin or("myClass", "myFunction(...)", WHERE); build 12-Apr-2018 16:00:58 +// LogIO os(or); build 12-Apr-2018 16:00:58 +// header.list(os); build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// A NewCalTable object is constructed and then logged build 12-Apr-2018 16:00:58 +// to the supplied LogIO object. build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// The viewing of the cal table header is a basic capability that is build 12-Apr-2018 16:00:58 +// commonly required. build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +class CTSummary build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 +public: build 12-Apr-2018 16:00:58 +// Constructor build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 + CTSummary (const NewCalTable& ct); build 12-Apr-2018 16:00:58 + CTSummary (const NewCalTable* ct); build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Destructor build 12-Apr-2018 16:00:58 + ~CTSummary(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Retrieve number of rows build 12-Apr-2018 16:00:58 + casacore::Int nrow() const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Retrieve caltable name build 12-Apr-2018 16:00:58 + casacore::String name() const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Set a new NCT. build 12-Apr-2018 16:00:58 + casacore::Bool setNCT (const NewCalTable& ct); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// List all header information. build 12-Apr-2018 16:00:58 + void list (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// List a title for the Summary. build 12-Apr-2018 16:00:58 + void listTitle (casacore::LogIO& os) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// List convenient groupings of tables: build 12-Apr-2018 16:00:58 +// List where CT obtained (Observation table) build 12-Apr-2018 16:00:58 + void listWhere (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 +// List what was observed (Field and Main tables) build 12-Apr-2018 16:00:58 + void listWhat (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 +// List how data were obtained (SpectralWindow and Antenna tables) build 12-Apr-2018 16:00:58 + void listHow (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// List main table build 12-Apr-2018 16:00:58 + void listMain (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// List subtables build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 + void listObservation (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + void listField (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + void listAntenna (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + void listSpectralWindow (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + void listHistory (casacore::LogIO& os) const; build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// List table size summary build 12-Apr-2018 16:00:58 + void listTables (casacore::LogIO& os, casacore::Bool verbose=false) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +private: build 12-Apr-2018 16:00:58 +// Pointer to NewCalTable build 12-Apr-2018 16:00:58 + const NewCalTable* pNCT; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Formatting strings build 12-Apr-2018 16:00:58 + const casacore::String dashlin1, dashlin2; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Needed for antenna offsets build 12-Apr-2018 16:00:58 + bool getObservatoryPosition(casacore::MPosition& obspos, build 12-Apr-2018 16:00:58 + casacore::String& name) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Clear formatting flags build 12-Apr-2018 16:00:58 + void clearFormatFlags (casacore::LogIO& os) const; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// For keeping track of the number of vis per field build 12-Apr-2018 16:00:58 + mutable casacore::Vector nVisPerField_; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Name of the CT used in the constructor build 12-Apr-2018 16:00:58 + casacore::String ctname_p; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +}; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/CTTimeInterp1.cc b/code/synthesis/CalTables/CTTimeInterp1.cc build 12-Apr-2018 16:00:58 index f922426..9fe81c4 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/CTTimeInterp1.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/CTTimeInterp1.cc build 12-Apr-2018 16:00:58 @@ -156,11 +156,26 @@ Bool CTTimeInterp1::interpolate(Double newtime) { build 12-Apr-2018 16:00:58 if (newReg || (!exact && lastWasExact_)) { build 12-Apr-2018 16:00:58 // Only bother if not 'nearest' nor exact... build 12-Apr-2018 16:00:58 if (!timeType().contains("nearest") && !exact) { build 12-Apr-2018 16:00:58 - ScalarSampledFunctional xf(timelist_(Slice(newIdx,2))); build 12-Apr-2018 16:00:58 - Vector rows(2); indgen(rows); rows+=uInt(newIdx); build 12-Apr-2018 16:00:58 - Array ya(mcols_p->fparamArray("",rows)); build 12-Apr-2018 16:00:58 - ArraySampledFunctional > yf(ya); build 12-Apr-2018 16:00:58 - tInterpolator_p->setData(xf,yf,true); build 12-Apr-2018 16:00:58 + if (timeType().contains("linear")) { build 12-Apr-2018 16:00:58 + ScalarSampledFunctional xf(timelist_(Slice(newIdx,2))); build 12-Apr-2018 16:00:58 + Vector rows(2); indgen(rows); rows+=uInt(newIdx); build 12-Apr-2018 16:00:58 + Array ya(mcols_p->fparamArray("",rows)); build 12-Apr-2018 16:00:58 + ArraySampledFunctional > yf(ya); build 12-Apr-2018 16:00:58 + tInterpolator_p->setData(xf,yf,true); build 12-Apr-2018 16:00:58 + } else if (timeType().contains("cubic")) { // Added for CAS-10787 (16/2/2018 WK) build 12-Apr-2018 16:00:58 + Int newIdxCubic(newIdx-1); build 12-Apr-2018 16:00:58 + if (newIdxCubic < 0) { build 12-Apr-2018 16:00:58 + newIdxCubic = 0; build 12-Apr-2018 16:00:58 + } else if (newIdxCubic > (Int)timelist_.nelements()-4) { build 12-Apr-2018 16:00:58 + newIdxCubic = timelist_.nelements()-4; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + //cout << "{newIdxCubic = " << newIdxCubic << " / " << timelist_.nelements() << "}" << flush; build 12-Apr-2018 16:00:58 + ScalarSampledFunctional xf(timelist_(Slice(newIdxCubic,4))); build 12-Apr-2018 16:00:58 + Vector rows(4); indgen(rows); rows+=uInt(newIdxCubic); build 12-Apr-2018 16:00:58 + Array ya(mcols_p->fparamArray("",rows)); build 12-Apr-2018 16:00:58 + ArraySampledFunctional > yf(ya); build 12-Apr-2018 16:00:58 + tInterpolator_p->setData(xf,yf,true); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 @@ -178,6 +193,8 @@ Bool CTTimeInterp1::interpolate(Double newtime) { build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 if (CTTIMEINTERPVERB1) cout << " non-trivial non-nearest" << endl; build 12-Apr-2018 16:00:58 // Delegate to the interpolator build 12-Apr-2018 16:00:58 + // The next line is needed to restore the given interpolation type, which has been overwritten to linear in setData() above - CAS-10787 (16/2/2018 WK) build 12-Apr-2018 16:00:58 + setInterpType(timeType()); build 12-Apr-2018 16:00:58 result_=(*tInterpolator_p)(fnewtime); build 12-Apr-2018 16:00:58 rflag_=(flaglist_.xyPlane(newIdx) || flaglist_.xyPlane(newIdx+1)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -231,6 +248,14 @@ void CTTimeInterp1::setInterpType(String strtype) { build 12-Apr-2018 16:00:58 tInterpolator_p->setMethod(Interpolate1D >::linear); build 12-Apr-2018 16:00:58 return; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + if (strtype.contains("cubic")) { build 12-Apr-2018 16:00:58 + tInterpolator_p->setMethod(Interpolate1D >::cubic); build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (strtype.contains("spline")) { build 12-Apr-2018 16:00:58 + tInterpolator_p->setMethod(Interpolate1D >::spline); build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 throw(AipsError("Unknown interp type: '"+strtype+"'!!")); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/NewCalTable.cc b/code/synthesis/CalTables/NewCalTable.cc build 12-Apr-2018 16:00:58 index c52504d..2965d52 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/NewCalTable.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/NewCalTable.cc build 12-Apr-2018 16:00:58 @@ -468,6 +468,15 @@ String NewCalTable::polBasis() { build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //---------------------------------------------------------------------------- build 12-Apr-2018 16:00:58 +String NewCalTable::CASAvers() { build 12-Apr-2018 16:00:58 + if (this->keywordSet().fieldNumber("CASA_Version")==-1) build 12-Apr-2018 16:00:58 + // Handle non-existent keyword build 12-Apr-2018 16:00:58 + return String("Unknown"); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + return this->keywordSet().asString("CASA_Version"); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +//---------------------------------------------------------------------------- build 12-Apr-2018 16:00:58 Record NewCalTable::getRowMain (const Int& jrow) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 // Get a row from cal_main build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/NewCalTable.h b/code/synthesis/CalTables/NewCalTable.h build 12-Apr-2018 16:00:58 index 7e72caa..9fcf605 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/NewCalTable.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/NewCalTable.h build 12-Apr-2018 16:00:58 @@ -198,6 +198,9 @@ class NewCalTable : public casacore::Table build 12-Apr-2018 16:00:58 // Report the polarization basis (from header record) build 12-Apr-2018 16:00:58 casacore::String polBasis(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Report the CASA version at which the NCT was created (from header) build 12-Apr-2018 16:00:58 + casacore::String CASAvers(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Get a row from cal_main build 12-Apr-2018 16:00:58 casacore::Record getRowMain (const casacore::Int& jrow); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/CalTables/test/tCTTimeInterp1.cc b/code/synthesis/CalTables/test/tCTTimeInterp1.cc build 12-Apr-2018 16:00:58 index b9a1b65..1745d0c 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/CalTables/test/tCTTimeInterp1.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/CalTables/test/tCTTimeInterp1.cc build 12-Apr-2018 16:00:58 @@ -103,7 +103,7 @@ void doTest1 (Bool verbose=false) { build 12-Apr-2018 16:00:58 // Matrix c(f.c()); build 12-Apr-2018 16:00:58 Complex rc=Matrix(f.c())(0,0); build 12-Apr-2018 16:00:58 Float diff=abs(rc-cfval); build 12-Apr-2018 16:00:58 - if (verbose) build 12-Apr-2018 16:00:58 + //if (verbose) build 12-Apr-2018 16:00:58 cout << "t="<(f.c())(0,0); build 12-Apr-2018 16:00:58 + Float diff=abs(rc-cfval); build 12-Apr-2018 16:00:58 + //if (verbose) build 12-Apr-2018 16:00:58 cout << "t="<interactivemask(imageName, maskName, build 12-Apr-2018 16:00:58 // niter, ncycles, threshold); build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 ret = interactiveMasker_p->interactivemask(imageName, maskName, build 12-Apr-2018 16:00:58 niter, cycleniter, threshold, cyclethreshold); build 12-Apr-2018 16:00:58 cout << "After interaction : niter : " << niter << " cycleniter : " << cycleniter << " thresh : " << threshold << " cyclethresh : " << cyclethreshold << " ------ ret : " << ret << endl; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 return ret; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -720,7 +726,9 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void SDMaskHandler::autoMask(SHARED_PTR imstore, build 12-Apr-2018 16:00:58 + TempImage& posmask, build 12-Apr-2018 16:00:58 const Int iterdone, build 12-Apr-2018 16:00:58 + Vector& chanflag, build 12-Apr-2018 16:00:58 const String& alg, build 12-Apr-2018 16:00:58 const String& threshold, build 12-Apr-2018 16:00:58 const Float& fracofpeak, build 12-Apr-2018 16:00:58 @@ -737,6 +745,10 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 const Float& smoothfactor, build 12-Apr-2018 16:00:58 const Float& minbeamfrac, build 12-Apr-2018 16:00:58 const Int growiterations, build 12-Apr-2018 16:00:58 + const Bool dogrowprune, build 12-Apr-2018 16:00:58 + const Float& minpercentchange, build 12-Apr-2018 16:00:58 + const Bool verbose, build 12-Apr-2018 16:00:58 + const Bool isthresholdreached, build 12-Apr-2018 16:00:58 Float pblimit) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 LogIO os( LogOrigin("SDMaskHandler","autoMask",WHERE) ); build 12-Apr-2018 16:00:58 @@ -921,7 +933,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 os<< LogIO::DEBUG1 << "All MAD's on the input image -- mad.nelements()="<psf(), qreso, resbybeam, qthresh, fracofpeak, thestats, sigma, nmask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else if (alg==String("multithresh")) { build 12-Apr-2018 16:00:58 - autoMaskByMultiThreshold(*tempmask, *tempres, *imstore->psf(), thestats, iterdone, itsSidelobeLevel, sidelobethreshold, build 12-Apr-2018 16:00:58 - noisethreshold, lownoisethreshold, negativethreshold, cutthreshold, smoothfactor, minbeamfrac, growiterations); build 12-Apr-2018 16:00:58 + autoMaskByMultiThreshold(*tempmask, posmask, *tempres, *imstore->psf(), thestats, iterdone, chanflag, minpercentchange, itsSidelobeLevel, sidelobethreshold, build 12-Apr-2018 16:00:58 + noisethreshold, lownoisethreshold, negativethreshold, cutthreshold, smoothfactor, minbeamfrac, growiterations, dogrowprune, verbose, isthresholdreached); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // this did not work (it won't physically remove the mask from the image build 12-Apr-2018 16:00:58 @@ -1299,10 +1311,13 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // for implemtation of Amanda's algorithm build 12-Apr-2018 16:00:58 void SDMaskHandler::autoMaskByMultiThreshold(ImageInterface& mask, build 12-Apr-2018 16:00:58 + TempImage& posmask, build 12-Apr-2018 16:00:58 const ImageInterface& res, build 12-Apr-2018 16:00:58 const ImageInterface& psf, build 12-Apr-2018 16:00:58 const Record& stats, build 12-Apr-2018 16:00:58 const Int iterdone, build 12-Apr-2018 16:00:58 + Vector& chanFlag, build 12-Apr-2018 16:00:58 + const Float& minPercentChange, build 12-Apr-2018 16:00:58 const Float& sidelobeLevel, build 12-Apr-2018 16:00:58 const Float& sidelobeThresholdFactor, build 12-Apr-2018 16:00:58 const Float& noiseThresholdFactor, build 12-Apr-2018 16:00:58 @@ -1311,25 +1326,40 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 const Float& cutThreshold, build 12-Apr-2018 16:00:58 const Float& smoothFactor, build 12-Apr-2018 16:00:58 const Float& minBeamFrac, build 12-Apr-2018 16:00:58 - const Int growIterations) build 12-Apr-2018 16:00:58 + const Int growIterations, build 12-Apr-2018 16:00:58 + const Bool doGrowPrune, build 12-Apr-2018 16:00:58 + const Bool verbose, build 12-Apr-2018 16:00:58 + const Bool isthresholdreached) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 LogIO os( LogOrigin("SDMaskHandler","autoMaskByMultiThreshold",WHERE) ); build 12-Apr-2018 16:00:58 - Array rmss, maxs, mads; build 12-Apr-2018 16:00:58 + Array rmss, maxs, mins, mads; build 12-Apr-2018 16:00:58 //Float resPeak, resRms; build 12-Apr-2018 16:00:58 Array resRmss; build 12-Apr-2018 16:00:58 Double minrmsval, maxrmsval, minmaxval, maxmaxval, minmadval, maxmadval; build 12-Apr-2018 16:00:58 IPosition minrmspos, maxrmspos, minmaxpos, maxmaxpos, minmadpos, maxmadpos; build 12-Apr-2018 16:00:58 Int nxpix, nypix; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // % min mask pixel change (to trigger new automask creation per chan plane) to a fractional change build 12-Apr-2018 16:00:58 + Float fracChange = minPercentChange/100.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //store summary info build 12-Apr-2018 16:00:58 + Record summaryRec; build 12-Apr-2018 16:00:58 + summaryRec.define("sidelobelevel",sidelobeLevel); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 //for debug set to True to save intermediate mask images on disk build 12-Apr-2018 16:00:58 Bool debug(false); // create additional temp masks for debugging build 12-Apr-2018 16:00:58 Bool debug2(false); // debug2 saves masks before/after prune and binary dilation build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + //Timer build 12-Apr-2018 16:00:58 + Timer timer; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // tempmsk: working image for the curret mask build 12-Apr-2018 16:00:58 TempImage tempmask(mask.shape(), mask.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 // prevmask: mask from previous iter. build 12-Apr-2018 16:00:58 TempImage prevmask(mask.shape(), mask.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 - prevmask.copyData(LatticeExpr(mask) ); build 12-Apr-2018 16:00:58 + // use positive only previous mask build 12-Apr-2018 16:00:58 + //prevmask.copyData(LatticeExpr(mask) ); build 12-Apr-2018 16:00:58 + prevmask.copyData(LatticeExpr(posmask) ); build 12-Apr-2018 16:00:58 // taking account for beam or input resolution build 12-Apr-2018 16:00:58 IPosition shp = mask.shape(); build 12-Apr-2018 16:00:58 CoordinateSystem incsys = res.coordinates(); build 12-Apr-2018 16:00:58 @@ -1370,11 +1400,12 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 modbeam.setMajorMinor(Double(smoothFactor) * bmaj, Double(smoothFactor) * bmin); build 12-Apr-2018 16:00:58 modbeam.setPA(beam.getPA()); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - os< maskedRes(res.shape(), res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(res, maskedRes, maskThreshold); build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(res, chanFlag, maskedRes, maskThreshold, dummysizes); build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End thresholding: time to create the initial threshold mask: real "<< timer.real() build 12-Apr-2018 16:00:58 + << "s ( user " << timer.user() <<"s, system "<< timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 Vector allPruned(nchan); build 12-Apr-2018 16:00:58 if (!iterdone) noMaskCheck(maskedRes, ThresholdType); build 12-Apr-2018 16:00:58 if (debug2) { build 12-Apr-2018 16:00:58 @@ -1465,14 +1507,19 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 savedPreMask.copyData(maskedRes); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "Start pruning: the initial threshold mask" << LogIO::POST; build 12-Apr-2018 16:00:58 + timer.mark(); build 12-Apr-2018 16:00:58 //SHARED_PTR > tempIm_ptr = pruneRegions2(maskedRes, tempthresh, -1, pruneSize); build 12-Apr-2018 16:00:58 - SHARED_PTR > tempIm_ptr = YAPruneRegions(maskedRes, allPruned, pruneSize); build 12-Apr-2018 16:00:58 + SHARED_PTR > tempIm_ptr = YAPruneRegions(maskedRes, chanFlag, allPruned, nreg, npruned, pruneSize); build 12-Apr-2018 16:00:58 tempmask.copyData(*(tempIm_ptr.get())); build 12-Apr-2018 16:00:58 Int nAllPruned=ntrue(allPruned); build 12-Apr-2018 16:00:58 if(!iterdone && isEmptyMask(tempmask) && nAllPruned) { build 12-Apr-2018 16:00:58 os< ( iif( *(tempIm_ptr.get()) > maskThreshold, 1.0, 0.0 )); build 12-Apr-2018 16:00:58 // Need this? build 12-Apr-2018 16:00:58 - //makeMaskByPerChanThreshold(*(tempIm_ptr.get()), tempmask, maskThreshold); build 12-Apr-2018 16:00:58 + //makeMaskByPerChanThreshold(*(tempIm_ptr.get()), tempmask, maskThreshold, dummysizes); build 12-Apr-2018 16:00:58 //if (debug) { build 12-Apr-2018 16:00:58 // PagedImage savedPostPrunedMask(res.shape(),res.coordinates(),"tmp-postPruningPostThreshMask.im"); build 12-Apr-2018 16:00:58 // savedPostPrunedMask.copyData(tempmask); build 12-Apr-2018 16:00:58 //} build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - else { build 12-Apr-2018 16:00:58 + else { // No pruning case build 12-Apr-2018 16:00:58 //themask = LatticeExpr ( iif( res > maskThreshold, 1.0, 0.0 )); build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(res, tempmask, maskThreshold); build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "Start thresholding: create an initial threshold mask" << LogIO::POST; build 12-Apr-2018 16:00:58 + timer.mark(); build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(res, chanFlag, tempmask, maskThreshold, dummysizes); build 12-Apr-2018 16:00:58 if (debug) { build 12-Apr-2018 16:00:58 PagedImage savedThreshmask(res.shape(), res.coordinates(), "tmpNoPruneInitTresh.im"); build 12-Apr-2018 16:00:58 savedThreshmask.copyData(tempmask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (!iterdone) noMaskCheck(tempmask, ThresholdType); build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End trehsholding: time to create the initial threshold mask: real " build 12-Apr-2018 16:00:58 + << timer.real()<<"s (user " << timer.user() <<"s, system "<< timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 //tempmask.copyData(themask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //smooth build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "Start smoothing: the initial threshold mask" << LogIO::POST; build 12-Apr-2018 16:00:58 + timer.mark(); build 12-Apr-2018 16:00:58 SPIIF outmask = convolveMask(tempmask, modbeam ); build 12-Apr-2018 16:00:58 if (debug) { build 12-Apr-2018 16:00:58 String tmpfname3="tmp-postSmoothMask-"+String::toString(iterdone)+".im"; build 12-Apr-2018 16:00:58 @@ -1528,8 +1581,10 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 TempImage thenewmask(res.shape(),res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 //thenewmask.copyData(*outmask); build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(*outmask, thenewmask, cutThresholdValue); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(*outmask, chanFlag, thenewmask, cutThresholdValue, dummysizes); build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End smoothing: time to create the smoothed initial threshold mask: real "<< timer.real() build 12-Apr-2018 16:00:58 + <<"s (user " << timer.user() <<"s, system "<< timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 //LatticeExpr thenewmask( iif( *(outmask.get()) > cutThreshold, 1.0, 0.0 )); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 /*** build 12-Apr-2018 16:00:58 @@ -1561,25 +1616,35 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 dogrow.set(false); build 12-Apr-2018 16:00:58 for (uInt i=0; i < arrshape(0); i++) { build 12-Apr-2018 16:00:58 indx(0) = i; build 12-Apr-2018 16:00:58 - if (maskmaxs(indx) == 1.0 ) { build 12-Apr-2018 16:00:58 + if (maskmaxs(indx) == 1.0 && !chanFlag(i)) { build 12-Apr-2018 16:00:58 dogrow(indx) = true; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + //For debug build 12-Apr-2018 16:00:58 + //if (chanFlag(i)) { build 12-Apr-2018 16:00:58 + // os< constraintMaskImage(res.shape(), res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 // constrainMask is 1/0 mask build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(res, constraintMaskImage, lowMaskThreshold); build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(res, chanFlag, constraintMaskImage, lowMaskThreshold, dummysizes); build 12-Apr-2018 16:00:58 if(debug2) { build 12-Apr-2018 16:00:58 os<< LogIO::NORMAL<<"saving constraint mask " << LogIO::POST; build 12-Apr-2018 16:00:58 PagedImage beforepruneconstIm(res.shape(), res.coordinates(),"tmpConstraint-"+String::toString(iterdone)+".im"); build 12-Apr-2018 16:00:58 beforepruneconstIm.copyData(constraintMaskImage); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // 2017.05.05: should done after multiply by binary dilation build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // prune the constraintImage build 12-Apr-2018 16:00:58 @@ -1623,6 +1688,13 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // multiply binary dilated mask by constraintmask build 12-Apr-2018 16:00:58 prevmask.copyData( LatticeExpr (constraintMaskImage*prevmask)); build 12-Apr-2018 16:00:58 + if(debug2) { build 12-Apr-2018 16:00:58 + PagedImage beforepruneconstIm(res.shape(), res.coordinates(),"tmpBeforePruneGrowMask-"+String::toString(iterdone)+".im"); build 12-Apr-2018 16:00:58 + beforepruneconstIm.copyData(prevmask); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End grow mask: time to grow the previous mask: real " build 12-Apr-2018 16:00:58 + << timer.real() <<"s (user "<< timer.user() << "s, system " << timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // prune the resultant mask build 12-Apr-2018 16:00:58 /*** build 12-Apr-2018 16:00:58 if (minBeamFrac > 0.0 ) { build 12-Apr-2018 16:00:58 @@ -1631,16 +1703,23 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 prevmask.copyData( *(tempPrunedMask_ptr.get()) ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 ***/ build 12-Apr-2018 16:00:58 - if (minBeamFrac > 0.0 ) { build 12-Apr-2018 16:00:58 - os< 0.0 && doGrowPrune) { build 12-Apr-2018 16:00:58 + //os< dummy(0); build 12-Apr-2018 16:00:58 - SHARED_PTR > tempPrunedMask_ptr = YAPruneRegions(prevmask, dummy, pruneSize); build 12-Apr-2018 16:00:58 + SHARED_PTR > tempPrunedMask_ptr = YAPruneRegions(prevmask, chanFlag, dummy, ngrowreg, ngrowpruned, pruneSize); build 12-Apr-2018 16:00:58 prevmask.copyData( *(tempPrunedMask_ptr.get()) ); build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End pruning: time to prune the grow mask: real " build 12-Apr-2018 16:00:58 + << timer.real() <<"s (user "<< timer.user() << "s, system "<< timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if(debug2) { build 12-Apr-2018 16:00:58 PagedImage afterpruneconstIm(res.shape(), res.coordinates(),"tmpAfterPruneGrowMask-"+String::toString(iterdone)+".im"); build 12-Apr-2018 16:00:58 - afterpruneconstIm.copyData(constraintMaskImage); build 12-Apr-2018 16:00:58 + afterpruneconstIm.copyData(prevmask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "Start smoothing: the grow mask " << LogIO::POST; build 12-Apr-2018 16:00:58 + timer.mark(); build 12-Apr-2018 16:00:58 SPIIF outprevmask = convolveMask( prevmask, modbeam); build 12-Apr-2018 16:00:58 if (debug) { build 12-Apr-2018 16:00:58 PagedImage postSmoothGrowedMask(res.shape(), res.coordinates(),"tmpPostSmoothGrowMask-"+String::toString(iterdone)+".im"); build 12-Apr-2018 16:00:58 @@ -1660,20 +1739,46 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 constCutThresholdValue(ich) = cutThreshold * constmaskmaxs(chindx); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(*outprevmask, prevmask, constCutThresholdValue); build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(*outprevmask, chanFlag, prevmask, constCutThresholdValue, dummysizes); build 12-Apr-2018 16:00:58 if (debug) { build 12-Apr-2018 16:00:58 PagedImage smoothedGrowedMask(res.shape(), res.coordinates(),"tmpSmoothedGrowMask-"+String::toString(iterdone)+".im"); build 12-Apr-2018 16:00:58 smoothedGrowedMask.copyData(prevmask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End smoothing: time to create the smoothed grow mask: real " build 12-Apr-2018 16:00:58 + << timer.real() <<"s (user "<< timer.user() << "s, system " << timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 } //end - iterdone build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 + // save positive (emission) mask only build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // temporary save negative mask from the previous one build 12-Apr-2018 16:00:58 + //TempImage prevnegmask(res.shape(), res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 + //prevnegmask.copyData( (LatticeExpr)( iif( (mask - posmask ) > 0.0, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (res.hasPixelMask()) { build 12-Apr-2018 16:00:58 + LatticeExpr pixmask(res.pixelMask()); build 12-Apr-2018 16:00:58 + // add all positive masks (previous one, grow mask, current thresh mask) build 12-Apr-2018 16:00:58 + // mask = untouched prev mask, prevmask=modified prev mask by the grow func, thenewmask=mask by thresh on current residual build 12-Apr-2018 16:00:58 + posmask.copyData( (LatticeExpr)( iif((posmask + prevmask + thenewmask ) > 0.0 && pixmask, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + os <)( iif((posmask + prevmask + thenewmask ) > 0.0, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os < thenegmask(res.shape(),res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 thenegmask.set(0); build 12-Apr-2018 16:00:58 + Vector negmaskpixs; build 12-Apr-2018 16:00:58 if (negativeThresholdFactor > 0) { build 12-Apr-2018 16:00:58 - os< negativeMaskImage(res.shape(), res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(res, negativeMaskImage , negativeMaskThreshold); build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(res, chanFlag, negativeMaskImage , negativeMaskThreshold, dummysizes); build 12-Apr-2018 16:00:58 SPIIF negmask = convolveMask( negativeMaskImage, modbeam); build 12-Apr-2018 16:00:58 // determine the cutthreshold value for negative mask build 12-Apr-2018 16:00:58 Record negmaskstats = calcImageStatistics(*negmask, *negmask, lelmask, 0, false); build 12-Apr-2018 16:00:58 @@ -1689,7 +1794,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 negCutThresholdValue(ich) = cutThreshold * negmaskmaxs(chindx); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - makeMaskByPerChanThreshold(*negmask, thenegmask, negCutThresholdValue); build 12-Apr-2018 16:00:58 + makeMaskByPerChanThreshold(*negmask, chanFlag, thenegmask, negCutThresholdValue, negmaskpixs); build 12-Apr-2018 16:00:58 if (isEmptyMask(thenegmask) ){ build 12-Apr-2018 16:00:58 os<<"No negative region was found by auotmask."< tempsmonegmask(TiledShape(thenegmask.shape()), thenegmask.coordinates(),"tmpSmoNegMask.im"); build 12-Apr-2018 16:00:58 tempsmonegmask.copyData(*negmask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "End thresholding: time to create the negative mask: real " build 12-Apr-2018 16:00:58 + << timer.real() <<"s (user " << timer.user() << "s, system " << timer.system() << "s)" << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //for debug build 12-Apr-2018 16:00:58 @@ -1733,12 +1840,18 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 tmpUntouchedPrevMask.copyData(mask); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + // make a copy of unmodified previous mask build 12-Apr-2018 16:00:58 + TempImage unmodifiedprevmask(res.shape(),res.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 + unmodifiedprevmask.copyData(mask); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if (res.hasPixelMask()) { build 12-Apr-2018 16:00:58 LatticeExpr pixmask(res.pixelMask()); build 12-Apr-2018 16:00:58 //mask.copyData( (LatticeExpr)( iif((mask + thenewmask) > 0.0 && pixmask, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 - // add all masks (previous one, growed mask, current thresh mask) build 12-Apr-2018 16:00:58 + // add all masks (previous one, grow mask, current thresh mask) build 12-Apr-2018 16:00:58 // mask = untouched prev mask, prevmask=modified prev mask by the grow func, thenewmask=mask by thresh on current residual build 12-Apr-2018 16:00:58 - mask.copyData( (LatticeExpr)( iif((mask+prevmask + thenewmask + thenegmask) > 0.0 && pixmask, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //mask.copyData( (LatticeExpr)( iif((mask+prevmask + thenewmask + thenegmask) > 0.0 && pixmask, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + mask.copyData( (LatticeExpr)( iif((mask + posmask + thenegmask ) > 0.0 && pixmask, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 mask.clearCache(); build 12-Apr-2018 16:00:58 mask.unlock(); build 12-Apr-2018 16:00:58 @@ -1748,10 +1861,19 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 //os <<"Lattice themask is created..."< themask( iif( tempconvim > rmsthresh/afactor, 1.0, 0.0 )); build 12-Apr-2018 16:00:58 - mask.copyData( (LatticeExpr)( iif((mask + prevmask + thenewmask + thenegmask ) > 0.0, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //mask.copyData( (LatticeExpr)( iif((mask + prevmask + thenewmask + thenegmask ) > 0.0, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 + mask.copyData( (LatticeExpr)( iif((mask + posmask + thenegmask ) > 0.0, 1.0, 0.0 ) ) ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 os < zeroChanMask; build 12-Apr-2018 16:00:58 + skipChannels(fracChange,unmodifiedprevmask, mask, ThresholdType, isthresholdreached, chanFlag, zeroChanMask); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (verbose) build 12-Apr-2018 16:00:58 + printAutomaskSummary(resRmss, maxs, mins, maskThreshold, ThresholdType, chanFlag, zeroChanMask, nreg, npruned, ngrowreg, ngrowpruned, negmaskpixs, summaryRec); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 }//end of autoMaskByMultiThreshold build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Bool SDMaskHandler::isEmptyMask(ImageInterface& mask) build 12-Apr-2018 16:00:58 @@ -1763,7 +1885,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 IPosition trc=maskshape-1; build 12-Apr-2018 16:00:58 Slicer sl(blc,trc,Slicer::endIsLast); build 12-Apr-2018 16:00:58 mask.doGetSlice(maskdata,sl); build 12-Apr-2018 16:00:58 - return (sum(maskdata)==0); build 12-Apr-2018 16:00:58 + return (sum(maskdata)==0.0); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1815,6 +1937,61 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + void SDMaskHandler::skipChannels(const Float& fracChange, build 12-Apr-2018 16:00:58 + ImageInterface& prevmask, build 12-Apr-2018 16:00:58 + ImageInterface& curmask, build 12-Apr-2018 16:00:58 + const Vector& thresholdtype, build 12-Apr-2018 16:00:58 + const Bool isthresholdreached, build 12-Apr-2018 16:00:58 + Vector& chanFlag, build 12-Apr-2018 16:00:58 + Vector& zeroChanMask) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO os( LogOrigin("SDMaskHandler","skipChannels",WHERE) ); build 12-Apr-2018 16:00:58 + IPosition shp = curmask.shape(); build 12-Apr-2018 16:00:58 + Int naxis = shp.size(); build 12-Apr-2018 16:00:58 + CoordinateSystem csys = curmask.coordinates(); build 12-Apr-2018 16:00:58 + Int specaxis = CoordinateUtil::findSpectralAxis(csys); build 12-Apr-2018 16:00:58 + Int nchan = shp(specaxis); build 12-Apr-2018 16:00:58 + IPosition blc(naxis,0); build 12-Apr-2018 16:00:58 + IPosition trc=shp-1; build 12-Apr-2018 16:00:58 + zeroChanMask.resize(nchan); build 12-Apr-2018 16:00:58 + for (Int ichan=0; ichan curmaskdata; build 12-Apr-2018 16:00:58 + curmask.doGetSlice(curmaskdata,sl); build 12-Apr-2018 16:00:58 + Float curmaskpix = sum(curmaskdata); build 12-Apr-2018 16:00:58 + // sepearately store zero channel mask info maybe combined in future to streamline build 12-Apr-2018 16:00:58 + if (curmaskpix==0) { build 12-Apr-2018 16:00:58 + zeroChanMask(ichan) = True; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + zeroChanMask(ichan) = False; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //if (thresholdtype(ichan).contains("noise") && isthresholdreached && !chanFlag(ichan)) { build 12-Apr-2018 16:00:58 + if (thresholdtype(ichan).contains("noise") && !chanFlag(ichan)) { build 12-Apr-2018 16:00:58 + Array prevmaskdata; build 12-Apr-2018 16:00:58 + prevmask.doGetSlice(prevmaskdata,sl); build 12-Apr-2018 16:00:58 + Float prevmaskpix = sum(prevmaskdata); build 12-Apr-2018 16:00:58 + //cerr<<"prevmaskpix="<0) { build 12-Apr-2018 16:00:58 recordPruned=True; build 12-Apr-2018 16:00:58 allpruned.set(False); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 IPosition fullimShape=image.shape(); build 12-Apr-2018 16:00:58 TempImage* fullIm = new TempImage(TiledShape(fullimShape, image.niceCursorShape()), image.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 fullIm->set(0); build 12-Apr-2018 16:00:58 @@ -2437,93 +2615,108 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 fullIm->copyData(image); build 12-Apr-2018 16:00:58 return SHARED_PTR >(fullIm); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - os < tempImarr; build 12-Apr-2018 16:00:58 - tempIm->get(tempImarr); build 12-Apr-2018 16:00:58 - os< blobsizes = findBlobSize(*blobMap); build 12-Apr-2018 16:00:58 - //cerr<<"blobsizes="< tempImarr; build 12-Apr-2018 16:00:58 + tempIm->get(tempImarr); build 12-Apr-2018 16:00:58 + Float sumMaskVal=sum(tempImarr); build 12-Apr-2018 16:00:58 + uInt removeBySize=0; build 12-Apr-2018 16:00:58 + uInt nBlob=0; build 12-Apr-2018 16:00:58 + os< tempblobarr; build 12-Apr-2018 16:00:58 + blobMap->get(tempblobarr); build 12-Apr-2018 16:00:58 + os< blobsizes = findBlobSize(*blobMap); build 12-Apr-2018 16:00:58 + os<< LogIO::DEBUG1 << "Processing time for findBlobSize: real "<< timer.real() << "s ; user "<< timer.user() <<"s"<0) { build 12-Apr-2018 16:00:58 + os < tempBlobMap(blobMap->shape(), blobMap->coordinates(), "tmp-Blob.map"); build 12-Apr-2018 16:00:58 + tempBlobMap.copyData(*blobMap); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + Array subimData; build 12-Apr-2018 16:00:58 + tempIm->getSlice(subimData,IPosition(2,0), tempIm->shape(), IPosition(2,1,1)); build 12-Apr-2018 16:00:58 + fullIm->putSlice(subimData,start,IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 + delete tempIm; tempIm=0; build 12-Apr-2018 16:00:58 + delete subIm; subIm=0; build 12-Apr-2018 16:00:58 + delete blobMap; blobMap=0; build 12-Apr-2018 16:00:58 + } // if-skipmask build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 - hasMask=False; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // log reporting ... build 12-Apr-2018 16:00:58 - String chanlabel = "[C"+String::toString(ich)+"]"; build 12-Apr-2018 16:00:58 - if (removeBySize>0) { build 12-Apr-2018 16:00:58 - os < tempBlobMap(blobMap->shape(), blobMap->coordinates(), "tmp-Blob.map"); build 12-Apr-2018 16:00:58 - tempBlobMap.copyData(*blobMap); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - Array subimData; build 12-Apr-2018 16:00:58 - tempIm->getSlice(subimData,IPosition(2,0), tempIm->shape(), IPosition(2,1,1)); build 12-Apr-2018 16:00:58 - fullIm->putSlice(subimData,start,IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 - delete tempIm; tempIm=0; build 12-Apr-2018 16:00:58 - delete subIm; subIm=0; build 12-Apr-2018 16:00:58 - delete blobMap; blobMap=0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 return SHARED_PTR >(fullIm); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -2568,41 +2761,48 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 }// end of makePBMask build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //apply per channel plane threshold build 12-Apr-2018 16:00:58 - void SDMaskHandler::makeMaskByPerChanThreshold(const ImageInterface& image, ImageInterface& mask, Vector& thresholds) build 12-Apr-2018 16:00:58 + void SDMaskHandler::makeMaskByPerChanThreshold(const ImageInterface& image, Vector& chanflag, ImageInterface& mask, Vector& thresholds, Vector& masksizes) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 IPosition imshape = image.shape(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 CoordinateSystem imcsys = image.coordinates(); build 12-Apr-2018 16:00:58 Vector diraxes = CoordinateUtil::findDirectionAxes(imcsys); build 12-Apr-2018 16:00:58 Int specaxis = CoordinateUtil::findSpectralAxis(imcsys); build 12-Apr-2018 16:00:58 - uInt nchan = imshape (specaxis); build 12-Apr-2018 16:00:58 + uInt nchan = imshape (specaxis); build 12-Apr-2018 16:00:58 + masksizes.resize(nchan); build 12-Apr-2018 16:00:58 if (nchan != thresholds.nelements()) { build 12-Apr-2018 16:00:58 throw(AipsError("Mismatch in the number of threshold values and the number of chan planes.")); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 for (uInt ich=0; ich < nchan; ich++) { build 12-Apr-2018 16:00:58 - IPosition start(4, 0, 0, 0,ich); build 12-Apr-2018 16:00:58 - IPosition length(4, imshape(diraxes(0)),imshape(diraxes(1)),imshape(2),1); build 12-Apr-2018 16:00:58 - Slicer sl(start, length); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // make a subImage for a channel slice build 12-Apr-2018 16:00:58 - AxesSpecifier aspec(False); build 12-Apr-2018 16:00:58 - SubImage chanImage(image, sl, aspec, true); build 12-Apr-2018 16:00:58 - TempImage* tempChanImage = new TempImage (chanImage.shape(), chanImage.coordinates(), memoryToUse() ); build 12-Apr-2018 16:00:58 - Array chanImageArr; build 12-Apr-2018 16:00:58 - LatticeExpr chanMask; build 12-Apr-2018 16:00:58 - if (thresholds(ich) < 0) { build 12-Apr-2018 16:00:58 - //LatticeExpr chanMask(iif(chanImage < thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 - chanMask = LatticeExpr (iif(chanImage < thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - else { build 12-Apr-2018 16:00:58 - //LatticeExpr chanMask(iif(chanImage > thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 - chanMask = LatticeExpr (iif(chanImage > thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - tempChanImage->copyData(chanMask); build 12-Apr-2018 16:00:58 - //tempChanImage->getSlice(chanImageArr, IPosition(4,0), chanImage.shape(),IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 - tempChanImage->getSlice(chanImageArr, IPosition(2,0), chanImage.shape(),IPosition(2,1,1)); build 12-Apr-2018 16:00:58 - mask.putSlice(chanImageArr,start,IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 - delete tempChanImage; tempChanImage=0; build 12-Apr-2018 16:00:58 + if (!chanflag(ich)) { build 12-Apr-2018 16:00:58 + IPosition start(4, 0, 0, 0,ich); build 12-Apr-2018 16:00:58 + IPosition length(4, imshape(diraxes(0)),imshape(diraxes(1)),imshape(2),1); build 12-Apr-2018 16:00:58 + Slicer sl(start, length); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // make a subImage for a channel slice build 12-Apr-2018 16:00:58 + AxesSpecifier aspec(False); build 12-Apr-2018 16:00:58 + SubImage chanImage(image, sl, aspec, true); build 12-Apr-2018 16:00:58 + TempImage* tempChanImage = new TempImage (chanImage.shape(), chanImage.coordinates(), memoryToUse() ); build 12-Apr-2018 16:00:58 + Array chanImageArr; build 12-Apr-2018 16:00:58 + LatticeExpr chanMask; build 12-Apr-2018 16:00:58 + if (thresholds(ich) < 0) { build 12-Apr-2018 16:00:58 + //LatticeExpr chanMask(iif(chanImage < thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 + chanMask = LatticeExpr (iif(chanImage < thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + //LatticeExpr chanMask(iif(chanImage > thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 + chanMask = LatticeExpr (iif(chanImage > thresholds(ich),1.0, 0.0)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + tempChanImage->copyData(chanMask); build 12-Apr-2018 16:00:58 + //tempChanImage->getSlice(chanImageArr, IPosition(4,0), chanImage.shape(),IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 + tempChanImage->getSlice(chanImageArr, IPosition(2,0), chanImage.shape(),IPosition(2,1,1)); build 12-Apr-2018 16:00:58 + mask.putSlice(chanImageArr,start,IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 + masksizes[ich]=sum(chanImageArr); build 12-Apr-2018 16:00:58 + delete tempChanImage; tempChanImage=0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + //else { build 12-Apr-2018 16:00:58 + // cerr<<"makeMaskByPerChanThresh: skipping chan="< oli(outlattice,tls); build 12-Apr-2018 16:00:58 Int ich; build 12-Apr-2018 16:00:58 IPosition ipch(chanmask.shape().size(),0); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // for debug build 12-Apr-2018 16:00:58 + //Array initarr=inlattice.get(); build 12-Apr-2018 16:00:58 + //cerr<<"initarr sum pix="< planeImage(li.cursor()); build 12-Apr-2018 16:00:58 + //Array planeImage(li.cursor()); build 12-Apr-2018 16:00:58 + Array inMask(li.cursor()); build 12-Apr-2018 16:00:58 + //cerr<<"sum of inMask="< planeImage(inMask.shape()); build 12-Apr-2018 16:00:58 + planeImage.set(0); build 12-Apr-2018 16:00:58 + planeImage=inMask; build 12-Apr-2018 16:00:58 + //cerr<<"sum of planeImage before grow ="< planeMask(mi.cursor()); build 12-Apr-2018 16:00:58 ipch(0)=ich; build 12-Apr-2018 16:00:58 // if masks are true do binary dilation... build 12-Apr-2018 16:00:58 @@ -2670,6 +2881,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } // S.E. row loop build 12-Apr-2018 16:00:58 } // image col loop build 12-Apr-2018 16:00:58 } //inage row loop build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for (Int ii=0; ii < nx; ii++) { build 12-Apr-2018 16:00:58 for (Int jj=0; jj < ny; jj++) { build 12-Apr-2018 16:00:58 if (planeImage(IPosition(4,ii,jj,0,0))==2) build 12-Apr-2018 16:00:58 @@ -2679,6 +2892,11 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } // if ntrure() ... build 12-Apr-2018 16:00:58 oli.woCursor() = planeImage; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + //For debug build 12-Apr-2018 16:00:58 + //Array afterinarr=inlattice.get(); build 12-Apr-2018 16:00:58 + //cerr<<"afaterinarr sum pix ="< outarr = outlattice.get(); build 12-Apr-2018 16:00:58 + //cerr<<"outlattice sum pix ="<& inImage, build 12-Apr-2018 16:00:58 @@ -2688,19 +2906,42 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 Array& chanmask, build 12-Apr-2018 16:00:58 ImageInterface& outImage) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO os( LogOrigin("SDMaskHandler", "binaryDilation", WHERE) ); build 12-Apr-2018 16:00:58 + ArrayLattice templattice(inImage.shape()); build 12-Apr-2018 16:00:58 + templattice.copyData(inImage); build 12-Apr-2018 16:00:58 + TempImage diffTempImage(outImage.shape(), outImage.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 + diffTempImage.set(1); build 12-Apr-2018 16:00:58 + // initial grow mask build 12-Apr-2018 16:00:58 binaryDilationCore(inImage,structure,mask,chanmask,outImage); build 12-Apr-2018 16:00:58 + LatticeExpr diffIm0( abs(templattice - outImage ) ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // if the initial grow does not change mask (i.e. diffIm0 = 0) build 12-Apr-2018 16:00:58 + // then it won't enter the while loop below. build 12-Apr-2018 16:00:58 + diffTempImage.copyData(diffIm0); build 12-Apr-2018 16:00:58 Int iter = 1; build 12-Apr-2018 16:00:58 - ArrayLattice templattice(inImage.shape()); build 12-Apr-2018 16:00:58 - while (iter < niteration) { build 12-Apr-2018 16:00:58 + while (iter < niteration && !isEmptyMask(diffTempImage)) { build 12-Apr-2018 16:00:58 templattice.copyData(outImage); build 12-Apr-2018 16:00:58 binaryDilationCore(templattice,structure,mask,chanmask,outImage); build 12-Apr-2018 16:00:58 + LatticeExpr diffIm( abs(templattice - outImage ) ); build 12-Apr-2018 16:00:58 + diffTempImage.copyData(diffIm); build 12-Apr-2018 16:00:58 + /*** build 12-Apr-2018 16:00:58 + if (isEmptyMask(diffTempImage)) { build 12-Apr-2018 16:00:58 + cerr<<"current iter"<hasPB() ) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2871,20 +3116,22 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 lablat.get(lablatarr); build 12-Apr-2018 16:00:58 //cerr<<"IN labelRegions:: inlat.shape="< abs( mins(chanidx))? maxs(chanidx): mins(chanidx); build 12-Apr-2018 16:00:58 + String domasking = chanflag[ich]==0? "T":"F"; build 12-Apr-2018 16:00:58 + //String domasking = zeroChanMask[ich]==1? "F":"T"; build 12-Apr-2018 16:00:58 + String Nreg, Npruned, Ngrowreg, NgrowPruned, Nnegpix; build 12-Apr-2018 16:00:58 + String NAstr("--"); build 12-Apr-2018 16:00:58 + if (!nreg.nelements()) { build 12-Apr-2018 16:00:58 + Nreg = NAstr; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + Nreg = String::toString(nreg[ich]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (!npruned.nelements()) { build 12-Apr-2018 16:00:58 + Npruned = NAstr; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + Npruned = String::toString(npruned[ich]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (!ngrowreg.nelements()) { build 12-Apr-2018 16:00:58 + Ngrowreg = NAstr; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + Ngrowreg = String::toString(ngrowreg[ich]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (!ngrowpruned.nelements()) { build 12-Apr-2018 16:00:58 + NgrowPruned = NAstr; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + NgrowPruned = String::toString(ngrowpruned[ich]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if (!negmaskpixs.nelements()) { build 12-Apr-2018 16:00:58 + Nnegpix = NAstr; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + Nnegpix = String::toString(negmaskpixs[ich]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL << "[C" << ich << "] " build 12-Apr-2018 16:00:58 + << domasking << " " build 12-Apr-2018 16:00:58 + << rmss(chanidx) << " " build 12-Apr-2018 16:00:58 + << peak << " " build 12-Apr-2018 16:00:58 + << thresholdtype[ich] << " " build 12-Apr-2018 16:00:58 + << maskthreshold[ich] << " " build 12-Apr-2018 16:00:58 + << Nreg << " " build 12-Apr-2018 16:00:58 + << Npruned << " " build 12-Apr-2018 16:00:58 + << Ngrowreg << " " build 12-Apr-2018 16:00:58 + << NgrowPruned << " " build 12-Apr-2018 16:00:58 + << Nnegpix build 12-Apr-2018 16:00:58 + << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os << LogIO::NORMAL <<"========== END of automask summary ==========" << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SDMaskHandler.h b/code/synthesis/ImagerObjects/SDMaskHandler.h build 12-Apr-2018 16:00:58 index 6350f4a..0003af1 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SDMaskHandler.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SDMaskHandler.h build 12-Apr-2018 16:00:58 @@ -39,7 +39,9 @@ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -117,10 +119,18 @@ public: build 12-Apr-2018 16:00:58 // @param[in] negativethreshold Threshold factor in a multiplier of the rms noise used to set threshold for negative features build 12-Apr-2018 16:00:58 // @param[in] cutthreshold Cut threshold factor for adjust a mask after smoothing of the mask build 12-Apr-2018 16:00:58 // @param[in] smoothfactor Smoothing factor (multiplier of the beam) build 12-Apr-2018 16:00:58 + // @param[in] minbeamfrac Percent change in mask size to trigger a new automask creation for 'noise'-based threshold build 12-Apr-2018 16:00:58 + // @param[in] growiterations (maximum) number of binary dilation iteartions to grow the mask build 12-Apr-2018 16:00:58 + // @param[in] dogrowprune Toggle to do or skip pruning on the grow mask build 12-Apr-2018 16:00:58 + // @param[in] minpercentchange Mininum percentage change in mask to stop updating mask build 12-Apr-2018 16:00:58 + // @param[in] verbose Controls automask related logging messages build 12-Apr-2018 16:00:58 + // @param[in] isthresholdreached Check if cyclethreshold reached threshold build 12-Apr-2018 16:00:58 // @param[in] pblimit Primary beam cut off level build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 void autoMask(SHARED_PTR imstore, build 12-Apr-2018 16:00:58 + casacore::TempImage& posmask, build 12-Apr-2018 16:00:58 const casacore::Int iterdone, build 12-Apr-2018 16:00:58 + casacore::Vector& chanflag, build 12-Apr-2018 16:00:58 const casacore::String& alg="", build 12-Apr-2018 16:00:58 const casacore::String& threshold="", build 12-Apr-2018 16:00:58 const casacore::Float& fracpeak=0.0, build 12-Apr-2018 16:00:58 @@ -136,7 +146,12 @@ public: build 12-Apr-2018 16:00:58 const casacore::Float& smoothfactor=0.0, build 12-Apr-2018 16:00:58 const casacore::Float& minbeamfrac=0.0, build 12-Apr-2018 16:00:58 const casacore::Int growiterations=0, build 12-Apr-2018 16:00:58 + const casacore::Bool dogrowprune=true, build 12-Apr-2018 16:00:58 + const casacore::Float& minpercentchange=0.0, build 12-Apr-2018 16:00:58 + const casacore::Bool verbose=false, build 12-Apr-2018 16:00:58 + const casacore::Bool isthresholdreached=false, build 12-Apr-2018 16:00:58 casacore::Float pblimit=0.0); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // automask by threshold with binning before applying it build 12-Apr-2018 16:00:58 void autoMaskByThreshold (casacore::ImageInterface& mask, build 12-Apr-2018 16:00:58 const casacore::ImageInterface& res, build 12-Apr-2018 16:00:58 @@ -164,10 +179,13 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // implementation of Amanda's automasking algorithm using multiple thresholds build 12-Apr-2018 16:00:58 void autoMaskByMultiThreshold(casacore::ImageInterface& mask, build 12-Apr-2018 16:00:58 + casacore::TempImage& posmask, build 12-Apr-2018 16:00:58 const casacore::ImageInterface& res, build 12-Apr-2018 16:00:58 const casacore::ImageInterface& psf, build 12-Apr-2018 16:00:58 const casacore::Record& stats, build 12-Apr-2018 16:00:58 const casacore::Int iterdone, build 12-Apr-2018 16:00:58 + casacore::Vector& chanFlag, build 12-Apr-2018 16:00:58 + const casacore::Float& maskPercentChange=0.0, build 12-Apr-2018 16:00:58 const casacore::Float& sidelobeLevel=0.0, build 12-Apr-2018 16:00:58 const casacore::Float& sidelobeThresholdFactor=3.0, build 12-Apr-2018 16:00:58 const casacore::Float& noiseThresholdFactor=3.0, build 12-Apr-2018 16:00:58 @@ -176,7 +194,10 @@ public: build 12-Apr-2018 16:00:58 const casacore::Float& cutThreshold=0.01, build 12-Apr-2018 16:00:58 const casacore::Float& smoothFactor=1.0, build 12-Apr-2018 16:00:58 const casacore::Float& minBeamFrac=-1.0, build 12-Apr-2018 16:00:58 - const casacore::Int growIterations=100); build 12-Apr-2018 16:00:58 + const casacore::Int growIterations=100, build 12-Apr-2018 16:00:58 + const casacore::Bool dogrowprune=true, build 12-Apr-2018 16:00:58 + const casacore::Bool verbose=false, build 12-Apr-2018 16:00:58 + const casacore::Bool isthresholdreached=false); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Calculate statistics on a residual image with additional region and LEL mask specificaations build 12-Apr-2018 16:00:58 casacore::Record calcImageStatistics(casacore::ImageInterface& res, build 12-Apr-2018 16:00:58 @@ -216,12 +237,18 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Yet another Prune the mask regions per spectral plane build 12-Apr-2018 16:00:58 SHARED_PTR > YAPruneRegions(const casacore::ImageInterface& image, build 12-Apr-2018 16:00:58 - casacore::Vector& allpruned, casacore::Double prunesize=0.0); build 12-Apr-2018 16:00:58 + casacore::Vector& chanflag, build 12-Apr-2018 16:00:58 + casacore::Vector& allpruned, build 12-Apr-2018 16:00:58 + casacore::Vector& nreg, build 12-Apr-2018 16:00:58 + casacore::Vector& npruned, build 12-Apr-2018 16:00:58 + casacore::Double prunesize=0.0); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // create a mask image (1/0 image) applying a different threshold for each channel plane build 12-Apr-2018 16:00:58 void makeMaskByPerChanThreshold(const casacore::ImageInterface& image, build 12-Apr-2018 16:00:58 + casacore::Vector& chanflag, build 12-Apr-2018 16:00:58 casacore::ImageInterface& mask, build 12-Apr-2018 16:00:58 - casacore::Vector& thresholds); build 12-Apr-2018 16:00:58 + casacore::Vector& thresholds, build 12-Apr-2018 16:00:58 + casacore::Vector& masksizes); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // A core method for binary dilation of the input lattice build 12-Apr-2018 16:00:58 void binaryDilationCore(casacore::Lattice& inlattice, build 12-Apr-2018 16:00:58 @@ -245,7 +272,9 @@ public: build 12-Apr-2018 16:00:58 void makePBMask(SHARED_PTR imstore, casacore::Float pblimit=0.1); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void autoMaskWithinPB(SHARED_PTR imstore, build 12-Apr-2018 16:00:58 + casacore::TempImage& posmask, build 12-Apr-2018 16:00:58 const casacore::Int iterdone, build 12-Apr-2018 16:00:58 + casacore::Vector& chanflag, build 12-Apr-2018 16:00:58 const casacore::String& alg="", build 12-Apr-2018 16:00:58 const casacore::String& threshold="", build 12-Apr-2018 16:00:58 const casacore::Float& fracpeak=0.0, build 12-Apr-2018 16:00:58 @@ -261,6 +290,10 @@ public: build 12-Apr-2018 16:00:58 const casacore::Float& smoothfactor=0.0, build 12-Apr-2018 16:00:58 const casacore::Float& minbeamfrac=0.0, build 12-Apr-2018 16:00:58 const casacore::Int growiterations=0, build 12-Apr-2018 16:00:58 + const casacore::Bool dogrowprune=true, build 12-Apr-2018 16:00:58 + const casacore::Float& minpercentchange=0.0, build 12-Apr-2018 16:00:58 + const casacore::Bool verbose=false, build 12-Apr-2018 16:00:58 + const casacore::Bool isthresholdreached=false, build 12-Apr-2018 16:00:58 casacore::Float pblimit=0.1); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -293,13 +326,38 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // check if mask image is empty (all zeros ) =True or not build 12-Apr-2018 16:00:58 casacore::Bool isEmptyMask(casacore::ImageInterface& maskiamge); build 12-Apr-2018 16:00:58 + casacore::Int getTotalPixels(casacore::ImageInterface& maskiamge); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // for warning messages for empy initial mask in automask build 12-Apr-2018 16:00:58 void noMaskCheck(casacore::ImageInterface& mask, casacore::Vector& thresholdType); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // determining skip channels for the mask changed less than the specfied percentage build 12-Apr-2018 16:00:58 + void skipChannels(const casacore::Float& fracChnage, build 12-Apr-2018 16:00:58 + casacore::ImageInterface& prevmask, build 12-Apr-2018 16:00:58 + casacore::ImageInterface& curmask, build 12-Apr-2018 16:00:58 + const casacore::Vector& threshtype, build 12-Apr-2018 16:00:58 + const casacore::Bool isthresholdreached, build 12-Apr-2018 16:00:58 + casacore::Vector& chanFlag, build 12-Apr-2018 16:00:58 + casacore::Vector& zeroChanMask); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // check if input image is a mask image with 0 or a value (if normalize=true, 1) build 12-Apr-2018 16:00:58 //casacore::Bool checkMaskImage(casacore::ImageInterface& maskiamge, casacore::Bool normalize=true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // print per-channel automask summary build 12-Apr-2018 16:00:58 + void printAutomaskSummary(const casacore::Array& rmss, build 12-Apr-2018 16:00:58 + const casacore::Array& maxs, build 12-Apr-2018 16:00:58 + const casacore::Array& mins, build 12-Apr-2018 16:00:58 + const casacore::Vector& maskthreshold, build 12-Apr-2018 16:00:58 + const casacore::Vector& masktype, build 12-Apr-2018 16:00:58 + const casacore::Vector& chanflag, build 12-Apr-2018 16:00:58 + const casacore::Vector& zerochanmask, build 12-Apr-2018 16:00:58 + const casacore::Vector& nreg, build 12-Apr-2018 16:00:58 + const casacore::Vector& npruned, build 12-Apr-2018 16:00:58 + const casacore::Vector& ngrowreg, build 12-Apr-2018 16:00:58 + const casacore::Vector& ngrowpruned, build 12-Apr-2018 16:00:58 + const casacore::Vector& negmaskpixs, build 12-Apr-2018 16:00:58 + const casacore::Record& miscsummaryinfo); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 static casacore::Bool cloneImShape(const casacore::ImageInterface& inImage, const casacore::String& outImageName); build 12-Apr-2018 16:00:58 @@ -307,7 +365,9 @@ public: build 12-Apr-2018 16:00:58 static inline casacore::Double memoryToUse() {return 1.0;}; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 InteractiveMasking *interactiveMasker_p; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 private: build 12-Apr-2018 16:00:58 double itsRms; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIIterBot.cc b/code/synthesis/ImagerObjects/SIIterBot.cc build 12-Apr-2018 16:00:58 index 7defeb5..eba827e 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIIterBot.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIIterBot.cc build 12-Apr-2018 16:00:58 @@ -286,6 +286,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 Float cycleThreshold = itsCycleThreshold; build 12-Apr-2018 16:00:58 maxCycleIterations = min(maxCycleIterations, itsNiter - itsIterDone); build 12-Apr-2018 16:00:58 cycleThreshold = max(cycleThreshold, itsThreshold); build 12-Apr-2018 16:00:58 + Bool thresholdReached = (cycleThreshold==itsThreshold)? True : False; build 12-Apr-2018 16:00:58 /* build 12-Apr-2018 16:00:58 if (itsInteractiveMode) { build 12-Apr-2018 16:00:58 maxCycleIterations = min(maxCycleIterations, itsInteractiveNiter); build 12-Apr-2018 16:00:58 @@ -295,6 +296,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 returnRecord.define( RecordFieldId("cycleniter"), maxCycleIterations); build 12-Apr-2018 16:00:58 returnRecord.define( RecordFieldId("cyclethreshold"), cycleThreshold); build 12-Apr-2018 16:00:58 returnRecord.define( RecordFieldId("loopgain"), itsLoopGain); build 12-Apr-2018 16:00:58 + returnRecord.define( RecordFieldId("thresholdreached"), thresholdReached); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 return returnRecord; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIMapper.cc b/code/synthesis/ImagerObjects/SIMapper.cc build 12-Apr-2018 16:00:58 index b80cfa9..12963f0 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIMapper.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIMapper.cc build 12-Apr-2018 16:00:58 @@ -265,15 +265,21 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - void SIMapper::addPB(vi::VisBuffer2& vb, PBMath& pbMath) build 12-Apr-2018 16:00:58 + void SIMapper::addPB(vi::VisBuffer2& vb, PBMath& pbMath, const MDirection& altDir, const Bool useAltDir) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 CoordinateSystem imageCoord=itsImages->pb()->coordinates(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition imShape=itsImages->pb()->shape(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - ROMSColumns mscol(vb.ms()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - MDirection wcenter=mscol.field().phaseDirMeas(vb.fieldId()(0)); build 12-Apr-2018 16:00:58 + MDirection wcenter; build 12-Apr-2018 16:00:58 + if(useAltDir) build 12-Apr-2018 16:00:58 + wcenter=altDir; build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + ROMSColumns mscol(vb.ms()); build 12-Apr-2018 16:00:58 + wcenter=mscol.field().phaseDirMeas(vb.fieldId()(0), vb.time()(0)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 TempImage pbTemp(imShape, imageCoord); build 12-Apr-2018 16:00:58 TempImage ctemp(imShape, imageCoord); build 12-Apr-2018 16:00:58 ctemp.set(1.0); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIMapper.h b/code/synthesis/ImagerObjects/SIMapper.h build 12-Apr-2018 16:00:58 index 9b42e56..f41d7b8 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIMapper.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIMapper.h build 12-Apr-2018 16:00:58 @@ -78,7 +78,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 virtual void finalizeGrid(vi::VisBuffer2& vb, casacore::Bool dopsf); build 12-Apr-2018 16:00:58 virtual void initializeDegrid(vi::VisBuffer2& vb, casacore::Int row=-1); build 12-Apr-2018 16:00:58 virtual void degrid(vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 - virtual void addPB(vi::VisBuffer2& vb, PBMath& pbMath); build 12-Apr-2018 16:00:58 + virtual void addPB(vi::VisBuffer2& vb, PBMath& pbMath, const casacore::MDirection& altDir=MDirection(), const casacore::Bool useAltDir=False); build 12-Apr-2018 16:00:58 /////////////////////// OLD VI/VB versions build 12-Apr-2018 16:00:58 virtual void initializeGrid(VisBuffer& vb, casacore::Bool dopsf, casacore::Bool firstaccess=false); build 12-Apr-2018 16:00:58 virtual void grid(VisBuffer& vb, casacore::Bool dopsf, FTMachine::Type col, const casacore::Int whichFTM=-1); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIMapperCollection.cc b/code/synthesis/ImagerObjects/SIMapperCollection.cc build 12-Apr-2018 16:00:58 index af6c14e..7c7e2ba 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIMapperCollection.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIMapperCollection.cc build 12-Apr-2018 16:00:58 @@ -413,11 +413,11 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 }// if non zero model build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - void SIMapperCollection::addPB(vi::VisBuffer2& vb, PBMath& pbMath) build 12-Apr-2018 16:00:58 + void SIMapperCollection::addPB(vi::VisBuffer2& vb, PBMath& pbMath, const MDirection& altDir, const Bool useAltDir) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 for (uInt k=0; k < itsMappers.nelements(); ++k) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - (itsMappers[k])->addPB(vb,pbMath); build 12-Apr-2018 16:00:58 + (itsMappers[k])->addPB(vb,pbMath, altDir, useAltDir); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIMapperCollection.h b/code/synthesis/ImagerObjects/SIMapperCollection.h build 12-Apr-2018 16:00:58 index 464ce21..8fa6cbc 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIMapperCollection.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIMapperCollection.h build 12-Apr-2018 16:00:58 @@ -75,7 +75,7 @@ class SIMapperCollection build 12-Apr-2018 16:00:58 void degrid(vi::VisBuffer2& vb, casacore::Bool saveVirtualMod=false,const casacore::Int mapperid=-1); build 12-Apr-2018 16:00:58 void saveVirtualModel(vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 void finalizeDegrid(vi::VisBuffer2& vb,const casacore::Int mapperid=-1); build 12-Apr-2018 16:00:58 - void addPB(vi::VisBuffer2& vb, PBMath& pbMath); build 12-Apr-2018 16:00:58 + void addPB(vi::VisBuffer2& vb, PBMath& pbMath, const casacore::MDirection& altDir=casacore::MDirection(), const casacore::Bool useAltDir=False); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //////////// OLD VI/VB : Version that use old vi/vb can be removed the vi2/vb2 works build 12-Apr-2018 16:00:58 void initializeGrid(VisBuffer& vb, casacore::Bool dopsf=false,const casacore::Int mapperid=-1); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIMinorCycleController.cc b/code/synthesis/ImagerObjects/SIMinorCycleController.cc build 12-Apr-2018 16:00:58 index b816f8c..8c612a7 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIMinorCycleController.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIMinorCycleController.cc build 12-Apr-2018 16:00:58 @@ -35,6 +35,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 itsCycleNiter(0), build 12-Apr-2018 16:00:58 itsCycleThreshold(0.0), build 12-Apr-2018 16:00:58 itsLoopGain(0.1), build 12-Apr-2018 16:00:58 + itsIsThresholdReached(false), build 12-Apr-2018 16:00:58 itsUpdatedModelFlag(false), build 12-Apr-2018 16:00:58 itsIterDone(0), build 12-Apr-2018 16:00:58 itsCycleIterDone(0), build 12-Apr-2018 16:00:58 @@ -192,6 +193,11 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 return itsCycleThreshold; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Bool SIMinorCycleController::isThresholdReached() build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + return itsIsThresholdReached; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Record SIMinorCycleController::getCycleExecutionRecord() { build 12-Apr-2018 16:00:58 LogIO os( LogOrigin("SISkyModel",__FUNCTION__,WHERE) ); build 12-Apr-2018 16:00:58 @@ -243,6 +249,11 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 {recordIn.get(RecordFieldId("cyclethreshold"),itsCycleThreshold);} build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 {throw(AipsError("cyclethreshold not defined in input minor-cycle controller") );} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (recordIn.isDefined("thresholdreached")) build 12-Apr-2018 16:00:58 + {recordIn.get(RecordFieldId("thresholdreached"), itsIsThresholdReached);} build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + { throw(AipsError("thresholdreached not defined in input minor-cycle controller") );} build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (recordIn.isDefined("loopgain")) build 12-Apr-2018 16:00:58 {recordIn.get(RecordFieldId("loopgain"), itsLoopGain);} build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SIMinorCycleController.h b/code/synthesis/ImagerObjects/SIMinorCycleController.h build 12-Apr-2018 16:00:58 index 42ec1fc..fde99fa 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SIMinorCycleController.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SIMinorCycleController.h build 12-Apr-2018 16:00:58 @@ -97,6 +97,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 casacore::Int getIterDone(); build 12-Apr-2018 16:00:58 casacore::Int getCycleNiter(); build 12-Apr-2018 16:00:58 casacore::Float getCycleThreshold(); build 12-Apr-2018 16:00:58 + casacore::Bool isThresholdReached(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 /* This method resets the iteration counter for the cycle */ build 12-Apr-2018 16:00:58 void resetCycleIter(); build 12-Apr-2018 16:00:58 @@ -125,7 +126,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 casacore::Int itsCycleNiter; build 12-Apr-2018 16:00:58 casacore::Float itsCycleThreshold; build 12-Apr-2018 16:00:58 casacore::Float itsLoopGain; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + casacore::Bool itsIsThresholdReached; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 casacore::Bool itsUpdatedModelFlag; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 /* Status Reporting Variables */ build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisDeconvolver.cc b/code/synthesis/ImagerObjects/SynthesisDeconvolver.cc build 12-Apr-2018 16:00:58 index ae1e42c..c8007aa 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisDeconvolver.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisDeconvolver.cc build 12-Apr-2018 16:00:58 @@ -70,6 +70,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 itsPBMask(0.0), build 12-Apr-2018 16:00:58 //itsMaskString(String("")), build 12-Apr-2018 16:00:58 itsIterDone(0.0), build 12-Apr-2018 16:00:58 + itsChanFlag(Vector(False)), build 12-Apr-2018 16:00:58 + initializeChanMaskFlag(false), build 12-Apr-2018 16:00:58 itsIsMaskLoaded(false), build 12-Apr-2018 16:00:58 itsMaskSum(-1e+9) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -192,6 +194,9 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 itsMinBeamFrac = decpars.minBeamFrac; build 12-Apr-2018 16:00:58 itsCutThreshold = decpars.cutThreshold; build 12-Apr-2018 16:00:58 itsGrowIterations = decpars.growIterations; build 12-Apr-2018 16:00:58 + itsDoGrowPrune = decpars.doGrowPrune; build 12-Apr-2018 16:00:58 + itsMinPercentChange = decpars.minPercentChange; build 12-Apr-2018 16:00:58 + itsVerbose = decpars.verbose; build 12-Apr-2018 16:00:58 itsIsInteractive = decpars.interactive; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch(AipsError &x) build 12-Apr-2018 16:00:58 @@ -237,6 +242,16 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 itsLoopController.setPeakResidualNoMask( peakresnomask ); build 12-Apr-2018 16:00:58 itsLoopController.setMaxPsfSidelobe( itsImages->getPSFSidelobeLevel() ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + if ( itsAutoMaskAlgorithm=="multithresh" && !initializeChanMaskFlag ) { build 12-Apr-2018 16:00:58 + IPosition maskshp = itsImages->mask()->shape(); build 12-Apr-2018 16:00:58 + Int nchan = maskshp(3); build 12-Apr-2018 16:00:58 + itsChanFlag=Vector(nchan,False); build 12-Apr-2018 16:00:58 + initializeChanMaskFlag=True; build 12-Apr-2018 16:00:58 + // also initialize posmask, which tracks only positive (emission) build 12-Apr-2018 16:00:58 + itsPosMask = TempImage (maskshp, itsImages->mask()->coordinates(),SDMaskHandler::memoryToUse()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + os< rmss = itsImages->calcRobustRMS(); build 12-Apr-2018 16:00:58 AlwaysAssert( rmss.shape()[0]>0 , AipsError); build 12-Apr-2018 16:00:58 @@ -526,14 +541,17 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 if ( itsAutoMaskAlgorithm != "" ) { build 12-Apr-2018 16:00:58 itsIterDone += itsLoopController.getIterDone(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + Bool isThresholdReached = itsLoopController.isThresholdReached(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 LogIO os( LogOrigin("SynthesisDeconvolver","setAutoMask",WHERE) ); build 12-Apr-2018 16:00:58 os << "Generating AutoMask" << LogIO::POST; build 12-Apr-2018 16:00:58 + //os << "itsMinPercentChnage = " << itsMinPercentChange<< LogIO::POST; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if ( itsPBMask > 0.0 ) { build 12-Apr-2018 16:00:58 - itsMaskHandler->autoMaskWithinPB( itsImages, itsIterDone, itsAutoMaskAlgorithm, itsMaskThreshold, itsFracOfPeak, itsMaskResolution, itsMaskResByBeam, itsNMask, itsAutoAdjust, itsSidelobeThreshold, itsNoiseThreshold, itsLowNoiseThreshold, itsNegativeThreshold,itsCutThreshold, itsSmoothFactor, itsMinBeamFrac, itsGrowIterations, itsPBMask); build 12-Apr-2018 16:00:58 + itsMaskHandler->autoMaskWithinPB( itsImages, itsPosMask, itsIterDone, itsChanFlag, itsAutoMaskAlgorithm, itsMaskThreshold, itsFracOfPeak, itsMaskResolution, itsMaskResByBeam, itsNMask, itsAutoAdjust, itsSidelobeThreshold, itsNoiseThreshold, itsLowNoiseThreshold, itsNegativeThreshold,itsCutThreshold, itsSmoothFactor, itsMinBeamFrac, itsGrowIterations, itsDoGrowPrune, itsMinPercentChange, itsVerbose, isThresholdReached, itsPBMask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 - itsMaskHandler->autoMask( itsImages, itsIterDone, itsAutoMaskAlgorithm, itsMaskThreshold, itsFracOfPeak, itsMaskResolution, itsMaskResByBeam, itsNMask, itsAutoAdjust, itsSidelobeThreshold, itsNoiseThreshold, itsLowNoiseThreshold, itsNegativeThreshold, itsCutThreshold, itsSmoothFactor, itsMinBeamFrac, itsGrowIterations ); build 12-Apr-2018 16:00:58 + itsMaskHandler->autoMask( itsImages, itsPosMask, itsIterDone, itsChanFlag,itsAutoMaskAlgorithm, itsMaskThreshold, itsFracOfPeak, itsMaskResolution, itsMaskResByBeam, itsNMask, itsAutoAdjust, itsSidelobeThreshold, itsNoiseThreshold, itsLowNoiseThreshold, itsNegativeThreshold, itsCutThreshold, itsSmoothFactor, itsMinBeamFrac, itsGrowIterations, itsDoGrowPrune, itsMinPercentChange, itsVerbose, isThresholdReached ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisDeconvolver.h b/code/synthesis/ImagerObjects/SynthesisDeconvolver.h build 12-Apr-2018 16:00:58 index 881d407..f0d8c8d 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisDeconvolver.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisDeconvolver.h build 12-Apr-2018 16:00:58 @@ -170,12 +170,18 @@ protected: build 12-Apr-2018 16:00:58 casacore::Float itsCutThreshold; build 12-Apr-2018 16:00:58 casacore::Int itsIterDone; build 12-Apr-2018 16:00:58 casacore::Int itsGrowIterations; build 12-Apr-2018 16:00:58 + casacore::Bool itsDoGrowPrune; build 12-Apr-2018 16:00:58 + casacore::Float itsMinPercentChange; build 12-Apr-2018 16:00:58 + casacore::Bool itsVerbose; build 12-Apr-2018 16:00:58 + casacore::Vector itsChanFlag; build 12-Apr-2018 16:00:58 + casacore::Bool initializeChanMaskFlag; build 12-Apr-2018 16:00:58 + casacore::TempImage itsPosMask; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::Bool itsIsMaskLoaded; // Try to get rid of this state variable ! build 12-Apr-2018 16:00:58 casacore::Bool itsIsInteractive; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::Float itsMaskSum; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisImager.cc b/code/synthesis/ImagerObjects/SynthesisImager.cc build 12-Apr-2018 16:00:58 index eafaa4d..d3578ca 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisImager.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisImager.cc build 12-Apr-2018 16:00:58 @@ -56,7 +56,9 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -82,8 +84,10 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -103,7 +107,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 SynthesisImager::SynthesisImager() : itsMappers(SIMapperCollection()), writeAccess_p(True), build 12-Apr-2018 16:00:58 - gridpars_p(), impars_p() build 12-Apr-2018 16:00:58 + gridpars_p(), impars_p(), movingSource_p("") build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 imwgt_p=VisImagingWeight("natural"); build 12-Apr-2018 16:00:58 @@ -2705,8 +2709,9 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 for(rvi_p->originChunks(); rvi_p->moreChunks(); rvi_p->nextChunk()){ build 12-Apr-2018 16:00:58 Bool fieldDone=false; build 12-Apr-2018 16:00:58 - for (uInt k=0; k < fieldsDone.nelements(); ++k) build 12-Apr-2018 16:00:58 + for (uInt k=0; k < fieldsDone.nelements(); ++k){ build 12-Apr-2018 16:00:58 fieldDone=fieldDone || (vb.fieldId()==fieldsDone(k)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if(!fieldDone){ build 12-Apr-2018 16:00:58 ++fieldCounter; build 12-Apr-2018 16:00:58 fieldsDone.resize(fieldCounter, true); build 12-Apr-2018 16:00:58 @@ -2723,7 +2728,11 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 return True; build 12-Apr-2018 16:00:58 }// end makePB build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + /////=========== build 12-Apr-2018 16:00:58 + void SynthesisImager::setMovingSource(const String& movingSource){ build 12-Apr-2018 16:00:58 + movingSource_p=movingSource; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisImager.h b/code/synthesis/ImagerObjects/SynthesisImager.h build 12-Apr-2018 16:00:58 index 5f7aa22..56f9ff6 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisImager.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisImager.h build 12-Apr-2018 16:00:58 @@ -195,6 +195,9 @@ class SynthesisImager build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 const SynthesisParamsGrid& getSynthesisParamsGrid() {return gridpars_p;}; build 12-Apr-2018 16:00:58 const SynthesisParamsImage& getSynthesisParamsImage() {return impars_p;}; build 12-Apr-2018 16:00:58 + ///This will set the movingSource_p build 12-Apr-2018 16:00:58 + void setMovingSource(const casacore::String& movsource); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -397,6 +400,7 @@ protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 SynthesisParamsGrid gridpars_p; build 12-Apr-2018 16:00:58 SynthesisParamsImage impars_p; build 12-Apr-2018 16:00:58 + String movingSource_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc b/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc build 12-Apr-2018 16:00:58 index ed024f6..4a69e9b 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisImagerVi2.cc build 12-Apr-2018 16:00:58 @@ -55,7 +55,9 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -82,8 +84,10 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -519,10 +523,11 @@ Bool SynthesisImagerVi2::defineImage(SynthesisParamsImage& impars, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 try build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 os << "Define image coordinates for [" << impars.imageName << "] : " << LogIO::POST; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 csys = impars.buildCoordinateSystem( *vi_p, channelSelections_p, mss_p ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition imshape = impars.shp(); build 12-Apr-2018 16:00:58 @@ -1462,11 +1467,20 @@ void SynthesisImagerVi2::unlockMSs() build 12-Apr-2018 16:00:58 //// Set interpolation mode build 12-Apr-2018 16:00:58 theFT->setFreqInterpolation( interpolation ); build 12-Apr-2018 16:00:58 theIFT->setFreqInterpolation( interpolation ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + ///Set tracking of moving source if any build 12-Apr-2018 16:00:58 + if(movingSource_p != ""){ build 12-Apr-2018 16:00:58 + theFT->setMovingSource(movingSource_p); build 12-Apr-2018 16:00:58 + theIFT->setMovingSource(movingSource_p); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 /* vi_p has chanselection now build 12-Apr-2018 16:00:58 //channel selections from spw param build 12-Apr-2018 16:00:58 theFT->setSpwChanSelection(chanSel_p); build 12-Apr-2018 16:00:58 theIFT->setSpwChanSelection(chanSel_p); build 12-Apr-2018 16:00:58 */ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// build 12-Apr-2018 16:00:58 @@ -1579,6 +1593,13 @@ void SynthesisImagerVi2::unlockMSs() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 cfCacheObj = new refim::CFCache(); build 12-Apr-2018 16:00:58 cfCacheObj->setCacheDir(cfCache.data()); build 12-Apr-2018 16:00:58 + // Get the LAZYFILL setting from the user configuration. If not build 12-Apr-2018 16:00:58 + // found, default to False. build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // With lazy fill ON, CFCache loads the required CFs on-demand build 12-Apr-2018 16:00:58 + // from the disk. And periodically triggers garbage collection to build 12-Apr-2018 16:00:58 + // release CFs that aren't required immediately. build 12-Apr-2018 16:00:58 + cfCacheObj->setLazyFill(SynthesisUtils::getenv("CFCache.LAZYFILL",0)==1); build 12-Apr-2018 16:00:58 // cerr << "Setting wtImagePrefix to " << imageNamePrefix.c_str() << endl; build 12-Apr-2018 16:00:58 cfCacheObj->setWtImagePrefix(imageNamePrefix.c_str()); build 12-Apr-2018 16:00:58 cfCacheObj->initCache2(); build 12-Apr-2018 16:00:58 @@ -2090,22 +2111,33 @@ void SynthesisImagerVi2::unlockMSs() build 12-Apr-2018 16:00:58 vi::VisBuffer2* vb = vi_p->getVisBuffer(); build 12-Apr-2018 16:00:58 vi_p->originChunks(); build 12-Apr-2018 16:00:58 vi_p->origin(); build 12-Apr-2018 16:00:58 - Int fieldCounter=0; build 12-Apr-2018 16:00:58 - Vector fieldsDone; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + std::map> fieldsDone; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + ///////if tracking a moving source build 12-Apr-2018 16:00:58 + MDirection origMovingDir; build 12-Apr-2018 16:00:58 + MDirection newPhaseCenter; build 12-Apr-2018 16:00:58 + Bool trackBeam=getMovingDirection(*vb, origMovingDir); build 12-Apr-2018 16:00:58 + ////// build 12-Apr-2018 16:00:58 for(vi_p->originChunks(); vi_p->moreChunks(); vi_p->nextChunk()) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 for (vi_p->origin(); vi_p->more(); vi_p->next()) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 Bool fieldDone=False; build 12-Apr-2018 16:00:58 - for (uInt k=0; k < fieldsDone.nelements(); ++k) build 12-Apr-2018 16:00:58 - fieldDone=fieldDone || (vb->fieldId()(0)==fieldsDone(k)); build 12-Apr-2018 16:00:58 + if(fieldsDone.count(vb->msId() >0)){ build 12-Apr-2018 16:00:58 + fieldDone=fieldDone || (fieldsDone[vb->msId()].count(vb->fieldId()(0)) > 0); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + fieldsDone[vb->msId()]=std::set(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if(!fieldDone){ build 12-Apr-2018 16:00:58 - ++fieldCounter; build 12-Apr-2018 16:00:58 - fieldsDone.resize(fieldCounter, True); build 12-Apr-2018 16:00:58 - fieldsDone(fieldCounter-1)=vb->fieldId()(0); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - itsMappers.addPB(*vb,pbMath); build 12-Apr-2018 16:00:58 + fieldsDone[vb->msId()].insert(vb->fieldId()(0)); build 12-Apr-2018 16:00:58 + if(trackBeam){ build 12-Apr-2018 16:00:58 + MDirection newMovingDir; build 12-Apr-2018 16:00:58 + getMovingDirection(*vb, newMovingDir); build 12-Apr-2018 16:00:58 + newPhaseCenter=vb->phaseCenter(); build 12-Apr-2018 16:00:58 + newPhaseCenter.shift(MVDirection(-newMovingDir.getAngle()+origMovingDir.getAngle()), False); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + itsMappers.addPB(*vb,pbMath, newPhaseCenter, trackBeam); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -2116,7 +2148,46 @@ void SynthesisImagerVi2::unlockMSs() build 12-Apr-2018 16:00:58 return True; build 12-Apr-2018 16:00:58 }// end makePB build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + Bool SynthesisImagerVi2::getMovingDirection(const vi::VisBuffer2& vb, MDirection& outDir){ build 12-Apr-2018 16:00:58 + MDirection movingDir; build 12-Apr-2018 16:00:58 + Bool trackBeam=False; build 12-Apr-2018 16:00:58 + MeasFrame mFrame(MEpoch(Quantity(vb.time()(0), "s"), ROMSColumns(vb.ms()).timeMeas()(0).getRef()), mLocation_p); build 12-Apr-2018 16:00:58 + if(movingSource_p != ""){ build 12-Apr-2018 16:00:58 + MDirection::Types refType; build 12-Apr-2018 16:00:58 + trackBeam=True; build 12-Apr-2018 16:00:58 + if(Table::isReadable(movingSource_p, False)){ build 12-Apr-2018 16:00:58 + //seems to be a table so assuming ephemerides table build 12-Apr-2018 16:00:58 + Table laTable(movingSource_p); build 12-Apr-2018 16:00:58 + Path leSentier(movingSource_p); build 12-Apr-2018 16:00:58 + MeasComet laComet(laTable, leSentier.absoluteName()); build 12-Apr-2018 16:00:58 + movingDir.setRefString("COMET"); build 12-Apr-2018 16:00:58 + mFrame.set(laComet); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + ///if not a table build 12-Apr-2018 16:00:58 + else if(casacore::MDirection::getType(refType, movingSource_p)){ build 12-Apr-2018 16:00:58 + if(refType > casacore::MDirection::N_Types && refType < casacore::MDirection:: N_Planets ){ build 12-Apr-2018 16:00:58 + ///A known planet build 12-Apr-2018 16:00:58 + movingDir.setRefString(movingSource_p); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else if(upcase(movingSource_p)=="TRACKFIELD"){ build 12-Apr-2018 16:00:58 + movingDir=VisBufferUtil::getEphemDir(vb, -1.0); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + throw(AipsError("Erroneous tracking direction set to make pb")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + MDirection::Ref outref1(MDirection::AZEL, mFrame); build 12-Apr-2018 16:00:58 + MDirection tmphazel=MDirection::Convert(movingDir, outref1)(); build 12-Apr-2018 16:00:58 + MDirection::Ref outref(vb.phaseCenter().getRef().getType(), mFrame); build 12-Apr-2018 16:00:58 + outDir=MDirection::Convert(tmphazel, outref)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + outDir=vb.phaseCenter(); build 12-Apr-2018 16:00:58 + trackBeam=False; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return trackBeam; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisImagerVi2.h b/code/synthesis/ImagerObjects/SynthesisImagerVi2.h build 12-Apr-2018 16:00:58 index 69ca696..cdaed96 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisImagerVi2.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisImagerVi2.h build 12-Apr-2018 16:00:58 @@ -194,6 +194,10 @@ public: build 12-Apr-2018 16:00:58 void andFreqSelection(const casacore::Int msId, const casacore::Int spwId, const casacore::Double freqBeg, const casacore::Double freqEnd, const casacore::MFrequency::Types frame); build 12-Apr-2018 16:00:58 void andChanSelection(const casacore::Int msId, const casacore::Int spwId, const casacore::Int startchan, const casacore::Int endchan); build 12-Apr-2018 16:00:58 void tuneChunk(const casacore::Int gmap); build 12-Apr-2018 16:00:58 + //Set up tracking direction ; return False if no tracking is set. build 12-Apr-2018 16:00:58 + //return Direction of moving source is in the frame of vb.phaseCenter() at the time of the first row of the vb build 12-Apr-2018 16:00:58 + casacore::Bool getMovingDirection(const vi::VisBuffer2& vb, casacore::MDirection& movingDir); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Other Options build 12-Apr-2018 16:00:58 //casacore::Block mss_p; build 12-Apr-2018 16:00:58 casacore::CountedPtr vi_p; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc b/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc build 12-Apr-2018 16:00:58 index 00238a0..f9dbb78 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisUtilMethods.cc build 12-Apr-2018 16:00:58 @@ -3477,6 +3477,33 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 err+= "growiterations must be an integer\n"; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + if( inrec.isDefined("dogrowprune")) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (inrec.dataType("dogrowprune")==TpBool) { build 12-Apr-2018 16:00:58 + err+= readVal(inrec, String("dogrowprune"), doGrowPrune ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + err+= "dogrowprune must be a bool\n"; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if( inrec.isDefined("minpercentchange")) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (inrec.dataType("minpercentchange")==TpFloat || inrec.dataType("minpercentchange")==TpDouble ) { build 12-Apr-2018 16:00:58 + err+= readVal(inrec, String("minpercentchange"), minPercentChange ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + err+= "minpercentchange must be a float or double"; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if( inrec.isDefined("verbose")) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (inrec.dataType("verbose")==TpBool ) { build 12-Apr-2018 16:00:58 + err+= readVal(inrec, String("verbose"), verbose); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + err+= "verbose must be a bool"; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if( inrec.isDefined("restoringbeam") ) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 String errinfo(""); build 12-Apr-2018 16:00:58 @@ -3646,6 +3673,9 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 decpar.define("minbeamfrac",minBeamFrac); build 12-Apr-2018 16:00:58 decpar.define("cutthreshold",cutThreshold); build 12-Apr-2018 16:00:58 decpar.define("growiterations",growIterations); build 12-Apr-2018 16:00:58 + decpar.define("dogrowprune",doGrowPrune); build 12-Apr-2018 16:00:58 + decpar.define("minpercentchange",minPercentChange); build 12-Apr-2018 16:00:58 + decpar.define("verbose", verbose); build 12-Apr-2018 16:00:58 decpar.define("interactive",interactive); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 return decpar; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/SynthesisUtilMethods.h b/code/synthesis/ImagerObjects/SynthesisUtilMethods.h build 12-Apr-2018 16:00:58 index 13e4f59..10ab2c9 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/SynthesisUtilMethods.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/SynthesisUtilMethods.h build 12-Apr-2018 16:00:58 @@ -370,6 +370,9 @@ public: build 12-Apr-2018 16:00:58 casacore::Float minBeamFrac; build 12-Apr-2018 16:00:58 casacore::Float cutThreshold; build 12-Apr-2018 16:00:58 casacore::Int growIterations; build 12-Apr-2018 16:00:58 + casacore::Bool doGrowPrune; build 12-Apr-2018 16:00:58 + casacore::Float minPercentChange; build 12-Apr-2018 16:00:58 + casacore::Bool verbose; build 12-Apr-2018 16:00:58 int nMask; build 12-Apr-2018 16:00:58 bool autoAdjust; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/test/SDMaskHandler_GTest.cc b/code/synthesis/ImagerObjects/test/SDMaskHandler_GTest.cc build 12-Apr-2018 16:00:58 index 2831591..5408063 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/ImagerObjects/test/SDMaskHandler_GTest.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/test/SDMaskHandler_GTest.cc build 12-Apr-2018 16:00:58 @@ -283,7 +283,9 @@ void ImageInterfaceTest::testMaskByPerPlaneThreshold() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 PagedImage outmaskimage(TiledShape(shape), csys, String("testMaskPerChanOutput.im")); build 12-Apr-2018 16:00:58 SDMaskHandler maskhandler; build 12-Apr-2018 16:00:58 - maskhandler.makeMaskByPerChanThreshold(templateImage, outmaskimage, thresval); build 12-Apr-2018 16:00:58 + Vector chanflg(5,False); build 12-Apr-2018 16:00:58 + Vector maskpixs; build 12-Apr-2018 16:00:58 + maskhandler.makeMaskByPerChanThreshold(templateImage, chanflg, outmaskimage, thresval, maskpixs); build 12-Apr-2018 16:00:58 ASSERT_TRUE(outmaskimage.getAt(IPosition(4,50,45,0,0))==Float(1.0)); build 12-Apr-2018 16:00:58 ASSERT_TRUE(outmaskimage.getAt(IPosition(4,50,46,0,0))==Float(0.0)); build 12-Apr-2018 16:00:58 ASSERT_TRUE(outmaskimage.getAt(IPosition(4,25,25,0,1))==Float(0.0)); build 12-Apr-2018 16:00:58 @@ -366,7 +368,7 @@ void ImageInterfaceTest::testBinaryDilationIter() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition shape(4, 100, 100, 1, 5); build 12-Apr-2018 16:00:58 csys=CoordinateUtil::defaultCoords4D(); build 12-Apr-2018 16:00:58 - PagedImage InImage(TiledShape(shape),csys, String("testBDilationIn.im")); build 12-Apr-2018 16:00:58 + PagedImage InImage(TiledShape(shape),csys, String("testBDilationIn2.im")); build 12-Apr-2018 16:00:58 //PagedImage dummyMaskImage(TiledShape(shape),csys, String("testBDilationDummyMask.im")); build 12-Apr-2018 16:00:58 TempImage dummyMaskImage(TiledShape(shape),csys); build 12-Apr-2018 16:00:58 // no mask case (all true) build 12-Apr-2018 16:00:58 @@ -456,7 +458,10 @@ void ImageInterfaceTest::testYAPruneRegions() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Double prunesize=2.0; build 12-Apr-2018 16:00:58 Vector pruned; build 12-Apr-2018 16:00:58 - SHARED_PTR > tempIm_ptr = maskhandler.YAPruneRegions(InImage,pruned,prunesize); build 12-Apr-2018 16:00:58 + Vector chanflg(5,False); build 12-Apr-2018 16:00:58 + Vector nreg; build 12-Apr-2018 16:00:58 + Vector npruned; build 12-Apr-2018 16:00:58 + SHARED_PTR > tempIm_ptr = maskhandler.YAPruneRegions(InImage,chanflg, pruned,nreg, npruned, prunesize); build 12-Apr-2018 16:00:58 PagedImage outMask(InImage.shape(), InImage.coordinates(), "testYAPruneRegions-out.mask"); build 12-Apr-2018 16:00:58 outMask.copyData(*(tempIm_ptr.get()) ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -494,7 +499,10 @@ void ImageInterfaceTest::testYAPruneRegionsBigImage() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Double prunesize=2.0; build 12-Apr-2018 16:00:58 Vector pruned; build 12-Apr-2018 16:00:58 - SHARED_PTR > tempIm_ptr = maskhandler.YAPruneRegions(InImage,pruned,prunesize); build 12-Apr-2018 16:00:58 + Vector chanflg(5,False); build 12-Apr-2018 16:00:58 + Vector nreg; build 12-Apr-2018 16:00:58 + Vector npruned; build 12-Apr-2018 16:00:58 + SHARED_PTR > tempIm_ptr = maskhandler.YAPruneRegions(InImage,chanflg, pruned, nreg, npruned, prunesize); build 12-Apr-2018 16:00:58 PagedImage outMask(InImage.shape(), InImage.coordinates(), "testYAPruneRegions2-out.mask"); build 12-Apr-2018 16:00:58 outMask.copyData(*(tempIm_ptr.get()) ); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/test/tBinaryDilation.cc b/code/synthesis/ImagerObjects/test/tBinaryDilation.cc build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..6f49cc0 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/test/tBinaryDilation.cc build 12-Apr-2018 16:00:58 @@ -0,0 +1,129 @@ build 12-Apr-2018 16:00:58 +/* build 12-Apr-2018 16:00:58 + * tBinaryDilation.cc build 12-Apr-2018 16:00:58 +//# Copyright (C) 2013-2014 build 12-Apr-2018 16:00:58 +//# Associated Universities, Inc. Washington DC, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This program is free software; you can redistribute it and/or modify it build 12-Apr-2018 16:00:58 +//# under the terms of the GNU General Public License as published by the Free build 12-Apr-2018 16:00:58 +//# Software Foundation; either version 2 of the License, or (at your option) build 12-Apr-2018 16:00:58 +//# any later version. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This program is distributed in the hope that it will be useful, but WITHOUT build 12-Apr-2018 16:00:58 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 12-Apr-2018 16:00:58 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for build 12-Apr-2018 16:00:58 +//# more details. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# You should have received a copy of the GNU General Public License along build 12-Apr-2018 16:00:58 +//# with this program; if not, write to the Free Software Foundation, Inc., build 12-Apr-2018 16:00:58 +//# 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# Correspondence concerning AIPS++ should be addressed as follows: build 12-Apr-2018 16:00:58 +//# Internet email: aips2-request@nrao.edu. build 12-Apr-2018 16:00:58 +//# Postal address: AIPS++ Project Office build 12-Apr-2018 16:00:58 +//# National Radio Astronomy Observatory build 12-Apr-2018 16:00:58 +//# 520 Edgemont Road build 12-Apr-2018 16:00:58 +//# Charlottesville, VA 22903-2475 USA build 12-Apr-2018 16:00:58 + * build 12-Apr-2018 16:00:58 + * test binaryDilation build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +int main(int argc, char **argv) build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + using namespace std; build 12-Apr-2018 16:00:58 + using namespace casacore; build 12-Apr-2018 16:00:58 + using namespace casa; build 12-Apr-2018 16:00:58 + try{ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Timer timer; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + String imagename, constraintimagename; build 12-Apr-2018 16:00:58 + String outMaskName("testBinaryDilationOut.im"); build 12-Apr-2018 16:00:58 + CoordinateSystem csys; build 12-Apr-2018 16:00:58 + IPosition shape; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (argc > 1) { build 12-Apr-2018 16:00:58 + imagename=argv[1]; build 12-Apr-2018 16:00:58 + constraintimagename=argv[2]; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + imagename = "testBDilationIn.im"; build 12-Apr-2018 16:00:58 + constraintimagename = "testBDilationInConstaint.im"; build 12-Apr-2018 16:00:58 + shape=IPosition(4, 100, 100, 1, 5); build 12-Apr-2018 16:00:58 + csys=CoordinateUtil::defaultCoords4D(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + PagedImage InImage(TiledShape(shape),csys,imagename); build 12-Apr-2018 16:00:58 + PagedImage InConstraintImage(TiledShape(shape),csys,constraintimagename); build 12-Apr-2018 16:00:58 + // no mask case (all true) build 12-Apr-2018 16:00:58 + InConstraintImage.set(1); build 12-Apr-2018 16:00:58 + InImage.setUnits(Unit("Jy/pixel")); build 12-Apr-2018 16:00:58 + InImage.set(0.0); build 12-Apr-2018 16:00:58 + //masked regions build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,40,50,0,0)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,45,55,0,0)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,45,56,0,0)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,0,0,0,0)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,0,99,0,0)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,99,99,0,0)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,46,56,0,3)); build 12-Apr-2018 16:00:58 + InImage.putAt(1.0, IPosition(4,45,56,0,4)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + CountedPtr > im; build 12-Apr-2018 16:00:58 + im = ImageUtilities::openImage(imagename); build 12-Apr-2018 16:00:58 + IPosition shp=im->shape(); build 12-Apr-2018 16:00:58 + csys = im->coordinates(); build 12-Apr-2018 16:00:58 + CountedPtr > constraintim; build 12-Apr-2018 16:00:58 + constraintim = ImageUtilities::openImage(constraintimagename); build 12-Apr-2018 16:00:58 + IPosition constshp=im->shape(); build 12-Apr-2018 16:00:58 + PagedImage outmaskimage(TiledShape(shp), csys, outMaskName); build 12-Apr-2018 16:00:58 + SDMaskHandler maskhandler; build 12-Apr-2018 16:00:58 + //Structure Element build 12-Apr-2018 16:00:58 + IPosition axislen(2, 3, 3); build 12-Apr-2018 16:00:58 + Array se(axislen); build 12-Apr-2018 16:00:58 + se.set(0); build 12-Apr-2018 16:00:58 + se(IPosition(2,1,0))=1.0; build 12-Apr-2018 16:00:58 + se(IPosition(2,0,1))=1.0; build 12-Apr-2018 16:00:58 + se(IPosition(2,1,1))=1.0; build 12-Apr-2018 16:00:58 + se(IPosition(2,2,1))=1.0; build 12-Apr-2018 16:00:58 + se(IPosition(2,1,2))=1.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + TempImage maskImage(TiledShape(constshp), csys); build 12-Apr-2018 16:00:58 + maskImage.copyData(*constraintim); build 12-Apr-2018 16:00:58 + maskImage.attachMask( LatticeExpr( iif(maskImage > 0, true, false)) ); build 12-Apr-2018 16:00:58 + ArrayLattice mask( maskImage.getMask()); build 12-Apr-2018 16:00:58 + IPosition specshape(2,1,shp(3)); build 12-Apr-2018 16:00:58 + Array chanmask(specshape); build 12-Apr-2018 16:00:58 + chanmask.set(true); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + maskhandler.binaryDilation(*im, se, 75, mask, chanmask, outmaskimage); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + catch( AipsError e ){ build 12-Apr-2018 16:00:58 + cout << "Exception ocurred." << endl; build 12-Apr-2018 16:00:58 + cout << e.getMesg() << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return 0; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/test/tLabelandFindRegionsFullCube.cc b/code/synthesis/ImagerObjects/test/tLabelandFindRegionsFullCube.cc build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..aa2fa1e build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/test/tLabelandFindRegionsFullCube.cc build 12-Apr-2018 16:00:58 @@ -0,0 +1,154 @@ build 12-Apr-2018 16:00:58 +/* build 12-Apr-2018 16:00:58 + * tLabelRegionsFullCube.cc build 12-Apr-2018 16:00:58 + *demo of SynthesisUtil functionality build 12-Apr-2018 16:00:58 +//# Copyright (C) 2013-2014 build 12-Apr-2018 16:00:58 +//# Associated Universities, Inc. Washington DC, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This program is free software; you can redistribute it and/or modify it build 12-Apr-2018 16:00:58 +//# under the terms of the GNU General Public License as published by the Free build 12-Apr-2018 16:00:58 +//# Software Foundation; either version 2 of the License, or (at your option) build 12-Apr-2018 16:00:58 +//# any later version. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This program is distributed in the hope that it will be useful, but WITHOUT build 12-Apr-2018 16:00:58 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 12-Apr-2018 16:00:58 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for build 12-Apr-2018 16:00:58 +//# more details. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# You should have received a copy of the GNU General Public License along build 12-Apr-2018 16:00:58 +//# with this program; if not, write to the Free Software Foundation, Inc., build 12-Apr-2018 16:00:58 +//# 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# Correspondence concerning AIPS++ should be addressed as follows: build 12-Apr-2018 16:00:58 +//# Internet email: aips2-request@nrao.edu. build 12-Apr-2018 16:00:58 +//# Postal address: AIPS++ Project Office build 12-Apr-2018 16:00:58 +//# National Radio Astronomy Observatory build 12-Apr-2018 16:00:58 +//# 520 Edgemont Road build 12-Apr-2018 16:00:58 +//# Charlottesville, VA 22903-2475 USA build 12-Apr-2018 16:00:58 + * build 12-Apr-2018 16:00:58 + * test labelRegions and findBlobSize build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +int main(int argc, char **argv) build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + using namespace std; build 12-Apr-2018 16:00:58 + using namespace casacore; build 12-Apr-2018 16:00:58 + using namespace casa; build 12-Apr-2018 16:00:58 + try{ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Timer timer; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + String imagename; build 12-Apr-2018 16:00:58 + if (argc > 1) { build 12-Apr-2018 16:00:58 + imagename=argv[1]; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + imagename="tLabelandFindRegions.temp.mask"; build 12-Apr-2018 16:00:58 + Int imsize = 100; build 12-Apr-2018 16:00:58 + Int nchan = 2; build 12-Apr-2018 16:00:58 + IPosition blc(4,45,50,0,0); build 12-Apr-2018 16:00:58 + IPosition trc(4,55,55,0,0); build 12-Apr-2018 16:00:58 + IPosition shape(4, imsize, imsize, 1, nchan); build 12-Apr-2018 16:00:58 + CoordinateSystem csys=CoordinateUtil::defaultCoords4D(); build 12-Apr-2018 16:00:58 + PagedImage maskImage(TiledShape(shape), csys, imagename); build 12-Apr-2018 16:00:58 + maskImage.setUnits(Unit("Jy/pixel")); build 12-Apr-2018 16:00:58 + maskImage.set(0.0); build 12-Apr-2018 16:00:58 + // sanity check build 12-Apr-2018 16:00:58 + if (blc(0) <= trc(0) && blc(1) <= trc(1) && blc(3) < nchan) { build 12-Apr-2018 16:00:58 + Int dx = trc(0) - blc(0); build 12-Apr-2018 16:00:58 + Int dy = trc(1) - blc(1); build 12-Apr-2018 16:00:58 + for (uInt i=0+blc(3); i < trc(3)+1; i++) { build 12-Apr-2018 16:00:58 + for (uInt j=0; j < (uInt)dx+1; j++) { build 12-Apr-2018 16:00:58 + for (uInt k=0; k < (uInt)dy+1; k++) { build 12-Apr-2018 16:00:58 + IPosition loc(4,blc(0)+j, blc(1)+k, 0, Int(i)); build 12-Apr-2018 16:00:58 + Float val = 1.0; build 12-Apr-2018 16:00:58 + maskImage.putAt(val, loc); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + CountedPtr > im; build 12-Apr-2018 16:00:58 + im = ImageUtilities::openImage(imagename); build 12-Apr-2018 16:00:58 + IPosition shp=im->shape(); build 12-Apr-2018 16:00:58 + Int nchan = shp(3); build 12-Apr-2018 16:00:58 + cerr<<"input image shape="<* fullIm = new TempImage(TiledShape(fullimShape, image.niceCursorShape()), image.coordinates(), memoryToUse()); build 12-Apr-2018 16:00:58 + //fullIm->set(0); build 12-Apr-2018 16:00:58 + for (Int ich=0; ich < nchan; ich++) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + IPosition start(4, 0, 0, 0, ich); build 12-Apr-2018 16:00:58 + IPosition length(4, shp(0),shp(1),shp(2),1); build 12-Apr-2018 16:00:58 + Slicer sl(start, length); build 12-Apr-2018 16:00:58 + AxesSpecifier aspec(False); build 12-Apr-2018 16:00:58 + SubImage* subIm = new SubImage(*im, sl, aspec, True); build 12-Apr-2018 16:00:58 + //cerr<<"subIm shape="<shape()<<" slice="<* tempIm = new TempImage (TiledShape(subIm->shape(), subIm->niceCursorShape()), subIm->coordinates() ); build 12-Apr-2018 16:00:58 + tempIm->copyData(LatticeExpr (*subIm)); build 12-Apr-2018 16:00:58 + //cerr<<"tempIm shape="<shape()<* blobMap = new TempImage (TiledShape(subIm->shape(), subIm->niceCursorShape()), subIm->coordinates() ); build 12-Apr-2018 16:00:58 + blobMap->set(0); build 12-Apr-2018 16:00:58 + //cerr<<"blobMap shape="<shape()< subimarr; build 12-Apr-2018 16:00:58 + //Array blobarr; build 12-Apr-2018 16:00:58 + //smh.getarr(*subIm, False); build 12-Apr-2018 16:00:58 + //smh.getarr(*blobMap, True); build 12-Apr-2018 16:00:58 + smh.labelRegions(*subIm, *blobMap); build 12-Apr-2018 16:00:58 + timer.show("time took for labelRegions"); build 12-Apr-2018 16:00:58 + //cerr<<"Calling findBlobSize()..."< bloblist=smh.findBlobSize(*blobMap); build 12-Apr-2018 16:00:58 + timer.show("time took for findBlobSize"); build 12-Apr-2018 16:00:58 + for (uInt iblob=0; iblob subimData; build 12-Apr-2018 16:00:58 + //tempIm->getSlice(subimData,IPosition(2,0), tempIm->shape(), IPosition(2,1,1)); build 12-Apr-2018 16:00:58 + //fullIm->putSlice(subimData,start,IPosition(4,1,1,1,1)); build 12-Apr-2018 16:00:58 + delete tempIm; tempIm=0; build 12-Apr-2018 16:00:58 + delete subIm; subIm=0; build 12-Apr-2018 16:00:58 + delete blobMap; blobMap=0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + }catch( AipsError e ){ build 12-Apr-2018 16:00:58 + cout << "Exception ocurred." << endl; build 12-Apr-2018 16:00:58 + cout << e.getMesg() << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return 0; build 12-Apr-2018 16:00:58 +}; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/ImagerObjects/test/tSkipChannels.cc b/code/synthesis/ImagerObjects/test/tSkipChannels.cc build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..520c288 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/code/synthesis/ImagerObjects/test/tSkipChannels.cc build 12-Apr-2018 16:00:58 @@ -0,0 +1,117 @@ build 12-Apr-2018 16:00:58 +/* build 12-Apr-2018 16:00:58 + * tSkipChannel.cc build 12-Apr-2018 16:00:58 +//# Copyright (C) 2013-2014 build 12-Apr-2018 16:00:58 +//# Associated Universities, Inc. Washington DC, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This program is free software; you can redistribute it and/or modify it build 12-Apr-2018 16:00:58 +//# under the terms of the GNU General Public License as published by the Free build 12-Apr-2018 16:00:58 +//# Software Foundation; either version 2 of the License, or (at your option) build 12-Apr-2018 16:00:58 +//# any later version. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# This program is distributed in the hope that it will be useful, but WITHOUT build 12-Apr-2018 16:00:58 +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or build 12-Apr-2018 16:00:58 +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for build 12-Apr-2018 16:00:58 +//# more details. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# You should have received a copy of the GNU General Public License along build 12-Apr-2018 16:00:58 +//# with this program; if not, write to the Free Software Foundation, Inc., build 12-Apr-2018 16:00:58 +//# 675 Massachusetts Ave, Cambridge, MA 02139, USA. build 12-Apr-2018 16:00:58 +//# build 12-Apr-2018 16:00:58 +//# Correspondence concerning AIPS++ should be addressed as follows: build 12-Apr-2018 16:00:58 +//# Internet email: aips2-request@nrao.edu. build 12-Apr-2018 16:00:58 +//# Postal address: AIPS++ Project Office build 12-Apr-2018 16:00:58 +//# National Radio Astronomy Observatory build 12-Apr-2018 16:00:58 +//# 520 Edgemont Road build 12-Apr-2018 16:00:58 +//# Charlottesville, VA 22903-2475 USA build 12-Apr-2018 16:00:58 + * build 12-Apr-2018 16:00:58 + * test skioChannel build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +int main(int argc, char **argv) build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + using namespace std; build 12-Apr-2018 16:00:58 + using namespace casacore; build 12-Apr-2018 16:00:58 + using namespace casa; build 12-Apr-2018 16:00:58 + try{ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Timer timer; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + String curimname, previmname; build 12-Apr-2018 16:00:58 + String outMaskName("testSkipChannels.im"); build 12-Apr-2018 16:00:58 + CoordinateSystem csys; build 12-Apr-2018 16:00:58 + IPosition shape; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (argc > 1) { build 12-Apr-2018 16:00:58 + curimname=argv[1]; build 12-Apr-2018 16:00:58 + previmname=argv[2]; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + curimname = "testSkipChanCur.im"; build 12-Apr-2018 16:00:58 + previmname = "testSkipChanPrev.im"; build 12-Apr-2018 16:00:58 + shape=IPosition(4, 100, 100, 1, 5); build 12-Apr-2018 16:00:58 + csys=CoordinateUtil::defaultCoords4D(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + PagedImage curImage(TiledShape(shape),csys,curimname); build 12-Apr-2018 16:00:58 + PagedImage prevImage(TiledShape(shape),csys,previmname); build 12-Apr-2018 16:00:58 + // no mask case (all true) build 12-Apr-2018 16:00:58 + prevImage.set(1); build 12-Apr-2018 16:00:58 + curImage.setUnits(Unit("Jy/pixel")); build 12-Apr-2018 16:00:58 + curImage.set(0.0); build 12-Apr-2018 16:00:58 + //masked regions build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,40,50,0,0)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,45,55,0,0)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,45,56,0,0)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,0,0,0,0)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,0,99,0,0)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,99,99,0,0)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,46,56,0,3)); build 12-Apr-2018 16:00:58 + curImage.putAt(1.0, IPosition(4,45,56,0,4)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Float fracChange = 0.0; build 12-Apr-2018 16:00:58 + CountedPtr > im; build 12-Apr-2018 16:00:58 + im = ImageUtilities::openImage(curimname); build 12-Apr-2018 16:00:58 + IPosition shp=im->shape(); build 12-Apr-2018 16:00:58 + Int nchan = shp(3); build 12-Apr-2018 16:00:58 + csys = im->coordinates(); build 12-Apr-2018 16:00:58 + CountedPtr > previm; build 12-Apr-2018 16:00:58 + previm = ImageUtilities::openImage(previmname); build 12-Apr-2018 16:00:58 + IPosition constshp=im->shape(); build 12-Apr-2018 16:00:58 + SDMaskHandler maskhandler; build 12-Apr-2018 16:00:58 + Vector chanflag(nchan); build 12-Apr-2018 16:00:58 + Vector zeromask(nchan); build 12-Apr-2018 16:00:58 + Vector type(nchan); build 12-Apr-2018 16:00:58 + Bool isthresholdreached(false); build 12-Apr-2018 16:00:58 + type.set("noise"); build 12-Apr-2018 16:00:58 + chanflag.set(false); build 12-Apr-2018 16:00:58 + maskhandler.skipChannels(fracChange, *previm, *im, type, isthresholdreached, chanflag, zeromask); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + catch( AipsError e ){ build 12-Apr-2018 16:00:58 + cout << "Exception ocurred." << endl; build 12-Apr-2018 16:00:58 + cout << e.getMesg() << endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return 0; build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/Calibrater.cc b/code/synthesis/MeasurementComponents/Calibrater.cc build 12-Apr-2018 16:00:58 index 28e89f0..1e0ac0e 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/Calibrater.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/Calibrater.cc build 12-Apr-2018 16:00:58 @@ -96,6 +96,7 @@ Calibrater::Calibrater(): build 12-Apr-2018 16:00:58 svc_p(0), build 12-Apr-2018 16:00:58 histLockCounter_p(), build 12-Apr-2018 16:00:58 hist_p(0), build 12-Apr-2018 16:00:58 + usingCalLibrary_(false), build 12-Apr-2018 16:00:58 actRec_(), build 12-Apr-2018 16:00:58 simdata_p(false), build 12-Apr-2018 16:00:58 ssvp_p() build 12-Apr-2018 16:00:58 @@ -115,6 +116,7 @@ Calibrater::Calibrater(String msname): build 12-Apr-2018 16:00:58 svc_p(0), build 12-Apr-2018 16:00:58 histLockCounter_p(), build 12-Apr-2018 16:00:58 hist_p(0), build 12-Apr-2018 16:00:58 + usingCalLibrary_(false), build 12-Apr-2018 16:00:58 actRec_(), build 12-Apr-2018 16:00:58 simdata_p(false), build 12-Apr-2018 16:00:58 ssvp_p() build 12-Apr-2018 16:00:58 @@ -153,6 +155,7 @@ Calibrater::Calibrater(const vi::SimpleSimVi2Parameters& ssvp): build 12-Apr-2018 16:00:58 svc_p(0), build 12-Apr-2018 16:00:58 histLockCounter_p(), build 12-Apr-2018 16:00:58 hist_p(0), build 12-Apr-2018 16:00:58 + usingCalLibrary_(false), build 12-Apr-2018 16:00:58 actRec_(), build 12-Apr-2018 16:00:58 simdata_p(true), build 12-Apr-2018 16:00:58 ssvp_p(ssvp) build 12-Apr-2018 16:00:58 @@ -622,7 +625,7 @@ Bool Calibrater::validatecallib(Record callib) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set up apply-able calibration via a Cal Library build 12-Apr-2018 16:00:58 -Bool Calibrater::setcallib2(Record callib) { build 12-Apr-2018 16:00:58 +Bool Calibrater::setcallib2(Record callib, const MeasurementSet* ms) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 logSink() << LogOrigin("Calibrater", "setcallib2(callib)"); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -651,7 +654,27 @@ Bool Calibrater::setcallib2(Record callib) { build 12-Apr-2018 16:00:58 // Tables exist, so deploy them... build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Local MS object for callib parsing (only) build 12-Apr-2018 16:00:58 - MeasurementSet lms(msname_p,Table::Update); build 12-Apr-2018 16:00:58 + // MeasurementSet lms(msname_p,Table::Update); build 12-Apr-2018 16:00:58 + // TBD: Use selected MS instead (not yet available in OTF plotms context!) build 12-Apr-2018 16:00:58 + //const MeasurementSet lms(*mssel_p); build 12-Apr-2018 16:00:58 + //MeasurementSet lms(msname_p); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Local const MS object for callib parsing (only) build 12-Apr-2018 16:00:58 + const MeasurementSet *lmsp(0); build 12-Apr-2018 16:00:58 + if (ms) { build 12-Apr-2018 16:00:58 + // Use supplied MS (from outside), if specified... build 12-Apr-2018 16:00:58 + // TBD: should we verify same base MS as ms_p/mssel_p? build 12-Apr-2018 16:00:58 + //cout << "Using externally-specified MS!!" << endl; build 12-Apr-2018 16:00:58 + lmsp=ms; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + // ...use internal one instead build 12-Apr-2018 16:00:58 + //cout << "Using internal MS (mssel_p)!!" << endl; build 12-Apr-2018 16:00:58 + lmsp=mssel_p; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Reference for use below build 12-Apr-2018 16:00:58 + const MeasurementSet &lms(*lmsp); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 for (uInt itab=0;itabsetCallib(thistabrec,lms); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } catch (AipsError x) { build 12-Apr-2018 16:00:58 logSink() << LogIO::SEVERE << x.getMesg() build 12-Apr-2018 16:00:58 << " Check inputs and try again." build 12-Apr-2018 16:00:58 @@ -712,6 +735,10 @@ Bool Calibrater::setcallib2(Record callib) { build 12-Apr-2018 16:00:58 return false; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Signal use of CalLibrary build 12-Apr-2018 16:00:58 + usingCalLibrary_=true; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // All ok, if we get this far! build 12-Apr-2018 16:00:58 return true; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1094,6 +1121,10 @@ Calibrater::correct2(String mode) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 logSink() << LogOrigin("Calibrater","correct2 (VI2/VB2)") << LogIO::NORMAL; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + //cout << "Artificial STOP!" << endl; build 12-Apr-2018 16:00:58 + //return false; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 Bool retval = true; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 try { build 12-Apr-2018 16:00:58 @@ -1166,7 +1197,11 @@ Calibrater::correct2(String mode) build 12-Apr-2018 16:00:58 for (vi.origin(); vi.more(); vi.next()) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 uInt spw = vb->spectralWindows()(0); build 12-Apr-2018 16:00:58 - if (ve_p->spwOK(spw)){ build 12-Apr-2018 16:00:58 + //if (ve_p->spwOK(spw)){ build 12-Apr-2018 16:00:58 + //if ( (usingCalLibrary_ && ve_p->VBOKforCalApply(*vb)) // CalLibrary case build 12-Apr-2018 16:00:58 + // || (!usingCalLibrary_ && ve_p->spwOK(spw)) // old-fashioned case build 12-Apr-2018 16:00:58 + // ) { build 12-Apr-2018 16:00:58 + if ( ve_p->VBOKforCalApply(*vb) ) { // Handles old and new (CL) contexts build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Re-initialize weight info from sigma info build 12-Apr-2018 16:00:58 // This is smart wrt spectral weights, etc. build 12-Apr-2018 16:00:58 @@ -1222,6 +1257,7 @@ Calibrater::correct2(String mode) build 12-Apr-2018 16:00:58 // set the flags, if we are being strict build 12-Apr-2018 16:00:58 // (don't touch the data/weights, which are initialized) build 12-Apr-2018 16:00:58 if (upmode.contains("STRICT")) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // reference (to avoid copy) and set the flags build 12-Apr-2018 16:00:58 Cube fC(vb->flagCube()); // reference build 12-Apr-2018 16:00:58 fC.set(true); build 12-Apr-2018 16:00:58 @@ -1241,7 +1277,6 @@ Calibrater::correct2(String mode) build 12-Apr-2018 16:00:58 // Asynchronous I/O doesn't have a way to skip build 12-Apr-2018 16:00:58 // VisBuffers, so only break out when not using build 12-Apr-2018 16:00:58 // async i/o. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 break; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1342,7 +1377,8 @@ Bool Calibrater::corrupt2() build 12-Apr-2018 16:00:58 for (vi.originChunks(); vi.moreChunks(); vi.nextChunk()) { build 12-Apr-2018 16:00:58 for (vi.origin(); vi.more(); vi.next()) { build 12-Apr-2018 16:00:58 uInt spw = vb->spectralWindows()(0); build 12-Apr-2018 16:00:58 - if (ve_p->spwOK(spw)){ build 12-Apr-2018 16:00:58 + //if (ve_p->spwOK(spw)){ build 12-Apr-2018 16:00:58 + if (usingCalLibrary_ || ve_p->spwOK(spw)){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Make all vb "not dirty", for safety build 12-Apr-2018 16:00:58 vb->dirtyComponentsClear(); build 12-Apr-2018 16:00:58 @@ -2534,7 +2570,7 @@ void Calibrater::specifycal(const String& type, build 12-Apr-2018 16:00:58 else if (utype=='K' || utype.contains("SBD") || utype.contains("DELAY")) build 12-Apr-2018 16:00:58 cal_ = createSolvableVisCal("K",*msmc_p); build 12-Apr-2018 16:00:58 else if (utype.contains("MBD")) build 12-Apr-2018 16:00:58 - cal_ = createSolvableVisCal("KMBD",*msmc_p); build 12-Apr-2018 16:00:58 + cal_ = createSolvableVisCal("K",*msmc_p); // As of 5.3, MBD is ordinary K build 12-Apr-2018 16:00:58 else if (utype.contains("ANTPOS")) build 12-Apr-2018 16:00:58 cal_ = createSolvableVisCal("KANTPOS",*msmc_p); build 12-Apr-2018 16:00:58 else if (utype.contains("TSYS")) build 12-Apr-2018 16:00:58 @@ -3378,6 +3414,12 @@ casacore::Bool Calibrater::genericGatherAndSolve() build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } // sdbs.Ok() build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + // Synchronize meta-info in SVC build 12-Apr-2018 16:00:58 + svc_p->syncSolveMeta(sdbs); build 12-Apr-2018 16:00:58 + cout << "Found no unflagged data at:"; build 12-Apr-2018 16:00:58 + svc_p->currMetaNote(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 //cout << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #ifdef _OPENMP build 12-Apr-2018 16:00:58 @@ -3850,9 +3892,9 @@ Bool OldCalibrater::setcallib(Record callib) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set up apply-able calibration via a Cal Library build 12-Apr-2018 16:00:58 -Bool OldCalibrater::setcallib2(Record callib) { build 12-Apr-2018 16:00:58 +Bool OldCalibrater::setcallib2(Record callib, const casacore::MeasurementSet* ms) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - logSink() << LogOrigin("Calibrater", "setcallib2(callib)"); build 12-Apr-2018 16:00:58 + logSink() << LogOrigin("OldCalibrater", "setcallib2(callib)"); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // cout << "Calibrater::setcallib2(callib) : " << boolalpha << callib << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -3879,7 +3921,23 @@ Bool OldCalibrater::setcallib2(Record callib) { build 12-Apr-2018 16:00:58 // Tables exist, so deploy them... build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Local MS object for callib parsing (only) build 12-Apr-2018 16:00:58 - MeasurementSet lms(msname_p,Table::Update); build 12-Apr-2018 16:00:58 + // MeasurementSet lms(msname_p,Table::Update); build 12-Apr-2018 16:00:58 + //cout << "OLD lms" << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Local const MS object for callib parsing (only) build 12-Apr-2018 16:00:58 + const MeasurementSet *lmsp(0); build 12-Apr-2018 16:00:58 + if (ms) { build 12-Apr-2018 16:00:58 + // Use supplied MS (from outside), if specified... build 12-Apr-2018 16:00:58 + // TBD: should we verify same base MS as ms_p/mssel_p? build 12-Apr-2018 16:00:58 + lmsp=ms; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + // ...use internal one instead build 12-Apr-2018 16:00:58 + lmsp=mssel_p; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // Reference for use below build 12-Apr-2018 16:00:58 + const MeasurementSet &lms(*lmsp); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Get some global shape info: build 12-Apr-2018 16:00:58 Int MSnAnt = lms.antenna().nrow(); build 12-Apr-2018 16:00:58 @@ -4985,7 +5043,7 @@ void OldCalibrater::specifycal(const String& type, build 12-Apr-2018 16:00:58 else if (utype=='K' || utype.contains("SBD") || utype.contains("DELAY")) build 12-Apr-2018 16:00:58 cal_ = createSolvableVisCal("K",*vs_p); build 12-Apr-2018 16:00:58 else if (utype.contains("MBD")) build 12-Apr-2018 16:00:58 - cal_ = createSolvableVisCal("KMBD",*vs_p); build 12-Apr-2018 16:00:58 + cal_ = createSolvableVisCal("K",*vs_p); // as of 5.3, KMBD is just K build 12-Apr-2018 16:00:58 else if (utype.contains("ANTPOS")) build 12-Apr-2018 16:00:58 cal_ = createSolvableVisCal("KANTPOS",*vs_p); build 12-Apr-2018 16:00:58 else if (utype.contains("TSYS")) build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/Calibrater.h b/code/synthesis/MeasurementComponents/Calibrater.h build 12-Apr-2018 16:00:58 index e2213df..25ec7ee 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/Calibrater.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/Calibrater.h build 12-Apr-2018 16:00:58 @@ -106,7 +106,7 @@ class Calibrater build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set up apply-able calibration via a Cal Library build 12-Apr-2018 16:00:58 virtual casacore::Bool setcallib(casacore::Record /*callib*/) { throw(casacore::AipsError("Calibrater::setcallib not implemented")); }; build 12-Apr-2018 16:00:58 - virtual casacore::Bool setcallib2(casacore::Record callib); build 12-Apr-2018 16:00:58 + virtual casacore::Bool setcallib2(casacore::Record callib, const casacore::MeasurementSet* ms=0); build 12-Apr-2018 16:00:58 casacore::Bool validatecallib(casacore::Record callib); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::Bool setmodel(const casacore::String& modelImage); build 12-Apr-2018 16:00:58 @@ -386,6 +386,8 @@ class Calibrater build 12-Apr-2018 16:00:58 casacore::MSHistoryHandler *hist_p; build 12-Apr-2018 16:00:58 casacore::Table historytab_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + casacore::Bool usingCalLibrary_; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Activity record build 12-Apr-2018 16:00:58 casacore::Record actRec_; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -447,7 +449,7 @@ class OldCalibrater : public Calibrater build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set up apply-able calibration via a Cal Library build 12-Apr-2018 16:00:58 virtual casacore::Bool setcallib(casacore::Record callib); build 12-Apr-2018 16:00:58 - virtual casacore::Bool setcallib2(casacore::Record callib); build 12-Apr-2018 16:00:58 + virtual casacore::Bool setcallib2(casacore::Record callib, const casacore::MeasurementSet* ms=0); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Uses *vs_p to ctor the SolvableVisCal build 12-Apr-2018 16:00:58 virtual casacore::Bool setsolve (const casacore::String& type, build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/CalibratingVi2.cc b/code/synthesis/MeasurementComponents/CalibratingVi2.cc build 12-Apr-2018 16:00:58 index 95d4a03..3011038 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/CalibratingVi2.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/CalibratingVi2.cc build 12-Apr-2018 16:00:58 @@ -171,7 +171,7 @@ CalibratingVi2::CalibratingVi2( vi::ViImplementation2 * inputVii, build 12-Apr-2018 16:00:58 if (calpar.byCalLib()) { build 12-Apr-2018 16:00:58 // Arrange calibration build 12-Apr-2018 16:00:58 cb_p->validatecallib(calpar.getCalLibRecord()); build 12-Apr-2018 16:00:58 - cb_p->setcallib2(calpar.getCalLibRecord()); build 12-Apr-2018 16:00:58 + cb_p->setcallib2(calpar.getCalLibRecord(),&(inputVii->ms())); // Use underlying MS! build 12-Apr-2018 16:00:58 cb_p->applystate(); build 12-Apr-2018 16:00:58 // Point to VisEquation build 12-Apr-2018 16:00:58 ve_p = cb_p->ve(); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/EJones.cc b/code/synthesis/MeasurementComponents/EJones.cc build 12-Apr-2018 16:00:58 index e9e1156..5fb3b65 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/EJones.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/EJones.cc build 12-Apr-2018 16:00:58 @@ -60,8 +60,7 @@ EGainCurve::EGainCurve(VisSet& vs) : build 12-Apr-2018 16:00:58 VisMueller(vs), build 12-Apr-2018 16:00:58 SolvableVisJones(vs), build 12-Apr-2018 16:00:58 za_(), build 12-Apr-2018 16:00:58 - eff_(nSpw(),1.0), build 12-Apr-2018 16:00:58 - spwOK_() build 12-Apr-2018 16:00:58 + eff_(nSpw(),1.0) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "EGainCurve::EGainCurve(vs)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -71,8 +70,7 @@ EGainCurve::EGainCurve(String msname,Int MSnAnt,Int MSnSpw) : build 12-Apr-2018 16:00:58 VisMueller(msname,MSnAnt,MSnSpw), build 12-Apr-2018 16:00:58 SolvableVisJones(msname,MSnAnt,MSnSpw), build 12-Apr-2018 16:00:58 za_(), build 12-Apr-2018 16:00:58 - eff_(nSpw(),1.0), build 12-Apr-2018 16:00:58 - spwOK_() build 12-Apr-2018 16:00:58 + eff_(nSpw(),1.0) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "EGainCurve::EGainCurve(msname,MSnAnt,MSnSpw)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -82,8 +80,7 @@ EGainCurve::EGainCurve(const MSMetaInfoForCal& msmc) : build 12-Apr-2018 16:00:58 VisMueller(msmc), build 12-Apr-2018 16:00:58 SolvableVisJones(msmc), build 12-Apr-2018 16:00:58 za_(), build 12-Apr-2018 16:00:58 - eff_(nSpw(),1.0), build 12-Apr-2018 16:00:58 - spwOK_() build 12-Apr-2018 16:00:58 + eff_(nSpw(),1.0) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "EGainCurve::EGainCurve(msmc)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -334,8 +331,8 @@ void EGainCurve::specify(const Record& specify) { build 12-Apr-2018 16:00:58 && rawgaintab.col("ETIME") > obstime_); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // ...for each spw: build 12-Apr-2018 16:00:58 - spwOK_.resize(nSpw()); build 12-Apr-2018 16:00:58 - spwOK_.set(false); // will set true when we find them build 12-Apr-2018 16:00:58 + Vector spwFound_(nSpw(),false); build 12-Apr-2018 16:00:58 + spwFound_.set(false); // will set true when we find them build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 for (Int ispw=0; ispw spwOK() { return spwOK_; }; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // EGainCurve has eight casacore::Float pars per ant (4 per pol) build 12-Apr-2018 16:00:58 @@ -128,9 +125,6 @@ private: build 12-Apr-2018 16:00:58 // Effeciency samples build 12-Apr-2018 16:00:58 casacore::Vector eff_; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Local spwOK_ build 12-Apr-2018 16:00:58 - casacore::Vector spwOK_; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/KJones.cc b/code/synthesis/MeasurementComponents/KJones.cc build 12-Apr-2018 16:00:58 index f19445e..30b4aef 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/KJones.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/KJones.cc build 12-Apr-2018 16:00:58 @@ -263,8 +263,6 @@ DelayFFT::DelayFFT(SolveDataBuffer& sdb,Double padBW,Int refant,Int nElem) : build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void DelayFFT::FFT() { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "DelayFFT::FFT()..." << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // We always transform only the chan axis (1) build 12-Apr-2018 16:00:58 Vector ax(3,false); build 12-Apr-2018 16:00:58 ax(1)=true; build 12-Apr-2018 16:00:58 @@ -274,14 +272,10 @@ void DelayFFT::FFT() { build 12-Apr-2018 16:00:58 ArrayLattice c(Vpad_); build 12-Apr-2018 16:00:58 LatticeFFT::cfft0(c,ax,true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "...end DelayFFT::FFT()" << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void DelayFFT::shift(Double f) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "DelayFFT::shift(f)..." << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 Double shift=-(f0_-f)/df_; // samples build 12-Apr-2018 16:00:58 Vector ph(nPadChan_); indgen(ph); // indices build 12-Apr-2018 16:00:58 // ph-=Double(nPadChan_/2); // centered build 12-Apr-2018 16:00:58 @@ -303,8 +297,6 @@ void DelayFFT::shift(Double f) { build 12-Apr-2018 16:00:58 v*=sh; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "... end DelayFFT::shift(f)" << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -315,9 +307,6 @@ void DelayFFT::add(const DelayFFT& other) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition osh=other.Vpad_.shape(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "add: " << nPadChan_ << " " << other.nPadChan_ << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 AlwaysAssert( (other.nCorr_==nCorr_), AipsError); build 12-Apr-2018 16:00:58 AlwaysAssert( (other.nPadChan_<=nPadChan_), AipsError); build 12-Apr-2018 16:00:58 AlwaysAssert( (other.nElem_==nElem_), AipsError); build 12-Apr-2018 16:00:58 @@ -333,14 +322,10 @@ void DelayFFT::add(const DelayFFT& other) { build 12-Apr-2018 16:00:58 lo+=oNchan; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "...end DelayFFT::add(x)" << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void DelayFFT::searchPeak() { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "DelayFFT::searchPeak()..." << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 delay_.resize(nCorr_,nElem_); build 12-Apr-2018 16:00:58 delay_.set(0.0); build 12-Apr-2018 16:00:58 flag_.resize(nCorr_,nElem_); build 12-Apr-2018 16:00:58 @@ -376,7 +361,8 @@ void DelayFFT::searchPeak() { build 12-Apr-2018 16:00:58 << Float(ipk)/Float(nPadChan_)/df_ << "..." build 12-Apr-2018 16:00:58 << Float(ipk<(nPadChan_-1) ? ipk+1 : 0)/Float(nPadChan_)/df_ << "-->" build 12-Apr-2018 16:00:58 << delay << " " build 12-Apr-2018 16:00:58 - << alo << " " << amax << " " << ahi build 12-Apr-2018 16:00:58 + << alo << " " << amax << " " << ahi << " " build 12-Apr-2018 16:00:58 + << alo/amax << " " << amax/amax << " " << ahi/amax build 12-Apr-2018 16:00:58 << endl; build 12-Apr-2018 16:00:58 */ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -396,8 +382,6 @@ void DelayFFT::searchPeak() { build 12-Apr-2018 16:00:58 if (refant_>-1) build 12-Apr-2018 16:00:58 flag_(Slice(),Slice(refant_,1,1))=false; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "...end DelayFFT::searchPeak()" << endl; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -418,6 +402,75 @@ void DelayFFT::state() { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +// ********************************************************** build 12-Apr-2018 16:00:58 +// CrossDelayFFT Implementations build 12-Apr-2018 16:00:58 +// build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Construct from freq info and a data-like Cube build 12-Apr-2018 16:00:58 +CrossDelayFFT::CrossDelayFFT(Double f0, Double df, Double padBW, build 12-Apr-2018 16:00:58 + Cube V) : build 12-Apr-2018 16:00:58 + DelayFFT(f0,df,padBW,V) build 12-Apr-2018 16:00:58 +{} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Construct from freq info and shape, w/ initialization build 12-Apr-2018 16:00:58 +CrossDelayFFT::CrossDelayFFT(Double f0, Double df, Double padBW) : build 12-Apr-2018 16:00:58 + DelayFFT(f0,df,padBW,1,1,-1,Complex(0.0)) build 12-Apr-2018 16:00:58 +{} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Construct from a (single) SDB build 12-Apr-2018 16:00:58 +// (init DelayFFT via freq info/shape ctor, and fill data _here_ build 12-Apr-2018 16:00:58 +CrossDelayFFT::CrossDelayFFT(SolveDataBuffer& sdb,Double padBW) : build 12-Apr-2018 16:00:58 + DelayFFT(sdb.freqs()(0)/1e9, build 12-Apr-2018 16:00:58 + (sdb.freqs()(1)-sdb.freqs()(0))/1e9, build 12-Apr-2018 16:00:58 + padBW, build 12-Apr-2018 16:00:58 + 1,1,-1,Complex(0.0)) build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + AlwaysAssert(Vpad_.shape()(0)==1,AipsError); // Working array only 1 corr build 12-Apr-2018 16:00:58 + AlwaysAssert(Vpad_.shape()(2)==1,AipsError); // Working array only 1 elem build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // SDB facts build 12-Apr-2018 16:00:58 + Int nCorr=sdb.nCorrelations(); build 12-Apr-2018 16:00:58 + AlwaysAssert(nCorr==4,AipsError); // Must have full set of correlations! build 12-Apr-2018 16:00:58 + Int nChan=sdb.nChannels(); build 12-Apr-2018 16:00:58 + Int nRow=sdb.nRows(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // this->state(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Fill the relevant data build 12-Apr-2018 16:00:58 + Vpad_.set(Complex(0.0)); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Zero weights of flagged samples build 12-Apr-2018 16:00:58 + // (first, balance cross-hand flags) build 12-Apr-2018 16:00:58 + Slicer pq(Slice(1,1,1),Slice(),Slice()); // PQ build 12-Apr-2018 16:00:58 + Slicer qp(Slice(2,1,1),Slice(),Slice()); // QP build 12-Apr-2018 16:00:58 + sdb.flagCube()(pq)(sdb.flagCube()(qp))=true; build 12-Apr-2018 16:00:58 + sdb.flagCube()(qp)(sdb.flagCube()(pq))=true; build 12-Apr-2018 16:00:58 + sdb.weightSpectrum()(sdb.flagCube())=0.0f; build 12-Apr-2018 16:00:58 + Cube Vsum(2,sdb.nChannels(),1,Complex(0.0)); build 12-Apr-2018 16:00:58 + Cube wtsum(2,sdb.nChannels(),1,0.0f); build 12-Apr-2018 16:00:58 + for (Int irow=0;irow Vxh(sdb.visCubeCorrected()(xh)); build 12-Apr-2018 16:00:58 + Cube Wxh(sdb.weightSpectrum()(xh)); build 12-Apr-2018 16:00:58 + Vsum=Vsum+Vxh*Wxh; build 12-Apr-2018 16:00:58 + wtsum=wtsum+Wxh; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Combine cross-hands into the padded Cube build 12-Apr-2018 16:00:58 + if (sum(wtsum)>0.0f) { build 12-Apr-2018 16:00:58 + Slicer sl1(Slice(),Slice(0,nChan,1),Slice()); // add to this Vpad_ slice build 12-Apr-2018 16:00:58 + Vpad_(sl1)=Vpad_(sl1)+(Vsum(Slice(0,1,1),Slice(),Slice())+conj(Vsum(Slice(1,1,1),Slice(),Slice()))); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -499,7 +552,35 @@ void KJones::setApply(const Record& apply) { build 12-Apr-2018 16:00:58 // from the CalTable build 12-Apr-2018 16:00:58 MSSpectralWindow msSpw(ct_->spectralWindow()); build 12-Apr-2018 16:00:58 ROMSSpWindowColumns msCol(msSpw); build 12-Apr-2018 16:00:58 - msCol.refFrequency().getColumn(KrefFreqs_,true); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + String ctvers=ct_->CASAvers(); build 12-Apr-2018 16:00:58 + if (ctvers==String("Unknown") || // pre-5.3.0-80 (no version recorded in table) build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-100") || // a few pre-release versions with reverted behavior build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-101") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-102") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-103") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-104") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-105") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-106") ) { build 12-Apr-2018 16:00:58 + // Old-fashioned; use spw edge freq build 12-Apr-2018 16:00:58 + msCol.refFrequency().getColumn(KrefFreqs_,true); build 12-Apr-2018 16:00:58 + if (typeName()!=String("KMBD Jones") && build 12-Apr-2018 16:00:58 + typeName()!=String("KAntPos Jones") ) build 12-Apr-2018 16:00:58 + logSink() << LogIO::WARN build 12-Apr-2018 16:00:58 + << " Found pre-5.3.0 CASA delay cal table; using spw REF_FREQUENCY pivot (usually the edge) for phase(freq) calculation." build 12-Apr-2018 16:00:58 + << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + // Use the "physical" (centroid) frequency, per spw build 12-Apr-2018 16:00:58 + Vector chanfreq; build 12-Apr-2018 16:00:58 + KrefFreqs_.resize(nSpw()); KrefFreqs_.set(0.0); build 12-Apr-2018 16:00:58 + for (Int ispw=0;ispwrefFreqIn()); build 12-Apr-2018 16:00:58 - KrefFreqs_/=1.0e9; // in GHz build 12-Apr-2018 16:00:58 + String ctvers=cpp_->CTCASAvers(); build 12-Apr-2018 16:00:58 + if (ctvers==String("Unknown") || // pre-5.3.0-80 (no version recorded in table) build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-100") || // a few pre-release versions with reverted behavior build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-101") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-102") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-103") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-104") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-105") || build 12-Apr-2018 16:00:58 + ctvers==String("5.3.0-106") ) { build 12-Apr-2018 16:00:58 + KrefFreqs_.assign(cpp_->refFreqIn()); build 12-Apr-2018 16:00:58 + if (typeName()!=String("KMBD Jones") && build 12-Apr-2018 16:00:58 + typeName()!=String("KAntPos Jones") ) build 12-Apr-2018 16:00:58 + logSink() << LogIO::WARN build 12-Apr-2018 16:00:58 + << " Found pre-5.3.0 CASA K (delay) cal table; using spw REF_FREQUENCY pivot (usually the edge) for phase(freq) calculation." build 12-Apr-2018 16:00:58 + << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else { build 12-Apr-2018 16:00:58 + // Extract physical freq build 12-Apr-2018 16:00:58 + KrefFreqs_.resize(nSpw()); build 12-Apr-2018 16:00:58 + for (Int ispw=0;ispw& f(cpp_->freqIn(ispw)); build 12-Apr-2018 16:00:58 + Int nf=f.nelements(); build 12-Apr-2018 16:00:58 + KrefFreqs_[ispw]=f[nf/2]; // center (usually this will be same as [0]) build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + KrefFreqs_/=1.0e9; // In GHz build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Re-assign KrefFreq_ according spwmap (if any) build 12-Apr-2018 16:00:58 if (spwMap().nelements()>0) { build 12-Apr-2018 16:00:58 @@ -552,7 +658,6 @@ void KJones::setCallib(const Record& callib, build 12-Apr-2018 16:00:58 if (spwMap()(ispw)>-1) build 12-Apr-2018 16:00:58 KrefFreqs_(ispw)=tmpfreqs(spwMap()(ispw)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1145,13 +1250,13 @@ void KcrossJones::selfSolveOne(VisBuffGroupAcc& vbga) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void KcrossJones::selfSolveOne(SDBList& sdbs) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Trap MBD attempt (NYI) build 12-Apr-2018 16:00:58 - if (sdbs.nSDB()!=1) build 12-Apr-2018 16:00:58 - throw(AipsError("KcrossJones does not yet support MBD")); build 12-Apr-2018 16:00:58 - // this->solveOneVBmbd(vbga); build 12-Apr-2018 16:00:58 + // Do MBD if more than one SolveDataBuffer build 12-Apr-2018 16:00:58 + if (sdbs.nSDB()>1) build 12-Apr-2018 16:00:58 + this->solveOneSDBmbd(sdbs); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // otherwise, call the single-VB solver with the first VB in the vbga build 12-Apr-2018 16:00:58 + // otherwise, call the single-SDB solver with the first (and only) SDB in SDBLIST build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 + //this->solveOneSDBmbd(sdbs); build 12-Apr-2018 16:00:58 this->solveOneSDB(sdbs(0)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1340,6 +1445,64 @@ void KcrossJones::solveOneSDB(SolveDataBuffer& sdb) { build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void KcrossJones::solveOneSDBmbd(SDBList& sdbs) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Int nbuf=sdbs.nSDB(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Vector nch(nbuf,0); build 12-Apr-2018 16:00:58 + Vector f0(nbuf,0.0); build 12-Apr-2018 16:00:58 + Vector df(nbuf,0.0); build 12-Apr-2018 16:00:58 + Double flo(1e15),fhi(0.0); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + for (Int ibuf=0;ibuf chf(sdb.freqs()); build 12-Apr-2018 16:00:58 + nch(ibuf)=sdbs(ibuf).nChannels(); build 12-Apr-2018 16:00:58 + f0(ibuf)=chf(0)/1.0e9; // GHz build 12-Apr-2018 16:00:58 + df(ibuf)=(chf(1)-chf(0))/1.0e9; // GHz build 12-Apr-2018 16:00:58 + flo=min(flo,f0[ibuf]); build 12-Apr-2018 16:00:58 + fhi=max(fhi,f0[ibuf]+nch[ibuf]*df[ibuf]); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + Double tbw=fhi-flo; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Double ptbw=tbw*8; // pad total bw by 8X build 12-Apr-2018 16:00:58 + // TBD: verifty that all df are factors of tbw build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + cout << "tbw = " << tbw << " (" << flo << "-" << fhi << ")" << " resoln=" << 1.0/tbw build 12-Apr-2018 16:00:58 + << "; ptbw = " << ptbw << " resoln=" << 1/ptbw build 12-Apr-2018 16:00:58 + << endl; build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Must always have 4 correlations when doing cross-hand delays build 12-Apr-2018 16:00:58 + Int nCor=sdbs(0).nCorrelations(); build 12-Apr-2018 16:00:58 + AlwaysAssert(nCor==4,AipsError); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + CrossDelayFFT sumfft(f0[0],min(df),ptbw); build 12-Apr-2018 16:00:58 + for (Int ibuf=0;ibuf2) cout << "Kmbd::setApply()" << endl; build 12-Apr-2018 16:00:58 KJones::setApply(apply); build 12-Apr-2018 16:00:58 KrefFreqs_.set(0.0); // MBD is ALWAYS ref'd to zero freq build 12-Apr-2018 16:00:58 + logSink() << LogIO::WARN build 12-Apr-2018 16:00:58 + << " Found pre-5.3.0 CASA multi-band delay cal table; using zero frequency pivot for phase(freq) calculation." build 12-Apr-2018 16:00:58 + << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1503,10 +1670,20 @@ void KAntPosJones::setCallib(const Record& callib, build 12-Apr-2018 16:00:58 const MeasurementSet& selms) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cout << "KAntPosJones::setCallib()" << endl; build 12-Apr-2018 16:00:58 + // Enforce hardwired spwmap in a new revised callib build 12-Apr-2018 16:00:58 + Record newcallib; build 12-Apr-2018 16:00:58 + newcallib.define("calwt",Bool(callib.asBool("calwt"))); build 12-Apr-2018 16:00:58 + newcallib.define("tablename",String(callib.asString("tablename"))); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Record thiscls; build 12-Apr-2018 16:00:58 + thiscls=callib.asRecord("0"); // copy build 12-Apr-2018 16:00:58 + thiscls.removeField("spwmap"); build 12-Apr-2018 16:00:58 + thiscls.define("spwmap",Vector(nSpw(),0)); build 12-Apr-2018 16:00:58 + newcallib.defineRecord("0",thiscls); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Call generic to do conventional things build 12-Apr-2018 16:00:58 - SolvableVisCal::setCallib(callib,selms); build 12-Apr-2018 16:00:58 + SolvableVisCal::setCallib(newcallib,selms); build 12-Apr-2018 16:00:58 + // SolvableVisCal::setCallib(callib,selms); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (calWt()) build 12-Apr-2018 16:00:58 logSink() << " (" << this->typeName() << ": Enforcing calWt()=false for phase/delay-like terms)" << LogIO::POST; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/KJones.h b/code/synthesis/MeasurementComponents/KJones.h build 12-Apr-2018 16:00:58 index a7ebc25..055da10 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/KJones.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/KJones.h build 12-Apr-2018 16:00:58 @@ -72,7 +72,7 @@ public: build 12-Apr-2018 16:00:58 // Report some stateinfo build 12-Apr-2018 16:00:58 void state(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -private: build 12-Apr-2018 16:00:58 +protected: build 12-Apr-2018 16:00:58 casacore::Double f0_, df_, padBW_; build 12-Apr-2018 16:00:58 casacore::Int nCorr_, nPadChan_, nElem_; build 12-Apr-2018 16:00:58 casacore::Int refant_; build 12-Apr-2018 16:00:58 @@ -83,6 +83,26 @@ private: build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + class CrossDelayFFT : public DelayFFT { build 12-Apr-2018 16:00:58 +public: build 12-Apr-2018 16:00:58 + // Construct from freq info and data-like casacore::Cube build 12-Apr-2018 16:00:58 + // (for generic testing w/out casacore::MS data) build 12-Apr-2018 16:00:58 + CrossDelayFFT(casacore::Double f0, casacore::Double df, casacore::Double padBW, build 12-Apr-2018 16:00:58 + casacore::Cube V); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Construct from freq info and shape, w/ initialization build 12-Apr-2018 16:00:58 + // (for accumulation) build 12-Apr-2018 16:00:58 + CrossDelayFFT(casacore::Double f0, casacore::Double df, casacore::Double padBW); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Construct from a SDB (VB2) build 12-Apr-2018 16:00:58 + CrossDelayFFT(SolveDataBuffer& sdb,casacore::Double padBW); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Report some stateinfo build 12-Apr-2018 16:00:58 + void state(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +}; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -124,12 +144,8 @@ public: build 12-Apr-2018 16:00:58 virtual Type type() { return VisCal::K; }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Return type name as string build 12-Apr-2018 16:00:58 - virtual casacore::String typeName() { return ( (isSolved() && combspw()) ? build 12-Apr-2018 16:00:58 - "KMBD Jones" : build 12-Apr-2018 16:00:58 - "K Jones" ); }; build 12-Apr-2018 16:00:58 - virtual casacore::String longTypeName() { return ( (isSolved() && combspw()) ? build 12-Apr-2018 16:00:58 - "KMBD Jones (multi-band delay)" : build 12-Apr-2018 16:00:58 - "K Jones (single-band delay)" ); }; build 12-Apr-2018 16:00:58 + virtual casacore::String typeName() { return "K Jones"; }; build 12-Apr-2018 16:00:58 + virtual casacore::String longTypeName() { return "K Jones (delay)"; }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Type of Jones matrix according to nPar() build 12-Apr-2018 16:00:58 virtual Jones::JonesType jonesType() { return Jones::Diagonal; }; build 12-Apr-2018 16:00:58 @@ -217,7 +233,7 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Return type name as string build 12-Apr-2018 16:00:58 virtual casacore::String typeName() { return "Kcross Jones"; }; build 12-Apr-2018 16:00:58 - virtual casacore::String longTypeName() { return "Kcross Jones (single-band cross delay)"; }; build 12-Apr-2018 16:00:58 + virtual casacore::String longTypeName() { return "Kcross Jones (cross-hand delay)"; }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // By definition, we consider cross-hands build 12-Apr-2018 16:00:58 virtual casacore::Bool phandonly() { return false; }; build 12-Apr-2018 16:00:58 @@ -228,6 +244,7 @@ public: build 12-Apr-2018 16:00:58 virtual void selfSolveOne(SDBList& sdbs); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -235,6 +252,9 @@ protected: build 12-Apr-2018 16:00:58 virtual void solveOneVB(const VisBuffer& vb); build 12-Apr-2018 16:00:58 virtual void solveOneSDB(SolveDataBuffer& sdb); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // MBD support build 12-Apr-2018 16:00:58 + void solveOneSDBmbd(SDBList& sdbs); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/SDDoubleCircleGainCal.cc b/code/synthesis/MeasurementComponents/SDDoubleCircleGainCal.cc build 12-Apr-2018 16:00:58 index d807877..54e9ab6 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/SDDoubleCircleGainCal.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/SDDoubleCircleGainCal.cc build 12-Apr-2018 16:00:58 @@ -29,6 +29,7 @@ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Debug Message Handling build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/SingleDishSkyCal.cc b/code/synthesis/MeasurementComponents/SingleDishSkyCal.cc build 12-Apr-2018 16:00:58 index 9efb60c..0774537 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/SingleDishSkyCal.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/SingleDishSkyCal.cc build 12-Apr-2018 16:00:58 @@ -52,6 +52,7 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Debug Message Handling build 12-Apr-2018 16:00:58 // if SDCALSKY_DEBUG is defined, the macro debuglog and build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/SolvableVisCal.cc b/code/synthesis/MeasurementComponents/SolvableVisCal.cc build 12-Apr-2018 16:00:58 index 39ae247..0d7d660 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/SolvableVisCal.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/SolvableVisCal.cc build 12-Apr-2018 16:00:58 @@ -64,10 +64,11 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -541,8 +542,11 @@ void SolvableVisCal::setCallib(const Record& callib, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Make the interpolation engine build 12-Apr-2018 16:00:58 cpp_ = new CLPatchPanel(calTableName(),selms,callib,matrixType(),nPar(),cttifactoryptr()); build 12-Apr-2018 16:00:58 + //cpp_->listmappings(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // cpp_->listmappings(); build 12-Apr-2018 16:00:58 + // Setup ct_ in SVC private data, because some derived classes need this build 12-Apr-2018 16:00:58 + // NB: Not loaded into memory in the callib context (CLPatchPanel has that) build 12-Apr-2018 16:00:58 + ct_= new NewCalTable(calTableName(),Table::Old,Table::Plain); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -3854,6 +3858,95 @@ Bool SolvableVisCal::spwOK(Int ispw) { build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +// Is the data in this VB calibrate-able? This replaces the old spwOK and build 12-Apr-2018 16:00:58 +// is more specific as regards obs, fld, intent. Used at wide scopes build 12-Apr-2018 16:00:58 +// (Calibrater/VisEquation) to control entering expensive loops. build 12-Apr-2018 16:00:58 +// "OK for Cal" or "Calibrate-able" here means: build 12-Apr-2018 16:00:58 +// a) this SVC can actually calibrate the data within the VB because build 12-Apr-2018 16:00:58 +// there are solutions explicitly available to do it (see build 12-Apr-2018 16:00:58 +// SVC::calAvailable(vb) below) build 12-Apr-2018 16:00:58 +// OR build 12-Apr-2018 16:00:58 +// b) that this SVC is agnostic about the data within the VB according build 12-Apr-2018 16:00:58 +// to arrangements made by CalLibrary specifictions and build 12-Apr-2018 16:00:58 +// embodied within the CLPatchPanel (cpp_). Agnosticism is build 12-Apr-2018 16:00:58 +// supported ONLY when using the CalLibrary and CLPatchPanel build 12-Apr-2018 16:00:58 +Bool SolvableVisCal::VBOKforCalApply(vi::VisBuffer2& vb) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Current spw build 12-Apr-2018 16:00:58 + // TBD: Use syncMeta2? build 12-Apr-2018 16:00:58 + const Int& ispw(vb.spectralWindows()(0)); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (isSolved()) build 12-Apr-2018 16:00:58 + return spwOK_(ispw); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (isApplied()) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (ci_) build 12-Apr-2018 16:00:58 + // Get it from the old-fashioned CTPatchedInterp build 12-Apr-2018 16:00:58 + return spwOK_(ispw)=ci_->spwOK(ispw); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + else if (cpp_) { build 12-Apr-2018 16:00:58 + // Get it from the new CLPatchPanel, which has build 12-Apr-2018 16:00:58 + // obs, fld, intent specificity, too! build 12-Apr-2018 16:00:58 + const Int& iobs(vb.observationId()(0)); build 12-Apr-2018 16:00:58 + const Int& ifld(vb.fieldId()(0)); build 12-Apr-2018 16:00:58 + const Int& ient(vb.stateId()(0)); build 12-Apr-2018 16:00:58 + return cpp_->MSIndicesOK(iobs,ifld,ient,ispw,-1); // all ants build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + // Assume ok for non-interpolable types build 12-Apr-2018 16:00:58 + return true; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Shouldn't reach here, assume true (could trigger failure elsewhere) build 12-Apr-2018 16:00:58 + return true; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// Is calibration for the specified VB actually available? build 12-Apr-2018 16:00:58 +// This returns true when condition "a" described above build 12-Apr-2018 16:00:58 +// is true. If the CLPatchPanel is agnostic, this returns build 12-Apr-2018 16:00:58 +// false. This is used by VisCal::correct2 control whether build 12-Apr-2018 16:00:58 +// calibration update and algebraic apply can/should be done. build 12-Apr-2018 16:00:58 +// In the CalLibrary context, this enables agnosticism (when build 12-Apr-2018 16:00:58 +// false) build 12-Apr-2018 16:00:58 +// The implementation here is almost the same as VBOKforCal, build 12-Apr-2018 16:00:58 +// differing only in the call to cpp_->calAvailable. build 12-Apr-2018 16:00:58 +Bool SolvableVisCal::calAvailable(vi::VisBuffer2& vb) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Current spw build 12-Apr-2018 16:00:58 + // TBD: Use syncMeta2? build 12-Apr-2018 16:00:58 + const Int& ispw(vb.spectralWindows()(0)); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (isSolved()) build 12-Apr-2018 16:00:58 + return spwOK_(ispw); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (isApplied()) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (ci_) build 12-Apr-2018 16:00:58 + // Get it from the old-fashioned CTPatchedInterp build 12-Apr-2018 16:00:58 + return spwOK_(ispw)=ci_->spwOK(ispw); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + else if (cpp_) { build 12-Apr-2018 16:00:58 + // Get it from the new CLPatchPanel, which has build 12-Apr-2018 16:00:58 + // obs, fld, intent specificity, too! build 12-Apr-2018 16:00:58 + const Int& iobs(vb.observationId()(0)); build 12-Apr-2018 16:00:58 + const Int& ifld(vb.fieldId()(0)); build 12-Apr-2018 16:00:58 + const Int& ient(vb.stateId()(0)); build 12-Apr-2018 16:00:58 + return cpp_->calAvailable(iobs,ifld,ient,ispw,-1); // all ants build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + // Assume ok for non-interpolable types build 12-Apr-2018 16:00:58 + return true; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Shouldn't reach here, assume true (could trigger failure elsewhere) build 12-Apr-2018 16:00:58 + return true; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // File a solved solution (and meta-data) into the in-memory Caltable build 12-Apr-2018 16:00:58 void SolvableVisCal::keepNCT() { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -4646,8 +4739,10 @@ SolvableVisJones::SolvableVisJones(VisSet& vs) : build 12-Apr-2018 16:00:58 dJ1_(NULL), // data... build 12-Apr-2018 16:00:58 dJ2_(NULL), build 12-Apr-2018 16:00:58 diffJElem_(), build 12-Apr-2018 16:00:58 - DJValid_(false), build 12-Apr-2018 16:00:58 - plotter_(NULL) build 12-Apr-2018 16:00:58 + DJValid_(false) build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 + ,plotter_(NULL) build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "SVJ::SVJ(vs)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -4660,8 +4755,10 @@ SolvableVisJones::SolvableVisJones(String msname,Int MSnAnt,Int MSnSpw) : build 12-Apr-2018 16:00:58 dJ1_(NULL), // data... build 12-Apr-2018 16:00:58 dJ2_(NULL), build 12-Apr-2018 16:00:58 diffJElem_(), build 12-Apr-2018 16:00:58 - DJValid_(false), build 12-Apr-2018 16:00:58 - plotter_(NULL) build 12-Apr-2018 16:00:58 + DJValid_(false) build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 + ,plotter_(NULL) build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "SVJ::SVJ(msname,MSnAnt,MSnSpw)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -4674,8 +4771,10 @@ SolvableVisJones::SolvableVisJones(const MSMetaInfoForCal& msmc) : build 12-Apr-2018 16:00:58 dJ1_(NULL), // data... build 12-Apr-2018 16:00:58 dJ2_(NULL), build 12-Apr-2018 16:00:58 diffJElem_(), build 12-Apr-2018 16:00:58 - DJValid_(False), build 12-Apr-2018 16:00:58 - plotter_(NULL) build 12-Apr-2018 16:00:58 + DJValid_(False) build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 + ,plotter_(NULL) build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "SVJ::SVJ(msmc)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -4689,8 +4788,10 @@ SolvableVisJones::SolvableVisJones(const Int& nAnt) : build 12-Apr-2018 16:00:58 dJ1_(NULL), // data... build 12-Apr-2018 16:00:58 dJ2_(NULL), build 12-Apr-2018 16:00:58 diffJElem_(), build 12-Apr-2018 16:00:58 - DJValid_(false), build 12-Apr-2018 16:00:58 - plotter_(NULL) build 12-Apr-2018 16:00:58 + DJValid_(false) build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 + ,plotter_(NULL) build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (prtlev()>2) cout << "SVJ::SVJ(i,j,k)" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -7347,8 +7448,10 @@ void SolvableVisJones::fluxscale(const String& outfile, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void SolvableVisJones::setupPlotter() { build 12-Apr-2018 16:00:58 // setjup plotserver build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 plotter_ = dbus::launch( ); build 12-Apr-2018 16:00:58 panels_id_.resize(nSpw()); build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void SolvableVisJones::plotHistogram(const String& title, build 12-Apr-2018 16:00:58 @@ -7359,15 +7462,19 @@ void SolvableVisJones::plotHistogram(const String& title, build 12-Apr-2018 16:00:58 std::string legendloc = "bottom"; build 12-Apr-2018 16:00:58 std::string zoomloc = ""; build 12-Apr-2018 16:00:58 if (index==0) { build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 panels_id_[0] = plotter_->panel( title, "ratio", "N", "Fluxscale", build 12-Apr-2018 16:00:58 std::vector( ), legendloc,zoomloc,0,false,false); build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 std::vector loc; build 12-Apr-2018 16:00:58 loc.push_back("top"); build 12-Apr-2018 16:00:58 //plotter_->loaddock( dock_xml_p, "bottom", loc, panels_id_[0].getInt()); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 panels_id_[index] = plotter_->panel( title, "ratio", "N", "", build 12-Apr-2018 16:00:58 std::vector( ), legendloc,zoomloc,panels_id_[index-1].getInt(),false,false); build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // multirow panels build 12-Apr-2018 16:00:58 /*** build 12-Apr-2018 16:00:58 @@ -7389,8 +7496,10 @@ void SolvableVisJones::plotHistogram(const String& title, build 12-Apr-2018 16:00:58 ***/ build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // plot histogram build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 plotter_->erase( panels_id_[index].getInt() ); build 12-Apr-2018 16:00:58 plotter_->histogram(dbus::af(data),nbins,"blue",title,panels_id_[index].getInt( )); build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/SolvableVisCal.h b/code/synthesis/MeasurementComponents/SolvableVisCal.h build 12-Apr-2018 16:00:58 index fc2fb6f..f88c513 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/SolvableVisCal.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/SolvableVisCal.h build 12-Apr-2018 16:00:58 @@ -51,9 +51,11 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -330,6 +332,12 @@ public: build 12-Apr-2018 16:00:58 // New spwOK build 12-Apr-2018 16:00:58 virtual casacore::Bool spwOK(casacore::Int ispw); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + //Is VB OK for calibration? build 12-Apr-2018 16:00:58 + virtual casacore::Bool VBOKforCalApply(vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Calibration available? build 12-Apr-2018 16:00:58 + virtual casacore::Bool calAvailable(vi::VisBuffer2&); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Post solve tinkering (generic version) build 12-Apr-2018 16:00:58 virtual void globalPostSolveTinker(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -954,8 +962,10 @@ private: build 12-Apr-2018 16:00:58 wTotal_p, wPreAnt_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //for plotting build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 PlotServerProxy* plotter_; build 12-Apr-2018 16:00:58 casacore::Vector panels_id_; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/VisCal.cc b/code/synthesis/MeasurementComponents/VisCal.cc build 12-Apr-2018 16:00:58 index 9b60f28..cd1e9cf 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/VisCal.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/VisCal.cc build 12-Apr-2018 16:00:58 @@ -72,6 +72,7 @@ VisCal::VisCal(VisSet& vs) : build 12-Apr-2018 16:00:58 currScan_(vs.numberSpw(),-1), build 12-Apr-2018 16:00:58 currObs_(vs.numberSpw(),-1), build 12-Apr-2018 16:00:58 currField_(vs.numberSpw(),-1), build 12-Apr-2018 16:00:58 + currIntent_(vs.numberSpw(),-1), build 12-Apr-2018 16:00:58 currFreq_(vs.numberSpw(),-1), build 12-Apr-2018 16:00:58 lastTime_(vs.numberSpw(),0.0), build 12-Apr-2018 16:00:58 refTime_(0.0), build 12-Apr-2018 16:00:58 @@ -109,6 +110,7 @@ VisCal::VisCal(String msname,Int MSnAnt,Int MSnSpw) : build 12-Apr-2018 16:00:58 currScan_(MSnSpw,-1), build 12-Apr-2018 16:00:58 currObs_(MSnSpw,-1), build 12-Apr-2018 16:00:58 currField_(MSnSpw,-1), build 12-Apr-2018 16:00:58 + currIntent_(MSnSpw,-1), build 12-Apr-2018 16:00:58 currFreq_(MSnSpw,-1), build 12-Apr-2018 16:00:58 lastTime_(MSnSpw,0.0), build 12-Apr-2018 16:00:58 refTime_(0.0), build 12-Apr-2018 16:00:58 @@ -146,6 +148,7 @@ VisCal::VisCal(const MSMetaInfoForCal& msmc) : build 12-Apr-2018 16:00:58 currScan_(nSpw_,-1), build 12-Apr-2018 16:00:58 currObs_(nSpw_,-1), build 12-Apr-2018 16:00:58 currField_(nSpw_,-1), build 12-Apr-2018 16:00:58 + currIntent_(nSpw_,-1), build 12-Apr-2018 16:00:58 currFreq_(nSpw_,-1), build 12-Apr-2018 16:00:58 lastTime_(nSpw_,0.0), build 12-Apr-2018 16:00:58 refTime_(0.0), build 12-Apr-2018 16:00:58 @@ -181,6 +184,7 @@ VisCal::VisCal(const Int& nAnt) : build 12-Apr-2018 16:00:58 currSpw_(0), build 12-Apr-2018 16:00:58 currTime_(1,0.0), build 12-Apr-2018 16:00:58 currField_(1,-1), build 12-Apr-2018 16:00:58 + currIntent_(1,-1), build 12-Apr-2018 16:00:58 currFreq_(1,-1), build 12-Apr-2018 16:00:58 lastTime_(1,0.0), build 12-Apr-2018 16:00:58 refTime_(0.0), build 12-Apr-2018 16:00:58 @@ -306,6 +310,14 @@ void VisCal::correct2(vi::VisBuffer2& vb, Bool trial, Bool doWtSp, Bool dosync) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (prtlev()>3) cout << "VC::correct2(vb)" << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // If calibration is unavailable, just return! build 12-Apr-2018 16:00:58 + if (!calAvailable(vb)) { build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Reaching here, calibration is available, so do it! build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Count pre-cal flags build 12-Apr-2018 16:00:58 countInFlag2(vb); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -350,6 +362,11 @@ void VisCal::corrupt2(vi::VisBuffer2& vb) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (prtlev()>3) cout << "VC::corrupt(vb2)" << endl; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // If calibration is unavailable, just return! build 12-Apr-2018 16:00:58 + if (!calAvailable(vb)) { build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Call non-in-place version, in-place-wise: build 12-Apr-2018 16:00:58 Cube m; build 12-Apr-2018 16:00:58 m.reference(vb.visCubeModel()); // access model non-const build 12-Apr-2018 16:00:58 @@ -606,6 +623,7 @@ void VisCal::state() { build 12-Apr-2018 16:00:58 << "; refTime= " << refTime() << endl; build 12-Apr-2018 16:00:58 cout << " refFreq= " << refFreq() << endl; build 12-Apr-2018 16:00:58 cout << " currField=" << currField() << endl; build 12-Apr-2018 16:00:58 + cout << " currIntent=" << currIntent() << endl; build 12-Apr-2018 16:00:58 cout << " PValid() = " << PValid() << endl; build 12-Apr-2018 16:00:58 cout << " currCPar().shape() = " << currCPar().shape() build 12-Apr-2018 16:00:58 << " (" << currCPar().data() << ")" << endl; build 12-Apr-2018 16:00:58 @@ -738,7 +756,7 @@ void VisCal::syncMeta2(const vi::VisBuffer2& vb) { build 12-Apr-2018 16:00:58 vb.nChannels()); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 currObs()=vb.observationId()(0); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + currIntent()=vb.stateId()(0); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Ensure VisVector for data acces has correct form build 12-Apr-2018 16:00:58 Int ncorr(vb.nCorrelations()); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/VisCal.h b/code/synthesis/MeasurementComponents/VisCal.h build 12-Apr-2018 16:00:58 index 0000762..3f3c66d 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/VisCal.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/VisCal.h build 12-Apr-2018 16:00:58 @@ -116,6 +116,14 @@ public: build 12-Apr-2018 16:00:58 virtual casacore::Vector spwOK() { return casacore::Vector(nSpw(),true); }; build 12-Apr-2018 16:00:58 virtual casacore::Bool spwOK(casacore::Int) { return true; }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Calibration available? build 12-Apr-2018 16:00:58 + // (always true for non-tabular) build 12-Apr-2018 16:00:58 + virtual casacore::Bool calAvailable(vi::VisBuffer2&) { return true;}; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Calibration expected AND available? build 12-Apr-2018 16:00:58 + // (always assume true for non-tabular) build 12-Apr-2018 16:00:58 + virtual casacore::Bool VBOKforCalApply(vi::VisBuffer2&) { return true;}; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Frequency-dependent Parameters? Nominally not. build 12-Apr-2018 16:00:58 virtual casacore::Bool freqDepPar() { return false; }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -239,6 +247,7 @@ protected: build 12-Apr-2018 16:00:58 inline casacore::Int& currScan() { return currScan_(currSpw()); }; build 12-Apr-2018 16:00:58 inline casacore::Int& currObs() { return currObs_(currSpw()); }; build 12-Apr-2018 16:00:58 inline casacore::Int& currField() { return currField_(currSpw()); }; build 12-Apr-2018 16:00:58 + inline casacore::Int& currIntent() { return currIntent_(currSpw()); }; build 12-Apr-2018 16:00:58 inline casacore::Vector& currFreq() { return currFreq_; }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 inline casacore::Double& refTime() { return refTime_; }; build 12-Apr-2018 16:00:58 @@ -367,6 +376,7 @@ private: build 12-Apr-2018 16:00:58 casacore::Vector currScan_; build 12-Apr-2018 16:00:58 casacore::Vector currObs_; build 12-Apr-2018 16:00:58 casacore::Vector currField_; build 12-Apr-2018 16:00:58 + casacore::Vector currIntent_; build 12-Apr-2018 16:00:58 casacore::Vector currFreq_; build 12-Apr-2018 16:00:58 casacore::Vector lastTime_; build 12-Apr-2018 16:00:58 casacore::Double refTime_; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/VisCalGlobals.cc b/code/synthesis/MeasurementComponents/VisCalGlobals.cc build 12-Apr-2018 16:00:58 index f2bcd88..9748c37 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/VisCalGlobals.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/VisCalGlobals.cc build 12-Apr-2018 16:00:58 @@ -608,9 +608,9 @@ Slice calParSliceByType(String caltype, String what, String pol) build 12-Apr-2018 16:00:58 else if (caltype=="TOPAC") { build 12-Apr-2018 16:00:58 if (what=="OPAC") { build 12-Apr-2018 16:00:58 if (pol=="") build 12-Apr-2018 16:00:58 - return Slice(0,1,1); // trivial build 12-Apr-2018 16:00:58 + return Slice(0,1,1); // trivial build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 - throw(AipsError("Can't select with pol='"+pol+"' on unpolarized OPAC table.")); build 12-Apr-2018 16:00:58 + throw(AipsError("Can't select with pol='"+pol+"' on unpolarized OPAC table.")); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 @@ -629,42 +629,61 @@ Slice calParSliceByType(String caltype, String what, String pol) build 12-Apr-2018 16:00:58 caltype[0]=='B' || build 12-Apr-2018 16:00:58 caltype[0]=='D') { build 12-Apr-2018 16:00:58 if (what=="AMP" || build 12-Apr-2018 16:00:58 - what=="PHASE" || build 12-Apr-2018 16:00:58 - what=="REAL" || build 12-Apr-2018 16:00:58 - what=="IMAG") { build 12-Apr-2018 16:00:58 + what=="PHASE" || build 12-Apr-2018 16:00:58 + what=="REAL" || build 12-Apr-2018 16:00:58 + what=="IMAG") { build 12-Apr-2018 16:00:58 s=0; // nominal start is first pol build 12-Apr-2018 16:00:58 i=1; // increment is nominally 1 (only good for 1-par-per-pol caltypes build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - else if (caltype[0]=='T') { build 12-Apr-2018 16:00:58 + else if ((caltype[0]=='T') || (caltype[0]=='X' && !caltype.contains("MUELLER"))) { build 12-Apr-2018 16:00:58 if (what=="AMP" || build 12-Apr-2018 16:00:58 - what=="PHASE" || build 12-Apr-2018 16:00:58 - what=="REAL" || build 12-Apr-2018 16:00:58 - what=="IMAG") { build 12-Apr-2018 16:00:58 + what=="PHASE" || build 12-Apr-2018 16:00:58 + what=="REAL" || build 12-Apr-2018 16:00:58 + what=="IMAG") { build 12-Apr-2018 16:00:58 if (pol=="") build 12-Apr-2018 16:00:58 - return Slice(0,1,1); // trivial build 12-Apr-2018 16:00:58 + return Slice(0,1,1); // trivial build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 - throw(AipsError("Can't select with pol='"+pol+"' on unpolarized T table.")); build 12-Apr-2018 16:00:58 + throw(AipsError("Can't select with pol='"+pol+"' on unpolarized table.")); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - else if (caltype[0]=='K' && caltype!="KAntPos Jones") { build 12-Apr-2018 16:00:58 + else if (caltype[0]=='A') { build 12-Apr-2018 16:00:58 + if (what=="AMP" || build 12-Apr-2018 16:00:58 + what=="PHASE" || build 12-Apr-2018 16:00:58 + what=="REAL" || build 12-Apr-2018 16:00:58 + what=="IMAG") { build 12-Apr-2018 16:00:58 + s=0; // nominal start is first pol build 12-Apr-2018 16:00:58 + i=1; // increment is nominally 1 (only good for 1-par-per-pol caltypes build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else if (caltype[0]=='K') { build 12-Apr-2018 16:00:58 + if (caltype=="KANTPOS JONES") { build 12-Apr-2018 16:00:58 + // antenna x,y,z corrections not pol build 12-Apr-2018 16:00:58 + if (pol=="") build 12-Apr-2018 16:00:58 + return Slice(0,3,1); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + throw(AipsError("Can't select with pol='"+pol+"' on antpos table.")); build 12-Apr-2018 16:00:58 + } else { build 12-Apr-2018 16:00:58 if (what=="DELAY") { build 12-Apr-2018 16:00:58 s=0; build 12-Apr-2018 16:00:58 i=1; build 12-Apr-2018 16:00:58 } else { build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else if (caltype[0]=='F') { build 12-Apr-2018 16:00:58 if (what=="TEC") { build 12-Apr-2018 16:00:58 if (pol=="") build 12-Apr-2018 16:00:58 - return Slice(0,1,1); // trivial build 12-Apr-2018 16:00:58 + return Slice(0,1,1); // trivial build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 - throw(AipsError("Can't select with pol='"+pol+"' on unpolarized TEC table.")); build 12-Apr-2018 16:00:58 + throw(AipsError("Can't select with pol='"+pol+"' on unpolarized TEC table.")); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 @@ -677,7 +696,15 @@ Slice calParSliceByType(String caltype, String what, String pol) build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported value type: "+what)); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + else if (caltype=="EGAINCURVE") { build 12-Apr-2018 16:00:58 + if (what=="AMP" || build 12-Apr-2018 16:00:58 + what=="PHASE" || build 12-Apr-2018 16:00:58 + what=="REAL" || build 12-Apr-2018 16:00:58 + what=="IMAG") { build 12-Apr-2018 16:00:58 + if (pol=="") build 12-Apr-2018 16:00:58 + return Slice(0,8,1); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 throw(AipsError("Unsupported cal type: "+caltype)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -687,8 +714,7 @@ Slice calParSliceByType(String caltype, String what, String pol) build 12-Apr-2018 16:00:58 s+=i; // jump by incr to 2nd pol build 12-Apr-2018 16:00:58 n=1; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - else if (pol=="R" || build 12-Apr-2018 16:00:58 - pol=="X") { build 12-Apr-2018 16:00:58 + else if (pol=="R" || pol=="X") { build 12-Apr-2018 16:00:58 n=1; // for _all_ single-pol selections build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else if (pol=="" || pol=="RL" || pol=="XY") { build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementComponents/test/tKJones_GT.cc b/code/synthesis/MeasurementComponents/test/tKJones_GT.cc build 12-Apr-2018 16:00:58 index f4232bc..01a07dd 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementComponents/test/tKJones_GT.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementComponents/test/tKJones_GT.cc build 12-Apr-2018 16:00:58 @@ -148,7 +148,7 @@ public: build 12-Apr-2018 16:00:58 Cube del; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 KJonesTest() : build 12-Apr-2018 16:00:58 - VisCalTestBase(1,1,2,3,4,128,1,true), build 12-Apr-2018 16:00:58 + VisCalTestBase(1,1,4,6,4,128,1,true), build 12-Apr-2018 16:00:58 del(2,1,nAnt) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 // canned delays build 12-Apr-2018 16:00:58 @@ -159,14 +159,17 @@ public: build 12-Apr-2018 16:00:58 del+=0.01f; build 12-Apr-2018 16:00:58 del(0,0,0)=0.0; build 12-Apr-2018 16:00:58 del(1,0,0)=0.0; build 12-Apr-2018 16:00:58 - //cout.precision(16); build 12-Apr-2018 16:00:58 + cout.precision(16); build 12-Apr-2018 16:00:58 //cout << "del=" << del << endl; build 12-Apr-2018 16:00:58 + //summary("hello"); build 12-Apr-2018 16:00:58 + //ssvp.summary(); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void setCrossHandDelay(Float xdel) { build 12-Apr-2018 16:00:58 del(Slice(0),Slice(),Slice())=xdel; // ~ on the padded grid build 12-Apr-2018 16:00:58 del*=Float(1.0/nChan/0.001); build 12-Apr-2018 16:00:58 del(Slice(1),Slice(),Slice())=0.0f; // all in the first pol build 12-Apr-2018 16:00:58 + // cout << "xdel=" << del(0,0,0) << "nsec" << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 @@ -281,7 +284,7 @@ TEST_F(KJonesTest, MBDSolveTest) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 KJones K(msmc); build 12-Apr-2018 16:00:58 Record solvePar; build 12-Apr-2018 16:00:58 - solvePar.define("table",String("test.K")); build 12-Apr-2018 16:00:58 + solvePar.define("table",String("testMBD.K")); build 12-Apr-2018 16:00:58 solvePar.define("solint",String("inf")); build 12-Apr-2018 16:00:58 solvePar.define("combine",String("")); build 12-Apr-2018 16:00:58 Vector refant(1,0); solvePar.define("refant",refant); build 12-Apr-2018 16:00:58 @@ -339,12 +342,27 @@ TEST_F(KJonesTest, MBDSolveTest) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ASSERT_EQ(nSpw,sdbs.nSDB()); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - K.setMeta(sdbs.aggregateObsId(),sdbs.aggregateScan(),sdbs.aggregateTime(), build 12-Apr-2018 16:00:58 - sdbs.aggregateSpw(),sdbs(0).freqs(), // freqs don't matter here, really build 12-Apr-2018 16:00:58 - sdbs.aggregateFld()); build 12-Apr-2018 16:00:58 + K.createMemCalTable2(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + K.syncSolveMeta(sdbs); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //K.setMeta(sdbs.aggregateObsId(),sdbs.aggregateScan(),sdbs.aggregateTime(), build 12-Apr-2018 16:00:58 + //sdbs.aggregateSpw(),sdbs(0).freqs(), // freqs don't matter here, really build 12-Apr-2018 16:00:58 + //sdbs.aggregateFld()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + K.setOrVerifyCTFrequencies(sdbs.aggregateSpw()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 K.sizeSolveParCurrSpw(nChan); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 K.selfSolveOne(sdbs); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + K.state(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + K.keepNCT(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + K.storeNCT(); build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Cube soldiff=abs(K.solveRPar()-del); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -355,6 +373,7 @@ TEST_F(KJonesTest, MBDSolveTest) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 TEST_F(KJonesTest, KCrossSolveTest) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 setCrossHandDelay(1.251f); build 12-Apr-2018 16:00:58 @@ -423,7 +442,7 @@ TEST_F(KJonesTest, KCrossSolveTest) { build 12-Apr-2018 16:00:58 << " cal delay=" << edel build 12-Apr-2018 16:00:58 << " diff=" << diff build 12-Apr-2018 16:00:58 << endl; build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 ASSERT_TRUE(diff<1.0e-4); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -448,4 +467,148 @@ TEST_F(KJonesTest, KCrossSolveTest) { build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +TEST_F(KJonesTest, KmbdCrossSolveTest) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + setCrossHandDelay(1.251f); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Apply-able K build 12-Apr-2018 16:00:58 + KMBDJones Kapp(msmc); build 12-Apr-2018 16:00:58 + Kapp.setApply(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + for (Int ispw=0;ispw refant(1,0); solvePar.define("refant",refant); build 12-Apr-2018 16:00:58 + Kmbd.setSolve(solvePar); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // SolveDataBuffer accumulator for MBD solve build 12-Apr-2018 16:00:58 + SDBList MBDsdbs; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + for (vi2.originChunks();vi2.moreChunks();vi2.nextChunk()) { build 12-Apr-2018 16:00:58 + for (vi2.origin();vi2.more();vi2.next()) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Int ispw=vb2->spectralWindows()(0); build 12-Apr-2018 16:00:58 + Int obsid(vb2->observationId()(0)); build 12-Apr-2018 16:00:58 + Int scan(vb2->scan()(0)); build 12-Apr-2018 16:00:58 + Double timestamp(vb2->time()(0)); build 12-Apr-2018 16:00:58 + Int fldid(vb2->fieldId()(0)); build 12-Apr-2018 16:00:58 + Vector freqs(vb2->getFrequencies(0)); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + vb2->resetWeightsUsingSigma(); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Cube vC(vb2->visCube()); build 12-Apr-2018 16:00:58 + vb2->setVisCubeCorrected(vC); build 12-Apr-2018 16:00:58 + vb2->setFlagCube(vb2->flagCube()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Kapp.setMeta(obsid,scan,timestamp, build 12-Apr-2018 16:00:58 + ispw,freqs, build 12-Apr-2018 16:00:58 + fldid); build 12-Apr-2018 16:00:58 + Kapp.correct2(*vb2,false,false,false); // (trial?,doWtSp?,dosync?) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Cube ph=phase(vb2->visCubeCorrected()); build 12-Apr-2018 16:00:58 + Int hichan(1); // nChan-1); build 12-Apr-2018 16:00:58 + Vector a1(vb2->antenna1()); build 12-Apr-2018 16:00:58 + Vector a2(vb2->antenna2()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + for (Int irow=0;irownRows();++irow) { build 12-Apr-2018 16:00:58 + for (Int icor=1;icor<3;icor+=1) { build 12-Apr-2018 16:00:58 + Float dph=(ph(icor,hichan,irow)-ph(icor,0,irow))/2.0f/C::pi; // cycles build 12-Apr-2018 16:00:58 + if (dph>0.5f) dph-=1.0f; build 12-Apr-2018 16:00:58 + if (dph<-0.5f) dph+=1.0f; build 12-Apr-2018 16:00:58 + Float adel(dph/(hichan*0.001)); build 12-Apr-2018 16:00:58 + Float edel(del(icor/2,0,a1(irow))-del(icor%2,0,a2(irow))); build 12-Apr-2018 16:00:58 + Float diff(abs(adel-edel)); build 12-Apr-2018 16:00:58 + //cout << "a1=" << a1(irow) << " a2=" << a2(irow) build 12-Apr-2018 16:00:58 + // << " dph= " << dph*360.0 << "deg " build 12-Apr-2018 16:00:58 + // << " app delay=" << adel build 12-Apr-2018 16:00:58 + // << " cal delay=" << edel build 12-Apr-2018 16:00:58 + // << " diff=" << diff build 12-Apr-2018 16:00:58 + // << endl; build 12-Apr-2018 16:00:58 + EXPECT_TRUE(diff<1.0e-4); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Accumualte for MBD solve build 12-Apr-2018 16:00:58 + MBDsdbs.add(*vb2); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Do MULTI-band solve build 12-Apr-2018 16:00:58 + Kmbd.setMeta(MBDsdbs.aggregateObsId(),MBDsdbs.aggregateScan(),MBDsdbs.aggregateTime(), build 12-Apr-2018 16:00:58 + MBDsdbs.aggregateSpw(),MBDsdbs.freqs(), // freqs don't really matter here... build 12-Apr-2018 16:00:58 + MBDsdbs.aggregateFld()); build 12-Apr-2018 16:00:58 + Kmbd.sizeSolveParCurrSpw(nChan); // nChan not really needed here... build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Kmbd.selfSolveOne(MBDsdbs); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Cube soldiff=abs(Kmbd.solveRPar()-del); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //cout << "Kmbd.solveRPar() = " << Kmbd.solveRPar() << endl; build 12-Apr-2018 16:00:58 + //cout << "Diff = " << soldiff << endl; build 12-Apr-2018 16:00:58 + ASSERT_TRUE(allNearAbs(soldiff,0.0f,1e-4)); // at available resoln build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //String a("5.3.0-79"), b("5.3.0-80"), c("5.3"); build 12-Apr-2018 16:00:58 + //cout << "5.3.0-79 < 5.3.0-80 = " << boolalpha << (aclose( clean_panel_p ); build 12-Apr-2018 16:00:58 viewer_p->done(); build 12-Apr-2018 16:00:58 delete viewer_p; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch (AipsError x){ build 12-Apr-2018 16:00:58 @@ -6572,6 +6591,7 @@ Bool Imager::plotuv(const Bool rotate) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(rotate) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 PlotServerProxy *plotter = dbus::launch( ); build 12-Apr-2018 16:00:58 dbus::variant panel_id = plotter->panel( "UV-Coverage for "+imageName(), "U (wavelengths)", "V (wavelengths)", "UV-Plot", build 12-Apr-2018 16:00:58 std::vector( ), "right"); build 12-Apr-2018 16:00:58 @@ -6585,8 +6605,12 @@ Bool Imager::plotuv(const Bool rotate) build 12-Apr-2018 16:00:58 plotter->scatter(dbus::af(u),dbus::af(v),"blue","unrotated","hexagon",6,-1,panel_id.getInt( )); build 12-Apr-2018 16:00:58 plotter->scatter(dbus::af(uRotated),dbus::af(vRotated),"red","rotated","ellipse",6,-1,panel_id.getInt( )); build 12-Apr-2018 16:00:58 plotter->release( panel_id.getInt( ) ); build 12-Apr-2018 16:00:58 +#else build 12-Apr-2018 16:00:58 + return false; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 PlotServerProxy *plotter = dbus::launch( ); build 12-Apr-2018 16:00:58 dbus::variant panel_id = plotter->panel( "UV-Coverage for "+imageName(), "U (wavelengths)", "V (wavelengths)", "UV-Plot" , build 12-Apr-2018 16:00:58 std::vector( ), "right"); build 12-Apr-2018 16:00:58 @@ -6602,6 +6626,9 @@ Bool Imager::plotuv(const Bool rotate) build 12-Apr-2018 16:00:58 v=v*Float(-1.0); build 12-Apr-2018 16:00:58 plotter->scatter(dbus::af(u),dbus::af(v),"red","conjugate","ellipse",6,-1,panel_id.getInt( )); build 12-Apr-2018 16:00:58 plotter->release( panel_id.getInt( ) ); build 12-Apr-2018 16:00:58 +#else build 12-Apr-2018 16:00:58 + return false; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 this->unlock(); build 12-Apr-2018 16:00:58 @@ -6825,6 +6852,7 @@ Bool Imager::plotvis(const String& type, const Int increment) build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 PlotServerProxy *plotter = dbus::launch( ); build 12-Apr-2018 16:00:58 dbus::variant panel_id = plotter->panel( "Stokes I Visibility for "+imageName(),"UVDistance (wavelengths)" , "Amplitude", "Vis-Plot", build 12-Apr-2018 16:00:58 std::vector( ), "right", "bottom", 0, false, false); build 12-Apr-2018 16:00:58 @@ -6851,8 +6879,9 @@ Bool Imager::plotvis(const String& type, const Int increment) build 12-Apr-2018 16:00:58 plotter->scatter(dbus::af(uvDistance),dbus::af(residualAmp),"yellow","residual","cross",6,-1,panel_id.getInt( )); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 plotter->release( panel_id.getInt( ) ); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#else build 12-Apr-2018 16:00:58 + return false; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 this->unlock(); build 12-Apr-2018 16:00:58 @@ -6947,6 +6976,7 @@ Bool Imager::plotweights(const Bool gridded, const Int increment) build 12-Apr-2018 16:00:58 //Float vmax=Float(ny_p/2)/vscale; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 PlotServerProxy *plotter = dbus::launch( ); build 12-Apr-2018 16:00:58 dbus::variant panel_id = plotter->panel( "Gridded weights for "+imageName(), "U (wavelengths)", "V (wavelengths)", "ImagingWeight-plot" ); build 12-Apr-2018 16:00:58 if ( panel_id.type() != dbus::variant::INT ) { build 12-Apr-2018 16:00:58 @@ -6969,7 +6999,9 @@ Bool Imager::plotweights(const Bool gridded, const Int increment) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 plotter->raster( data, (int) shape[1], (int) shape[0] ); build 12-Apr-2018 16:00:58 // plotter->release( panel_id.getInt( ) ); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#else build 12-Apr-2018 16:00:58 + return false; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -7048,6 +7080,7 @@ Bool Imager::plotweights(const Bool gridded, const Int increment) build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 PlotServerProxy *plotter = dbus::launch( ); build 12-Apr-2018 16:00:58 dbus::variant panel_id = plotter->panel( "Weights for "+imageName(), "UVDistance (wavelengths)", "Weights", "ImagingWeight-plot" ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -7059,6 +7092,9 @@ Bool Imager::plotweights(const Bool gridded, const Int increment) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 plotter->scatter(dbus::af(uvDistance),dbus::af(weights),"blue","","hexagon",4,-1,panel_id.getInt( )); build 12-Apr-2018 16:00:58 //plotter->release( panel_id.getInt( ) ); build 12-Apr-2018 16:00:58 +#else build 12-Apr-2018 16:00:58 + return false; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -7433,6 +7469,7 @@ Bool Imager::makemodelfromsd(const String& sdImage, const String& modelImage, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 class interactive_clean_callback { build 12-Apr-2018 16:00:58 public: build 12-Apr-2018 16:00:58 interactive_clean_callback( ) { } build 12-Apr-2018 16:00:58 @@ -7450,7 +7487,7 @@ bool interactive_clean_callback::callback( const DBus::Message &msg ) { build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 return true; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 Int Imager::interactivemask(const String& image, const String& mask, build 12-Apr-2018 16:00:58 Int& niter, Int& ncycles, String& thresh, const Bool forceReload){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -7465,7 +7502,7 @@ Int Imager::interactivemask(const String& image, const String& mask, build 12-Apr-2018 16:00:58 else{ build 12-Apr-2018 16:00:58 clone(image, mask); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 if ( viewer_p == 0 ) { build 12-Apr-2018 16:00:58 std::list args; build 12-Apr-2018 16:00:58 args.push_back("--oldregions"); build 12-Apr-2018 16:00:58 @@ -7614,6 +7651,9 @@ Int Imager::interactivemask(const String& image, const String& mask, build 12-Apr-2018 16:00:58 // return 1 if "no more interaction" build 12-Apr-2018 16:00:58 // return 2 if "stop" build 12-Apr-2018 16:00:58 return result; build 12-Apr-2018 16:00:58 +#else build 12-Apr-2018 16:00:58 + return false; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Record Imager::iClean(const String& algorithm, const Int niter, const Double gain, build 12-Apr-2018 16:00:58 @@ -7769,6 +7809,7 @@ Int Imager::interactivemask(const String& image, const String& mask, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 ///guess we are done with the viewer build 12-Apr-2018 16:00:58 if((viewer_p !=0) && (clean_panel_p != 0)){ build 12-Apr-2018 16:00:58 if(image_id_p !=0) build 12-Apr-2018 16:00:58 @@ -7780,6 +7821,7 @@ Int Imager::interactivemask(const String& image, const String& mask, build 12-Apr-2018 16:00:58 image_id_p=0; build 12-Apr-2018 16:00:58 mask_id_p=0; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementEquations/Imager.h b/code/synthesis/MeasurementEquations/Imager.h build 12-Apr-2018 16:00:58 index 6435779..c6ed399 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementEquations/Imager.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementEquations/Imager.h build 12-Apr-2018 16:00:58 @@ -72,8 +72,9 @@ class VisImagingWeight_p; build 12-Apr-2018 16:00:58 class PBMath; build 12-Apr-2018 16:00:58 class VPSkyJones; build 12-Apr-2018 16:00:58 class EPJones; build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 class ViewerProxy; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 // Class that contains functions needed for imager build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1045,7 +1046,9 @@ protected: build 12-Apr-2018 16:00:58 VisImagingWeight imwgt_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // viewer connection build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 ViewerProxy *viewer_p; build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 int clean_panel_p; build 12-Apr-2018 16:00:58 int image_id_p; build 12-Apr-2018 16:00:58 int mask_id_p; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementEquations/Imager2.cc b/code/synthesis/MeasurementEquations/Imager2.cc build 12-Apr-2018 16:00:58 index a1e36d7..38f9e3d 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementEquations/Imager2.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementEquations/Imager2.cc build 12-Apr-2018 16:00:58 @@ -174,10 +174,12 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +#if ! defined(WITHOUT_DBUS) build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#endif build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementEquations/VisEquation.cc b/code/synthesis/MeasurementEquations/VisEquation.cc build 12-Apr-2018 16:00:58 index 45cfdb9..b2a6ca9 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementEquations/VisEquation.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementEquations/VisEquation.cc build 12-Apr-2018 16:00:58 @@ -205,6 +205,23 @@ Bool VisEquation::spwOK(const Int& spw) { build 12-Apr-2018 16:00:58 return spwok; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +//---------------------------------------------------------------------- build 12-Apr-2018 16:00:58 +// Report if calibration is collectively calibrateable by all VCs build 12-Apr-2018 16:00:58 +// (including possible agnosticism by somein CalLibrary context; build 12-Apr-2018 16:00:58 +// see SolvableVisCal::VBOKforCalApply) build 12-Apr-2018 16:00:58 +Bool VisEquation::VBOKforCalApply(vi::VisBuffer2& vb) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Bool okForCal(True); // nominal build 12-Apr-2018 16:00:58 + for (Int i=0;iVBOKforCalApply(vb); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + return okForCal; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 //---------------------------------------------------------------------- build 12-Apr-2018 16:00:58 // Correct in place the OBSERVED visibilities in a VisBuffer build 12-Apr-2018 16:00:58 void VisEquation::correct(VisBuffer& vb, Bool trial) { build 12-Apr-2018 16:00:58 @@ -377,7 +394,12 @@ void VisEquation::collapse2(vi::VisBuffer2& vb) { build 12-Apr-2018 16:00:58 // Trap case of unavailable calibration in any vc we intend to apply below build 12-Apr-2018 16:00:58 // In the solve context, if we can't pre-cal, we flag it build 12-Apr-2018 16:00:58 // NB: this assumes only one spw in the VB2! build 12-Apr-2018 16:00:58 - if (!this->spwOK(vb.spectralWindows()(0))) { build 12-Apr-2018 16:00:58 + //if (!this->spwOK(vb.spectralWindows()(0))) { build 12-Apr-2018 16:00:58 + // Use new VBOKforCalApply, which is f(obs,fld,intent,spw) (not just f(spw)) build 12-Apr-2018 16:00:58 + if (!this->VBOKforCalApply(vb)) { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //cout << "UNCALIBRATEABLE VB2 in VE::collapse2" << endl; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 Cube fl(vb.flagCube()); fl.set(true); build 12-Apr-2018 16:00:58 Cube wtsp(vb.weightSpectrum()); wtsp.set(0.0f); build 12-Apr-2018 16:00:58 Matrix wt(vb.weight()); wt.set(0.0f); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/MeasurementEquations/VisEquation.h b/code/synthesis/MeasurementEquations/VisEquation.h build 12-Apr-2018 16:00:58 index 42e45a5..6b9b234 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/MeasurementEquations/VisEquation.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/MeasurementEquations/VisEquation.h build 12-Apr-2018 16:00:58 @@ -127,8 +127,16 @@ public: build 12-Apr-2018 16:00:58 casacore::Vector listTypes() const; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Report if spw has solutions available from all applied tables build 12-Apr-2018 16:00:58 + // To be deprecated in favor of VBOKforCalApply build 12-Apr-2018 16:00:58 casacore::Bool spwOK(const casacore::Int& spw); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Report if VB can be calibrated by all supplied build 12-Apr-2018 16:00:58 + // calibration. If not, we can't ask it to! build 12-Apr-2018 16:00:58 + // Modern replacement for spwOK(spw) which is sensitive build 12-Apr-2018 16:00:58 + // to obs, fld, and intent, and which supports build 12-Apr-2018 16:00:58 + // per-caltable agnosticism (see SVC::VBOKforCalApply) build 12-Apr-2018 16:00:58 + casacore::Bool VBOKforCalApply(vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Correct in place the OBSERVED visibilities in a VisBuffer build 12-Apr-2018 16:00:58 // with the apply-able VisCals build 12-Apr-2018 16:00:58 void correct(VisBuffer& vb, casacore::Bool trial=false); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines/CFCell.h b/code/synthesis/TransformMachines/CFCell.h build 12-Apr-2018 16:00:58 index 2201ede..76545d8 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines/CFCell.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines/CFCell.h build 12-Apr-2018 16:00:58 @@ -82,7 +82,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 casacore::Int xSupport, ySupport; build 12-Apr-2018 16:00:58 casacore::Double wValue, wIncr, freqValue,freqIncr, conjFreq; build 12-Apr-2018 16:00:58 casacore::Int muellerElement, conjPoln; build 12-Apr-2018 16:00:58 - casacore::String fileName, telescopeName; build 12-Apr-2018 16:00:58 + casacore::String fileName, telescopeName, bandName; build 12-Apr-2018 16:00:58 bool isRotationallySymmetric; build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -143,6 +143,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 cfst.diameter=diameter_p; build 12-Apr-2018 16:00:58 cfst.fileName = fileName_p; build 12-Apr-2018 16:00:58 cfst.telescopeName=telescopeName_p; build 12-Apr-2018 16:00:58 + cfst.bandName = bandName_p; build 12-Apr-2018 16:00:58 cfst.isRotationallySymmetric=isRotationallySymmetric_p; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 casacore::CountedPtr >& getStorage() {return storage_p;} build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/AWConvFunc.cc b/code/synthesis/TransformMachines2/AWConvFunc.cc build 12-Apr-2018 16:00:58 index 6e7e49f..3b7e93c 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/AWConvFunc.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/AWConvFunc.cc build 12-Apr-2018 16:00:58 @@ -70,10 +70,11 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 ConvolutionFunction(),aTerm_p(aTerm),psTerm_p(psTerm), wTerm_p(wTerm), pixFieldGrad_p(), build 12-Apr-2018 16:00:58 wbAWP_p(wbAWP), conjPB_p(conjPB), baseCFB_p() build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc", "AWConvFunc")); build 12-Apr-2018 16:00:58 if (psTerm->isNoOp() && aTerm->isNoOp()) build 12-Apr-2018 16:00:58 - log_l << "Both, psterm and aterm cannot be set to NoOp. " << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWConvFunc", "AWConvFunc")); build 12-Apr-2018 16:00:58 + log_l << "Both, psterm and aterm cannot be set to NoOp. " << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if (wbAWP && aTerm->isNoOp()) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 //log_l << "wbawp=True is ineffective when aterm is OFF. Setting wbawp to False." << LogIO::NORMAL1; build 12-Apr-2018 16:00:58 @@ -137,7 +138,7 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 void AWConvFunc::makeConjPolAxis(CoordinateSystem& cs, build 12-Apr-2018 16:00:58 Int conjStokes_in) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2", "makeConjPolAxis[R&D]")); build 12-Apr-2018 16:00:58 + //LogIO log_l(LogOrigin("AWConvFunc2", "makeConjPolAxis[R&D]")); build 12-Apr-2018 16:00:58 IPosition dummy; build 12-Apr-2018 16:00:58 Vector csList; build 12-Apr-2018 16:00:58 Vector stokes, conjStokes; build 12-Apr-2018 16:00:58 @@ -177,8 +178,9 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 //---------------------------------------------------------------------- build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 void AWConvFunc::fillConvFuncBuffer(CFBuffer& cfb, CFBuffer& cfWtb, build 12-Apr-2018 16:00:58 - const Int& skyNX, const Int& skyNY, build 12-Apr-2018 16:00:58 - const Vector& skyIncr, build 12-Apr-2018 16:00:58 + const Int&,// skyNX, build 12-Apr-2018 16:00:58 + const Int&,// skyNY, build 12-Apr-2018 16:00:58 + const Vector&,// skyIncr, build 12-Apr-2018 16:00:58 const Int& nx, const Int& ny, build 12-Apr-2018 16:00:58 const Vector& freqValues, build 12-Apr-2018 16:00:58 const Vector& wValues, build 12-Apr-2018 16:00:58 @@ -195,7 +197,6 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 (void)psScale; build 12-Apr-2018 16:00:58 (void)muellerElementsIndex; build 12-Apr-2018 16:00:58 (void)freqHi; build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2", "fillConvFuncBuffer[R&D]")); build 12-Apr-2018 16:00:58 // Int ttt=0; build 12-Apr-2018 16:00:58 Complex cfNorm, cfWtNorm; build 12-Apr-2018 16:00:58 //Double vbPA = getPA(vb); build 12-Apr-2018 16:00:58 @@ -224,22 +225,22 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 muellerElements(imx)(imy)); build 12-Apr-2018 16:00:58 aTerm.setBandName(bandName); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - Double lambdaByD = 1.22*C::c/freqValues(inu)/25.0; build 12-Apr-2018 16:00:58 - Double FoV_x = fabs(skyNX*skyIncr(0)); build 12-Apr-2018 16:00:58 - Double FoV_y = fabs(skyNY*skyIncr(1)); build 12-Apr-2018 16:00:58 - Vector uvScale_l(3); build 12-Apr-2018 16:00:58 - uvScale_l(0) = (FoV_x < lambdaByD) ? FoV_x : lambdaByD; build 12-Apr-2018 16:00:58 - uvScale_l(1) = (FoV_y < lambdaByD) ? FoV_y : lambdaByD; build 12-Apr-2018 16:00:58 - uvScale_l(2) = 0.0; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - //Hints that only uvScale needs to be updated in PSTerm. build 12-Apr-2018 16:00:58 - IPosition dummy; build 12-Apr-2018 16:00:58 - Vector dummyoffset; build 12-Apr-2018 16:00:58 - Double pss = -1; build 12-Apr-2018 16:00:58 - //cerr << "############ " << freqValues(inu) << " " << skyIncr << skyNX << " " << uvScale_l << endl; build 12-Apr-2018 16:00:58 - psTerm.reinit(dummy, uvScale_l, dummyoffset,pss); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + // { build 12-Apr-2018 16:00:58 + // Double lambdaByD = 1.22*C::c/freqValues(inu)/25.0; build 12-Apr-2018 16:00:58 + // Double FoV_x = fabs(skyNX*skyIncr(0)); build 12-Apr-2018 16:00:58 + // Double FoV_y = fabs(skyNY*skyIncr(1)); build 12-Apr-2018 16:00:58 + // Vector uvScale_l(3); build 12-Apr-2018 16:00:58 + // uvScale_l(0) = (FoV_x < lambdaByD) ? FoV_x : lambdaByD; build 12-Apr-2018 16:00:58 + // uvScale_l(1) = (FoV_y < lambdaByD) ? FoV_y : lambdaByD; build 12-Apr-2018 16:00:58 + // uvScale_l(2) = 0.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // //Hints that only uvScale needs to be updated in PSTerm. build 12-Apr-2018 16:00:58 + // IPosition dummy; build 12-Apr-2018 16:00:58 + // Vector dummyoffset; build 12-Apr-2018 16:00:58 + // Double pss = -1; build 12-Apr-2018 16:00:58 + // //cerr << "############ " << freqValues(inu) << " " << skyIncr << skyNX << " " << uvScale_l << endl; build 12-Apr-2018 16:00:58 + // psTerm.reinit(dummy, uvScale_l, dummyoffset,pss); build 12-Apr-2018 16:00:58 + // } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition pbshp(4,nx,ny,1,1); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -321,10 +322,14 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 for (uInt iw=0;iw thisCell=cfb.getCFCellPtr(freqValues(inu), wValues(iw), muellerElements(imx)(imy)); build 12-Apr-2018 16:00:58 // thisCell->conjFreq_p = conjFreq; build 12-Apr-2018 16:00:58 @@ -550,7 +555,10 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 AWConvFunc::resizeCF(cfBuf, xSupport, ySupport, supportBuffer, sampling,0.0); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (!isDryRun) build 12-Apr-2018 16:00:58 - log_l << "CF Support: " << xSupport << " (" << xSupportWt << ") " << "pixels" << LogIO::POST; build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWConvFunc2", "fillConvFuncBuffer[R&D]")); build 12-Apr-2018 16:00:58 + log_l << "CF Support: " << xSupport << " (" << xSupportWt << ") " << "pixels" << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // cfb.getCFCellPtr(freqValues(inu), wValues(iw), muellerElement)->storage_p->assign(cfBuf); build 12-Apr-2018 16:00:58 // ftRef(0)=cfBuf.shape()(0)/2-1; build 12-Apr-2018 16:00:58 @@ -612,7 +620,6 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 const Int& xSupport, const Int& ySupport, build 12-Apr-2018 16:00:58 const Float& sampling) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2","cfArea")); build 12-Apr-2018 16:00:58 Complex cfNorm=0; build 12-Apr-2018 16:00:58 Int origin=cf.shape()(0)/2; build 12-Apr-2018 16:00:58 Float peak=0; build 12-Apr-2018 16:00:58 @@ -625,6 +632,7 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 // origin = peakPix(0); build 12-Apr-2018 16:00:58 if (origin != peakPix(0)) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWConvFunc2","cfArea")); build 12-Apr-2018 16:00:58 log_l << "Peak not at the center " << origin << " " << cf(IPosition(4,origin,origin,0,0)) << " " << peakPix << " " << peak << LogIO::NORMAL1; build 12-Apr-2018 16:00:58 // peakNIC=1e7; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -981,20 +989,30 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 //access the PS function implementation (in Utils.h build 12-Apr-2018 16:00:58 //SynthesisUtils::libreSpheroidal() - but this needs more build 12-Apr-2018 16:00:58 //testing). build 12-Apr-2018 16:00:58 - Int inner=convSize/(convSampling); build 12-Apr-2018 16:00:58 - // Float psScale= (image.coordinates().increment()(0)*nx) / build 12-Apr-2018 16:00:58 - // (coords.increment()(0)*screen.shape()(0)); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 Float psScale = (2.0*coords.increment()(0))/(nx*image.coordinates().increment()(0)), build 12-Apr-2018 16:00:58 innerQuaterFraction=1.0; build 12-Apr-2018 16:00:58 - // psScale when using SynthesisUtils::libreSpheroidal() is build 12-Apr-2018 16:00:58 - // 2.0/nSupport. nSupport is in pixels and the 2.0 is due to build 12-Apr-2018 16:00:58 - // the center being at Nx/2. Here the nSupport is determined build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + Int inner=convSize/(convSampling); build 12-Apr-2018 16:00:58 + // Float psScale= (image.coordinates().increment()(0)*nx) / build 12-Apr-2018 16:00:58 + // (coords.increment()(0)*screen.shape()(0)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // by the sky-image and is equal to convSize/convSampling. build 12-Apr-2018 16:00:58 - psScale = 2.0/(innerQuaterFraction*convSize/convSampling);// nx*image.coordinates().increment()(0)*convSampling/2; build 12-Apr-2018 16:00:58 - Vector uvOffset_cf(3,0); uvOffset_cf(0)=uvOffset_cf(2)=convSize/2; build 12-Apr-2018 16:00:58 - psTerm_p->init(IPosition(2,inner,inner), uvScale, uvOffset_cf,psScale); build 12-Apr-2018 16:00:58 + // psScale when using SynthesisUtils::libreSpheroidal() is build 12-Apr-2018 16:00:58 + // 2.0/nSupport. nSupport is in pixels and the 2.0 is due to build 12-Apr-2018 16:00:58 + // the center being at Nx/2. Here the nSupport is determined build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Double lambdaByD = 1.22*C::c/min(freqValues)/25.0; build 12-Apr-2018 16:00:58 + Double FoV_x = fabs(nx*skyIncr(0)); build 12-Apr-2018 16:00:58 + Double FoV_y = fabs(nx*skyIncr(1)); build 12-Apr-2018 16:00:58 + Vector uvScale_l(3); build 12-Apr-2018 16:00:58 + uvScale_l(0) = (FoV_x < lambdaByD) ? FoV_x : lambdaByD; build 12-Apr-2018 16:00:58 + uvScale_l(1) = (FoV_y < lambdaByD) ? FoV_y : lambdaByD; build 12-Apr-2018 16:00:58 + uvScale_l(2) = uvScale(2); build 12-Apr-2018 16:00:58 + // by the sky-image and is equal to convSize/convSampling. build 12-Apr-2018 16:00:58 + psScale = 2.0/(innerQuaterFraction*convSize/convSampling);// nx*image.coordinates().increment()(0)*convSampling/2; build 12-Apr-2018 16:00:58 + Vector uvOffset_cf(3,0); uvOffset_cf(0)=uvOffset_cf(2)=convSize/2; build 12-Apr-2018 16:00:58 + // psTerm_p->init(IPosition(2,inner,inner), uvScale, uvOffset_cf,psScale); build 12-Apr-2018 16:00:58 + psTerm_p->init(IPosition(2,inner,inner), uvScale_l, uvOffset_cf,psScale); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 MuellerElementType muellerElement(0,0); build 12-Apr-2018 16:00:58 CoordinateSystem cfb_cs=coords; build 12-Apr-2018 16:00:58 @@ -1096,7 +1114,6 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 Bool AWConvFunc::setUpCFSupport(Array& cffunc, Int& xSupport, Int& ySupport, build 12-Apr-2018 16:00:58 const Float& sampling, const Complex& peak) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2", "setUpCFSupport[R&D]")); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Find the convolution function support size. No assumption build 12-Apr-2018 16:00:58 // about the symmetry of the conv. func. can be made (except that build 12-Apr-2018 16:00:58 @@ -1138,6 +1155,8 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 // always centered on the center of the image. build 12-Apr-2018 16:00:58 if ((xSupport*sampling + int(sampling/2.0+0.5)) > convFuncOrigin) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWConvFunc2", "setUpCFSupport[R&D]")); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 log_l << "Convolution function support size > N/2. Limiting it to N/2 " build 12-Apr-2018 16:00:58 << "(threshold = " << threshold << ")." build 12-Apr-2018 16:00:58 << LogIO::WARN; build 12-Apr-2018 16:00:58 @@ -1145,8 +1164,12 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(xSupport<1) build 12-Apr-2018 16:00:58 - log_l << "Convolution function is misbehaved - support seems to be zero" build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWConvFunc2", "setUpCFSupport[R&D]")); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + log_l << "Convolution function is misbehaved - support seems to be zero" build 12-Apr-2018 16:00:58 << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 return found; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -1155,7 +1178,7 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 Bool AWConvFunc::resizeCF(Array& func, Int& xSupport, Int& ySupport, build 12-Apr-2018 16:00:58 const Int& supportBuffer, const Float& sampling, const Complex& peak) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2", "resizeCF[R&D]")); build 12-Apr-2018 16:00:58 + //LogIO log_l(LogOrigin("AWConvFunc2", "resizeCF[R&D]")); build 12-Apr-2018 16:00:58 Int ConvFuncOrigin=func.shape()[0]/2; // Conv. Func. is half that size of convSize build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Bool found = setUpCFSupport(func, xSupport, ySupport, sampling,peak); build 12-Apr-2018 16:00:58 @@ -1224,7 +1247,7 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 Bool AWConvFunc::awFindSupport(Array& func, Float& threshold, build 12-Apr-2018 16:00:58 Int& origin, Int& radius) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2", "findSupport[R&D]")); build 12-Apr-2018 16:00:58 + //LogIO log_l(LogOrigin("AWConvFunc2", "findSupport[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Int nCFS=func.shape().nelements(), build 12-Apr-2018 16:00:58 PixInc=1, R0, R1, R, convSize; build 12-Apr-2018 16:00:58 @@ -1514,7 +1537,6 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (fabs(dPA) <= fabs(rotateCFOTFAngleRad_p)) return; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWConvFunc2", "prepareConvFunction")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Int Nth=1; build 12-Apr-2018 16:00:58 // #ifdef _OPENMP build 12-Apr-2018 16:00:58 @@ -1532,6 +1554,7 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 // If the following messsage is emitted more than once, we build 12-Apr-2018 16:00:58 // are in a heterogeneous-array case build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWConvFunc2", "prepareConvFunction")); build 12-Apr-2018 16:00:58 log_l << "Rotating the base CFB from PA=" << cfb->getCFCellPtr(0,0,0)->pa_p.getValue("deg") build 12-Apr-2018 16:00:58 << " to " << actualPA*57.2957795131 build 12-Apr-2018 16:00:58 << " " << cfb->getCFCellPtr(0,0,0)->shape_p build 12-Apr-2018 16:00:58 @@ -1839,12 +1862,14 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // extern casacore::Double casa::EVLABandMinFreqDefaults[EVLABeamCalc_NumBandCodes]; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 //---------------------------------------------------------------------- build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 void AWConvFunc::makeConvFunction2(const String& cfCachePath, build 12-Apr-2018 16:00:58 - const Vector& uvScale, const Vector& uvOffset, build 12-Apr-2018 16:00:58 + const Vector&,// uvScale, build 12-Apr-2018 16:00:58 + const Vector& uvOffset, build 12-Apr-2018 16:00:58 const Matrix& ,//vbFreqSelection, build 12-Apr-2018 16:00:58 CFStore2& cfs2, build 12-Apr-2018 16:00:58 CFStore2& cfwts2, build 12-Apr-2018 16:00:58 @@ -1860,9 +1885,18 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 const String uvGridDiskImage=cfCachePath+"/"+"uvgrid.im"; build 12-Apr-2018 16:00:58 PagedImage skyImage_l(uvGridDiskImage);//cfs2.getCacheDir()+"/uvgrid.im"); build 12-Apr-2018 16:00:58 - //CoordinateSystem coords(image_l.coordinates()); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - //Int nx=image_l.shape()(0);//, ny=image.shape()(1); build 12-Apr-2018 16:00:58 + Double skyMinFreq; build 12-Apr-2018 16:00:58 + Vector skyIncr; build 12-Apr-2018 16:00:58 + Int skyNX,skyNY; build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + skyNX=skyImage_l.shape()(0); build 12-Apr-2018 16:00:58 + skyNY=skyImage_l.shape()(1); build 12-Apr-2018 16:00:58 + CoordinateSystem skyCoords(skyImage_l.coordinates()); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Int directionIndex=skyCoords.findCoordinate(Coordinate::DIRECTION); build 12-Apr-2018 16:00:58 + DirectionCoordinate dc=skyCoords.directionCoordinate(directionIndex); build 12-Apr-2018 16:00:58 + skyIncr = dc.increment(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 CountedPtr cfb_p, cfwtb_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 IPosition cfsShape = cfs2.getShape(); build 12-Apr-2018 16:00:58 @@ -1894,7 +1928,15 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 if (tt->cfShape_p.nelements() != 0) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 (*cfb_p)(iNu,iW,iPol).getAsStruct(miscInfo); // Get misc. info. for this CFCell build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + //This code uses the BeamCalc class to get build 12-Apr-2018 16:00:58 + //the nominal min. freq. of the band in build 12-Apr-2018 16:00:58 + //use. While not accurate, may be build 12-Apr-2018 16:00:58 + //sufficient for the purpose of the build 12-Apr-2018 16:00:58 + //anti-aliasing operator. build 12-Apr-2018 16:00:58 + Int bandID = BeamCalc::Instance()->getBandID(miscInfo.freqValue,miscInfo.telescopeName,miscInfo.bandName); build 12-Apr-2018 16:00:58 + skyMinFreq = casa::EVLABandMinFreqDefaults[bandID]; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 wbAWP=True; // Always true since the Freq. value is got from the coord. sys. build 12-Apr-2018 16:00:58 wTermOn=(miscInfo.wValue > 0.0); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1922,19 +1964,24 @@ AWConvFunc::AWConvFunc(const casacore::CountedPtr aTerm, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Matrix screen(convSize, convSize); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Int inner=convSize/(convSampling); build 12-Apr-2018 16:00:58 - //Float psScale = (2*coords.increment()(0))/(nx*image.coordinates().increment()(0)); build 12-Apr-2018 16:00:58 - Float innerQuaterFraction=1.0; build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + // Set up the anti-aliasing operator (psTerm_p) for this CF. build 12-Apr-2018 16:00:58 + Int inner=convSize/(convSampling); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //Float psScale = (2*coords.increment()(0))/(nx*image.coordinates().increment()(0)); build 12-Apr-2018 16:00:58 + Float innerQuaterFraction=1.0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Double lambdaByD = 1.22*C::c/miscInfo.freqValue/25.0; build 12-Apr-2018 16:00:58 - //cerr << "@@@@@@@@@@@@@@@@@ " << miscInfo.freqValue << " " << lambdaByD << endl; build 12-Apr-2018 16:00:58 - Vector tuvScale(3); build 12-Apr-2018 16:00:58 - tuvScale(0) = lambdaByD; build 12-Apr-2018 16:00:58 - tuvScale(1) = lambdaByD; build 12-Apr-2018 16:00:58 - tuvScale(2) = 0.0; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Float psScale = 2.0/(innerQuaterFraction*convSize/convSampling);// nx*image.coordinates().increment()(0)*convSampling/2; build 12-Apr-2018 16:00:58 - ((static_cast(*awCF)).psTerm_p)->init(IPosition(2,inner,inner), tuvScale, uvOffset,psScale); build 12-Apr-2018 16:00:58 + Double lambdaByD = 1.22*C::c/skyMinFreq/miscInfo.diameter; build 12-Apr-2018 16:00:58 + Double FoV_x = fabs(skyNX*skyIncr(0)); build 12-Apr-2018 16:00:58 + Double FoV_y = fabs(skyNY*skyIncr(1)); build 12-Apr-2018 16:00:58 + Vector uvScale_l(3); build 12-Apr-2018 16:00:58 + uvScale_l(0) = (FoV_x < lambdaByD) ? FoV_x : lambdaByD; build 12-Apr-2018 16:00:58 + uvScale_l(1) = (FoV_y < lambdaByD) ? FoV_y : lambdaByD; build 12-Apr-2018 16:00:58 + uvScale_l(2) = 0.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Float psScale = 2.0/(innerQuaterFraction*convSize/convSampling);// nx*image.coordinates().increment()(0)*convSampling/2; build 12-Apr-2018 16:00:58 + ((static_cast(*awCF)).psTerm_p)->init(IPosition(2,inner,inner), uvScale_l, uvOffset,psScale); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // By this point, the all the 4 axis (Time/PA, Freq, Pol, build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/AWProjectFT.cc b/code/synthesis/TransformMachines2/AWProjectFT.cc build 12-Apr-2018 16:00:58 index cbaabe4..99d7f6c 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/AWProjectFT.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/AWProjectFT.cc build 12-Apr-2018 16:00:58 @@ -113,7 +113,6 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ATerm* AWProjectFT::createTelescopeATerm(const String& telescopeName, const Bool& isATermOn) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO os(LogOrigin("AWProjectFT2", "createTelescopeATerm",WHERE)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (!isATermOn) return new NoOpATerm(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -123,6 +122,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 return new EVLAAperture(); build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("AWProjectFT2", "createTelescopeATerm",WHERE)); build 12-Apr-2018 16:00:58 os << "Telescope name ('"+ build 12-Apr-2018 16:00:58 telescopeName+"') in the MS not recognized to create the telescope specific ATerm" build 12-Apr-2018 16:00:58 << LogIO::WARN; build 12-Apr-2018 16:00:58 @@ -278,13 +278,13 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 AWProjectFT::AWProjectFT(const RecordInterface& stateRec) build 12-Apr-2018 16:00:58 : FTMachine(),Second("s"),Radian("rad"),Day("d"),visResampler_p()//, cfs2_p(), cfwts2_p() build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "AWProjectFT[R&D]")); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Construct from the input state record build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 String error; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if (!fromRecord(stateRec)) { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectFT2", "AWProjectFT[R&D]")); build 12-Apr-2018 16:00:58 log_l << "Failed to create " << name() << " object." << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 maxConvSupport=-1; build 12-Apr-2018 16:00:58 @@ -567,7 +567,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 Array &m_off, build 12-Apr-2018 16:00:58 Bool Evaluate) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "findPointingOffsets[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "findPointingOffsets[R&D]")); build 12-Apr-2018 16:00:58 Int NAnt = 0; build 12-Apr-2018 16:00:58 MEpoch LAST; build 12-Apr-2018 16:00:58 Double thisTime = getCurrentTimeStamp(vb); build 12-Apr-2018 16:00:58 @@ -686,7 +686,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 Array &m_off, build 12-Apr-2018 16:00:58 Bool Evaluate) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "findPointingOffsets[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "findPointingOffsets[R&D]")); build 12-Apr-2018 16:00:58 Int NAnt = 0; build 12-Apr-2018 16:00:58 //Float tmp; build 12-Apr-2018 16:00:58 // TBD: adapt the following to VisCal mechanism: build 12-Apr-2018 16:00:58 @@ -952,7 +952,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::makeCFPolMap(const VisBuffer2& vb, const Vector& locCfStokes, build 12-Apr-2018 16:00:58 Vector& polM) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "makeCFPolMap[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "makeCFPolMap[R&D]")); build 12-Apr-2018 16:00:58 // Vector msStokes = vb.corrType(); build 12-Apr-2018 16:00:58 // cerr << "Using vb2.correlationTypes() in place of vb.corrType(): AWPFT.cc:954" << endl; build 12-Apr-2018 16:00:58 Vector msStokes = vb.correlationTypes(); build 12-Apr-2018 16:00:58 @@ -1148,7 +1148,6 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::findConvFunction(const ImageInterface& image, build 12-Apr-2018 16:00:58 const VisBuffer2& vb) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "findConvFunction[R&D]")); build 12-Apr-2018 16:00:58 if (!paChangeDetector.changed(vb,0)) return; build 12-Apr-2018 16:00:58 Int cfSource=CFDefs::NOTCACHED; build 12-Apr-2018 16:00:58 CoordinateSystem ftcoords; build 12-Apr-2018 16:00:58 @@ -1265,6 +1264,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 String unit(" KB"); build 12-Apr-2018 16:00:58 memUsed = (Int)(memUsed/1024.0+0.5); build 12-Apr-2018 16:00:58 if (memUsed > 1024) {memUsed /=1024; unit=" MB";} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectFT2", "findConvFunction[R&D]")); build 12-Apr-2018 16:00:58 log_l << "Convolution function memory footprint:" build 12-Apr-2018 16:00:58 << (Int)(memUsed) << unit << " out of a maximum of " build 12-Apr-2018 16:00:58 << HostInfo::memoryTotal(true)/1024 << " MB" << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -1531,8 +1532,6 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 void AWProjectFT::finalizeToVis() build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "finalizeToVis[R&D]")); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // cerr << "De-gridding run time = " << visResampler_p->runTimeDG_p << endl; build 12-Apr-2018 16:00:58 visResampler_p->runTimeDG_p=0.0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1547,6 +1546,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 ostringstream o; build 12-Apr-2018 16:00:58 imageCache->flush(); build 12-Apr-2018 16:00:58 imageCache->showCacheStatistics(o); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectFT2", "finalizeToVis[R&D]")); build 12-Apr-2018 16:00:58 log_l << o.str() << LogIO::POST; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if(pointingToImage) delete pointingToImage; pointingToImage=0; build 12-Apr-2018 16:00:58 @@ -1561,7 +1562,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 Matrix& weight, build 12-Apr-2018 16:00:58 const VisBuffer2& vb) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "initializeToSky[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "initializeToSky[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // image always points to the image build 12-Apr-2018 16:00:58 image=&iimage; build 12-Apr-2018 16:00:58 @@ -1628,7 +1629,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // Now we flush the cache and report statistics For memory based, build 12-Apr-2018 16:00:58 // we don't write anything out yet. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "finalizeToSky[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "finalizeToSky[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(isTiled) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1637,7 +1638,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 imageCache->flush(); build 12-Apr-2018 16:00:58 ostringstream o; build 12-Apr-2018 16:00:58 imageCache->showCacheStatistics(o); build 12-Apr-2018 16:00:58 - log_l << o.str() << LogIO::POST; build 12-Apr-2018 16:00:58 + // log_l << o.str() << LogIO::POST; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 if(pointingToImage) delete pointingToImage; pointingToImage=0; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1672,7 +1673,6 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::put(const VisBuffer2& vb, Int /*row*/, Bool dopsf, build 12-Apr-2018 16:00:58 FTMachine::Type type) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "put[R&D]")); build 12-Apr-2018 16:00:58 // Take care of translation of Bools to Integer build 12-Apr-2018 16:00:58 makingPSF=dopsf; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1682,6 +1682,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch(AipsError& x) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectFT2", "put[R&D]")); build 12-Apr-2018 16:00:58 log_l << x.getMesg() << LogIO::WARN; build 12-Apr-2018 16:00:58 return; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1783,7 +1784,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::resampleDataToGrid(Array& griddedData_l, VBStore& vbs, build 12-Apr-2018 16:00:58 const VisBuffer2& /*vb*/, Bool& dopsf) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "resampleDataToGrid[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "resampleDataToGrid[R&D]")); build 12-Apr-2018 16:00:58 visResampler_p->DataToGrid(griddedData_l, vbs, sumWeight, dopsf); build 12-Apr-2018 16:00:58 // cerr << "####SumWt(C): " << sumWeight << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1793,7 +1794,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::resampleDataToGrid(Array& griddedData_l, VBStore& vbs, build 12-Apr-2018 16:00:58 const VisBuffer2& /*vb*/, Bool& dopsf) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "resampleDataToGridD[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "resampleDataToGridD[R&D]")); build 12-Apr-2018 16:00:58 visResampler_p->DataToGrid(griddedData_l, vbs, sumWeight, dopsf); build 12-Apr-2018 16:00:58 // cerr << "####SumWt(DC): " << sumWeight << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -1802,7 +1803,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 void AWProjectFT::get(VisBuffer2& vb, Int /*row*/) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "get[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "get[R&D]")); build 12-Apr-2018 16:00:58 // If row is -1 then we pass through all rows build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //------COMMON FROM HERE build 12-Apr-2018 16:00:58 @@ -1901,7 +1902,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::resampleGridToData(VBStore& vbs, Array& griddedData_l, build 12-Apr-2018 16:00:58 const VisBuffer2& /*vb*/) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "resampleGridToData[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "resampleGridToData[R&D]")); build 12-Apr-2018 16:00:58 // Timer tim; build 12-Apr-2018 16:00:58 // tim.mark(); build 12-Apr-2018 16:00:58 visResampler_p->GridToData(vbs, griddedData_l); build 12-Apr-2018 16:00:58 @@ -2053,7 +2054,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 void AWProjectFT::getWeightImage(ImageInterface& weightImage, build 12-Apr-2018 16:00:58 Matrix& weights) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "getWeightImage[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "getWeightImage[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 weights.resize(sumWeight.shape()); build 12-Apr-2018 16:00:58 convertArray(weights,sumWeight); build 12-Apr-2018 16:00:58 @@ -2084,7 +2085,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 Bool AWProjectFT::toRecord(RecordInterface& outRec, Bool withImage) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "toRecord[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "toRecord[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Save the current AWProjectFT object to an output state record build 12-Apr-2018 16:00:58 Bool retval = true; build 12-Apr-2018 16:00:58 @@ -2134,7 +2135,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 Bool AWProjectFT::fromRecord(const RecordInterface& inRec) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "fromRecord[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "fromRecord[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Bool retval = true; build 12-Apr-2018 16:00:58 imageCache=0; lattice=0; arrayLattice=0; build 12-Apr-2018 16:00:58 @@ -2388,7 +2389,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 const Bool& dopsf, build 12-Apr-2018 16:00:58 const Vector& /*gridShape*/) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "setupVBStore[R&D]")); build 12-Apr-2018 16:00:58 + // LogIO log_l(LogOrigin("AWProjectFT2", "setupVBStore[R&D]")); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Vector ConjCFMap, CFMap; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -2434,7 +2435,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 vbs.flagCube_p.resize(flagCube.shape()); vbs.flagCube_p = false; vbs.flagCube_p(flagCube!=0) = true; build 12-Apr-2018 16:00:58 vbs.conjBeams_p=conjBeams_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - timer_p.mark(); build 12-Apr-2018 16:00:58 + //timer_p.mark(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Vector pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb)); build 12-Apr-2018 16:00:58 if (makingPSF){ build 12-Apr-2018 16:00:58 @@ -2501,7 +2502,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 //makeThGridCoords(vbs,gridShape); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - runTime1_p += timer_p.real(); build 12-Apr-2018 16:00:58 + //runTime1_p += timer_p.real(); build 12-Apr-2018 16:00:58 visResampler_p->initializeDataBuffers(vbs); build 12-Apr-2018 16:00:58 // visResampler_p->setConvFunc(cfs_p); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/AWProjectWBFT.cc b/code/synthesis/TransformMachines2/AWProjectWBFT.cc build 12-Apr-2018 16:00:58 index 6fd6d75..61b60bd 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/AWProjectWBFT.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/AWProjectWBFT.cc build 12-Apr-2018 16:00:58 @@ -54,10 +54,38 @@ build 12-Apr-2018 16:00:58 using namespace casacore; build 12-Apr-2018 16:00:58 namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 namespace refim{ build 12-Apr-2018 16:00:58 + //================================================================================================== build 12-Apr-2018 16:00:58 + // Various template instantiations build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::ftWeightImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 + const Matrix& sumWt, build 12-Apr-2018 16:00:58 + const Bool& doFFTNorm); build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::makeSensitivityImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 + ImageInterface& sensitivityImage, build 12-Apr-2018 16:00:58 + const Matrix& sumWt, build 12-Apr-2018 16:00:58 + const Bool& doFFTNorm); build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::ftWeightImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 + const Matrix& sumWt, build 12-Apr-2018 16:00:58 + const Bool& doFFTNorm); build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::makeSensitivityImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 + ImageInterface& sensitivityImage, build 12-Apr-2018 16:00:58 + const Matrix& sumWt, build 12-Apr-2018 16:00:58 + const Bool& doFFTNorm); build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::resampleCFToGrid(Array& gwts, build 12-Apr-2018 16:00:58 + VBStore& vbs, const VisBuffer2& vb); build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::resampleCFToGrid(Array& gwts, build 12-Apr-2018 16:00:58 + VBStore& vbs, const VisBuffer2& vb); build 12-Apr-2018 16:00:58 + //================================================================================================== build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 AWProjectWBFT::AWProjectWBFT(Int nWPlanes, Long icachesize, build 12-Apr-2018 16:00:58 CountedPtr& cfcache, build 12-Apr-2018 16:00:58 CountedPtr& cf, build 12-Apr-2018 16:00:58 @@ -289,7 +317,23 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (oneTimeMessage_p == false) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectWBFT2", "makeSensitivityImage[R&D]")); build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectWBFT2", "makeSensitivityImage(Complex)[R&D]")); build 12-Apr-2018 16:00:58 + log_l << "Setting up for weights accumulation "; build 12-Apr-2018 16:00:58 + if (sensitivityPatternQualifierStr_p != "") log_l << "for term " << sensitivityPatternQualifier_p << " "; build 12-Apr-2018 16:00:58 + log_l << "during gridding to compute sensitivity pattern." build 12-Apr-2018 16:00:58 + << endl build 12-Apr-2018 16:00:58 + << "Consequently, the first gridding cycle will be slower than the subsequent ones." build 12-Apr-2018 16:00:58 + << LogIO::WARN; build 12-Apr-2018 16:00:58 + oneTimeMessage_p=true; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + void AWProjectWBFT::makeSensitivityImage(const VisBuffer2&, build 12-Apr-2018 16:00:58 + const ImageInterface& /*imageTemplate*/, build 12-Apr-2018 16:00:58 + ImageInterface& /*sensitivityImage*/) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (oneTimeMessage_p == false) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectWBFT2", "makeSensitivityImage(DComplex)[R&D]")); build 12-Apr-2018 16:00:58 log_l << "Setting up for weights accumulation "; build 12-Apr-2018 16:00:58 if (sensitivityPatternQualifierStr_p != "") log_l << "for term " << sensitivityPatternQualifier_p << " "; build 12-Apr-2018 16:00:58 log_l << "during gridding to compute sensitivity pattern." build 12-Apr-2018 16:00:58 @@ -302,7 +346,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::ftWeightImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::ftWeightImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 const Matrix& sumWt, build 12-Apr-2018 16:00:58 const Bool& doFFTNorm) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -340,8 +385,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Int sizeX=wtImage.shape()(0), sizeY=wtImage.shape()(1); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Array wtBuf; wtImage.get(wtBuf,false); build 12-Apr-2018 16:00:58 - ArrayLattice wtLat(wtBuf,true); build 12-Apr-2018 16:00:58 + Array wtBuf; wtImage.get(wtBuf,false); build 12-Apr-2018 16:00:58 + ArrayLattice wtLat(wtBuf,true); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Copy one 2D plane at a time, normalizing by the sum of weights build 12-Apr-2018 16:00:58 // and possibly 2D FFT. build 12-Apr-2018 16:00:58 @@ -352,7 +397,7 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 IPosition cursorShape(4, sizeX, sizeY, 1, 1); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 LatticeStepper wtImStepper(wtImage.shape(), cursorShape, axisPath); build 12-Apr-2018 16:00:58 - LatticeIterator wtImIter(wtImage, wtImStepper); build 12-Apr-2018 16:00:58 + LatticeIterator wtImIter(wtImage, wtImStepper); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Iterate over channel and polarization axis build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -367,20 +412,16 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // USEFUL DEBUG MESSAGE build 12-Apr-2018 16:00:58 - //cerr << "SumCFWt: " << getSumOfCFWeights() << " " << max(wtBuf) << " " << sensitivityPatternQualifier_p << endl; build 12-Apr-2018 16:00:58 + // log_l << "SumCFWt: " << getSumOfCFWeights() << " " << max(wtBuf) << " " << sensitivityPatternQualifier_p < senSqBuf; sensitivitySqImage.get(senSqBuf,false); build 12-Apr-2018 16:00:58 @@ -458,7 +507,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::makeSensitivityImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::makeSensitivityImage(Lattice& wtImage, build 12-Apr-2018 16:00:58 ImageInterface& sensitivityImage, build 12-Apr-2018 16:00:58 const Matrix& sumWt, build 12-Apr-2018 16:00:58 const Bool& doFFTNorm) build 12-Apr-2018 16:00:58 @@ -490,15 +540,23 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // storeArrayAsImage(name,griddedWeights.coordinates(),wtImage.get()); build 12-Apr-2018 16:00:58 // } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - sensitivityImage.resize(griddedWeights.shape()); build 12-Apr-2018 16:00:58 - sensitivityImage.setCoordinateInfo(griddedWeights.coordinates()); build 12-Apr-2018 16:00:58 + if (useDoubleGrid_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + sensitivityImage.resize(griddedWeights_D.shape()); build 12-Apr-2018 16:00:58 + sensitivityImage.setCoordinateInfo(griddedWeights_D.coordinates()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + sensitivityImage.resize(griddedWeights.shape()); build 12-Apr-2018 16:00:58 + sensitivityImage.setCoordinateInfo(griddedWeights.coordinates()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Int sizeX=wtImage.shape()(0), sizeY=wtImage.shape()(1); build 12-Apr-2018 16:00:58 Array senBuf; sensitivityImage.get(senBuf,false); build 12-Apr-2018 16:00:58 ArrayLattice senLat(senBuf, true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Array wtBuf; wtImage.get(wtBuf,false); build 12-Apr-2018 16:00:58 - ArrayLattice wtLat(wtBuf,true); build 12-Apr-2018 16:00:58 + Array wtBuf; wtImage.get(wtBuf,false); build 12-Apr-2018 16:00:58 + ArrayLattice wtLat(wtBuf,true); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Set up Lattice iteratos on wtImage and sensitivityImage build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 @@ -522,25 +580,23 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // StokesImageUtil::To(sensitivityImage, griddedWeights); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 - // Copy the real part of the average of all planes of the wtImage to build 12-Apr-2018 16:00:58 - // all the planes of the sensitivity image (senImage). build 12-Apr-2018 16:00:58 + // Copy the real part of the average of all planes of the wtImage build 12-Apr-2018 16:00:58 + // to all the planes of the sensitivity image (senImage). Also build 12-Apr-2018 16:00:58 + // convert from DComplex to Complex on-the-fly. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 LatticeStepper wtImStepper(wtImage.shape(), cursorShape, axisPath); build 12-Apr-2018 16:00:58 - LatticeIterator wtImIter(wtImage, wtImStepper); build 12-Apr-2018 16:00:58 + LatticeIterator wtImIter(wtImage, wtImStepper); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // Matrix tmp(senImIter.rwMatrixCursor().shape()); build 12-Apr-2018 16:00:58 Matrix tmp(senImIter.rwMatrixCursor().shape()); build 12-Apr-2018 16:00:58 tmp = 1.0; build 12-Apr-2018 16:00:58 - Int n=0; build 12-Apr-2018 16:00:58 for(wtImIter.reset(); !wtImIter.atEnd(); wtImIter++) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - // tmp += real(wtImIter.rwMatrixCursor().nonDegenerate()); build 12-Apr-2018 16:00:58 - tmp = (wtImIter.rwMatrixCursor().nonDegenerate()); build 12-Apr-2018 16:00:58 - n++; build 12-Apr-2018 16:00:58 + Matrix tmp_ref;tmp_ref.reference(wtImIter.rwMatrixCursor().nonDegenerate()); build 12-Apr-2018 16:00:58 + for (int i=0;iComplex) build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - // tmp = tmp/n; build 12-Apr-2018 16:00:58 - //UUU// tmp = fabs(tmp); // fabs(Array&) returns a complex array build 12-Apr-2018 16:00:58 - // tmp = (sqrt(fabs(tmp))); // fabs(Array&) returns a complex array build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 for(senImIter.reset(); !senImIter.atEnd(); senImIter++) build 12-Apr-2018 16:00:58 senImIter.rwMatrixCursor() = real(tmp); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -592,7 +648,10 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // wtImageFTDone_p = avgPBReady_p=false; build 12-Apr-2018 16:00:58 // } build 12-Apr-2018 16:00:58 // // REMOVE THIS CODE build 12-Apr-2018 16:00:58 - makeSensitivityImage(griddedWeights, *avgPB_p, weights, true); build 12-Apr-2018 16:00:58 + if (useDoubleGrid_p) build 12-Apr-2018 16:00:58 + makeSensitivityImage(griddedWeights_D, *avgPB_p, weights, true); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + makeSensitivityImage(griddedWeights, *avgPB_p, weights, true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // if (avgPBSq_p.null()) avgPBSq_p = new TempImage(); build 12-Apr-2018 16:00:58 // makeSensitivitySqImage(griddedWeights, *avgPBSq_p, weights, true); build 12-Apr-2018 16:00:58 @@ -611,6 +670,261 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 return *image; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Initialize the FFT to the Sky. Here we have to setup and build 12-Apr-2018 16:00:58 + // initialize the grid. build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + void AWProjectWBFT::initializeToSky(ImageInterface& iimage, build 12-Apr-2018 16:00:58 + Matrix& weight, build 12-Apr-2018 16:00:58 + const VisBuffer2& vb) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectWBFT2","initializeToSky[R&D]")); build 12-Apr-2018 16:00:58 + AWProjectFT::initializeToSky(iimage,weight,vb); build 12-Apr-2018 16:00:58 + // The following code is same as that in the parent class call above. build 12-Apr-2018 16:00:58 +// image=&iimage; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// init(); build 12-Apr-2018 16:00:58 +// initMaps(vb); build 12-Apr-2018 16:00:58 +// nx = image->shape()(0); build 12-Apr-2018 16:00:58 +// ny = image->shape()(1); build 12-Apr-2018 16:00:58 +// npol = image->shape()(2); build 12-Apr-2018 16:00:58 +// nchan = image->shape()(3); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// isTiled = false; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// sumWeight=0.0; build 12-Apr-2018 16:00:58 +// weight.resize(sumWeight.shape()); build 12-Apr-2018 16:00:58 +// weight=0.0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +// if(isTiled) build 12-Apr-2018 16:00:58 +// { build 12-Apr-2018 16:00:58 +// imageCache->flush(); build 12-Apr-2018 16:00:58 +// image->set(Complex(0.0)); build 12-Apr-2018 16:00:58 +// //lattice=image; build 12-Apr-2018 16:00:58 +// lattice=CountedPtr > (image, false); build 12-Apr-2018 16:00:58 +// } build 12-Apr-2018 16:00:58 +// else build 12-Apr-2018 16:00:58 +// { build 12-Apr-2018 16:00:58 +// IPosition gridShape(4, nx, ny, npol, nchan); build 12-Apr-2018 16:00:58 +// griddedData.resize(gridShape); build 12-Apr-2018 16:00:58 +// griddedData=Complex(0.0); build 12-Apr-2018 16:00:58 +// // if(arrayLattice) delete arrayLattice; arrayLattice=0; build 12-Apr-2018 16:00:58 +// arrayLattice = new ArrayLattice(griddedData); build 12-Apr-2018 16:00:58 +// lattice=arrayLattice; build 12-Apr-2018 16:00:58 +// visResampler_p->initializeToSky(griddedData, sumWeight); build 12-Apr-2018 16:00:58 +// } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //AlwaysAssert(lattice, AipsError); build 12-Apr-2018 16:00:58 + if (resetPBs_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (useDoubleGrid_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + griddedWeights_D.resize(iimage.shape()); build 12-Apr-2018 16:00:58 + griddedWeights_D.setCoordinateInfo(iimage.coordinates()); build 12-Apr-2018 16:00:58 + griddedWeights_D.set(0.0); build 12-Apr-2018 16:00:58 + pbPeaks.resize(griddedWeights_D.shape()(2)); build 12-Apr-2018 16:00:58 + pbPeaks.set(0.0); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + griddedWeights.resize(iimage.shape()); build 12-Apr-2018 16:00:58 + griddedWeights.setCoordinateInfo(iimage.coordinates()); build 12-Apr-2018 16:00:58 + griddedWeights.set(0.0); build 12-Apr-2018 16:00:58 + pbPeaks.resize(griddedWeights.shape()(2)); build 12-Apr-2018 16:00:58 + pbPeaks.set(0.0); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + resetPBs_p=false; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + avgPBReady_p = (cfCache_p->loadAvgPB(avgPB_p,sensitivityPatternQualifierStr_p) != CFDefs::NOTCACHED); build 12-Apr-2018 16:00:58 + // avgPBReady_p = cfCache_p->avgPBReady(sensitivityPatternQualifierStr_p); build 12-Apr-2018 16:00:58 + // Need to grid the weighted Convolution Functions to make the sensitivity pattern. build 12-Apr-2018 16:00:58 + if (!avgPBReady_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + // Make a copy of the re-sampler and set it up. build 12-Apr-2018 16:00:58 + if (visResamplerWt_p.null()) visResamplerWt_p = visResampler_p->clone(); build 12-Apr-2018 16:00:58 + visResamplerWt_p = visResampler_p; build 12-Apr-2018 16:00:58 + visResamplerWt_p->setMaps(chanMap, polMap); build 12-Apr-2018 16:00:58 + if (useDoubleGrid_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + griddedWeights_D.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + visResamplerWt_p->initializeToSky(gwts, sumCFWeight); //A NoOp right now. build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + visResamplerWt_p->initializeToSky(gwts, sumCFWeight); //A NoOp right now. build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + void AWProjectWBFT::finalizeToSky() build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWProjectWBFT2", "finalizeToSky[R&D]")); build 12-Apr-2018 16:00:58 + AWProjectFT::finalizeToSky(); build 12-Apr-2018 16:00:58 + // The following commented code is the same as in the parent class build 12-Apr-2018 16:00:58 + // call above. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // if(isTiled) build 12-Apr-2018 16:00:58 + // { build 12-Apr-2018 16:00:58 + // AlwaysAssert(image, AipsError); build 12-Apr-2018 16:00:58 + // AlwaysAssert(imageCache, AipsError); build 12-Apr-2018 16:00:58 + // imageCache->flush(); build 12-Apr-2018 16:00:58 + // ostringstream o; build 12-Apr-2018 16:00:58 + // imageCache->showCacheStatistics(o); build 12-Apr-2018 16:00:58 + // log_l << o.str() << LogIO::POST; build 12-Apr-2018 16:00:58 + // } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // if(pointingToImage) delete pointingToImage; pointingToImage=0; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // paChangeDetector.reset(); build 12-Apr-2018 16:00:58 + // cfCache_p->flush(); build 12-Apr-2018 16:00:58 + // visResampler_p->finalizeToSky(griddedData, sumWeight); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if (!avgPBReady_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (useDoubleGrid_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + griddedWeights_D.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + visResamplerWt_p->finalizeToSky(gwts, sumCFWeight); build 12-Apr-2018 16:00:58 + visResamplerWt_p->releaseBuffers(); build 12-Apr-2018 16:00:58 + // griddedWeights_D.resize(IPosition(1,0)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + visResamplerWt_p->finalizeToSky(gwts, sumCFWeight); build 12-Apr-2018 16:00:58 + visResamplerWt_p->releaseBuffers(); build 12-Apr-2018 16:00:58 + // griddedWeights.resize(IPosition(1,0)); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + cerr << "Gridding run time = " build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG1_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG2_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG3_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG4_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG5_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG6_p build 12-Apr-2018 16:00:58 + << " " << visResampler_p->runTimeG7_p build 12-Apr-2018 16:00:58 + << " C " << runTime1_p build 12-Apr-2018 16:00:58 + << endl; build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + visResampler_p->runTimeG_p=visResampler_p->runTimeG1_p=visResampler_p->runTimeG2_p=visResampler_p->runTimeG3_p=visResampler_p->runTimeG4_p=visResampler_p->runTimeG5_p=visResampler_p->runTimeG6_p=visResampler_p->runTimeG7_p=0.0; build 12-Apr-2018 16:00:58 + runTime1_p=0; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void AWProjectWBFT::resampleCFToGrid(Array& gwts, build 12-Apr-2018 16:00:58 + VBStore& vbs, const VisBuffer2& vb) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Grid the weighted convolution function as well build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + //LogIO log_l(LogOrigin("AWProjectFT2", "resampleCFToGrid[R&D]")); build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Now rotate and put the rotated convolution weight function build 12-Apr-2018 16:00:58 + // in rotatedCFWts_l object. build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // makeWBCFWt(*cfwts2_p, imRefFreq_p); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //timer_p.mark(); build 12-Apr-2018 16:00:58 + visResamplerWt_p->copy(*visResampler_p); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Vector pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb)); build 12-Apr-2018 16:00:58 + //cerr << "AWPWB: " << pointingOffset << endl; build 12-Apr-2018 16:00:58 + visResamplerWt_p->makeVBRow2CFMap(*cfwts2_p,*convFuncCtor_p, vb, build 12-Apr-2018 16:00:58 + paChangeDetector.getParAngleTolerance(), build 12-Apr-2018 16:00:58 + chanMap,polMap,pointingOffset); build 12-Apr-2018 16:00:58 + VBRow2CFBMapType& theMap=visResamplerWt_p->getVBRow2CFBMap(); build 12-Apr-2018 16:00:58 + convFuncCtor_p->prepareConvFunction(vb,theMap); build 12-Apr-2018 16:00:58 + //runTime1_p += timer_p.real(); build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Set the uvw array to zero-sized array and dopsf=true. build 12-Apr-2018 16:00:58 + // uvw.nelements()==0 is a hint to the re-sampler to put the build 12-Apr-2018 16:00:58 + // gridded weights at the origin of the uv-grid. dopsf=true so build 12-Apr-2018 16:00:58 + // that CF*Wts are accumulated (as against CF*Wts*Vis). build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Receive the sum-of-weights in a dummy array. build 12-Apr-2018 16:00:58 + Matrix uvwOrigin; build 12-Apr-2018 16:00:58 + vbs.uvw_p.reference(uvwOrigin); build 12-Apr-2018 16:00:58 + Bool dopsf_l=true; build 12-Apr-2018 16:00:58 + vbs.accumCFs_p=((vbs.uvw_p.nelements() == 0) && dopsf_l); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + // wtsGrid.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + Int nDataChan = vbs.flagCube_p.shape()[1]; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + vbs.startChan_p = 0; vbs.endChan_p = nDataChan; build 12-Apr-2018 16:00:58 + visResamplerWt_p->DataToGrid(gwts, vbs, sumCFWeight, dopsf_l); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + void AWProjectWBFT::resampleDataToGrid(Array& griddedData_l, build 12-Apr-2018 16:00:58 + VBStore& vbs, const VisBuffer2& vb, build 12-Apr-2018 16:00:58 + Bool& dopsf) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + AWProjectFT::resampleDataToGrid(griddedData_l,vbs,vb,dopsf); build 12-Apr-2018 16:00:58 + if (!avgPBReady_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Get a reference to the pixels of griddedWeights (a build 12-Apr-2018 16:00:58 + // TempImage!) build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + resampleCFToGrid(gwts, vbs, vb); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + }; build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + void AWProjectWBFT::resampleDataToGrid(Array& griddedData_l, build 12-Apr-2018 16:00:58 + VBStore& vbs, const VisBuffer2& vb, build 12-Apr-2018 16:00:58 + Bool& dopsf) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + AWProjectFT::resampleDataToGrid(griddedData_l,vbs,vb,dopsf); build 12-Apr-2018 16:00:58 + if (!avgPBReady_p) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + // Get a reference to the pixels of griddedWeights (a build 12-Apr-2018 16:00:58 + // TempImage!) build 12-Apr-2018 16:00:58 + // build 12-Apr-2018 16:00:58 + Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 + griddedWeights_D.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 + resampleCFToGrid(gwts, vbs, vb); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + }; build 12-Apr-2018 16:00:58 + // void AWProjectWBFT::resampleGridToData(VBStore& vbs, const VisBuffer2& vb) {}; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + void AWProjectWBFT::setCFCache(CountedPtr& cfc, const Bool resetCFC) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + if (resetCFC) cfCache_p = cfc; build 12-Apr-2018 16:00:58 + if (!cfCache_p.null()) build 12-Apr-2018 16:00:58 + { build 12-Apr-2018 16:00:58 + cfs2_p = CountedPtr(&cfCache_p->memCache2_p[0],false);//new CFStore2; build 12-Apr-2018 16:00:58 + cfwts2_p = CountedPtr(&cfCache_p->memCacheWt2_p[0],false);//new CFStore2; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // cfCache_p->summarize(cfCache_p->memCache2_p,String("New CFC")); build 12-Apr-2018 16:00:58 + // cfCache_p->summarize(cfCache_p->memCacheWt2_p,String("")); build 12-Apr-2018 16:00:58 + avgPBReady_p=false; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // #define NEED_UNDERSCORES build 12-Apr-2018 16:00:58 @@ -1275,227 +1589,5 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // // griddedWeights.put(gwts); build 12-Apr-2018 16:00:58 // } build 12-Apr-2018 16:00:58 // } build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Initialize the FFT to the Sky. Here we have to setup and build 12-Apr-2018 16:00:58 - // initialize the grid. build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::initializeToSky(ImageInterface& iimage, build 12-Apr-2018 16:00:58 - Matrix& weight, build 12-Apr-2018 16:00:58 - const VisBuffer2& vb) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectWBFT2","initializeToSky[R&D]")); build 12-Apr-2018 16:00:58 - AWProjectFT::initializeToSky(iimage,weight,vb); build 12-Apr-2018 16:00:58 - // The following code is same as that in the parent class call above. build 12-Apr-2018 16:00:58 -// image=&iimage; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// init(); build 12-Apr-2018 16:00:58 -// initMaps(vb); build 12-Apr-2018 16:00:58 -// nx = image->shape()(0); build 12-Apr-2018 16:00:58 -// ny = image->shape()(1); build 12-Apr-2018 16:00:58 -// npol = image->shape()(2); build 12-Apr-2018 16:00:58 -// nchan = image->shape()(3); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// isTiled = false; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// sumWeight=0.0; build 12-Apr-2018 16:00:58 -// weight.resize(sumWeight.shape()); build 12-Apr-2018 16:00:58 -// weight=0.0; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 -// if(isTiled) build 12-Apr-2018 16:00:58 -// { build 12-Apr-2018 16:00:58 -// imageCache->flush(); build 12-Apr-2018 16:00:58 -// image->set(Complex(0.0)); build 12-Apr-2018 16:00:58 -// //lattice=image; build 12-Apr-2018 16:00:58 -// lattice=CountedPtr > (image, false); build 12-Apr-2018 16:00:58 -// } build 12-Apr-2018 16:00:58 -// else build 12-Apr-2018 16:00:58 -// { build 12-Apr-2018 16:00:58 -// IPosition gridShape(4, nx, ny, npol, nchan); build 12-Apr-2018 16:00:58 -// griddedData.resize(gridShape); build 12-Apr-2018 16:00:58 -// griddedData=Complex(0.0); build 12-Apr-2018 16:00:58 -// // if(arrayLattice) delete arrayLattice; arrayLattice=0; build 12-Apr-2018 16:00:58 -// arrayLattice = new ArrayLattice(griddedData); build 12-Apr-2018 16:00:58 -// lattice=arrayLattice; build 12-Apr-2018 16:00:58 -// visResampler_p->initializeToSky(griddedData, sumWeight); build 12-Apr-2018 16:00:58 -// } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - //AlwaysAssert(lattice, AipsError); build 12-Apr-2018 16:00:58 - if (resetPBs_p) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - griddedWeights.resize(iimage.shape()); build 12-Apr-2018 16:00:58 - griddedWeights.setCoordinateInfo(iimage.coordinates()); build 12-Apr-2018 16:00:58 - griddedWeights.set(0.0); build 12-Apr-2018 16:00:58 - pbPeaks.resize(griddedWeights.shape()(2)); build 12-Apr-2018 16:00:58 - pbPeaks.set(0.0); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - resetPBs_p=false; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - avgPBReady_p = (cfCache_p->loadAvgPB(avgPB_p,sensitivityPatternQualifierStr_p) != CFDefs::NOTCACHED); build 12-Apr-2018 16:00:58 - // avgPBReady_p = cfCache_p->avgPBReady(sensitivityPatternQualifierStr_p); build 12-Apr-2018 16:00:58 - // Need to grid the weighted Convolution Functions to make the sensitivity pattern. build 12-Apr-2018 16:00:58 - if (!avgPBReady_p) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - // Make a copy of the re-sampler and set it up. build 12-Apr-2018 16:00:58 - if (visResamplerWt_p.null()) visResamplerWt_p = visResampler_p->clone(); build 12-Apr-2018 16:00:58 - visResamplerWt_p = visResampler_p; build 12-Apr-2018 16:00:58 - visResamplerWt_p->setMaps(chanMap, polMap); build 12-Apr-2018 16:00:58 - Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 - griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 - // cerr << "initializeToSky for gwts" << endl; build 12-Apr-2018 16:00:58 - visResamplerWt_p->initializeToSky(gwts, sumCFWeight); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::finalizeToSky() build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectWBFT2", "finalizeToSky[R&D]")); build 12-Apr-2018 16:00:58 - AWProjectFT::finalizeToSky(); build 12-Apr-2018 16:00:58 - // The following commented code is the same as in the parent class build 12-Apr-2018 16:00:58 - // call above. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // if(isTiled) build 12-Apr-2018 16:00:58 - // { build 12-Apr-2018 16:00:58 - // AlwaysAssert(image, AipsError); build 12-Apr-2018 16:00:58 - // AlwaysAssert(imageCache, AipsError); build 12-Apr-2018 16:00:58 - // imageCache->flush(); build 12-Apr-2018 16:00:58 - // ostringstream o; build 12-Apr-2018 16:00:58 - // imageCache->showCacheStatistics(o); build 12-Apr-2018 16:00:58 - // log_l << o.str() << LogIO::POST; build 12-Apr-2018 16:00:58 - // } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // if(pointingToImage) delete pointingToImage; pointingToImage=0; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // paChangeDetector.reset(); build 12-Apr-2018 16:00:58 - // cfCache_p->flush(); build 12-Apr-2018 16:00:58 - // visResampler_p->finalizeToSky(griddedData, sumWeight); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if (!avgPBReady_p) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 - griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 - visResamplerWt_p->finalizeToSky(gwts, sumCFWeight); build 12-Apr-2018 16:00:58 - visResamplerWt_p->releaseBuffers(); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - /* build 12-Apr-2018 16:00:58 - cerr << "Gridding run time = " build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG1_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG2_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG3_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG4_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG5_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG6_p build 12-Apr-2018 16:00:58 - << " " << visResampler_p->runTimeG7_p build 12-Apr-2018 16:00:58 - << " C " << runTime1_p build 12-Apr-2018 16:00:58 - << endl; build 12-Apr-2018 16:00:58 - */ build 12-Apr-2018 16:00:58 - visResampler_p->runTimeG_p=visResampler_p->runTimeG1_p=visResampler_p->runTimeG2_p=visResampler_p->runTimeG3_p=visResampler_p->runTimeG4_p=visResampler_p->runTimeG5_p=visResampler_p->runTimeG6_p=visResampler_p->runTimeG7_p=0.0; build 12-Apr-2018 16:00:58 - runTime1_p=0; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::resampleCFToGrid(Array& gwts, build 12-Apr-2018 16:00:58 - VBStore& vbs, const VisBuffer2& vb) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Grid the weighted convolution function as well build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWProjectFT2", "resampleCFToGrid[R&D]")); build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Now rotate and put the rotated convolution weight function build 12-Apr-2018 16:00:58 - // in rotatedCFWts_l object. build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // makeWBCFWt(*cfwts2_p, imRefFreq_p); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - timer_p.mark(); build 12-Apr-2018 16:00:58 - visResamplerWt_p->copy(*visResampler_p); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Vector pointingOffset(convFuncCtor_p->findPointingOffset(*image, vb)); build 12-Apr-2018 16:00:58 - //cerr << "AWPWB: " << pointingOffset << endl; build 12-Apr-2018 16:00:58 - visResamplerWt_p->makeVBRow2CFMap(*cfwts2_p,*convFuncCtor_p, vb, build 12-Apr-2018 16:00:58 - paChangeDetector.getParAngleTolerance(), build 12-Apr-2018 16:00:58 - chanMap,polMap,pointingOffset); build 12-Apr-2018 16:00:58 - VBRow2CFBMapType& theMap=visResamplerWt_p->getVBRow2CFBMap(); build 12-Apr-2018 16:00:58 - convFuncCtor_p->prepareConvFunction(vb,theMap); build 12-Apr-2018 16:00:58 - runTime1_p += timer_p.real(); build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Set the uvw array to zero-sized array and dopsf=true. build 12-Apr-2018 16:00:58 - // uvw.nelements()==0 is a hint to the re-sampler to put the build 12-Apr-2018 16:00:58 - // gridded weights at the origin of the uv-grid. dopsf=true so build 12-Apr-2018 16:00:58 - // that CF*Wts are accumulated (as against CF*Wts*Vis). build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Receive the sum-of-weights in a dummy array. build 12-Apr-2018 16:00:58 - Matrix uvwOrigin; build 12-Apr-2018 16:00:58 - vbs.uvw_p.reference(uvwOrigin); build 12-Apr-2018 16:00:58 - Bool dopsf_l=true; build 12-Apr-2018 16:00:58 - vbs.accumCFs_p=((vbs.uvw_p.nelements() == 0) && dopsf_l); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 - // wtsGrid.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 - Int nDataChan = vbs.flagCube_p.shape()[1]; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - vbs.startChan_p = 0; vbs.endChan_p = nDataChan; build 12-Apr-2018 16:00:58 - visResamplerWt_p->DataToGrid(gwts, vbs, sumCFWeight, dopsf_l); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::resampleDataToGrid(Array& griddedData_l, build 12-Apr-2018 16:00:58 - VBStore& vbs, const VisBuffer2& vb, build 12-Apr-2018 16:00:58 - Bool& dopsf) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - AWProjectFT::resampleDataToGrid(griddedData_l,vbs,vb,dopsf); build 12-Apr-2018 16:00:58 - if (!avgPBReady_p) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Get a reference to the pixels of griddedWeights (a build 12-Apr-2018 16:00:58 - // TempImage!) build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 - griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 - resampleCFToGrid(gwts, vbs, vb); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - }; build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - //--------------------------------------------------------------- build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - void AWProjectWBFT::resampleDataToGrid(Array& griddedData_l, build 12-Apr-2018 16:00:58 - VBStore& vbs, const VisBuffer2& vb, build 12-Apr-2018 16:00:58 - Bool& dopsf) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - AWProjectFT::resampleDataToGrid(griddedData_l,vbs,vb,dopsf); build 12-Apr-2018 16:00:58 - if (!avgPBReady_p) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - // Get a reference to the pixels of griddedWeights (a build 12-Apr-2018 16:00:58 - // TempImage!) build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - Array gwts; Bool removeDegenerateAxis=false; build 12-Apr-2018 16:00:58 - griddedWeights.get(gwts, removeDegenerateAxis); build 12-Apr-2018 16:00:58 - resampleCFToGrid(gwts, vbs, vb); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - }; build 12-Apr-2018 16:00:58 - // void AWProjectWBFT::resampleGridToData(VBStore& vbs, const VisBuffer2& vb) {}; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - void AWProjectWBFT::setCFCache(CountedPtr& cfc, const Bool resetCFC) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - if (resetCFC) cfCache_p = cfc; build 12-Apr-2018 16:00:58 - if (!cfCache_p.null()) build 12-Apr-2018 16:00:58 - { build 12-Apr-2018 16:00:58 - cfs2_p = CountedPtr(&cfCache_p->memCache2_p[0],false);//new CFStore2; build 12-Apr-2018 16:00:58 - cfwts2_p = CountedPtr(&cfCache_p->memCacheWt2_p[0],false);//new CFStore2; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // cfCache_p->summarize(cfCache_p->memCache2_p,String("New CFC")); build 12-Apr-2018 16:00:58 - // cfCache_p->summarize(cfCache_p->memCacheWt2_p,String("")); build 12-Apr-2018 16:00:58 - avgPBReady_p=false; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -} //# NAMESPACE CASA - END build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/AWProjectWBFT.h b/code/synthesis/TransformMachines2/AWProjectWBFT.h build 12-Apr-2018 16:00:58 index 6d98cc0..969a1d7 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/AWProjectWBFT.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/AWProjectWBFT.h build 12-Apr-2018 16:00:58 @@ -100,6 +100,9 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 virtual void makeSensitivityImage(const VisBuffer2& vb, build 12-Apr-2018 16:00:58 const casacore::ImageInterface& imageTemplate, build 12-Apr-2018 16:00:58 casacore::ImageInterface& sensitivityImage); build 12-Apr-2018 16:00:58 + virtual void makeSensitivityImage(const VisBuffer2& vb, build 12-Apr-2018 16:00:58 + const casacore::ImageInterface& imageTemplate, build 12-Apr-2018 16:00:58 + casacore::ImageInterface& sensitivityImage); build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // In AWProjectWBFT and its derivatives, sensitivity image is build 12-Apr-2018 16:00:58 // computed by accumulating weight functions (images) during the build 12-Apr-2018 16:00:58 @@ -110,11 +113,12 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 // accumulated weight images. doFFTNorm when true, the FFT build 12-Apr-2018 16:00:58 // normalization (by pixel volume) is also done. build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 - virtual void makeSensitivityImage(casacore::Lattice& wtImage, build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void makeSensitivityImage(casacore::Lattice& wtImage, build 12-Apr-2018 16:00:58 casacore::ImageInterface& sensitivityImage, build 12-Apr-2018 16:00:58 const casacore::Matrix& sumWt=casacore::Matrix(), build 12-Apr-2018 16:00:58 const casacore::Bool& doFFTNorm=true); build 12-Apr-2018 16:00:58 - virtual void makeSensitivitySqImage(casacore::Lattice& wtImage, build 12-Apr-2018 16:00:58 + void makeSensitivitySqImage(casacore::Lattice& wtImage, build 12-Apr-2018 16:00:58 casacore::ImageInterface& sensitivitySqImage, build 12-Apr-2018 16:00:58 const casacore::Matrix& sumWt=casacore::Matrix(), build 12-Apr-2018 16:00:58 const casacore::Bool& doFFTNorm=true); build 12-Apr-2018 16:00:58 @@ -168,16 +172,18 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 virtual void setCFCache(casacore::CountedPtr& cfc, const casacore::Bool resetCFC=true); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 protected: build 12-Apr-2018 16:00:58 - virtual void ftWeightImage(casacore::Lattice& wtImage, build 12-Apr-2018 16:00:58 - const casacore::Matrix& sumWt, build 12-Apr-2018 16:00:58 - const casacore::Bool& doFFTNorm); build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void ftWeightImage(casacore::Lattice& wtImage, build 12-Apr-2018 16:00:58 + const casacore::Matrix& sumWt, build 12-Apr-2018 16:00:58 + const casacore::Bool& doFFTNorm); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 virtual void resampleDataToGrid(casacore::Array& griddedData,VBStore& vbs, build 12-Apr-2018 16:00:58 const VisBuffer2& vb, casacore::Bool& dopsf); build 12-Apr-2018 16:00:58 virtual void resampleDataToGrid(casacore::Array& griddedData,VBStore& vbs, build 12-Apr-2018 16:00:58 const VisBuffer2& vb, casacore::Bool& dopsf); build 12-Apr-2018 16:00:58 // virtual void resampleGridToData(VBStore& vbs, const VisBuffer2& vb); build 12-Apr-2018 16:00:58 - void resampleCFToGrid(casacore::Array& wtsGrid, build 12-Apr-2018 16:00:58 + template build 12-Apr-2018 16:00:58 + void resampleCFToGrid(casacore::Array& wtsGrid, build 12-Apr-2018 16:00:58 VBStore& vbs, const VisBuffer2& vb); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::Bool avgPBReady_p,resetPBs_p, wtImageFTDone_p; build 12-Apr-2018 16:00:58 @@ -185,7 +191,8 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 private: build 12-Apr-2018 16:00:58 casacore::String tt_pp; build 12-Apr-2018 16:00:58 casacore::Vector fieldIds_p; build 12-Apr-2018 16:00:58 - casacore::TempImage griddedWeights, griddedConjWeights; build 12-Apr-2018 16:00:58 + casacore::TempImage griddedWeights; build 12-Apr-2018 16:00:58 + casacore::TempImage griddedWeights_D; build 12-Apr-2018 16:00:58 CFStore rotatedCFWts_p; build 12-Apr-2018 16:00:58 casacore::Float pbNorm; build 12-Apr-2018 16:00:58 casacore::CountedPtr visResamplerWt_p; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/AWVisResampler.cc b/code/synthesis/TransformMachines2/AWVisResampler.cc build 12-Apr-2018 16:00:58 index d52b6fb..78bb75d 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/AWVisResampler.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/AWVisResampler.cc build 12-Apr-2018 16:00:58 @@ -387,14 +387,15 @@ namespace casa{ build 12-Apr-2018 16:00:58 const Double& /*imRefFreq*/, build 12-Apr-2018 16:00:58 const Int& spwID, const Int& fieldId) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWVisResampler","cachePhaseGrad[R&D]")); build 12-Apr-2018 16:00:58 //cout << "# " << cfRefFreq << " " << imRefFreq << endl; build 12-Apr-2018 16:00:58 + //cerr << pointingOffset << " " << cached_PointingOffset_p << endl; build 12-Apr-2018 16:00:58 if ( build 12-Apr-2018 16:00:58 (sum(fabs(pointingOffset-cached_PointingOffset_p)) > 1e-6) || build 12-Apr-2018 16:00:58 (cached_phaseGrad_p.shape()[0] < cfShape[0]) || build 12-Apr-2018 16:00:58 (cached_phaseGrad_p.shape()[1] < cfShape[1]) build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWVisResampler","cachePhaseGrad[R&D]")); build 12-Apr-2018 16:00:58 log_l << "Computing phase gradiant for pointing offset " build 12-Apr-2018 16:00:58 << pointingOffset << cfShape << " " << cached_phaseGrad_p.shape() build 12-Apr-2018 16:00:58 << "(SPW: " << spwID << " Field: " << fieldId << ")" build 12-Apr-2018 16:00:58 @@ -458,7 +459,6 @@ namespace casa{ build 12-Apr-2018 16:00:58 Matrix& sumwt,const Bool& dopsf, build 12-Apr-2018 16:00:58 Bool /*useConjFreqCF*/) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("AWVisResampler[R&D]","DataToGridImpl_p")); build 12-Apr-2018 16:00:58 Int nDataChan, nDataPol, nGridPol, nGridChan, nx, ny, nw;//, nCFFreq; build 12-Apr-2018 16:00:58 Int targetIMChan, targetIMPol, rbeg, rend;//, PolnPlane, ConjPlane; build 12-Apr-2018 16:00:58 Int startChan, endChan; build 12-Apr-2018 16:00:58 @@ -669,6 +669,7 @@ namespace casa{ build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch (SynthesisFTMachineError& x) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("AWVisResampler[R&D]","DataToGridImpl_p")); build 12-Apr-2018 16:00:58 log_l << x.getMesg() << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 // Extract the vis. vector element corresponding to the mCols column of the conjMRow row of the Mueller matrix. build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/CFStore2.cc b/code/synthesis/TransformMachines2/CFStore2.cc build 12-Apr-2018 16:00:58 index 215b980..8cc3449 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/CFStore2.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/CFStore2.cc build 12-Apr-2018 16:00:58 @@ -297,16 +297,12 @@ void CFStore2::clear() build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 if (spwID != currentSPWID_p) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - // While the message below is useful as NORMAL1, in a build 12-Apr-2018 16:00:58 - // parallel run, it appears on the console. So shutting build 12-Apr-2018 16:00:58 - // it down. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 // LogIO log_l(LogOrigin("CFStore2", "invokeGC")); build 12-Apr-2018 16:00:58 // log_l << "Invoking Garbage Collector: "; build 12-Apr-2018 16:00:58 // // The reason for invoking GC build 12-Apr-2018 16:00:58 // if (currentSPWID_p < 0) log_l << "Initial mopping-up"; build 12-Apr-2018 16:00:58 // else log_l << "SPW" << currentSPWID_p << "->SPW" << spwID; build 12-Apr-2018 16:00:58 - // log_l << LogIO::NORMAL1; build 12-Apr-2018 16:00:58 + // log_l << LogIO::DEBUGGING; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 clear(); currentSPWID_p=spwID; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/FTMachine.cc b/code/synthesis/TransformMachines2/FTMachine.cc build 12-Apr-2018 16:00:58 index 3d224ec..56a78d2 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/FTMachine.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/FTMachine.cc build 12-Apr-2018 16:00:58 @@ -88,7 +88,8 @@ using namespace casa::refim; build 12-Apr-2018 16:00:58 using namespace casacore; build 12-Apr-2018 16:00:58 using namespace casa::vi; build 12-Apr-2018 16:00:58 FTMachine::FTMachine() : isDryRun(false), image(0), uvwMachine_p(0), build 12-Apr-2018 16:00:58 - tangentSpecified_p(false), fixMovingSource_p(false), build 12-Apr-2018 16:00:58 + tangentSpecified_p(false), fixMovingSource_p(false), build 12-Apr-2018 16:00:58 + movingDirShift_p(0.0), build 12-Apr-2018 16:00:58 distance_p(0.0), lastFieldId_p(-1),lastMSId_p(-1), build 12-Apr-2018 16:00:58 useDoubleGrid_p(false), build 12-Apr-2018 16:00:58 freqFrameValid_p(false), build 12-Apr-2018 16:00:58 @@ -107,7 +108,7 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 FTMachine::FTMachine(CountedPtr& cfcache,CountedPtr& cf): build 12-Apr-2018 16:00:58 isDryRun(false), image(0), uvwMachine_p(0), build 12-Apr-2018 16:00:58 - tangentSpecified_p(false), fixMovingSource_p(false), build 12-Apr-2018 16:00:58 + tangentSpecified_p(false), fixMovingSource_p(false), movingDirShift_p(0.0), build 12-Apr-2018 16:00:58 distance_p(0.0), lastFieldId_p(-1),lastMSId_p(-1), build 12-Apr-2018 16:00:58 useDoubleGrid_p(false), build 12-Apr-2018 16:00:58 freqFrameValid_p(false), build 12-Apr-2018 16:00:58 @@ -184,7 +185,7 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 movingDir_p=other.movingDir_p; build 12-Apr-2018 16:00:58 fixMovingSource_p=other.fixMovingSource_p; build 12-Apr-2018 16:00:58 firstMovingDir_p=other.firstMovingDir_p; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + movingDirShift_p=other.movingDirShift_p; build 12-Apr-2018 16:00:58 //Double precision gridding for those FTMachines that can do build 12-Apr-2018 16:00:58 useDoubleGrid_p=other.useDoubleGrid_p; build 12-Apr-2018 16:00:58 cfStokes_p = other.cfStokes_p; build 12-Apr-2018 16:00:58 @@ -266,10 +267,23 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 AlwaysAssert(image, AipsError); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set the frame for the UVWMachine build 12-Apr-2018 16:00:58 - if(vb.isAttached()) build 12-Apr-2018 16:00:58 - mFrame_p=MeasFrame(MEpoch(Quantity(vb.time()(0), "s"), ROMSColumns(vb.ms()).timeMeas()(0).getRef()), mLocation_p); build 12-Apr-2018 16:00:58 - else build 12-Apr-2018 16:00:58 + if(vb.isAttached()){ build 12-Apr-2018 16:00:58 + //mFrame_p=MeasFrame(MEpoch(Quantity(vb.time()(0), "s"), ROMSColumns(vb.ms()).timeMeas()(0).getRef()), mLocation_p); build 12-Apr-2018 16:00:58 + if(!mFrame_p.epoch()) build 12-Apr-2018 16:00:58 + mFrame_p.set(MEpoch(Quantity(vb.time()(0), "s"), ROMSColumns(vb.ms()).timeMeas()(0).getRef())); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + mFrame_p.resetEpoch(MEpoch(Quantity(vb.time()(0), "s"), ROMSColumns(vb.ms()).timeMeas()(0).getRef())); build 12-Apr-2018 16:00:58 + if(!mFrame_p.position()) build 12-Apr-2018 16:00:58 + mFrame_p.set(mLocation_p); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + mFrame_p.resetPosition(mLocation_p); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 throw(AipsError("Cannot define some frame as no Visiter/MS is attached")); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + //////TESTOOOO build 12-Apr-2018 16:00:58 + ///setMovingSource("COMET", "des_deedee_ephem2.tab"); build 12-Apr-2018 16:00:58 + /////////////////////////////////////////// build 12-Apr-2018 16:00:58 // First get the CoordinateSystem for the image and then find build 12-Apr-2018 16:00:58 // the DirectionCoordinate build 12-Apr-2018 16:00:58 casacore::CoordinateSystem coords=image->coordinates(); build 12-Apr-2018 16:00:58 @@ -284,10 +298,19 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //First convert to HA-DEC or AZEL for parallax correction build 12-Apr-2018 16:00:58 MDirection::Ref outref1(MDirection::AZEL, mFrame_p); build 12-Apr-2018 16:00:58 - MDirection tmphadec=MDirection::Convert(movingDir_p, outref1)(); build 12-Apr-2018 16:00:58 + MDirection tmphadec; build 12-Apr-2018 16:00:58 + if(upcase(movingDir_p.getRefString()).contains("APP")){ build 12-Apr-2018 16:00:58 + tmphadec=MDirection::Convert((vbutil_p->getEphemDir(vb, phaseCenterTime_p)), outref1)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + tmphadec=MDirection::Convert(movingDir_p, outref1)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 MDirection::Ref outref(directionCoord.directionType(), mFrame_p); build 12-Apr-2018 16:00:58 firstMovingDir_p=MDirection::Convert(tmphadec, outref)(); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + ///TESTOO build 12-Apr-2018 16:00:58 + ///waiting for CAS-11060 build 12-Apr-2018 16:00:58 + //firstMovingDir_p=MDirection::Convert(vbutil_p->getPhaseCenter(vb, phaseCenterTime_p), outref)(); build 12-Apr-2018 16:00:58 + //////////////////// build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -866,9 +889,16 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 // UVrotation is false only if field never changes build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ROMSColumns mscol(vb.ms()); build 12-Apr-2018 16:00:58 - if((vb.fieldId()(0)!=lastFieldId_p) || (vb.msId()!=lastMSId_p)) build 12-Apr-2018 16:00:58 + if((vb.fieldId()(0)!=lastFieldId_p) || (vb.msId()!=lastMSId_p)){ build 12-Apr-2018 16:00:58 doUVWRotation_p=true; build 12-Apr-2018 16:00:58 - if(doUVWRotation_p || fixMovingSource_p){ build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + //if above failed it still can be changing if polynome phasecenter or ephem build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if( (vb.subtableColumns().field().numPoly()(lastFieldId_p) >0) || (! (vb.subtableColumns().field().ephemerisId().isNull()) && (vb.subtableColumns().field().ephemerisId()(lastFieldId_p) > -1))) build 12-Apr-2018 16:00:58 + doUVWRotation_p=True; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if(doUVWRotation_p || fixMovingSource_p){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 mFrame_p.epoch() != 0 ? build 12-Apr-2018 16:00:58 mFrame_p.resetEpoch(MEpoch(Quantity(vb.time()(0), "s"))): build 12-Apr-2018 16:00:58 @@ -876,38 +906,46 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 MDirection::Types outType; build 12-Apr-2018 16:00:58 MDirection::getType(outType, mImage_p.getRefString()); build 12-Apr-2018 16:00:58 MDirection phasecenter=MDirection::Convert(vbutil_p->getPhaseCenter(vb, phaseCenterTime_p), MDirection::Ref(outType, mFrame_p))(); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + MDirection inFieldPhaseCenter=phasecenter; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(fixMovingSource_p){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //First convert to HA-DEC or AZEL for parallax correction build 12-Apr-2018 16:00:58 MDirection::Ref outref1(MDirection::AZEL, mFrame_p); build 12-Apr-2018 16:00:58 - MDirection tmphadec=MDirection::Convert(movingDir_p, outref1)(); build 12-Apr-2018 16:00:58 + MDirection tmphadec; build 12-Apr-2018 16:00:58 + if(upcase(movingDir_p.getRefString()).contains("APP")){ build 12-Apr-2018 16:00:58 + tmphadec=MDirection::Convert((vbutil_p->getEphemDir(vb, phaseCenterTime_p)), outref1)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + tmphadec=MDirection::Convert(movingDir_p, outref1)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 MDirection::Ref outref(mImage_p.getRef().getType(), mFrame_p); build 12-Apr-2018 16:00:58 MDirection sourcenow=MDirection::Convert(tmphadec, outref)(); build 12-Apr-2018 16:00:58 //cerr << "Rotating to fixed moving source " << MVDirection(phasecenter.getAngle()-firstMovingDir_p.getAngle()+sourcenow.getAngle()) << endl; build 12-Apr-2018 16:00:58 - phasecenter.set(MVDirection(phasecenter.getAngle()+firstMovingDir_p.getAngle()-sourcenow.getAngle())); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + //phasecenter.set(MVDirection(phasecenter.getAngle()+firstMovingDir_p.getAngle()-sourcenow.getAngle())); build 12-Apr-2018 16:00:58 + movingDirShift_p=MVDirection(sourcenow.getAngle()-firstMovingDir_p.getAngle()); build 12-Apr-2018 16:00:58 + // cerr << "shift " << movingDirShift_p.getAngle() << endl; build 12-Apr-2018 16:00:58 + inFieldPhaseCenter.shift(movingDirShift_p, False); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set up the UVWMachine only if the field id has changed. If build 12-Apr-2018 16:00:58 // the tangent plane is specified then we need a UVWMachine that build 12-Apr-2018 16:00:58 // will reproject to that plane iso the image plane build 12-Apr-2018 16:00:58 - if((vb.fieldId()(0)!=lastFieldId_p) || (vb.msId()!=lastMSId_p) || fixMovingSource_p) { build 12-Apr-2018 16:00:58 + if(doUVWRotation_p || fixMovingSource_p) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 String observatory=mscol.observation().telescopeName()(0); build 12-Apr-2018 16:00:58 if(uvwMachine_p) delete uvwMachine_p; uvwMachine_p=0; build 12-Apr-2018 16:00:58 if(observatory.contains("ATCA") || observatory.contains("WSRT")){ build 12-Apr-2018 16:00:58 //Tangent specified is being wrongly used...it should be for a build 12-Apr-2018 16:00:58 //Use the safest way for now. build 12-Apr-2018 16:00:58 - uvwMachine_p=new UVWMachine(phasecenter, vbutil_p->getPhaseCenter(vb, phaseCenterTime_p), mFrame_p, build 12-Apr-2018 16:00:58 + uvwMachine_p=new UVWMachine(inFieldPhaseCenter, vbutil_p->getPhaseCenter(vb, phaseCenterTime_p), mFrame_p, build 12-Apr-2018 16:00:58 true, false); build 12-Apr-2018 16:00:58 phaseShifter_p=new UVWMachine(mImage_p, phasecenter, mFrame_p, build 12-Apr-2018 16:00:58 true, false); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else{ build 12-Apr-2018 16:00:58 - uvwMachine_p=new UVWMachine(phasecenter, vbutil_p->getPhaseCenter(vb, phaseCenterTime_p), mFrame_p, build 12-Apr-2018 16:00:58 + uvwMachine_p=new UVWMachine(inFieldPhaseCenter, vbutil_p->getPhaseCenter(vb, phaseCenterTime_p), mFrame_p, build 12-Apr-2018 16:00:58 false, false); build 12-Apr-2018 16:00:58 phaseShifter_p=new UVWMachine(mImage_p, phasecenter, mFrame_p, build 12-Apr-2018 16:00:58 false, false); build 12-Apr-2018 16:00:58 @@ -971,8 +1009,17 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 //the uvw rotation is done for common tangent reprojection or if the build 12-Apr-2018 16:00:58 //image center is different from the phasecenter build 12-Apr-2018 16:00:58 // UVrotation is false only if field never changes build 12-Apr-2018 16:00:58 - if((vb.fieldId()(0)!=lastFieldId_p) || (vb.msId()!=lastMSId_p)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if((vb.fieldId()(0)!=lastFieldId_p) || (vb.msId()!=lastMSId_p)){ build 12-Apr-2018 16:00:58 doUVWRotation_p=true; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + //if above failed it still can be changing if polynome phasecenter or ephem build 12-Apr-2018 16:00:58 + if( (vb.subtableColumns().field().numPoly()(lastFieldId_p) >0) || (! (vb.subtableColumns().field().ephemerisId().isNull()) &&(vb.subtableColumns().field().ephemerisId()(lastFieldId_p) > -1))) build 12-Apr-2018 16:00:58 + doUVWRotation_p=True; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 if(doUVWRotation_p || tangentSpecified_p || fixMovingSource_p){ build 12-Apr-2018 16:00:58 ok(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -984,21 +1031,32 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 MDirection phasecenter=mImage_p; build 12-Apr-2018 16:00:58 if(fixMovingSource_p){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - //First convert to HA-DEC or AZEL for parallax correction build 12-Apr-2018 16:00:58 - MDirection::Ref outref1(MDirection::AZEL, mFrame_p); build 12-Apr-2018 16:00:58 - MDirection tmphadec=MDirection::Convert(movingDir_p, outref1)(); build 12-Apr-2018 16:00:58 - MDirection::Ref outref(mImage_p.getRef().getType(), mFrame_p); build 12-Apr-2018 16:00:58 - MDirection sourcenow=MDirection::Convert(tmphadec, outref)(); build 12-Apr-2018 16:00:58 + //First convert to HA-DEC or AZEL for parallax correction build 12-Apr-2018 16:00:58 + MDirection::Ref outref1(MDirection::AZEL, mFrame_p); build 12-Apr-2018 16:00:58 + MDirection tmphadec; build 12-Apr-2018 16:00:58 + if(upcase(movingDir_p.getRefString()).contains("APP")){ build 12-Apr-2018 16:00:58 + tmphadec=MDirection::Convert((vbutil_p->getEphemDir(vb, phaseCenterTime_p)), outref1)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + tmphadec=MDirection::Convert(movingDir_p, outref1)(); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + ////TESTOO waiting for CAS-11060 build 12-Apr-2018 16:00:58 + //MDirection tmphadec=MDirection::Convert((vbutil_p->getPhaseCenter(vb, phaseCenterTime_p)), outref1)(); build 12-Apr-2018 16:00:58 + ///////// build 12-Apr-2018 16:00:58 + MDirection::Ref outref(mImage_p.getRef().getType(), mFrame_p); build 12-Apr-2018 16:00:58 + MDirection sourcenow=MDirection::Convert(tmphadec, outref)(); build 12-Apr-2018 16:00:58 //cerr << "Rotating to fixed moving source " << MVDirection(phasecenter.getAngle()-firstMovingDir_p.getAngle()+sourcenow.getAngle()) << endl; build 12-Apr-2018 16:00:58 - phasecenter.set(MVDirection(phasecenter.getAngle()+firstMovingDir_p.getAngle()-sourcenow.getAngle())); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + //phasecenter.set(MVDirection(phasecenter.getAngle()+firstMovingDir_p.getAngle()-sourcenow.getAngle())); build 12-Apr-2018 16:00:58 + movingDirShift_p=MVDirection(sourcenow.getAngle()-firstMovingDir_p.getAngle()); build 12-Apr-2018 16:00:58 + phasecenter.shift(movingDirShift_p, False); build 12-Apr-2018 16:00:58 + //cerr << sourcenow.toString() <<" "<<(vbutil_p->getPhaseCenter(vb, phaseCenterTime_p)).toString() << " difference " << firstMovingDir_p.getAngle() - sourcenow.getAngle() << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Set up the UVWMachine only if the field id has changed. If build 12-Apr-2018 16:00:58 // the tangent plane is specified then we need a UVWMachine that build 12-Apr-2018 16:00:58 // will reproject to that plane iso the image plane build 12-Apr-2018 16:00:58 - if((vb.fieldId()(0)!=lastFieldId_p) || (vb.msId()!=lastMSId_p) || fixMovingSource_p) { build 12-Apr-2018 16:00:58 + if(doUVWRotation_p || fixMovingSource_p) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 String observatory=ROMSColumns(vb.ms()).observation().telescopeName()(0); build 12-Apr-2018 16:00:58 if(uvwMachine_p) delete uvwMachine_p; uvwMachine_p=0; build 12-Apr-2018 16:00:58 @@ -1245,6 +1303,7 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 saveMeasure(outRecord, "movingdir_rec", error, movingDir_p); build 12-Apr-2018 16:00:58 outRecord.define("fixmovingsource", fixMovingSource_p); build 12-Apr-2018 16:00:58 saveMeasure(outRecord, "firstmovingdir_rec", error, firstMovingDir_p); build 12-Apr-2018 16:00:58 + movingDirShift_p=MVDirection(0.0); build 12-Apr-2018 16:00:58 outRecord.define("usedoublegrid", useDoubleGrid_p); build 12-Apr-2018 16:00:58 outRecord.define("cfstokes", cfStokes_p); build 12-Apr-2018 16:00:58 outRecord.define("polinuse", polInUse_p); build 12-Apr-2018 16:00:58 @@ -1688,14 +1747,54 @@ using namespace casa::vi; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - void FTMachine::setMovingSource(const String& sourcename){ build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + void FTMachine::setMovingSource(const String& sname, const String& ephtab){ build 12-Apr-2018 16:00:58 + String sourcename=sname; build 12-Apr-2018 16:00:58 + String ephemtab=ephtab; build 12-Apr-2018 16:00:58 + //if a table is given as sourcename...assume ephemerides build 12-Apr-2018 16:00:58 + if(Table::isReadable(sourcename, False)){ build 12-Apr-2018 16:00:58 + sourcename="COMET"; build 12-Apr-2018 16:00:58 + ephemtab=sname; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + ///Special case build 12-Apr-2018 16:00:58 + if(upcase(sourcename)=="TRACKFIELD"){ build 12-Apr-2018 16:00:58 + //if(name().contains("MosaicFT")) build 12-Apr-2018 16:00:58 + // throw(AipsError("Cannot use field phasecenter to track moving source in a Mosaic")); build 12-Apr-2018 16:00:58 + fixMovingSource_p=True; build 12-Apr-2018 16:00:58 + movingDir_p=MDirection(Quantity(0.0,"deg"), Quantity(90.0, "deg")); build 12-Apr-2018 16:00:58 + movingDir_p.setRefString("APP"); build 12-Apr-2018 16:00:58 + ///Setting it to APP with movingDir_p==True => should use the phasecenter to track build 12-Apr-2018 16:00:58 + ///Discussion in CAS-9004 where users are too lazy to give an ephemtable. build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + MDirection::Types refType; build 12-Apr-2018 16:00:58 + Bool isValid = MDirection::getType(refType, sourcename); build 12-Apr-2018 16:00:58 + if(!isValid) build 12-Apr-2018 16:00:58 + throw(AipsError("Cannot recognize moving source "+sourcename)); build 12-Apr-2018 16:00:58 + if(refType < MDirection::N_Types || refType > MDirection:: N_Planets ) build 12-Apr-2018 16:00:58 + throw(AipsError(sourcename+" is not type of source we can track")); build 12-Apr-2018 16:00:58 + if(refType==MDirection::COMET){ build 12-Apr-2018 16:00:58 + MeasComet laComet; build 12-Apr-2018 16:00:58 + if(Table::isReadable(ephemtab, False)){ build 12-Apr-2018 16:00:58 + Table laTable(ephemtab); build 12-Apr-2018 16:00:58 + Path leSentier(ephemtab); build 12-Apr-2018 16:00:58 + laComet=MeasComet(laTable, leSentier.absoluteName()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + laComet= MeasComet(ephemtab); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + if(!mFrame_p.comet()) build 12-Apr-2018 16:00:58 + mFrame_p.set(laComet); build 12-Apr-2018 16:00:58 + else build 12-Apr-2018 16:00:58 + mFrame_p.resetComet(laComet); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 fixMovingSource_p=true; build 12-Apr-2018 16:00:58 movingDir_p=MDirection(Quantity(0.0,"deg"), Quantity(90.0, "deg")); build 12-Apr-2018 16:00:58 movingDir_p.setRefString(sourcename); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + // cerr << "movingdir " << movingDir_p.toString() << endl; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 void FTMachine::setMovingSource(const MDirection& mdir){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 fixMovingSource_p=true; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/FTMachine.h b/code/synthesis/TransformMachines2/FTMachine.h build 12-Apr-2018 16:00:58 index 67c7c9f..202a5da 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/FTMachine.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/FTMachine.h build 12-Apr-2018 16:00:58 @@ -313,7 +313,7 @@ public: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // set a moving source aka planets or comets => adjust phase center build 12-Apr-2018 16:00:58 // on the fly for gridding build 12-Apr-2018 16:00:58 - virtual void setMovingSource(const casacore::String& sourcename); build 12-Apr-2018 16:00:58 + virtual void setMovingSource(const casacore::String& sourcename, const casacore::String& ephemtable=""); build 12-Apr-2018 16:00:58 virtual void setMovingSource(const casacore::MDirection& mdir); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //reset stuff in an FTMachine build 12-Apr-2018 16:00:58 @@ -399,7 +399,9 @@ protected: build 12-Apr-2018 16:00:58 casacore::MDirection movingDir_p; build 12-Apr-2018 16:00:58 casacore::Bool fixMovingSource_p; build 12-Apr-2018 16:00:58 casacore::MDirection firstMovingDir_p; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + // This will hold the angular difference between movingDir and firstMovingDir with build 12-Apr-2018 16:00:58 + // the frame conversion done properly etc.. build 12-Apr-2018 16:00:58 + casacore::MVDirection movingDirShift_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::Double distance_p; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/FortranizedLoopsToGrid.cc b/code/synthesis/TransformMachines2/FortranizedLoopsToGrid.cc build 12-Apr-2018 16:00:58 index 27fafe9..fe37ae6 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/FortranizedLoopsToGrid.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/FortranizedLoopsToGrid.cc build 12-Apr-2018 16:00:58 @@ -28,7 +28,7 @@ build 12-Apr-2018 16:00:58 //# $Id$ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - timer_p.mark(); build 12-Apr-2018 16:00:58 + //timer_p.mark(); build 12-Apr-2018 16:00:58 // T *gridPtr; build 12-Apr-2018 16:00:58 Complex *cfPtr, *phaseGradPtr,typeComplex; build 12-Apr-2018 16:00:58 Int *supportPtr, *cfShapePtr, build 12-Apr-2018 16:00:58 @@ -59,7 +59,7 @@ build 12-Apr-2018 16:00:58 Int gnx = nx, gny = ny, gnp = nGridPol, gnc=nGridChan; build 12-Apr-2018 16:00:58 Int phx=cached_phaseGrad_p.shape()[0], phy=cached_phaseGrad_p.shape()[1]; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - runTimeG2_p += timer_p.real(); build 12-Apr-2018 16:00:58 + //runTimeG2_p += timer_p.real(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // build 12-Apr-2018 16:00:58 // Call the FORTRAN function with the gridding inner-loops (in synthesis/fortran/faccumulateToGrid.f) build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/HetArrayConvFunc.cc b/code/synthesis/TransformMachines2/HetArrayConvFunc.cc build 12-Apr-2018 16:00:58 index f2ba91e..d648a6c 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/HetArrayConvFunc.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/HetArrayConvFunc.cc build 12-Apr-2018 16:00:58 @@ -351,7 +351,8 @@ void HetArrayConvFunc::findConvFunction(const ImageInterface& iimage, build 12-Apr-2018 16:00:58 Vector& convSupport, build 12-Apr-2018 16:00:58 Vector& convFuncPolMap, build 12-Apr-2018 16:00:58 Vector& convFuncChanMap, build 12-Apr-2018 16:00:58 - Vector& convFuncRowMap, Bool getConjConvFunc) build 12-Apr-2018 16:00:58 + Vector& convFuncRowMap, Bool getConjConvFunc, build 12-Apr-2018 16:00:58 + const MVDirection& extraShift, const Bool useExtraShift) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 storeImageParams(iimage,vb); build 12-Apr-2018 16:00:58 @@ -380,7 +381,7 @@ void HetArrayConvFunc::findConvFunction(const ImageInterface& iimage, build 12-Apr-2018 16:00:58 convsize.resize(); build 12-Apr-2018 16:00:58 convSupport.resize(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Int isCached=checkPBOfField(vb, convFuncRowMap); build 12-Apr-2018 16:00:58 + Int isCached=checkPBOfField(vb, convFuncRowMap, extraShift, useExtraShift); build 12-Apr-2018 16:00:58 //cout << "isCached " << isCached << endl; build 12-Apr-2018 16:00:58 if(isCached==1 && (convFuncRowMap.shape()[0]==vb.nRows())) { build 12-Apr-2018 16:00:58 /*convFunc.reference(convFunc_p); build 12-Apr-2018 16:00:58 @@ -1288,9 +1289,9 @@ Int HetArrayConvFunc::factorial(Int n) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Int HetArrayConvFunc::checkPBOfField(const vi::VisBuffer2& vb, build 12-Apr-2018 16:00:58 - Vector& /*rowMap*/) { build 12-Apr-2018 16:00:58 + Vector& /*rowMap*/, const MVDirection& extraShift, const Bool useExtraShift) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - toPix(vb); build 12-Apr-2018 16:00:58 + toPix(vb, extraShift, useExtraShift); build 12-Apr-2018 16:00:58 Vector pixdepoint(2); build 12-Apr-2018 16:00:58 convertArray(pixdepoint, thePix_p); build 12-Apr-2018 16:00:58 if((pixdepoint(0) < 0) || pixdepoint(0) >= nx_p || pixdepoint(1) < 0 || build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/HetArrayConvFunc.h b/code/synthesis/TransformMachines2/HetArrayConvFunc.h build 12-Apr-2018 16:00:58 index a10b4a8..d3181c5 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/HetArrayConvFunc.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/HetArrayConvFunc.h build 12-Apr-2018 16:00:58 @@ -83,7 +83,8 @@ namespace casa { build 12-Apr-2018 16:00:58 casacore::Vector& convsize, build 12-Apr-2018 16:00:58 casacore::Vector& convSupport, build 12-Apr-2018 16:00:58 casacore::Vector& polMap, casacore::Vector& chanMap, casacore::Vector& rowMap, build 12-Apr-2018 16:00:58 - const casacore::Bool getConjConvFuncs=false build 12-Apr-2018 16:00:58 + const casacore::Bool getConjConvFuncs=false, build 12-Apr-2018 16:00:58 + const casacore::MVDirection& extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False build 12-Apr-2018 16:00:58 ); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 virtual casacore::ImageInterface& getFluxScaleImage(); build 12-Apr-2018 16:00:58 @@ -107,7 +108,7 @@ namespace casa { build 12-Apr-2018 16:00:58 //seems to be inside image build 12-Apr-2018 16:00:58 // 1 if value is cached..we have stopped caching..so it should not return this value build 12-Apr-2018 16:00:58 // 2 pointing is off image ...thus valid but not useful build 12-Apr-2018 16:00:58 - casacore::Int checkPBOfField(const vi::VisBuffer2& vb, casacore::Vector& rowMap); build 12-Apr-2018 16:00:58 + casacore::Int checkPBOfField(const vi::VisBuffer2& vb, casacore::Vector& rowMap, const casacore::MVDirection& extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False); build 12-Apr-2018 16:00:58 void findAntennaSizes(const vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 void supportAndNormalize(casacore::Int plane, casacore::Int convSampling); build 12-Apr-2018 16:00:58 void supportAndNormalizeLatt(casacore::Int plane, casacore::Int convSampling, casacore::TempLattice& convFuncLat, build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/MosaicFT.cc b/code/synthesis/TransformMachines2/MosaicFT.cc build 12-Apr-2018 16:00:58 index 2a08b0d..7615b41 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/MosaicFT.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/MosaicFT.cc build 12-Apr-2018 16:00:58 @@ -285,9 +285,8 @@ void MosaicFT::findConvFunction(const ImageInterface& iimage, build 12-Apr-2018 16:00:58 convSampling=10; build 12-Apr-2018 16:00:58 AipsrcValue::find (convSampling, "mosaic.oversampling", 10); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 pbConvFunc_p->findConvFunction(iimage, vb, convSampling, interpVisFreq_p, convFunc, weightConvFunc_p, convSizePlanes_p, convSupportPlanes_p, build 12-Apr-2018 16:00:58 - convPolMap_p, convChanMap_p, convRowMap_p, (useConjConvFunc_p && !toVis_p)); build 12-Apr-2018 16:00:58 + convPolMap_p, convChanMap_p, convRowMap_p, (useConjConvFunc_p && !toVis_p), MVDirection(-(movingDirShift_p.getAngle())), fixMovingSource_p); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // cerr << "MAX of convFunc " << max(abs(convFunc)) << endl; build 12-Apr-2018 16:00:58 //For now only use one size and support build 12-Apr-2018 16:00:58 @@ -982,11 +981,7 @@ void MosaicFT::put(const vi::VisBuffer2& vb, Int row, Bool dopsf, build 12-Apr-2018 16:00:58 Matrix elWeight; build 12-Apr-2018 16:00:58 interpolateFrequencyTogrid(vb, *imagingweight,data, flags, elWeight, type); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // This needs to be after the interp to get the interpolated channels build 12-Apr-2018 16:00:58 - findConvFunction(*image, vb); build 12-Apr-2018 16:00:58 - //nothing to grid here as the pointing resulted in a zero support convfunc build 12-Apr-2018 16:00:58 - if(convSupport <= 0) build 12-Apr-2018 16:00:58 - return; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Bool iswgtCopy; build 12-Apr-2018 16:00:58 const Float *wgtStorage; build 12-Apr-2018 16:00:58 @@ -1016,10 +1011,7 @@ void MosaicFT::put(const vi::VisBuffer2& vb, Int row, Bool dopsf, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Get the uvws in a form that Fortran can use and do that build 12-Apr-2018 16:00:58 - // necessary phase rotation. On a Pentium Pro 200 MHz build 12-Apr-2018 16:00:58 - // when null, this step takes about 50us per uvw point. This build 12-Apr-2018 16:00:58 - // is just barely noticeable for Stokes I continuum and build 12-Apr-2018 16:00:58 - // irrelevant for other cases. build 12-Apr-2018 16:00:58 + // necessary phase rotation. build 12-Apr-2018 16:00:58 Matrix uvw(negateUV(vb)); build 12-Apr-2018 16:00:58 Vector dphase(vb.nRows()); build 12-Apr-2018 16:00:58 dphase=0.0; build 12-Apr-2018 16:00:58 @@ -1027,7 +1019,13 @@ void MosaicFT::put(const vi::VisBuffer2& vb, Int row, Bool dopsf, build 12-Apr-2018 16:00:58 doUVWRotation_p=true; build 12-Apr-2018 16:00:58 girarUVW(uvw, dphase, vb); build 12-Apr-2018 16:00:58 refocus(uvw, vb.antenna1(), vb.antenna2(), dphase, vb); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + // This needs to be after the interp to get the interpolated channels build 12-Apr-2018 16:00:58 + //Also has to be after rotateuvw in case tracking is on build 12-Apr-2018 16:00:58 + findConvFunction(*image, vb); build 12-Apr-2018 16:00:58 + //nothing to grid here as the pointing resulted in a zero support convfunc build 12-Apr-2018 16:00:58 + if(convSupport <= 0) build 12-Apr-2018 16:00:58 + return; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 // Get the pointing positions. This can easily consume a lot build 12-Apr-2018 16:00:58 // of time thus we are for now assuming a field per build 12-Apr-2018 16:00:58 // vb chunk...need to change that accordingly if we start using build 12-Apr-2018 16:00:58 @@ -1363,7 +1361,7 @@ void MosaicFT::get(vi::VisBuffer2& vb, Int row) build 12-Apr-2018 16:00:58 Complex *datStorage; build 12-Apr-2018 16:00:58 Bool isCopy; build 12-Apr-2018 16:00:58 datStorage=data.getStorage(isCopy); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Vector rowFlags(vb.nRows()); build 12-Apr-2018 16:00:58 rowFlags=0; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/SimplePBConvFunc.cc b/code/synthesis/TransformMachines2/SimplePBConvFunc.cc build 12-Apr-2018 16:00:58 index a01475f..285cbae 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/SimplePBConvFunc.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/SimplePBConvFunc.cc build 12-Apr-2018 16:00:58 @@ -163,7 +163,7 @@ SimplePBConvFunc::SimplePBConvFunc(): nchan_p(-1), build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - void SimplePBConvFunc::toPix(const vi::VisBuffer2& vb){ build 12-Apr-2018 16:00:58 + void SimplePBConvFunc::toPix(const vi::VisBuffer2& vb, const MVDirection& extraShift, const Bool useExtraShift){ build 12-Apr-2018 16:00:58 thePix_p.resize(2); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 const MDirection& p1=pointingDirAnt1(vb); build 12-Apr-2018 16:00:58 @@ -196,16 +196,25 @@ SimplePBConvFunc::SimplePBConvFunc(): nchan_p(-1), build 12-Apr-2018 16:00:58 direction1_p=pointToPix_p(p1); build 12-Apr-2018 16:00:58 //direction2_p=pointToPix_p(vb.direction2()(0)); build 12-Apr-2018 16:00:58 direction2_p=direction1_p; build 12-Apr-2018 16:00:58 - dc_p.toPixel(thePix_p, direction1_p); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else{ build 12-Apr-2018 16:00:58 direction1_p=p1; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 //direction2_p=vb.direction2()(0); build 12-Apr-2018 16:00:58 //For now build 12-Apr-2018 16:00:58 direction2_p=direction1_p; build 12-Apr-2018 16:00:58 - dc_p.toPixel(thePix_p, direction1_p); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + //Should return both antennas direction in the future build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if(useExtraShift){ build 12-Apr-2018 16:00:58 + direction1_p.shift(extraShift, False); build 12-Apr-2018 16:00:58 + direction2_p.shift(extraShift, False); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + dc_p.toPixel(thePix_p, direction1_p); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void SimplePBConvFunc::setWeightImage(CountedPtr >& wgtimage){ build 12-Apr-2018 16:00:58 @@ -259,8 +268,10 @@ SimplePBConvFunc::SimplePBConvFunc(): nchan_p(-1), build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 Int val=ant1PointingCache_p.nelements(); build 12-Apr-2018 16:00:58 ant1PointingCache_p.resize(val+1, true); build 12-Apr-2018 16:00:58 - if(hasValidPointing) build 12-Apr-2018 16:00:58 - ant1PointingCache_p[val]=vb.direction1()[0]; build 12-Apr-2018 16:00:58 + if(hasValidPointing){ build 12-Apr-2018 16:00:58 + //ant1PointingCache_p[val]=vb.direction1()[0]; build 12-Apr-2018 16:00:58 + ant1PointingCache_p[val]=vbUtil_p.getPointingDir(vb, vb.antenna1()(0), 0); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 else build 12-Apr-2018 16:00:58 ant1PointingCache_p[val]=vbutil_p->getPhaseCenter(vb); build 12-Apr-2018 16:00:58 //ant1PointingCache_p[val]=vbUtil_p.getPointingDir(vb, vb.antenna1()(0), 0); build 12-Apr-2018 16:00:58 @@ -279,7 +290,8 @@ void SimplePBConvFunc::findConvFunction(const ImageInterface& iimage, build 12-Apr-2018 16:00:58 Vector& convFuncPolMap, build 12-Apr-2018 16:00:58 Vector& convFuncChanMap, build 12-Apr-2018 16:00:58 Vector& convFuncRowMap, build 12-Apr-2018 16:00:58 - const Bool /*getConjFreqConvFunc*/ build 12-Apr-2018 16:00:58 + const Bool /*getConjFreqConvFunc*/, build 12-Apr-2018 16:00:58 + const MVDirection& extraShift, const Bool useExtraShift build 12-Apr-2018 16:00:58 ){ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -346,7 +358,7 @@ void SimplePBConvFunc::findConvFunction(const ImageInterface& iimage, build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - toPix(vb); build 12-Apr-2018 16:00:58 + toPix(vb, extraShift, useExtraShift); build 12-Apr-2018 16:00:58 //Timer tim; build 12-Apr-2018 16:00:58 //tim.mark(); build 12-Apr-2018 16:00:58 addPBToFlux(vb); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/SimplePBConvFunc.h b/code/synthesis/TransformMachines2/SimplePBConvFunc.h build 12-Apr-2018 16:00:58 index fe37e75..9fe1d1e 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/SimplePBConvFunc.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/SimplePBConvFunc.h build 12-Apr-2018 16:00:58 @@ -114,7 +114,7 @@ namespace refim{ //namespace for imaging refactor build 12-Apr-2018 16:00:58 casacore::Array& weightConvFunc, build 12-Apr-2018 16:00:58 casacore::Vector& convsize, build 12-Apr-2018 16:00:58 casacore::Vector& convSupport, build 12-Apr-2018 16:00:58 - casacore::Vector& polMap, casacore::Vector& chanMap, casacore::Vector& rowMap, const casacore::Bool getConjFreqConvFunc=false); build 12-Apr-2018 16:00:58 + casacore::Vector& polMap, casacore::Vector& chanMap, casacore::Vector& rowMap, const casacore::Bool getConjFreqConvFunc=false, const casacore::MVDirection& extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False); build 12-Apr-2018 16:00:58 virtual casacore::ImageInterface& getFluxScaleImage(); build 12-Apr-2018 16:00:58 // slice fluxscale image by npol build 12-Apr-2018 16:00:58 virtual void sliceFluxScale(casacore::Int npol); build 12-Apr-2018 16:00:58 @@ -168,7 +168,7 @@ namespace refim{ //namespace for imaging refactor build 12-Apr-2018 16:00:58 virtual void storeImageParams(const casacore::ImageInterface& iimage, const vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 virtual void findUsefulChannels(casacore::Vector& chanMap, casacore::Vector& chanFreqs, const vi::VisBuffer2& vb, const casacore::Vector& visFreq); build 12-Apr-2018 16:00:58 //return the direction pixel corresponding to a direction build 12-Apr-2018 16:00:58 - virtual void toPix(const vi::VisBuffer2& vb); build 12-Apr-2018 16:00:58 + virtual void toPix(const vi::VisBuffer2& vb, const casacore::MVDirection& extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False); build 12-Apr-2018 16:00:58 FFT2D ft_p; build 12-Apr-2018 16:00:58 casacore::CountedPtr > convWeightImage_p; build 12-Apr-2018 16:00:58 casacore::String bandName_p; build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/VisModelData.cc b/code/synthesis/TransformMachines2/VisModelData.cc build 12-Apr-2018 16:00:58 index b2d8719..3d32cea 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/VisModelData.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/VisModelData.cc build 12-Apr-2018 16:00:58 @@ -92,41 +92,57 @@ VisModelData::clone () build 12-Apr-2018 16:00:58 return new VisModelData (* this); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -void VisModelData::listModel(const MeasurementSet& thems){ build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - //Table newTab(thems); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - ROMSColumns msc(thems); build 12-Apr-2018 16:00:58 - Vector fldnames=msc.field().name().getColumn(); build 12-Apr-2018 16:00:58 - Vector fields=msc.fieldId().getColumn(); build 12-Apr-2018 16:00:58 - const Sort::Order order=Sort::Ascending; build 12-Apr-2018 16:00:58 - const Int option=Sort::HeapSort | Sort::NoDuplicates; build 12-Apr-2018 16:00:58 - Int nfields=GenSort::sort (fields, order, option); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - LogIO logio; build 12-Apr-2018 16:00:58 - if (nfields>0) { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - logio << "MS Header field records:" build 12-Apr-2018 16:00:58 - << LogIO::POST; build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Int nlis(0); build 12-Apr-2018 16:00:58 - for (Int j=0; j< 2; ++j){ build 12-Apr-2018 16:00:58 + Bool VisModelData::hasAnyModel(const MeasurementSet& thems, Vector& fieldids){ build 12-Apr-2018 16:00:58 + Bool retval=False; build 12-Apr-2018 16:00:58 + fieldids.resize(); build 12-Apr-2018 16:00:58 + ROMSColumns msc(thems); build 12-Apr-2018 16:00:58 + Vector fields=msc.fieldId().getColumn(); build 12-Apr-2018 16:00:58 + const Sort::Order order=Sort::Ascending; build 12-Apr-2018 16:00:58 + const Int option=Sort::HeapSort | Sort::NoDuplicates; build 12-Apr-2018 16:00:58 + Int nfields=GenSort::sort (fields, order, option);\ build 12-Apr-2018 16:00:58 + if (nfields>0) { build 12-Apr-2018 16:00:58 + for (Int j=0; j< 2; ++j){ build 12-Apr-2018 16:00:58 const Table* thetab=&thems; build 12-Apr-2018 16:00:58 if (j==1) build 12-Apr-2018 16:00:58 - thetab=&(thems.source()); build 12-Apr-2018 16:00:58 + thetab=&(thems.source()); build 12-Apr-2018 16:00:58 for (Int k=0; k< nfields; ++k){ build 12-Apr-2018 16:00:58 if(thetab->keywordSet().isDefined("definedmodel_field_"+String::toString(fields[k]))) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - String elkey=thetab->keywordSet().asString("definedmodel_field_"+String::toString(fields[k])); build 12-Apr-2018 16:00:58 - if(thetab->keywordSet().isDefined(elkey)) build 12-Apr-2018 16:00:58 - logio << " " << fldnames[fields[k]] << " (id = " << fields[k] << ")" << LogIO::POST; build 12-Apr-2018 16:00:58 - ++nlis; build 12-Apr-2018 16:00:58 + String elkey=thetab->keywordSet().asString("definedmodel_field_"+String::toString(fields[k])); build 12-Apr-2018 16:00:58 + if(thetab->keywordSet().isDefined(elkey)){ build 12-Apr-2018 16:00:58 + fieldids.resize(fieldids.nelements()+1, True); build 12-Apr-2018 16:00:58 + fieldids[fieldids.nelements()-1]=fields[k]; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - if (nlis==0) build 12-Apr-2018 16:00:58 - logio << " None." << LogIO::POST; build 12-Apr-2018 16:00:58 + if(fieldids.nelements() >0) build 12-Apr-2018 16:00:58 + retval=True; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + return retval; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +void VisModelData::listModel(const MeasurementSet& thems){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //Table newTab(thems); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + ROMSColumns msc(thems); build 12-Apr-2018 16:00:58 + Vector fldnames=msc.field().name().getColumn(); build 12-Apr-2018 16:00:58 + Vector fieldids; build 12-Apr-2018 16:00:58 + LogIO logio; build 12-Apr-2018 16:00:58 + if(hasAnyModel(thems, fieldids)){ build 12-Apr-2018 16:00:58 + for (uInt k=0; k< fieldids.nelements(); ++k){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + logio << " " << fldnames[fieldids[k]] << " (id = " << fieldids[k] << ")" << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + logio << " None." << LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/VisModelData.h b/code/synthesis/TransformMachines2/VisModelData.h build 12-Apr-2018 16:00:58 index 3d258fe..e224de7 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/VisModelData.h build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/VisModelData.h build 12-Apr-2018 16:00:58 @@ -205,9 +205,11 @@ namespace casa { //# NAMESPACE CASA - BEGIN build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 static casacore::Bool getModelRecord(const casacore::String& theKey, casacore::TableRecord& theRec, const casacore::MeasurementSet& theMs); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - // casacore::List the fields build 12-Apr-2018 16:00:58 + // List the fields in the logger build 12-Apr-2018 16:00:58 static void listModel(const casacore::MeasurementSet& thems); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + // Returns true if any valid virtual model is found, fieldids of which are also returned build 12-Apr-2018 16:00:58 + static casacore::Bool hasAnyModel(const casacore::MeasurementSet& thems, casacore::Vector& fieldids); build 12-Apr-2018 16:00:58 static FTMachine* NEW_FT(const casacore::Record& ftrec); build 12-Apr-2018 16:00:58 //check if an addFT or addCompFT is necessary build 12-Apr-2018 16:00:58 //casacore::Bool hasFT(casacore::Int msid, casacore::Int fieldid); build 12-Apr-2018 16:00:58 diff --git a/code/synthesis/TransformMachines2/VisibilityResamplerBase.cc b/code/synthesis/TransformMachines2/VisibilityResamplerBase.cc build 12-Apr-2018 16:00:58 index c0ad32b..10eb90f 100644 build 12-Apr-2018 16:00:58 --- a/code/synthesis/TransformMachines2/VisibilityResamplerBase.cc build 12-Apr-2018 16:00:58 +++ b/code/synthesis/TransformMachines2/VisibilityResamplerBase.cc build 12-Apr-2018 16:00:58 @@ -117,7 +117,6 @@ namespace casa{ build 12-Apr-2018 16:00:58 const Vector& /*dataPol2ImPolMap*/, build 12-Apr-2018 16:00:58 const Vector& pointingOffset) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 - LogIO log_l(LogOrigin("VisibilityResamplerBase2", "makeVBRow2CFMap")); build 12-Apr-2018 16:00:58 // VBRow2CFMapType& vbRow2CFMap_p, build 12-Apr-2018 16:00:58 const Int nRow=vbs.nRows(); build 12-Apr-2018 16:00:58 //UNUSED: nChan=dataChan2ImChanMap.nelements(), build 12-Apr-2018 16:00:58 @@ -148,6 +147,7 @@ namespace casa{ build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch (CFNotCached& x) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 + LogIO log_l(LogOrigin("VisibilityResamplerBase2", "makeVBRow2CFMap")); build 12-Apr-2018 16:00:58 log_l << "CFs not cached for " << pa.getValue("deg") build 12-Apr-2018 16:00:58 << " deg, dPA = " << dPA.getValue("deg") build 12-Apr-2018 16:00:58 << " Field ID = " << vbs.fieldId()(0); build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/CMakeLists.txt b/gcwrap/python/CMakeLists.txt build 12-Apr-2018 16:00:58 index 163792a..c807028 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/CMakeLists.txt build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/CMakeLists.txt build 12-Apr-2018 16:00:58 @@ -178,6 +178,7 @@ scripts/task_plotweather.py build 12-Apr-2018 16:00:58 scripts/task_plotprofilemap.py build 12-Apr-2018 16:00:58 #scripts/task_plotxy.py build 12-Apr-2018 16:00:58 scripts/task_oldhanningsmooth.py build 12-Apr-2018 16:00:58 +scripts/task_oldplotants.py build 12-Apr-2018 16:00:58 scripts/task_oldsplit.py build 12-Apr-2018 16:00:58 scripts/task_partition.py build 12-Apr-2018 16:00:58 scripts/task_polcal.py build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/casa.py b/gcwrap/python/scripts/casa.py build 12-Apr-2018 16:00:58 index a5d7ebb..512ae51 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/casa.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/casa.py build 12-Apr-2018 16:00:58 @@ -240,6 +240,7 @@ from mosaic import mosaic build 12-Apr-2018 16:00:58 from mstransform import mstransform build 12-Apr-2018 16:00:58 from msuvbin import msuvbin build 12-Apr-2018 16:00:58 from oldhanningsmooth import oldhanningsmooth build 12-Apr-2018 16:00:58 +from oldplotants import oldplotants build 12-Apr-2018 16:00:58 from oldsplit import oldsplit build 12-Apr-2018 16:00:58 from plotants import plotants build 12-Apr-2018 16:00:58 from plotbandpass import plotbandpass build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/ialib.py b/gcwrap/python/scripts/ialib.py build 12-Apr-2018 16:00:58 index 5acf4d4..1b8d476 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/ialib.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/ialib.py build 12-Apr-2018 16:00:58 @@ -1,5 +1,7 @@ build 12-Apr-2018 16:00:58 from taskinit import find_casa build 12-Apr-2018 16:00:58 from init_tools import iatool build 12-Apr-2018 16:00:58 +import os build 12-Apr-2018 16:00:58 +from stat import S_ISDIR, ST_MTIME, ST_MODE build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def write_image_history(myia, tname, param_names, param_vals, myclog=None): build 12-Apr-2018 16:00:58 """ build 12-Apr-2018 16:00:58 @@ -73,3 +75,29 @@ def write_image_history(myia, tname, param_names, param_vals, myclog=None): build 12-Apr-2018 16:00:58 _ia.done() build 12-Apr-2018 16:00:58 return True build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +def get_created_images(outfile, target_time): build 12-Apr-2018 16:00:58 + dirpath = os.path.dirname(outfile) build 12-Apr-2018 16:00:58 + if not dirpath: build 12-Apr-2018 16:00:58 + dirpath = "." build 12-Apr-2018 16:00:58 + base = os.path.basename(outfile) build 12-Apr-2018 16:00:58 + # get all entries in the directory w/ stats build 12-Apr-2018 16:00:58 + entries = [] build 12-Apr-2018 16:00:58 + for fn in os.listdir(dirpath): build 12-Apr-2018 16:00:58 + if os.path.basename(fn).startswith(base): build 12-Apr-2018 16:00:58 + entries.append((os.stat(fn), fn)) build 12-Apr-2018 16:00:58 + # leave only directories, insert creation date build 12-Apr-2018 16:00:58 + entries = ((stat.st_mtime, path) build 12-Apr-2018 16:00:58 + for stat, path in entries if S_ISDIR(stat[ST_MODE])) build 12-Apr-2018 16:00:58 + # reverse sort by time build 12-Apr-2018 16:00:58 + zz = sorted(entries) build 12-Apr-2018 16:00:58 + zz.reverse() build 12-Apr-2018 16:00:58 + created_images = [] build 12-Apr-2018 16:00:58 + for mdate, path in zz: build 12-Apr-2018 16:00:58 + # kludge because all of a sudden, some mdates are less than time.time() value build 12-Apr-2018 16:00:58 + # that was gotten before these files were created on OSX. Weird. build 12-Apr-2018 16:00:58 + if mdate < target_time - 1: build 12-Apr-2018 16:00:58 + break build 12-Apr-2018 16:00:58 + if os.path.basename(path).startswith(base): build 12-Apr-2018 16:00:58 + created_images.append(path) build 12-Apr-2018 16:00:58 + return created_images build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/imagerhelpers/input_parameters.py b/gcwrap/python/scripts/imagerhelpers/input_parameters.py build 12-Apr-2018 16:00:58 index e7c3839..c716354 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/imagerhelpers/input_parameters.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/imagerhelpers/input_parameters.py build 12-Apr-2018 16:00:58 @@ -122,6 +122,9 @@ class ImagerParameters(): build 12-Apr-2018 16:00:58 minbeamfrac=0.3, build 12-Apr-2018 16:00:58 cutthreshold=0.01, build 12-Apr-2018 16:00:58 growiterations=100, build 12-Apr-2018 16:00:58 + dogrowprune=True, build 12-Apr-2018 16:00:58 + minpercentchange=0.0, build 12-Apr-2018 16:00:58 + verbose=False, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 # usescratch=True, build 12-Apr-2018 16:00:58 # readonly=True, build 12-Apr-2018 16:00:58 @@ -196,7 +199,8 @@ class ImagerParameters(): build 12-Apr-2018 16:00:58 #'maskresolution':maskresolution, 'nmask':nmask,'autoadjust':autoadjust, build 12-Apr-2018 16:00:58 'sidelobethreshold':sidelobethreshold, 'noisethreshold':noisethreshold, build 12-Apr-2018 16:00:58 'lownoisethreshold':lownoisethreshold, 'negativethreshold':negativethreshold,'smoothfactor':smoothfactor, build 12-Apr-2018 16:00:58 - 'minbeamfrac':minbeamfrac, 'cutthreshold':cutthreshold, 'growiterations':growiterations, build 12-Apr-2018 16:00:58 + 'minbeamfrac':minbeamfrac, 'cutthreshold':cutthreshold, 'growiterations':growiterations, build 12-Apr-2018 16:00:58 + 'dogrowprune':dogrowprune, 'minpercentchange':minpercentchange, 'verbose':verbose, build 12-Apr-2018 16:00:58 'interactive':interactive, 'startmodel':startmodel} } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ######### Iteration control. build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/recipes/pixelmask2cleanmask.py b/gcwrap/python/scripts/recipes/pixelmask2cleanmask.py build 12-Apr-2018 16:00:58 index f838601..f835ae4 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/recipes/pixelmask2cleanmask.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/recipes/pixelmask2cleanmask.py build 12-Apr-2018 16:00:58 @@ -1,6 +1,6 @@ build 12-Apr-2018 16:00:58 import shutil build 12-Apr-2018 16:00:58 -from casa import iatool build 12-Apr-2018 16:00:58 -from casa import tbtool build 12-Apr-2018 16:00:58 +from casac import casac build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def pixelmask2cleanmask(imagename='',maskname='mask0',maskimage='',usemasked=False): build 12-Apr-2018 16:00:58 """ build 12-Apr-2018 16:00:58 @@ -11,7 +11,7 @@ def pixelmask2cleanmask(imagename='',maskname='mask0',maskimage='',usemasked=Fal build 12-Apr-2018 16:00:58 maskimage - output mask image name build 12-Apr-2018 16:00:58 usemasked - if True use masked region as a valid region build 12-Apr-2018 16:00:58 """ build 12-Apr-2018 16:00:58 - ia = iatool( ) build 12-Apr-2018 16:00:58 + ia = casac.image() build 12-Apr-2018 16:00:58 ia.open(imagename) build 12-Apr-2018 16:00:58 masks=ia.maskhandler('get') build 12-Apr-2018 16:00:58 ia.close() build 12-Apr-2018 16:00:58 @@ -26,7 +26,7 @@ def pixelmask2cleanmask(imagename='',maskname='mask0',maskimage='',usemasked=Fal build 12-Apr-2018 16:00:58 if inmaskname=='': build 12-Apr-2018 16:00:58 raise Exception, "mask %s does not exist. Available masks are: %s" % (maskname,masks) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - tb = tbtool( ) build 12-Apr-2018 16:00:58 + tb = casac.table() build 12-Apr-2018 16:00:58 tb.open(imagename+'/'+maskname) build 12-Apr-2018 16:00:58 dat0=tb.getcol('PagedArray') build 12-Apr-2018 16:00:58 tb.close() build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/regressions/admin/runTest.py b/gcwrap/python/scripts/regressions/admin/runTest.py build 12-Apr-2018 16:00:58 index 88ce93e..7886727 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/regressions/admin/runTest.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/regressions/admin/runTest.py build 12-Apr-2018 16:00:58 @@ -19,8 +19,13 @@ import logging build 12-Apr-2018 16:00:58 import argparse build 12-Apr-2018 16:00:58 import time build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -#################### Temp Constants build 12-Apr-2018 16:00:58 -regressionsDisabled = True build 12-Apr-2018 16:00:58 +## build 12-Apr-2018 16:00:58 +## testwrapper.py depends upon the current directory being in the path because build 12-Apr-2018 16:00:58 +## it changes to the directory where the test is located and then imports it. build 12-Apr-2018 16:00:58 +## CASA no longer leaves empty strings in sys.path to avoid confusion when build 12-Apr-2018 16:00:58 +## stray files are in the current directory. build 12-Apr-2018 16:00:58 +## build 12-Apr-2018 16:00:58 +sys.path.insert(0,'') build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #################### Logging build 12-Apr-2018 16:00:58 logger = logging.getLogger(__name__) build 12-Apr-2018 16:00:58 @@ -40,8 +45,66 @@ logger.addHandler(handler) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #################### Functions build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -def use_pybot(): build 12-Apr-2018 16:00:58 - raise Exception, "Pybot option not avaliable" build 12-Apr-2018 16:00:58 +def use_pybot(tests): build 12-Apr-2018 16:00:58 + logger.debug("Start def use_pybot(%s)",tests) build 12-Apr-2018 16:00:58 + tests = tests build 12-Apr-2018 16:00:58 + pybotWorkspace = os.environ["CASAPATH"].split()[0] + "/pybotWorkspace" build 12-Apr-2018 16:00:58 + if not os.path.isdir(pybotWorkspace): build 12-Apr-2018 16:00:58 + os.makedirs(pybotWorkspace) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + shutil.rmtree(pybotWorkspace) build 12-Apr-2018 16:00:58 + os.makedirs(pybotWorkspace) build 12-Apr-2018 16:00:58 + logger.debug("Pybot Workspace Directory: %s",pybotWorkspace) build 12-Apr-2018 16:00:58 + for test in tests: build 12-Apr-2018 16:00:58 + generateHTML(pybotWorkspace,test) build 12-Apr-2018 16:00:58 + # Fetch Testing Dir From Casa-pkg build 12-Apr-2018 16:00:58 + if logger.isEnabledFor(logging.DEBUG): verbose = "--verbose" build 12-Apr-2018 16:00:58 + else: verbose = "--quiet" build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if not os.path.isdir("casa-pkg"): build 12-Apr-2018 16:00:58 + subprocess.call(["/opt/local/bin/git","clone","https://open-bitbucket.nrao.edu/scm/casa/casa-pkg.git",verbose]) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + shutil.rmtree("casa-pkg") build 12-Apr-2018 16:00:58 + subprocess.call(["/opt/local/bin/git","clone","https://open-bitbucket.nrao.edu/scm/casa/casa-pkg.git",verbose]) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + shutil.copyfile(os.getcwd() + "/casa-pkg/testing/pybot-regression/__init__.html",pybotWorkspace+"/__init__.html") build 12-Apr-2018 16:00:58 + logger.debug("Copying %s to %s", os.getcwd() + "/casa-pkg/testing/pybot-regression/__init__.html",pybotWorkspace+"/__init__.html") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + shutil.copytree(os.getcwd() + "/casa-pkg/testing/pybot-regression/lib",pybotWorkspace + "/lib") build 12-Apr-2018 16:00:58 + logger.debug("Copying %s to %s", os.getcwd() + "/casa-pkg/testing/pybot-regression/lib",pybotWorkspace + "/lib") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + shutil.copytree(os.getcwd() + "/casa-pkg/testing/pybot-regression/bin",pybotWorkspace + "/bin") build 12-Apr-2018 16:00:58 + logger.debug("Copying %s to %s", os.getcwd() + "/casa-pkg/testing/pybot-regression/bin",pybotWorkspace + "/bin") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + os.environ['CASAROOT'] = os.environ["CASAPATH"].split()[0] build 12-Apr-2018 16:00:58 + return pybotWorkspace build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def generateHTML(outdir,test): build 12-Apr-2018 16:00:58 + logger.debug("Start def generateHTML()") build 12-Apr-2018 16:00:58 + # Open Template File build 12-Apr-2018 16:00:58 + fp = open(HTML_Template, "rb" ) build 12-Apr-2018 16:00:58 + msg = fp.read( ) build 12-Apr-2018 16:00:58 + fp.close( ) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Open Testlists build 12-Apr-2018 16:00:58 + tests = readJSON(LISTofTESTS) build 12-Apr-2018 16:00:58 + logger.debug("Generating HTML For: %s", test) build 12-Apr-2018 16:00:58 + for localtest in tests: build 12-Apr-2018 16:00:58 + if localtest['testScript'] == test: build 12-Apr-2018 16:00:58 + testNumber = localtest['testNumber'] build 12-Apr-2018 16:00:58 + testName = localtest['testName'] build 12-Apr-2018 16:00:58 + forceTag = "TS" + str(localtest['priority']) build 12-Apr-2018 16:00:58 + testPyName = localtest['testScript'] build 12-Apr-2018 16:00:58 + maintainer = localtest['Maintainer'] build 12-Apr-2018 16:00:58 + maintainerEmail = localtest['MaintainerEmail'] build 12-Apr-2018 16:00:58 + tag = localtest['tag'] build 12-Apr-2018 16:00:58 + templateInfo = msg % (testNumber, testName, testNumber, testName, forceTag, testPyName, maintainer, maintainerEmail,tag) build 12-Apr-2018 16:00:58 + filename = outdir + "/%s_%s.html"%(testNumber, testName.replace(" ", "_")) build 12-Apr-2018 16:00:58 + file = open(filename, "w") build 12-Apr-2018 16:00:58 + for line in templateInfo: build 12-Apr-2018 16:00:58 + file.write(line) build 12-Apr-2018 16:00:58 + file.close() build 12-Apr-2018 16:00:58 + logger.debug("Generated %s", filename) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def remove_duplicates(values): build 12-Apr-2018 16:00:58 output = [] build 12-Apr-2018 16:00:58 @@ -92,7 +155,7 @@ def getclasses(testnames): build 12-Apr-2018 16:00:58 tmpdir = '/tmp' build 12-Apr-2018 16:00:58 for filename in testnames: build 12-Apr-2018 16:00:58 if not filename.startswith("test_"): build 12-Apr-2018 16:00:58 - print "Cannot Get Classes for Regression Test" build 12-Apr-2018 16:00:58 + #print "Cannot Get Classes for Regression Test" build 12-Apr-2018 16:00:58 logger.error("Cannot Get Classes for Regression Test: %s",filename) build 12-Apr-2018 16:00:58 return build 12-Apr-2018 16:00:58 try: build 12-Apr-2018 16:00:58 @@ -115,13 +178,45 @@ def getclasses(testnames): build 12-Apr-2018 16:00:58 logger.error('Failed to open file', exc_info=True) build 12-Apr-2018 16:00:58 return build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +def getsubtests(filename,list=[]): build 12-Apr-2018 16:00:58 + logger.debug("Start def getsubtests()") build 12-Apr-2018 16:00:58 + logger.debug("Test: %s", filename) build 12-Apr-2018 16:00:58 + f = filename build 12-Apr-2018 16:00:58 + testlist_to_execute = [] build 12-Apr-2018 16:00:58 + here = os.getcwd() build 12-Apr-2018 16:00:58 + tmpdir = '/tmp' build 12-Apr-2018 16:00:58 + os.chdir(tmpdir) build 12-Apr-2018 16:00:58 + tt = UnitTest(f) build 12-Apr-2018 16:00:58 + tt.copyTest(copyto=tmpdir) build 12-Apr-2018 16:00:58 + classes = tt.getTestClasses(f) build 12-Apr-2018 16:00:58 + logger.debug("Checking For Attribute: %s",ATTR_VAL) build 12-Apr-2018 16:00:58 + for c in classes: build 12-Apr-2018 16:00:58 + # Check if class has @attr(tag=''). Note: class @attr takes priority over func attr build 12-Apr-2018 16:00:58 + if 'tag' in c.__dict__: build 12-Apr-2018 16:00:58 + if c.tag == ATTR_VAL: build 12-Apr-2018 16:00:58 + for attr, value in c.__dict__.iteritems(): build 12-Apr-2018 16:00:58 + if len(attr) >= len("test") and attr[:len("test")] == "test": build 12-Apr-2018 16:00:58 + testlist_to_execute.append([attr,value.__module__]) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + # Check if functions within each class has @attr(tag = '') or func.tag = '' build 12-Apr-2018 16:00:58 + for attr, value in c.__dict__.iteritems(): build 12-Apr-2018 16:00:58 + if len(attr) >= len("test") and attr[:len("test")] == "test": build 12-Apr-2018 16:00:58 + if hasattr(value,'tag'): build 12-Apr-2018 16:00:58 + if value.tag == ATTR_VAL: build 12-Apr-2018 16:00:58 + testlist_to_execute.append([attr,value.__module__]) build 12-Apr-2018 16:00:58 + os.remove(f+'.py') build 12-Apr-2018 16:00:58 + os.remove(f+'.pyc') build 12-Apr-2018 16:00:58 + os.chdir(here) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + return testlist_to_execute build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 def readJSON(FILE): build 12-Apr-2018 16:00:58 logger.debug("Start Function: readJSON()") build 12-Apr-2018 16:00:58 - logger.debug("Filename: %s", FILE) build 12-Apr-2018 16:00:58 + logger.debug("Reading JSON File: %s", FILE) build 12-Apr-2018 16:00:58 import json build 12-Apr-2018 16:00:58 List = [] build 12-Apr-2018 16:00:58 if(not os.path.exists(FILE)): build 12-Apr-2018 16:00:58 - print 'ERROR: List of tests does not exist' build 12-Apr-2018 16:00:58 + #print 'ERROR: List of tests does not exist' build 12-Apr-2018 16:00:58 logger.error('ERROR: List of tests does not exist') build 12-Apr-2018 16:00:58 return [] build 12-Apr-2018 16:00:58 tests = json.load(open(FILE)) build 12-Apr-2018 16:00:58 @@ -141,8 +236,7 @@ def list_tests(): build 12-Apr-2018 16:00:58 tmpArray.append(test['tag']) build 12-Apr-2018 16:00:58 listtags = remove_duplicates(tmpArray) build 12-Apr-2018 16:00:58 listtags.append('functionalTest') build 12-Apr-2018 16:00:58 - if not regressionsDisabled: build 12-Apr-2018 16:00:58 - listtags.append('regression') build 12-Apr-2018 16:00:58 + listtags.append('regression') build 12-Apr-2018 16:00:58 listtags.append('TS1') build 12-Apr-2018 16:00:58 listtags.append('TS2') build 12-Apr-2018 16:00:58 #listtags.append('TS3') #'Disabled Due to CAS-10844' build 12-Apr-2018 16:00:58 @@ -158,19 +252,65 @@ def stdoutIO(stdout=None): build 12-Apr-2018 16:00:58 yield stdout build 12-Apr-2018 16:00:58 sys.stdout = old build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +class RegressionTestCase(unittest.TestCase): build 12-Apr-2018 16:00:58 # Creates A testcase for regression tests to be executed in nose build 12-Apr-2018 16:00:58 -def test_dummy(): build 12-Apr-2018 16:00:58 - '''Executing Regression Test''' build 12-Apr-2018 16:00:58 - print "Regression: %s"%(test_name) build 12-Apr-2018 16:00:58 - #test_result = regression_test.run(True) build 12-Apr-2018 16:00:58 - #TODO: Import regression setup and regression execution (if both are avaliable) build 12-Apr-2018 16:00:58 - with stdoutIO() as regressionResult: build 12-Apr-2018 16:00:58 - test_result = regression_test.run(False) # Some regressions are True/ False. This should be set within the test script build 12-Apr-2018 16:00:58 - print regressionResult.getvalue() build 12-Apr-2018 16:00:58 - if "PASS" in str(regressionResult.getvalue()).upper(): # Looks for PASS, PASSED build 12-Apr-2018 16:00:58 - assert True build 12-Apr-2018 16:00:58 - elif "FAIL" in str(regressionResult.getvalue()).upper():# Looks for FAIL, FAILED build 12-Apr-2018 16:00:58 - assert False,"Regression: %s Failed"%(test_name) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_dummy(self): build 12-Apr-2018 16:00:58 + '''Executing Regression Test''' build 12-Apr-2018 16:00:58 + from casac import casac build 12-Apr-2018 16:00:58 + ## flush output build 12-Apr-2018 16:00:58 + #sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) build 12-Apr-2018 16:00:58 + #sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + PYVER = str(sys.version_info[0]) + "." + str(sys.version_info[1]) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + CASA_DIR = os.environ["CASAPATH"].split()[0] build 12-Apr-2018 16:00:58 + TESTS_DIR = CASA_DIR + "/" + os.environ["CASAPATH"].split()[1] + '/lib/python' + PYVER + '/regressions/' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + _potential_data_directories = ( "/opt/casa/data","/home/casa/data","/home/casa/data/trunk","/home/casa/data/master","/opt/casa/data/master","/export/data/casa" ) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + REGRESSION_DATA = filter(lambda x: os.access(x,os.F_OK),map(lambda y: y+"/regression",_potential_data_directories)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if not os.access(TESTS_DIR, os.F_OK): build 12-Apr-2018 16:00:58 + if os.access(CASA_DIR+'/lib64', os.F_OK): build 12-Apr-2018 16:00:58 + TESTS_DIR = CASA_DIR+'/lib64/python' + PYVER + '/regressions/' build 12-Apr-2018 16:00:58 + elif os.access(CASA_DIR+'/lib', os.F_OK): build 12-Apr-2018 16:00:58 + TESTS_DIR = CASA_DIR+'/lib/python' + PYVER + '/regressions/' build 12-Apr-2018 16:00:58 + else: #Mac release build 12-Apr-2018 16:00:58 + TESTS_DIR = CASA_DIR+'/Resources/python/regressions/' build 12-Apr-2018 16:00:58 + stack_frame_find()['TESTS_DIR']=TESTS_DIR build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if os.access(TESTS_DIR+name+".py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+".py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+name+"_regression.py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+"_regression.py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+name+"-regression.py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+"-regression.py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+name+"_regression1.py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+"_regression1.py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+name+"-regression1.py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+"-regression1.py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+name+"_regression2.py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+"_regression2.py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+name+"-regression2.py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+name+"-regression2.py" build 12-Apr-2018 16:00:58 + elif os.access(TESTS_DIR+"test_"+name+".py",os.F_OK): build 12-Apr-2018 16:00:58 + path = TESTS_DIR+"test_"+name+".py" build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + raise RuntimeError("task %s not found" % name) build 12-Apr-2018 16:00:58 + print build 12-Apr-2018 16:00:58 + print "------------------------------------------------------------------------------------------------------------------------" build 12-Apr-2018 16:00:58 + print "starting test %s (%s)" % (name,path) build 12-Apr-2018 16:00:58 + print "------------------------------------------------------------------------------------------------------------------------" build 12-Apr-2018 16:00:58 + with stdoutIO() as regressionResult: build 12-Apr-2018 16:00:58 + #execfile(path,globals()) build 12-Apr-2018 16:00:58 + exec(open(path).read(),globals()) build 12-Apr-2018 16:00:58 + print regressionResult.getvalue() build 12-Apr-2018 16:00:58 + if "PASS" in str(regressionResult.getvalue()).upper(): # Looks for PASS, PASSED build 12-Apr-2018 16:00:58 + assert True build 12-Apr-2018 16:00:58 + elif "FAIL" in str(regressionResult.getvalue()).upper():# Looks for FAIL, FAILED build 12-Apr-2018 16:00:58 + assert False #,"Regression: %s Failed"%(test_name) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def _find_unit_path(): build 12-Apr-2018 16:00:58 TESTS_DIR = CASA_DIR + "/" + os.environ["CASAPATH"].split()[1] + '/lib/python' + PYVER + '/tests/' build 12-Apr-2018 16:00:58 @@ -292,11 +432,6 @@ def run(testnames=[]): build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 # Test Tag to run all Functional Tests or all regression tags build 12-Apr-2018 16:00:58 if ("functionalTest" in testTag) or ("regression" in testTag): build 12-Apr-2018 16:00:58 - # BEGIN TODO TEMP build 12-Apr-2018 16:00:58 - if regressionsDisabled: build 12-Apr-2018 16:00:58 - if 'regression' in testTag: build 12-Apr-2018 16:00:58 - raise Exception, 'Disabled Regression Tests' build 12-Apr-2018 16:00:58 - # END TODO TEMP build 12-Apr-2018 16:00:58 if not mpiEnabled and ("mpi" in test["tag"]): continue build 12-Apr-2018 16:00:58 if not pipelineEnabled and ("pipeline" in test["tag"]): continue build 12-Apr-2018 16:00:58 if not casaguideEnabled and ("casaguide" in test["tag"]): continue build 12-Apr-2018 16:00:58 @@ -305,7 +440,6 @@ def run(testnames=[]): build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 # Run Priority Tests ( Originally mapped to TS1, TS2 , etc) build 12-Apr-2018 16:00:58 elif testTag.startswith("TS"): build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 # BEGIN TODO TEMP build 12-Apr-2018 16:00:58 if 'TS3' in testTag: # TS3 has almost as many tests as --all option. Disabled till CAS-10844 is resolved build 12-Apr-2018 16:00:58 raise Exception, 'Disabled Due to CAS-10844.' build 12-Apr-2018 16:00:58 @@ -318,31 +452,9 @@ def run(testnames=[]): build 12-Apr-2018 16:00:58 continue build 12-Apr-2018 16:00:58 for testPriority in range(1,int(testTag[2:])+1): # run test suites inclusively (i.e. 'TS1' runs TS1, 'TS2' runs TS1 tests & TS2 tests, etc. build 12-Apr-2018 16:00:58 if (str(testPriority) in test['priority']): build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - # ****************** BEGIN TODO TEMP NOT TO RUN REGRESSIONS ******************* build 12-Apr-2018 16:00:58 - # When regressions are fix, delete this section and uncomment last line build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - if regressionsDisabled: build 12-Apr-2018 16:00:58 - if "regression" in test["testType"]: build 12-Apr-2018 16:00:58 - continue build 12-Apr-2018 16:00:58 - else: build 12-Apr-2018 16:00:58 - listtests.append(str(test['testScript'])) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - # ****************** END TODO TEMP NOT TO RUN REGRESSIONS ******************* build 12-Apr-2018 16:00:58 - #listtests.append(test['testScript']) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + listtests.append(test['testScript']) build 12-Apr-2018 16:00:58 elif testTag in test["tag"]: build 12-Apr-2018 16:00:58 - # ****************** BEGIN TODO TEMP NOT TO RUN REGRESSIONS ******************* build 12-Apr-2018 16:00:58 - # When regressions are fix, delete this section and uncomment last line build 12-Apr-2018 16:00:58 - if regressionsDisabled: build 12-Apr-2018 16:00:58 - if "regression" in test["testType"]: build 12-Apr-2018 16:00:58 - continue build 12-Apr-2018 16:00:58 - else: build 12-Apr-2018 16:00:58 - listtests.append(str(test['testScript'])) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - # ****************** END TODO TEMP NOT TO RUN REGRESSIONS ******************* build 12-Apr-2018 16:00:58 - #listtests.append(test['testScript']) build 12-Apr-2018 16:00:58 + listtests.append(test['testScript']) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if listtests == []: build 12-Apr-2018 16:00:58 raise Exception, 'List of tests is empty' build 12-Apr-2018 16:00:58 @@ -390,47 +502,79 @@ def run(testnames=[]): build 12-Apr-2018 16:00:58 #print "Starting tests for %s: " %(listtests) build 12-Apr-2018 16:00:58 logger.info("Starting Tests for: %s", listtests) build 12-Apr-2018 16:00:58 # ASSEMBLE and RUN the TESTS build 12-Apr-2018 16:00:58 - if not whichtests: build 12-Apr-2018 16:00:58 - '''Run all tests''' build 12-Apr-2018 16:00:58 - logger.info("Executing all tests") build 12-Apr-2018 16:00:58 - list = [] build 12-Apr-2018 16:00:58 - suiteList = [] build 12-Apr-2018 16:00:58 - for f in listtests: build 12-Apr-2018 16:00:58 - suite = unittest.TestSuite() build 12-Apr-2018 16:00:58 - try: build 12-Apr-2018 16:00:58 - if f.startswith("test_"): build 12-Apr-2018 16:00:58 - tests = UnitTest(f).getUnitTest() build 12-Apr-2018 16:00:58 - if DRY_RUN: build 12-Apr-2018 16:00:58 + #sys.exit() build 12-Apr-2018 16:00:58 + global name build 12-Apr-2018 16:00:58 + if not (HAVE_ROBOT and USE_PYBOT): build 12-Apr-2018 16:00:58 + if not whichtests: build 12-Apr-2018 16:00:58 + '''Run all tests''' build 12-Apr-2018 16:00:58 + logger.info("Executing all tests") build 12-Apr-2018 16:00:58 + suiteList = [] build 12-Apr-2018 16:00:58 + testlist_to_execute= [] build 12-Apr-2018 16:00:58 + for f in listtests: build 12-Apr-2018 16:00:58 + suite = unittest.TestSuite() build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + if f.startswith("test_"): build 12-Apr-2018 16:00:58 tests = UnitTest(f).getUnitTest() build 12-Apr-2018 16:00:58 - suiteList = suiteList + tests build 12-Apr-2018 16:00:58 + if RUN_SUBTEST: build 12-Apr-2018 16:00:58 + testlist_to_execute = testlist_to_execute + getsubtests(f,tests) build 12-Apr-2018 16:00:58 + if DRY_RUN: build 12-Apr-2018 16:00:58 + tests = UnitTest(f).getUnitTest() build 12-Apr-2018 16:00:58 + suiteList = suiteList + tests build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + for test in tests: build 12-Apr-2018 16:00:58 + suite.addTest(test) build 12-Apr-2018 16:00:58 + logger.debug("\nTestName: %s: Suite: %s", f, suite) build 12-Apr-2018 16:00:58 + suiteList.append(suite) build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 - for test in tests: build 12-Apr-2018 16:00:58 - suite.addTest(test) build 12-Apr-2018 16:00:58 - logger.debug("\nTestName: %s: Suite: %s", f, suite) build 12-Apr-2018 16:00:58 - suiteList.append(suite) build 12-Apr-2018 16:00:58 - else: build 12-Apr-2018 16:00:58 - logger.debug("Disabled Regression Test: %s not compatiable with runTest.py",f) build 12-Apr-2018 16:00:58 - pass build 12-Apr-2018 16:00:58 - except: build 12-Apr-2018 16:00:58 - traceback.print_exc() build 12-Apr-2018 16:00:58 - list = suiteList build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - # memTest.MemTest() plugin does not work with suites, requires 1 list of tests build 12-Apr-2018 16:00:58 - elif (whichtests == 1): build 12-Apr-2018 16:00:58 - list = [] build 12-Apr-2018 16:00:58 - suiteList = [] build 12-Apr-2018 16:00:58 - suite = unittest.TestSuite() build 12-Apr-2018 16:00:58 - for f in listtests: build 12-Apr-2018 16:00:58 - try: build 12-Apr-2018 16:00:58 - if f.startswith("test_"): build 12-Apr-2018 16:00:58 - tests = UnitTest(f).getUnitTest() build 12-Apr-2018 16:00:58 - list = list+tests build 12-Apr-2018 16:00:58 - else: build 12-Apr-2018 16:00:58 - logger.debug("Disabled Regression Test: %s not compatiable with runTest.py",f) build 12-Apr-2018 16:00:58 - pass build 12-Apr-2018 16:00:58 - except: build 12-Apr-2018 16:00:58 - traceback.print_exc() build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + name = f build 12-Apr-2018 16:00:58 + suite = unittest.TestSuite() build 12-Apr-2018 16:00:58 + suite.addTest(RegressionTestCase('test_dummy')) build 12-Apr-2018 16:00:58 + list = list + [suite] build 12-Apr-2018 16:00:58 + except: build 12-Apr-2018 16:00:58 + traceback.print_exc() build 12-Apr-2018 16:00:58 + list = suiteList build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # memTest.MemTest() plugin does not work with suites, requires 1 list of tests build 12-Apr-2018 16:00:58 + elif (whichtests == 1): build 12-Apr-2018 16:00:58 + list = [] build 12-Apr-2018 16:00:58 + suiteList = [] build 12-Apr-2018 16:00:58 + testlist_to_execute= [] build 12-Apr-2018 16:00:58 + suite = unittest.TestSuite() build 12-Apr-2018 16:00:58 + for f in listtests: build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + # Functional Tests build 12-Apr-2018 16:00:58 + if f.startswith("test_"): build 12-Apr-2018 16:00:58 + tests = UnitTest(f).getUnitTest() build 12-Apr-2018 16:00:58 + list = list+tests build 12-Apr-2018 16:00:58 + if RUN_SUBTEST: build 12-Apr-2018 16:00:58 + testlist_to_execute = testlist_to_execute + getsubtests(f,list) build 12-Apr-2018 16:00:58 + # Regression Tests build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + name = f build 12-Apr-2018 16:00:58 + suite = unittest.TestSuite() build 12-Apr-2018 16:00:58 + suite.addTest(RegressionTestCase('test_dummy')) build 12-Apr-2018 16:00:58 + list = list + [suite] build 12-Apr-2018 16:00:58 + except: build 12-Apr-2018 16:00:58 + traceback.print_exc() build 12-Apr-2018 16:00:58 + elif (HAVE_ROBOT and USE_PYBOT): build 12-Apr-2018 16:00:58 + list = listtests build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if RUN_SUBTEST: build 12-Apr-2018 16:00:58 + if len(testlist_to_execute) == 0: build 12-Apr-2018 16:00:58 + raise ValueError, "Cannot Find Tests with Attribute:'%s'"%(ATTR_VAL) build 12-Apr-2018 16:00:58 + if not whichtests: build 12-Apr-2018 16:00:58 + for i in range(0,len(list)): build 12-Apr-2018 16:00:58 + tmp = [] build 12-Apr-2018 16:00:58 + for item in list[i]: build 12-Apr-2018 16:00:58 + if [item._testMethodName,item.__module__] in testlist_to_execute: build 12-Apr-2018 16:00:58 + tmp.append(item) build 12-Apr-2018 16:00:58 + list[i] = unittest.TestSuite(tmp) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + tmp = [] build 12-Apr-2018 16:00:58 + for item in list: build 12-Apr-2018 16:00:58 + if [item._testMethodName,item.__module__] in testlist_to_execute: build 12-Apr-2018 16:00:58 + tmp.append(item) build 12-Apr-2018 16:00:58 + list = tmp build 12-Apr-2018 16:00:58 if (len(list) == 0): build 12-Apr-2018 16:00:58 os.chdir(PWD) build 12-Apr-2018 16:00:58 logger.critical("ERROR: There are no valid tests to run") build 12-Apr-2018 16:00:58 @@ -457,6 +601,65 @@ def run(testnames=[]): build 12-Apr-2018 16:00:58 logger.debug("Regstate: %s", regstate) build 12-Apr-2018 16:00:58 logger.info("Cov Test XML Directory: %s", xmldir) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + elif (HAVE_ROBOT and USE_PYBOT): build 12-Apr-2018 16:00:58 + """Programmatic entry point for running tests. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + :param tests: Paths to test case files/directories to be executed similarly build 12-Apr-2018 16:00:58 + as when running the ``robot`` command on the command line. build 12-Apr-2018 16:00:58 + :param options: Options to configure and control execution. Accepted build 12-Apr-2018 16:00:58 + options are mostly same as normal command line options to the ``robot`` build 12-Apr-2018 16:00:58 + command. Option names match command line option long names without build 12-Apr-2018 16:00:58 + hyphens so that, for example, ``--name`` becomes ``name``. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Most options that can be given from the command line work. An exception build 12-Apr-2018 16:00:58 + is that options ``--pythonpath``, ``--argumentfile``, ``--escape`` , build 12-Apr-2018 16:00:58 + ``--help`` and ``--version`` are not supported. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Options that can be given on the command line multiple times can be build 12-Apr-2018 16:00:58 + passed as lists. For example, ``include=['tag1', 'tag2']`` is equivalent build 12-Apr-2018 16:00:58 + to ``--include tag1 --include tag2``. If such options are used only once, build 12-Apr-2018 16:00:58 + they can be given also as a single string like ``include='tag'``. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Options that accept no value can be given as Booleans. For example, build 12-Apr-2018 16:00:58 + ``dryrun=True`` is same as using the ``--dryrun`` option. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Options that accept string ``NONE`` as a special value can also be used build 12-Apr-2018 16:00:58 + with Python ``None``. For example, using ``log=None`` is equivalent to build 12-Apr-2018 16:00:58 + ``--log NONE``. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + ``listener``, ``prerunmodifier`` and ``prerebotmodifier`` options allow build 12-Apr-2018 16:00:58 + passing values as Python objects in addition to module names these command build 12-Apr-2018 16:00:58 + line options support. For example, ``run('tests', listener=MyListener())``. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + To capture the standard output and error streams, pass an open file or build 12-Apr-2018 16:00:58 + file-like object as special keyword arguments ``stdout`` and ``stderr``, build 12-Apr-2018 16:00:58 + respectively. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + A return code is returned similarly as when running on the command line. build 12-Apr-2018 16:00:58 + Zero means that tests were executed and no critical test failed, values up build 12-Apr-2018 16:00:58 + to 250 denote the number of failed critical tests, and values between build 12-Apr-2018 16:00:58 + 251-255 are for other statuses documented in the Robot Framework User Guide. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Example:: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + from robot import run build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + run('path/to/tests.robot') build 12-Apr-2018 16:00:58 + run('tests.robot', include=['tag1', 'tag2'], splitlog=True) build 12-Apr-2018 16:00:58 + with open('stdout.txt', 'w') as stdout: build 12-Apr-2018 16:00:58 + run('t1.robot', 't2.robot', name='Example', log=None, stdout=stdout) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Equivalent command line usage:: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + robot path/to/tests.robot build 12-Apr-2018 16:00:58 + robot --include tag1 --include tag2 --splitlog tests.robot build 12-Apr-2018 16:00:58 + robot --name Example --log NONE t1.robot t2.robot > stdout.txt build 12-Apr-2018 16:00:58 + """ build 12-Apr-2018 16:00:58 + if args.debug: build 12-Apr-2018 16:00:58 + robot.run(use_pybot(list),dryrun=DRY_RUN,xuint=xmlfile,outputdir=xmldir,console='verbose') build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + robot.run(use_pybot(list),dryrun=DRY_RUN,xuint=xmlfile,outputdir=xmldir) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 cmd = [sys.argv[0],"-d","-s","--with-xunit","--verbosity=2","--xunit-file="+xmlfile] build 12-Apr-2018 16:00:58 if DRY_RUN: build 12-Apr-2018 16:00:58 @@ -500,6 +703,18 @@ try: build 12-Apr-2018 16:00:58 except: build 12-Apr-2018 16:00:58 HAVE_COVTEST = False build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +# pybot mode variables build 12-Apr-2018 16:00:58 +HAVE_ROBOT = True build 12-Apr-2018 16:00:58 +USE_PYBOT = 0 build 12-Apr-2018 16:00:58 +try: build 12-Apr-2018 16:00:58 + import robot build 12-Apr-2018 16:00:58 +except: build 12-Apr-2018 16:00:58 + HAVE_ROBOT = False build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +# Use Nose attribute Functionality build 12-Apr-2018 16:00:58 +RUN_SUBTEST = False build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 # Dry run of Tests build 12-Apr-2018 16:00:58 DRY_RUN = False build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -509,6 +724,11 @@ whichtests = 0 build 12-Apr-2018 16:00:58 # List of Tests build 12-Apr-2018 16:00:58 LISTofTESTS = _find_unit_path() + "uTest_list.json" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +# HTML Template build 12-Apr-2018 16:00:58 +HTML_Template = _find_unit_path() + "uTest_Template.dat" build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +# Define Generate HTML build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 global testTag build 12-Apr-2018 16:00:58 testTag = '' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -534,23 +754,26 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 parser.add_argument("-g", "--debug",action='store_true',help='Set casalog.filter to DEBUG. Set runTest-debug.log to DEBUG') build 12-Apr-2018 16:00:58 parser.add_argument("-l", "--list",action='store_true',help='print the list of tests & tags defined in trunk/gcwrap/python/scripts/tests/uTest_list.json.') build 12-Apr-2018 16:00:58 parser.add_argument("-m", "--mem",action='store_true',help='show the memory used by the tests and the number of files left open.') build 12-Apr-2018 16:00:58 - parser.add_argument("-p", "--pybot",action='store_true',help=argparse.SUPPRESS) # TODO build 12-Apr-2018 16:00:58 + parser.add_argument("-p", "--pybot",action='store_true',help="BETA: Select and run tests using pybot (Robot Framework)") # TODO build 12-Apr-2018 16:00:58 + parser.add_argument("-r", "--attr",action='append',help='BETA: Select and run tests with attribute from .py') build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 tmpArray = [] build 12-Apr-2018 16:00:58 for test in readJSON(LISTofTESTS): build 12-Apr-2018 16:00:58 tmpArray.append(str(test['tag'])) build 12-Apr-2018 16:00:58 listtags = remove_duplicates(tmpArray) build 12-Apr-2018 16:00:58 listtags.append('functionalTest') build 12-Apr-2018 16:00:58 - if not regressionsDisabled: build 12-Apr-2018 16:00:58 - listtags.append('regression') build 12-Apr-2018 16:00:58 + listtags.append('regression') build 12-Apr-2018 16:00:58 listtags.append('TS1') build 12-Apr-2018 16:00:58 listtags.append('TS2') build 12-Apr-2018 16:00:58 listtags.append('TS3') #'Disabled Due to CAS-10844' build 12-Apr-2018 16:00:58 + listtags.append('TS4') #'Disabled Due to CAS-10844' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 parser.add_argument("-t", "--subset", choices=listtags,metavar='tag',help='run a suite of tests defined from tags in trunk/gcwrap/python/scripts/tests/uTest_list.json.') build 12-Apr-2018 16:00:58 parser.add_argument("-s", "--classes",nargs='+',metavar='test',help='print the classes from a test script (those returned by suite())') build 12-Apr-2018 16:00:58 parser.add_argument("-x", "--dry-run",action='store_true',help="dry run Test Execution") build 12-Apr-2018 16:00:58 - parser.add_argument("-z", "--coverage",action='store_true',help='show the coverage of the tests') build 12-Apr-2018 16:00:58 + parser.add_argument("-z", "--coverage",action='store_true',help='BETA: show the coverage of the tests') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + parser.add_argument("--generate-html",action='store_true',help='Generate HTML files for use with pybot') build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 args, unknownArgs = parser.parse_known_args(sys.argv[i+2:]) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -559,6 +782,52 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 parser.print_help() build 12-Apr-2018 16:00:58 os._exit(0) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + # set casalog.filter to DEBUG. set runTest.log to DEBUG build 12-Apr-2018 16:00:58 + if args.debug: build 12-Apr-2018 16:00:58 + logger.info('Setting Debug Mode') build 12-Apr-2018 16:00:58 + casalog.filter('DEBUG') build 12-Apr-2018 16:00:58 + logger.setLevel(logging.DEBUG) build 12-Apr-2018 16:00:58 + logging.basicConfig(level=logging.DEBUG) build 12-Apr-2018 16:00:58 + handler.setLevel(logging.DEBUG) build 12-Apr-2018 16:00:58 + logger.debug("Starting Debug Mode") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if args.generate_html: build 12-Apr-2018 16:00:58 + logger.info('Generating HTML Suite') build 12-Apr-2018 16:00:58 + fp = open(HTML_Template, "rb" ) build 12-Apr-2018 16:00:58 + logger.debug("Reading HTML Template File: %s",HTML_Template) build 12-Apr-2018 16:00:58 + msg = fp.read( ) build 12-Apr-2018 16:00:58 + fp.close( ) build 12-Apr-2018 16:00:58 + if not os.path.isdir(os.getcwd()+ "/HTML"): build 12-Apr-2018 16:00:58 + os.makedirs(os.getcwd()+ "/HTML") build 12-Apr-2018 16:00:58 + outdir = os.getcwd()+ "/HTML" build 12-Apr-2018 16:00:58 + logger.debug("Save Directory: %s",outdir) build 12-Apr-2018 16:00:58 + for test in readJSON(LISTofTESTS): build 12-Apr-2018 16:00:58 + testNumber = test['testNumber'] build 12-Apr-2018 16:00:58 + testName = test['testName'] build 12-Apr-2018 16:00:58 + forceTag = "TS" + str(test['priority']) build 12-Apr-2018 16:00:58 + testPyName = test['testScript'] build 12-Apr-2018 16:00:58 + maintainer = test['Maintainer'] build 12-Apr-2018 16:00:58 + maintainerEmail = test['MaintainerEmail'] build 12-Apr-2018 16:00:58 + tag = test['tag'] build 12-Apr-2018 16:00:58 + templateInfo = msg % (testNumber, testName, testNumber, testName, forceTag, testPyName, maintainer, maintainerEmail,tag) build 12-Apr-2018 16:00:58 + filename = outdir + "/%s_%s.html"%(testNumber, testName.replace(" ", "_")) build 12-Apr-2018 16:00:58 + logger.debug("Creating File: %s_%s.html",testNumber, testName.replace(" ", "_")) build 12-Apr-2018 16:00:58 + file = open(filename, "w") build 12-Apr-2018 16:00:58 + for line in templateInfo: build 12-Apr-2018 16:00:58 + file.write(line) build 12-Apr-2018 16:00:58 + file.close() build 12-Apr-2018 16:00:58 + os._exit(0) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # List All Avaliable Tests build 12-Apr-2018 16:00:58 + if args.list: build 12-Apr-2018 16:00:58 + list_tests() build 12-Apr-2018 16:00:58 + os._exit(0) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Print the classes from a test script build 12-Apr-2018 16:00:58 + if args.classes is not None: build 12-Apr-2018 16:00:58 + getclasses(args.classes) build 12-Apr-2018 16:00:58 + os._exit(0) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if args.dry_run: build 12-Apr-2018 16:00:58 # Some Parameters do not work with some plugins build 12-Apr-2018 16:00:58 if args.coverage: build 12-Apr-2018 16:00:58 @@ -584,16 +853,11 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 testnames = 'subset' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - # List All Avaliable Tests build 12-Apr-2018 16:00:58 - if args.list: build 12-Apr-2018 16:00:58 - list_tests() build 12-Apr-2018 16:00:58 - os._exit(0) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - # Print the classes from a test script build 12-Apr-2018 16:00:58 - if args.classes is not None: build 12-Apr-2018 16:00:58 - getclasses(args.classes) build 12-Apr-2018 16:00:58 - os._exit(0) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + if args.attr: build 12-Apr-2018 16:00:58 + logger.info('Setting Attr') build 12-Apr-2018 16:00:58 + RUN_SUBTEST = True build 12-Apr-2018 16:00:58 + if len(args.attr) != 1: raise Exception, "Using multiple attributes not yet avaliable." build 12-Apr-2018 16:00:58 + ATTR_VAL = args.attr[0] build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 # Options to change test Execution Modes build 12-Apr-2018 16:00:58 if args.mem: # run specific tests in mem mode build 12-Apr-2018 16:00:58 @@ -605,18 +869,9 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 logger.info('Setting Cov Mode') build 12-Apr-2018 16:00:58 COV = 1 build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 - print "You don't have module coverage installed: See https://pypi.python.org/pypi/coverage" build 12-Apr-2018 16:00:58 + logger.critical("You don't have module coverage installed: See https://pypi.python.org/pypi/coverage") build 12-Apr-2018 16:00:58 os._exit(0) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - # set casalog.filter to DEBUG. set runTest.log to DEBUG build 12-Apr-2018 16:00:58 - if args.debug: build 12-Apr-2018 16:00:58 - logger.info('Setting Debug Mode') build 12-Apr-2018 16:00:58 - casalog.filter('DEBUG') build 12-Apr-2018 16:00:58 - logger.setLevel(logging.DEBUG) build 12-Apr-2018 16:00:58 - logging.basicConfig(level=logging.DEBUG) build 12-Apr-2018 16:00:58 - handler.setLevel(logging.DEBUG) build 12-Apr-2018 16:00:58 - logger.debug("Starting Debug Mode") build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 if args.file is not None: build 12-Apr-2018 16:00:58 logger.info('Reading Test List from %s: ', args.file) build 12-Apr-2018 16:00:58 for line in args.file: build 12-Apr-2018 16:00:58 @@ -626,10 +881,13 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 except: build 12-Apr-2018 16:00:58 raise Exception, " The list should contain one test per line." build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - if args.pybot: build 12-Apr-2018 16:00:58 - # TODO Define use_pybot function to run pybot and produce a .html output file build 12-Apr-2018 16:00:58 - use_pybot() build 12-Apr-2018 16:00:58 - os._exit(0) build 12-Apr-2018 16:00:58 + if args.pybot: #run specific tests in pybot mode build 12-Apr-2018 16:00:58 + if (HAVE_ROBOT): build 12-Apr-2018 16:00:58 + logger.info('Setting Pybot Mode') build 12-Apr-2018 16:00:58 + USE_PYBOT = 1 build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + logger.critical("You don't have module robot installed") build 12-Apr-2018 16:00:58 + os._exit(0) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if args.datadir is not None: build 12-Apr-2018 16:00:58 '''This will create an environmental variable called TEST_DATADIR that can be read by the tests to use build 12-Apr-2018 16:00:58 @@ -637,7 +895,7 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if not os.path.isdir(args.datadir): build 12-Apr-2018 16:00:58 raise Exception, 'Value of --datadir is not a directory -> '+ args.datadir build 12-Apr-2018 16:00:58 - logger.debug("Data Path: %s") build 12-Apr-2018 16:00:58 + logger.debug("Data Path: %s",args.datadir) build 12-Apr-2018 16:00:58 # Set an environmental variable for the data directory build 12-Apr-2018 16:00:58 # Also, overwrite casa paramaters dictionary to point to new data build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -666,6 +924,7 @@ if __name__ == "__main__": build 12-Apr-2018 16:00:58 logger.debug("CASA_DIR: %s",CASA_DIR) build 12-Apr-2018 16:00:58 logger.debug("HAVE_MEMTEST: %s",HAVE_MEMTEST) build 12-Apr-2018 16:00:58 logger.debug("HAVE_COVTEST: %s",HAVE_COVTEST) build 12-Apr-2018 16:00:58 + logger.debug("USE_PYBOT: %s",USE_PYBOT) build 12-Apr-2018 16:00:58 logger.debug("DRY_RUN: %s",DRY_RUN) build 12-Apr-2018 16:00:58 logger.debug("whichtests: %s",whichtests) build 12-Apr-2018 16:00:58 logger.debug("Tests: %s",testnames) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_applycal.py b/gcwrap/python/scripts/task_applycal.py build 12-Apr-2018 16:00:58 index 618513c..44b1fef 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_applycal.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_applycal.py build 12-Apr-2018 16:00:58 @@ -105,9 +105,10 @@ def applycal( build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if docallib: build 12-Apr-2018 16:00:58 # by cal library from file build 12-Apr-2018 16:00:58 - mycallib = callibrary() build 12-Apr-2018 16:00:58 - mycallib.read(callib) build 12-Apr-2018 16:00:58 - mycb.setcallib(mycallib.cld) build 12-Apr-2018 16:00:58 + # parsing using c++ parser build 12-Apr-2018 16:00:58 + thiscallib=mycb.parsecallibfile(callib) build 12-Apr-2018 16:00:58 + mycb.setcallib(thiscallib) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 # by traditional parameters build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_immoments.py b/gcwrap/python/scripts/task_immoments.py build 12-Apr-2018 16:00:58 index 55324b9..1034164 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_immoments.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_immoments.py build 12-Apr-2018 16:00:58 @@ -143,22 +143,30 @@ def immoments( build 12-Apr-2018 16:00:58 if outia: build 12-Apr-2018 16:00:58 outia.done() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 def _immoments_get_created_images(out1name, outfile): build 12-Apr-2018 16:00:58 dirpath = os.path.dirname(out1name) build 12-Apr-2018 16:00:58 target_time = os.path.getmtime(out1name) build 12-Apr-2018 16:00:58 - # get all entries in the directory w/ stats build 12-Apr-2018 16:00:58 - entries = (os.path.join(dirpath, fn) for fn in os.listdir(dirpath)) build 12-Apr-2018 16:00:58 - entries = ((os.stat(path), path) for path in entries) build 12-Apr-2018 16:00:58 - # leave only directories, insert creation date build 12-Apr-2018 16:00:58 - entries = ((stat.st_mtime, path) build 12-Apr-2018 16:00:58 - for stat, path in entries if S_ISDIR(stat[ST_MODE])) build 12-Apr-2018 16:00:58 + entries = (os.path.join(dirpath, fn) for fn in os.listdir(dirpath) \ build 12-Apr-2018 16:00:58 + if os.path.basename(fn).startswith(outfile) and os.path.isdir(fn)) build 12-Apr-2018 16:00:58 + entries2 = [] build 12-Apr-2018 16:00:58 + for path in entries: build 12-Apr-2018 16:00:58 + # we must explicitly check for file existence, because file build 12-Apr-2018 16:00:58 + # read before may have been deleted by another process build 12-Apr-2018 16:00:58 + # CAS-11205 build 12-Apr-2018 16:00:58 + if os.path.exists(path): build 12-Apr-2018 16:00:58 + entries2.append((os.stat(path), path)) build 12-Apr-2018 16:00:58 + entries3 = [] build 12-Apr-2018 16:00:58 + for stat, path in entries2: build 12-Apr-2018 16:00:58 + if os.path.exists(path): build 12-Apr-2018 16:00:58 + entries3.append((stat.st_mtime, path)) build 12-Apr-2018 16:00:58 # reverse sort by time build 12-Apr-2018 16:00:58 - zz = sorted(entries) build 12-Apr-2018 16:00:58 + zz = sorted(entries3) build 12-Apr-2018 16:00:58 zz.reverse() build 12-Apr-2018 16:00:58 created_images = [] build 12-Apr-2018 16:00:58 for mdate, path in zz: build 12-Apr-2018 16:00:58 if mdate < target_time: build 12-Apr-2018 16:00:58 break build 12-Apr-2018 16:00:58 - if path != out1name and os.path.basename(path).startswith(outfile): build 12-Apr-2018 16:00:58 + if os.path.exists(path) and path != out1name: build 12-Apr-2018 16:00:58 created_images.append(path) build 12-Apr-2018 16:00:58 return created_images build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_imregrid.py b/gcwrap/python/scripts/task_imregrid.py build 12-Apr-2018 16:00:58 index a5953b8..bb4b121 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_imregrid.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_imregrid.py build 12-Apr-2018 16:00:58 @@ -166,6 +166,14 @@ def _imregrid_to_new_ref_frame( build 12-Apr-2018 16:00:58 _myia.done() build 12-Apr-2018 16:00:58 csys.done() build 12-Apr-2018 16:00:58 return subi build 12-Apr-2018 16:00:58 + if (csys.projection()['type'] == 'SFL'): build 12-Apr-2018 16:00:58 + raise Exception( build 12-Apr-2018 16:00:58 + "The direction coordinate of this image has a projection " build 12-Apr-2018 16:00:58 + "of SFL. Because of the constraints of this projection, " build 12-Apr-2018 16:00:58 + "this image cannot be easily rotated. You may wish to " build 12-Apr-2018 16:00:58 + "consider temporarily modifying the projection using " build 12-Apr-2018 16:00:58 + "cs.setprojection() to allow rotation of the image." build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 casalog.post( build 12-Apr-2018 16:00:58 "Changing coordinate system from " + oldrefcode build 12-Apr-2018 16:00:58 + " to " + newrefcode, 'INFO' build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_imsmooth.py b/gcwrap/python/scripts/task_imsmooth.py build 12-Apr-2018 16:00:58 index f8df826..d8779af 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_imsmooth.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_imsmooth.py build 12-Apr-2018 16:00:58 @@ -70,6 +70,7 @@ build 12-Apr-2018 16:00:58 import os build 12-Apr-2018 16:00:58 import numpy build 12-Apr-2018 16:00:58 from taskinit import * build 12-Apr-2018 16:00:58 +from ialib import write_image_history build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def imsmooth( build 12-Apr-2018 16:00:58 imagename, kernel, major, minor, pa, targetres, kimage, scale, region, build 12-Apr-2018 16:00:58 @@ -104,6 +105,7 @@ def imsmooth( build 12-Apr-2018 16:00:58 +" smoothed image will be\nsaved on disk in file, " \ build 12-Apr-2018 16:00:58 + outfile, 'WARN') build 12-Apr-2018 16:00:58 _myia = iatool() build 12-Apr-2018 16:00:58 + _myia.dohistory(False) build 12-Apr-2018 16:00:58 retia = iatool() build 12-Apr-2018 16:00:58 _myia.open(imagename) build 12-Apr-2018 16:00:58 mycsys = _myia.coordsys() build 12-Apr-2018 16:00:58 @@ -148,14 +150,12 @@ def imsmooth( build 12-Apr-2018 16:00:58 if not pa: build 12-Apr-2018 16:00:58 raise Exception, "Position angle must be specified" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - retia = _myia.convolve2d( build 12-Apr-2018 16:00:58 + outia = _myia.convolve2d( build 12-Apr-2018 16:00:58 axes=[0,1], region=reg, major=major, build 12-Apr-2018 16:00:58 minor=minor, pa=pa, outfile=outfile, build 12-Apr-2018 16:00:58 mask=mask, stretch=stretch, targetres=targetres, build 12-Apr-2018 16:00:58 overwrite=overwrite, beam=beam build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 - return True build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 elif (bkernel ): build 12-Apr-2018 16:00:58 if not major or not minor: build 12-Apr-2018 16:00:58 raise Exception, "Both major and minor must be specified." build 12-Apr-2018 16:00:58 @@ -179,29 +179,36 @@ def imsmooth( build 12-Apr-2018 16:00:58 #retValue = ia.sepconvolve( axes=[0,1], types=['box','box' ],\ build 12-Apr-2018 16:00:58 # widths=[ minor, major ], \ build 12-Apr-2018 16:00:58 # region=reg,outfile=outfile ) build 12-Apr-2018 16:00:58 - retia = _myia.sepconvolve( build 12-Apr-2018 16:00:58 + outia = _myia.sepconvolve( build 12-Apr-2018 16:00:58 axes=[0,1], types=['box','box' ], build 12-Apr-2018 16:00:58 widths=[ minor, major ], build 12-Apr-2018 16:00:58 region=reg,outfile=outfile, build 12-Apr-2018 16:00:58 mask=mask, stretch=stretch, build 12-Apr-2018 16:00:58 overwrite=overwrite build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 - return True build 12-Apr-2018 16:00:58 elif ikernel: build 12-Apr-2018 16:00:58 _myia.open(imagename) build 12-Apr-2018 16:00:58 - retia = _myia.convolve( build 12-Apr-2018 16:00:58 + outia = _myia.convolve( build 12-Apr-2018 16:00:58 outfile=outfile, kernel=kimage, scale=scale, region=reg, build 12-Apr-2018 16:00:58 mask=mask, overwrite=overwrite, stretch=stretch build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 - return True build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 casalog.post( 'Unrecognized kernel type: ' + kernel, 'SEVERE' ) build 12-Apr-2018 16:00:58 return False build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + param_names = imsmooth.func_code.co_varnames[:imsmooth.func_code.co_argcount] build 12-Apr-2018 16:00:58 + param_vals = [eval(p) for p in param_names] build 12-Apr-2018 16:00:58 + write_image_history( build 12-Apr-2018 16:00:58 + outia, sys._getframe().f_code.co_name, build 12-Apr-2018 16:00:58 + param_names, param_vals, casalog build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + except Exception, instance: build 12-Apr-2018 16:00:58 + casalog.post("*** Error \'%s\' updating HISTORY" % (instance), 'WARN') build 12-Apr-2018 16:00:58 + return True build 12-Apr-2018 16:00:58 except Exception, instance: build 12-Apr-2018 16:00:58 casalog.post("Exception: " + str(instance), 'SEVERE') build 12-Apr-2018 16:00:58 return False build 12-Apr-2018 16:00:58 finally: build 12-Apr-2018 16:00:58 _myia.done() build 12-Apr-2018 16:00:58 - retia.done() build 12-Apr-2018 16:00:58 + outia.done() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_imstat.py b/gcwrap/python/scripts/task_imstat.py build 12-Apr-2018 16:00:58 index 00e05c6..07483cf 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_imstat.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_imstat.py build 12-Apr-2018 16:00:58 @@ -4,7 +4,7 @@ def imstat( build 12-Apr-2018 16:00:58 imagename, axes, region, box, chans, build 12-Apr-2018 16:00:58 stokes, listit, verbose, mask, stretch, build 12-Apr-2018 16:00:58 logfile, append, algorithm, fence, center, build 12-Apr-2018 16:00:58 - lside, zscore, maxiter, clmethod build 12-Apr-2018 16:00:58 + lside, zscore, maxiter, clmethod, niter build 12-Apr-2018 16:00:58 ): build 12-Apr-2018 16:00:58 _myia = iatool() build 12-Apr-2018 16:00:58 _myrg = rgtool() build 12-Apr-2018 16:00:58 @@ -25,7 +25,7 @@ def imstat( build 12-Apr-2018 16:00:58 stretch=stretch, logfile=logfile, append=append, build 12-Apr-2018 16:00:58 algorithm=algorithm, fence=fence, center=center, build 12-Apr-2018 16:00:58 lside=lside, zscore=zscore, maxiter=maxiter, build 12-Apr-2018 16:00:58 - clmethod=clmethod build 12-Apr-2018 16:00:58 + clmethod=clmethod, niter=niter build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 except Exception, instance: build 12-Apr-2018 16:00:58 casalog.post( '*** Error ***'+str(instance), 'SEVERE' ) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_imtrans.py b/gcwrap/python/scripts/task_imtrans.py build 12-Apr-2018 16:00:58 index 640c018..a8f2b25 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_imtrans.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_imtrans.py build 12-Apr-2018 16:00:58 @@ -63,17 +63,28 @@ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ########################################################################### build 12-Apr-2018 16:00:58 from taskinit import * build 12-Apr-2018 16:00:58 +from ialib import write_image_history build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def imtrans(imagename, outfile, order): build 12-Apr-2018 16:00:58 casalog.origin('imtrans') build 12-Apr-2018 16:00:58 myia = iatool() build 12-Apr-2018 16:00:58 - mynewim = None build 12-Apr-2018 16:00:58 + myia.dohistory(False) build 12-Apr-2018 16:00:58 + outia = None build 12-Apr-2018 16:00:58 try: build 12-Apr-2018 16:00:58 if (not myia.open(imagename)): build 12-Apr-2018 16:00:58 raise Exception, "Cannot create image analysis tool using " + imagename build 12-Apr-2018 16:00:58 if (len(outfile) == 0): build 12-Apr-2018 16:00:58 raise Exception, "outfile parameter must be specified." build 12-Apr-2018 16:00:58 - mynewim = myia.transpose(outfile=outfile, order=order) build 12-Apr-2018 16:00:58 + outia = myia.transpose(outfile=outfile, order=order) build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + param_names = imtrans.func_code.co_varnames[:imtrans.func_code.co_argcount] build 12-Apr-2018 16:00:58 + param_vals = [eval(p) for p in param_names] build 12-Apr-2018 16:00:58 + write_image_history( build 12-Apr-2018 16:00:58 + outia, sys._getframe().f_code.co_name, build 12-Apr-2018 16:00:58 + param_names, param_vals, casalog build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + except Exception, instance: build 12-Apr-2018 16:00:58 + casalog.post("*** Error \'%s\' updating HISTORY" % (instance), 'WARN') build 12-Apr-2018 16:00:58 return True build 12-Apr-2018 16:00:58 except Exception, instance: build 12-Apr-2018 16:00:58 casalog.post( str( '*** Error ***') + str(instance), 'SEVERE') build 12-Apr-2018 16:00:58 @@ -81,5 +92,5 @@ def imtrans(imagename, outfile, order): build 12-Apr-2018 16:00:58 finally: build 12-Apr-2018 16:00:58 if myia: build 12-Apr-2018 16:00:58 myia.done() build 12-Apr-2018 16:00:58 - if mynewim: build 12-Apr-2018 16:00:58 - mynewim.done() build 12-Apr-2018 16:00:58 \ No newline at end of file build 12-Apr-2018 16:00:58 + if outia: build 12-Apr-2018 16:00:58 + outia.done() build 12-Apr-2018 16:00:58 \ No newline at end of file build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_imview.py b/gcwrap/python/scripts/task_imview.py build 12-Apr-2018 16:00:58 index 284a158..afff7a4 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_imview.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_imview.py build 12-Apr-2018 16:00:58 @@ -131,7 +131,7 @@ class __imview_class(object): build 12-Apr-2018 16:00:58 #vwr.unfreeze( panel ) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if not gui: build 12-Apr-2018 16:00:58 - vwr.output(out,scale=out_scale,dpi=out_dpi,format=out_format,orientation=out_orientation,panel=panel) build 12-Apr-2018 16:00:58 + vwr.output(out_file,scale=out_scale,dpi=out_dpi,format=out_format,orientation=out_orientation,panel=panel) build 12-Apr-2018 16:00:58 vwr.close(panel) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 self.__popd( vwr ) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_oldplotants.py b/gcwrap/python/scripts/task_oldplotants.py build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..3f31849 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_oldplotants.py build 12-Apr-2018 16:00:58 @@ -0,0 +1,56 @@ build 12-Apr-2018 16:00:58 +import os build 12-Apr-2018 16:00:58 +import pylab as pl build 12-Apr-2018 16:00:58 +from taskinit import * build 12-Apr-2018 16:00:58 +from __casac__ import msplot build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def oldplotants(vis=None,figfile=''): build 12-Apr-2018 16:00:58 + """Plot the antenna distribution in the local reference frame: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + The location of the antennas in the MS will be plotted with build 12-Apr-2018 16:00:58 + X-toward local east; Y-toward local north. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Keyword arguments: build 12-Apr-2018 16:00:58 + vis -- Name of input visibility file. build 12-Apr-2018 16:00:58 + default: none. example: vis='ngc5921.ms' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + figfile -- Save the plotted figure in this file. build 12-Apr-2018 16:00:58 + default: ''. example: figfile='myFigure.png' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + The name of each antenna (egs. vla=antenna number) is build 12-Apr-2018 16:00:58 + shown next to its respective location. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + DO NOT use the buttons on the Mark Region line. These are build 12-Apr-2018 16:00:58 + not implemented yet and might abort CASA. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + You can zoom in by pressing the magnifier button (bottom, build 12-Apr-2018 16:00:58 + third from left) and making a rectangular region with build 12-Apr-2018 16:00:58 + the mouse. Press the home button (left most button) to build 12-Apr-2018 16:00:58 + remove zoom. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + A hard-copy of this plot can be obtained by pressing the build 12-Apr-2018 16:00:58 + button on the right at the bottom of the display. This build 12-Apr-2018 16:00:58 + produces a png format file. build 12-Apr-2018 16:00:58 + """ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + mp = mptool() build 12-Apr-2018 16:00:58 + if type(vis) == str and os.path.isdir(vis): build 12-Apr-2018 16:00:58 + mp.open(vis) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + raise Exception, 'Visibility data set not found - please verify the name' build 12-Apr-2018 16:00:58 + pl.ion() # countering tableplot's inadequacies with poor practice build 12-Apr-2018 16:00:58 + pl.clf() build 12-Apr-2018 16:00:58 + mp.plotoptions(plotsymbol='ro'); build 12-Apr-2018 16:00:58 + mp.plot(type='array') build 12-Apr-2018 16:00:58 + mp.reset() build 12-Apr-2018 16:00:58 + pl.axis('equal') build 12-Apr-2018 16:00:58 + pl.axis('scaled') build 12-Apr-2018 16:00:58 + #pl.ylabel('Y (m)') # Replace mp's "X (m)". build 12-Apr-2018 16:00:58 + pl.title(vis) build 12-Apr-2018 16:00:58 + if ( len(figfile) > 0 ) : build 12-Apr-2018 16:00:58 + mp.savefig( figfile ) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + except Exception, instance: build 12-Apr-2018 16:00:58 + print '*** Error ***',instance build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + mp.done() build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_plotants.py b/gcwrap/python/scripts/task_plotants.py build 12-Apr-2018 16:00:58 index b21e56e..7f5c186 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_plotants.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_plotants.py build 12-Apr-2018 16:00:58 @@ -1,55 +1,346 @@ build 12-Apr-2018 16:00:58 import os build 12-Apr-2018 16:00:58 +import numpy as np build 12-Apr-2018 16:00:58 import pylab as pl build 12-Apr-2018 16:00:58 -from taskinit import * build 12-Apr-2018 16:00:58 -from __casac__ import msplot build 12-Apr-2018 16:00:58 -def plotants(vis=None,figfile=''): build 12-Apr-2018 16:00:58 - """Plot the antenna distribution in the local reference frame: build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - The location of the antennas in the MS will be plotted with build 12-Apr-2018 16:00:58 - X-toward local east; Y-toward local north. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Keyword arguments: build 12-Apr-2018 16:00:58 - vis -- Name of input visibility file. build 12-Apr-2018 16:00:58 - default: none. example: vis='ngc5921.ms' build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - figfile -- Save the plotted figure in this file. build 12-Apr-2018 16:00:58 - default: ''. example: figfile='myFigure.png' build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - The name of each antenna (egs. vla=antenna number) is build 12-Apr-2018 16:00:58 - shown next to its respective location. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - DO NOT use the buttons on the Mark Region line. These are build 12-Apr-2018 16:00:58 - not implemented yet and might abort CASA. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - You can zoom in by pressing the magnifier button (bottom, build 12-Apr-2018 16:00:58 - third from left) and making a rectangular region with build 12-Apr-2018 16:00:58 - the mouse. Press the home button (left most button) to build 12-Apr-2018 16:00:58 - remove zoom. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - A hard-copy of this plot can be obtained by pressing the build 12-Apr-2018 16:00:58 - button on the right at the bottom of the display. This build 12-Apr-2018 16:00:58 - produces a png format file. build 12-Apr-2018 16:00:58 - """ build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - try: build 12-Apr-2018 16:00:58 - mp = mptool() build 12-Apr-2018 16:00:58 - if type(vis) == str and os.path.isdir(vis): build 12-Apr-2018 16:00:58 - mp.open(vis) build 12-Apr-2018 16:00:58 - else: build 12-Apr-2018 16:00:58 - raise Exception, 'Visibility data set not found - please verify the name' build 12-Apr-2018 16:00:58 - pl.ion() # countering tableplot's inadequacies with poor practice build 12-Apr-2018 16:00:58 - pl.clf() build 12-Apr-2018 16:00:58 - mp.plotoptions(plotsymbol='ro'); build 12-Apr-2018 16:00:58 - mp.plot(type='array') build 12-Apr-2018 16:00:58 - mp.reset() build 12-Apr-2018 16:00:58 - pl.axis('equal') build 12-Apr-2018 16:00:58 - pl.axis('scaled') build 12-Apr-2018 16:00:58 - #pl.ylabel('Y (m)') # Replace mp's "X (m)". build 12-Apr-2018 16:00:58 - pl.title(vis) build 12-Apr-2018 16:00:58 - if ( len(figfile) > 0 ) : build 12-Apr-2018 16:00:58 - mp.savefig( figfile ) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - except Exception, instance: build 12-Apr-2018 16:00:58 - print '*** Error ***',instance build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - mp.done() build 12-Apr-2018 16:00:58 +from textwrap import wrap build 12-Apr-2018 16:00:58 +from taskinit import msmdtool, gentools, qatool, casalog, mstool build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def plotants(vis=None, figfile=None, build 12-Apr-2018 16:00:58 + antindex=None, logpos=None, build 12-Apr-2018 16:00:58 + exclude=None, checkbaselines=None, build 12-Apr-2018 16:00:58 + title=None): build 12-Apr-2018 16:00:58 + """Plot the antenna distribution in the local reference frame: build 12-Apr-2018 16:00:58 + The location of the antennas in the MS will be plotted with build 12-Apr-2018 16:00:58 + X-toward local east; Y-toward local north. The name of each build 12-Apr-2018 16:00:58 + antenna is shown next to its respective location. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Keyword arguments: build 12-Apr-2018 16:00:58 + vis -- Name of input visibility file. build 12-Apr-2018 16:00:58 + default: none. example: vis='ngc5921.ms' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + figfile -- Save the plotted figure in this file. build 12-Apr-2018 16:00:58 + default: ''. example: figfile='myFigure.png' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + antindex -- Label antennas with name and antenna ID build 12-Apr-2018 16:00:58 + default: False. example: antindex=True build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + logpos -- Produce a logarithmic position plot. build 12-Apr-2018 16:00:58 + default: False. example: logpos=True build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + exclude -- antenna IDs or names to exclude from plotting build 12-Apr-2018 16:00:58 + default: []. example: exclude=[2,3,4], exclude='DV15' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + checkbaselines -- Only plot antennas in the MAIN table. build 12-Apr-2018 16:00:58 + This can be useful after a split. WARNING: Setting build 12-Apr-2018 16:00:58 + checkbaselines to True will add to runtime in build 12-Apr-2018 16:00:58 + proportion to the number of rows in the dataset. build 12-Apr-2018 16:00:58 + default: False. example: checkbaselines=True build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + title -- Title written along top of plot build 12-Apr-2018 16:00:58 + default: '' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + You can zoom in by pressing the magnifier button (bottom, build 12-Apr-2018 16:00:58 + third from right) and making a rectangular region with build 12-Apr-2018 16:00:58 + the mouse. Press the home button (left most button) to build 12-Apr-2018 16:00:58 + remove zoom. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + A hard-copy of this plot can be obtained by pressing the build 12-Apr-2018 16:00:58 + button on the right at the bottom of the display. A file build 12-Apr-2018 16:00:58 + dialog will allow you to choose the directory, filename, build 12-Apr-2018 16:00:58 + and format of the export. build 12-Apr-2018 16:00:58 + """ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + pl.clf() build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + # remove trailing / for title basename build 12-Apr-2018 16:00:58 + if vis[-1]=='/': build 12-Apr-2018 16:00:58 + vis = vis[:-1] build 12-Apr-2018 16:00:58 + myms = mstool() build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + exclude = myms.msseltoindex(vis, baseline=exclude)['antenna1'].tolist() build 12-Apr-2018 16:00:58 + except RuntimeError as rterr: # MSSelection failed build 12-Apr-2018 16:00:58 + errmsg = str(rterr) build 12-Apr-2018 16:00:58 + errmsg = errmsg.replace('specificion', 'specification') build 12-Apr-2018 16:00:58 + errmsg = errmsg.replace('Antenna Expression: ', '') build 12-Apr-2018 16:00:58 + casalog.post("Exclude selection error: " + errmsg, "ERROR") build 12-Apr-2018 16:00:58 + return build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + telescope, names, ids, xpos, ypos, stations = getPlotantsAntennaInfo(vis, build 12-Apr-2018 16:00:58 + logpos, exclude, checkbaselines) build 12-Apr-2018 16:00:58 + if not names: build 12-Apr-2018 16:00:58 + casalog.post("No antennas selected. Exiting plotants.", "ERROR") build 12-Apr-2018 16:00:58 + return build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if logpos: build 12-Apr-2018 16:00:58 + plotAntennasLog(telescope, names, ids, xpos, ypos, antindex, stations) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + plotAntennas(telescope, names, ids, xpos, ypos, antindex, stations) build 12-Apr-2018 16:00:58 + if not title: build 12-Apr-2018 16:00:58 + msname = os.path.basename(vis) build 12-Apr-2018 16:00:58 + title = "Antenna Positions for " build 12-Apr-2018 16:00:58 + if len(msname) > 55: build 12-Apr-2018 16:00:58 + title += '\n' build 12-Apr-2018 16:00:58 + title += msname build 12-Apr-2018 16:00:58 + pl.title(title, {'fontsize':12}) build 12-Apr-2018 16:00:58 + if figfile: build 12-Apr-2018 16:00:58 + pl.savefig(figfile) build 12-Apr-2018 16:00:58 + except Exception as instance: build 12-Apr-2018 16:00:58 + casalog.post("Error: " + str(instance), "ERROR") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def getPlotantsAntennaInfo(msname, log, exclude, checkbaselines): build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + tb, me = gentools(['tb', 'me']) build 12-Apr-2018 16:00:58 + qa = qatool() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + telescope, arrayPos = getPlotantsObservatoryInfo(msname) build 12-Apr-2018 16:00:58 + arrayWgs84 = me.measure(arrayPos, 'WGS84') build 12-Apr-2018 16:00:58 + arrayLon, arrayLat, arrayAlt = [arrayWgs84[i]['value'] build 12-Apr-2018 16:00:58 + for i in ['m0','m1','m2']] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Open the ANTENNA subtable to get the names of the antennas in this MS and build 12-Apr-2018 16:00:58 + # their positions. Note that the entries in the ANTENNA subtable are pretty build 12-Apr-2018 16:00:58 + # much in random order, so antNames translates between their index and name build 12-Apr-2018 16:00:58 + # (e.g., index 11 = STD155). We'll need these indices for later, since the build 12-Apr-2018 16:00:58 + # main data table refers to the antennas by their indices, not names. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + anttabname = msname + '/ANTENNA' build 12-Apr-2018 16:00:58 + tb.open(anttabname) build 12-Apr-2018 16:00:58 + # Get antenna names from antenna table build 12-Apr-2018 16:00:58 + antNames = np.array(tb.getcol("NAME")).tolist() build 12-Apr-2018 16:00:58 + stationNames = np.array(tb.getcol("STATION")).tolist() build 12-Apr-2018 16:00:58 + if telescope == 'VLBA': # names = ant@station build 12-Apr-2018 16:00:58 + antNames = ['@'.join(antsta) for antsta in zip(antNames,stationNames)] build 12-Apr-2018 16:00:58 + # Get antenna positions from antenna table build 12-Apr-2018 16:00:58 + antPositions = np.array([me.position('ITRF', qa.quantity(x, 'm'), build 12-Apr-2018 16:00:58 + qa.quantity(y, 'm'), qa.quantity(z, 'm')) build 12-Apr-2018 16:00:58 + for (x, y, z) in tb.getcol('POSITION').transpose()]) build 12-Apr-2018 16:00:58 + tb.close() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + allAntIds = range(len(antNames)) build 12-Apr-2018 16:00:58 + if checkbaselines: build 12-Apr-2018 16:00:58 + # Get antenna ids from main table; this will add to runtime build 12-Apr-2018 16:00:58 + tb.open(msname) build 12-Apr-2018 16:00:58 + ants1 = tb.getcol('ANTENNA1') build 12-Apr-2018 16:00:58 + ants2 = tb.getcol('ANTENNA2') build 12-Apr-2018 16:00:58 + tb.close() build 12-Apr-2018 16:00:58 + antIdsUsed = list(set(np.append(ants1, ants2))) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + # use them all! build 12-Apr-2018 16:00:58 + antIdsUsed = allAntIds build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # handle exclude -- remove from antIdsUsed build 12-Apr-2018 16:00:58 + for antId in exclude: build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + antNameId = antNames[antId] + " (id " + str(antId) + ")" build 12-Apr-2018 16:00:58 + antIdsUsed.remove(antId) build 12-Apr-2018 16:00:58 + casalog.post("Exclude antenna " + antNameId) build 12-Apr-2018 16:00:58 + except ValueError: build 12-Apr-2018 16:00:58 + casalog.post("Cannot exclude antenna " + antNameId + ": not in main table", "WARN") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # apply antIdsUsed mask build 12-Apr-2018 16:00:58 + antNames = [antNames[i] for i in antIdsUsed] build 12-Apr-2018 16:00:58 + antPositions = [antPositions[i] for i in antIdsUsed] build 12-Apr-2018 16:00:58 + stationNames = [stationNames[i] for i in antIdsUsed] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + nAnts = len(antIdsUsed) build 12-Apr-2018 16:00:58 + print "Number of points being plotted:", nAnts build 12-Apr-2018 16:00:58 + casalog.post("Number of points being plotted: " + str(nAnts)) build 12-Apr-2018 16:00:58 + if nAnts == 0: # excluded all antennas build 12-Apr-2018 16:00:58 + return telescope, antNames, [], [], [] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Get the names, indices, and lat/lon/alt coords of "good" antennas. build 12-Apr-2018 16:00:58 + antWgs84s = np.array([me.measure(pos, 'WGS84') for pos in antPositions]) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Convert from lat, lon, alt to X, Y, Z (unless VLBA) build 12-Apr-2018 16:00:58 + # where X is east, Y is north, Z is up, build 12-Apr-2018 16:00:58 + # and 0, 0, 0 is the center build 12-Apr-2018 16:00:58 + # Note: this conversion is NOT exact, since it doesn't take into account build 12-Apr-2018 16:00:58 + # Earth's ellipticity! But it's close enough. build 12-Apr-2018 16:00:58 + if telescope == 'VLBA' and not log: build 12-Apr-2018 16:00:58 + antLons, antLats = [[pos[i] for pos in antWgs84s] for i in ['m0','m1']] build 12-Apr-2018 16:00:58 + antXs = [qa.convert(lon, 'deg')['value'] for lon in antLons] build 12-Apr-2018 16:00:58 + antYs = [qa.convert(lat, 'deg')['value'] for lat in antLats] build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + antLons, antLats = [np.array( [pos[i]['value'] build 12-Apr-2018 16:00:58 + for pos in antWgs84s]) for i in ['m0','m1']] build 12-Apr-2018 16:00:58 + radE = 6370000. build 12-Apr-2018 16:00:58 + antXs = (antLons - arrayLon) * radE * np.cos(arrayLat) build 12-Apr-2018 16:00:58 + antYs = (antLats - arrayLat) * radE build 12-Apr-2018 16:00:58 + return telescope, antNames, antIdsUsed, antXs, antYs, stationNames build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def getPlotantsObservatoryInfo(msname): build 12-Apr-2018 16:00:58 + metadata = msmdtool() build 12-Apr-2018 16:00:58 + metadata.open(msname) build 12-Apr-2018 16:00:58 + telescope = metadata.observatorynames()[0] build 12-Apr-2018 16:00:58 + arrayPos = metadata.observatoryposition() build 12-Apr-2018 16:00:58 + metadata.close() build 12-Apr-2018 16:00:58 + return telescope, arrayPos build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def getAntennaLabelProps(telescope, station, log=False): build 12-Apr-2018 16:00:58 + # CAS-7120 make plots more readable (rotate labels) build 12-Apr-2018 16:00:58 + vAlign = 'center' build 12-Apr-2018 16:00:58 + hAlign = 'left' build 12-Apr-2018 16:00:58 + rotAngle = 0 build 12-Apr-2018 16:00:58 + if station and "VLA" in telescope: build 12-Apr-2018 16:00:58 + # these have non-standard format: build 12-Apr-2018 16:00:58 + # strip off VLA: or VLA:_ prefix if any build 12-Apr-2018 16:00:58 + if 'VLA:' in station: build 12-Apr-2018 16:00:58 + station = station[4:] build 12-Apr-2018 16:00:58 + if station[0] == '_': build 12-Apr-2018 16:00:58 + station = station[1:] build 12-Apr-2018 16:00:58 + if station in ['W01', 'E01', 'W1', 'E1']: build 12-Apr-2018 16:00:58 + vAlign = 'top' build 12-Apr-2018 16:00:58 + hAlign = 'center' build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + vAlign = 'bottom' build 12-Apr-2018 16:00:58 + if 'W' in station or 'MAS' in station: build 12-Apr-2018 16:00:58 + hAlign = 'right' build 12-Apr-2018 16:00:58 + rotAngle = -35 build 12-Apr-2018 16:00:58 + elif 'E' in station or ('N' in station and not log): build 12-Apr-2018 16:00:58 + rotAngle = 35 build 12-Apr-2018 16:00:58 + return vAlign, hAlign, rotAngle build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def plotAntennasLog(telescope, names, ids, xpos, ypos, antindex, stations): build 12-Apr-2018 16:00:58 + fig = pl.figure(1) build 12-Apr-2018 16:00:58 + # Set up subplot. build 12-Apr-2018 16:00:58 + ax = fig.add_subplot(1, 1, 1, polar=True, projection='polar') build 12-Apr-2018 16:00:58 + ax.set_theta_zero_location('N') build 12-Apr-2018 16:00:58 + ax.set_theta_direction(-1) build 12-Apr-2018 16:00:58 + # Do not show azimuth labels. build 12-Apr-2018 16:00:58 + ax.set_xticklabels([]) build 12-Apr-2018 16:00:58 + ax.set_yticklabels([]) build 12-Apr-2018 16:00:58 + # Do not show grid. build 12-Apr-2018 16:00:58 + ax.grid(False) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # code from pipeline summary.py build 12-Apr-2018 16:00:58 + # PlotAntsChart draw_polarlog_ant_map_in_subplot build 12-Apr-2018 16:00:58 + if 'VLA' in telescope: build 12-Apr-2018 16:00:58 + # For (E)VLA, set a fixed local center position that has been build 12-Apr-2018 16:00:58 + # tuned to work well for its array configurations (CAS-7479). build 12-Apr-2018 16:00:58 + xcenter, ycenter = -32, 0 build 12-Apr-2018 16:00:58 + rmin_min, rmin_max = 12.5, 350 build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + # For non-(E)VLA, take the median of antenna offsets as the build 12-Apr-2018 16:00:58 + # center for the plot. build 12-Apr-2018 16:00:58 + xcenter = np.median(xpos) build 12-Apr-2018 16:00:58 + ycenter = np.median(ypos) build 12-Apr-2018 16:00:58 + rmin_min, rmin_max = 3, 350 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Derive radial offset w.r.t. center position. build 12-Apr-2018 16:00:58 + r = ((xpos-xcenter)**2 + (ypos-ycenter)**2)**0.5 build 12-Apr-2018 16:00:58 + # Set rmin, clamp between a min and max value, ignore station build 12-Apr-2018 16:00:58 + # at r=0 if one is there. build 12-Apr-2018 16:00:58 + rmin = min(rmin_max, max(rmin_min, 0.8*np.min(r[r > 0]))) build 12-Apr-2018 16:00:58 + # Update r to move any points below rmin to r=rmin. build 12-Apr-2018 16:00:58 + r[r <= rmin] = rmin build 12-Apr-2018 16:00:58 + rmin = np.log(rmin) build 12-Apr-2018 16:00:58 + # Set rmax. build 12-Apr-2018 16:00:58 + rmax = np.log(1.5*np.max(r)) build 12-Apr-2018 16:00:58 + # Derive angle of offset w.r.t. center position. build 12-Apr-2018 16:00:58 + theta = np.arctan2(xpos-xcenter, ypos-ycenter) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Draw circles at specific distances from the center. build 12-Apr-2018 16:00:58 + angles = np.arange(0, 2.01*np.pi, 0.01*np.pi) build 12-Apr-2018 16:00:58 + show_circle = True build 12-Apr-2018 16:00:58 + circles = [30, 100, 300, 1000, 3000, 10000] build 12-Apr-2018 16:00:58 + if telescope == "VLBA": build 12-Apr-2018 16:00:58 + circles = [1e5, 3e5, 1e6, 3e6, 1e7] build 12-Apr-2018 16:00:58 + for cr in circles: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Only draw circles outside rmin. build 12-Apr-2018 16:00:58 + if cr > np.min(r) and show_circle: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Draw the circle. build 12-Apr-2018 16:00:58 + radius = np.ones(len(angles))*np.log(cr) build 12-Apr-2018 16:00:58 + ax.plot(angles, radius, 'k:') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Draw tick marks on the circle at 1 km intervals. build 12-Apr-2018 16:00:58 + inc = 0.1*10000/cr build 12-Apr-2018 16:00:58 + if telescope == "VLBA": build 12-Apr-2018 16:00:58 + inc = 0.1*1e8/cr build 12-Apr-2018 16:00:58 + if cr > 100: build 12-Apr-2018 16:00:58 + for angle in np.arange(inc/2., 2*np.pi+0.05, inc): build 12-Apr-2018 16:00:58 + ax.plot([angle, angle], build 12-Apr-2018 16:00:58 + [np.log(0.95*cr), np.log(1.05*cr)], 'k-') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Add text label to circle to denote distance from center. build 12-Apr-2018 16:00:58 + va = 'top' build 12-Apr-2018 16:00:58 + circle_label_angle = -20.0 * np.pi / 180. build 12-Apr-2018 16:00:58 + if cr >= 1000: build 12-Apr-2018 16:00:58 + if np.log(cr) < rmax: build 12-Apr-2018 16:00:58 + ax.text(circle_label_angle, np.log(cr), build 12-Apr-2018 16:00:58 + '%d km' % (cr/1000), size=8, va=va) build 12-Apr-2018 16:00:58 + ax.text(circle_label_angle + np.pi, np.log(cr), build 12-Apr-2018 16:00:58 + '%d km' % (cr / 1000), size=8, va=va) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + ax.text(circle_label_angle, np.log(cr), '%dm' % (cr), build 12-Apr-2018 16:00:58 + size=8, va=va) build 12-Apr-2018 16:00:58 + ax.text(circle_label_angle + np.pi, np.log(cr), build 12-Apr-2018 16:00:58 + '%dm' % (cr), size=8, va=va) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Find out if most recently drawn circle was outside all antennas, build 12-Apr-2018 16:00:58 + # if so, no more circles will be drawn. build 12-Apr-2018 16:00:58 + if np.log(cr) > rmax: build 12-Apr-2018 16:00:58 + show_circle = False build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # plot points and antenna names/ids build 12-Apr-2018 16:00:58 + for i, (name, station) in enumerate(zip(names, stations)): build 12-Apr-2018 16:00:58 + if station and 'OUT' not in station: build 12-Apr-2018 16:00:58 + ax.plot(theta[i], np.log(r[i]), 'ko', ms=5, mfc='r') build 12-Apr-2018 16:00:58 + if antindex: build 12-Apr-2018 16:00:58 + name += ' (' + str(ids[i]) + ')' build 12-Apr-2018 16:00:58 + # set alignment and rotation angle (for VLA) build 12-Apr-2018 16:00:58 + valign, halign, angle = getAntennaLabelProps(telescope, station, log=True) build 12-Apr-2018 16:00:58 + # adjust so text is not on the circle: build 12-Apr-2018 16:00:58 + yoffset = 0 build 12-Apr-2018 16:00:58 + if halign is 'center': build 12-Apr-2018 16:00:58 + yoffset = 0.1 build 12-Apr-2018 16:00:58 + ax.text(theta[i], np.log(r[i])+yoffset, ' '+name, size=8, va=valign, ha=halign, build 12-Apr-2018 16:00:58 + rotation=angle, weight='semibold') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Set minimum and maximum radius. build 12-Apr-2018 16:00:58 + ax.set_rmax(rmax) build 12-Apr-2018 16:00:58 + ax.set_rmin(rmin) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Make room for 2-line title build 12-Apr-2018 16:00:58 + pl.subplots_adjust(top=0.88) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +def plotAntennas(telescope, names, ids, xpos, ypos, antindex, stations): build 12-Apr-2018 16:00:58 + fig = pl.figure(1) build 12-Apr-2018 16:00:58 + ax = fig.add_subplot(111) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if telescope == 'VLBA': build 12-Apr-2018 16:00:58 + labelx = 'Longitude (deg)' build 12-Apr-2018 16:00:58 + labely = 'Latitude (deg)' build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + # use m or km units build 12-Apr-2018 16:00:58 + units = ' (m)' build 12-Apr-2018 16:00:58 + if np.median(xpos) > 1e6 or np.median(ypos) > 1e6: build 12-Apr-2018 16:00:58 + xpos /= 1e3 build 12-Apr-2018 16:00:58 + ypos /= 1e3 build 12-Apr-2018 16:00:58 + units = ' (km)' build 12-Apr-2018 16:00:58 + labelx = 'X' + units build 12-Apr-2018 16:00:58 + labely = 'Y' + units build 12-Apr-2018 16:00:58 + if "VLA" in telescope: build 12-Apr-2018 16:00:58 + spacer = ' ' build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + spacer = ' ' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # plot points and antenna names/ids build 12-Apr-2018 16:00:58 + for i, (x, y, name, station) in enumerate(zip(xpos, ypos, names, stations)): build 12-Apr-2018 16:00:58 + if station and 'OUT' not in station: build 12-Apr-2018 16:00:58 + ax.plot(x, y, 'ro') build 12-Apr-2018 16:00:58 + if antindex: build 12-Apr-2018 16:00:58 + name += ' (' + str(ids[i]) + ')' build 12-Apr-2018 16:00:58 + # set alignment and rotation angle (for VLA) build 12-Apr-2018 16:00:58 + valign, halign, angle = getAntennaLabelProps(telescope, station) build 12-Apr-2018 16:00:58 + # adjust so text is not on the circle: build 12-Apr-2018 16:00:58 + if halign is 'center': build 12-Apr-2018 16:00:58 + y -= 10 build 12-Apr-2018 16:00:58 + ax.text(x, y, ' '+name, size=8, va=valign, ha=halign, rotation=angle, build 12-Apr-2018 16:00:58 + weight='semibold') build 12-Apr-2018 16:00:58 + fig.show() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + pl.xlabel(labelx) build 12-Apr-2018 16:00:58 + pl.ylabel(labely) build 12-Apr-2018 16:00:58 + pl.margins(0.1, 0.1) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_plotms.py b/gcwrap/python/scripts/task_plotms.py build 12-Apr-2018 16:00:58 index 2cebf62..1bcbb45 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_plotms.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_plotms.py build 12-Apr-2018 16:00:58 @@ -275,6 +275,7 @@ def plotms(vis=None, build 12-Apr-2018 16:00:58 synonyms['tsys']=synonyms['Tsys']=synonyms['TSYS']='tsys' build 12-Apr-2018 16:00:58 synonyms['opac']=synonyms['opacity']=synonyms['Opac']='opac' build 12-Apr-2018 16:00:58 synonyms['snr']=synonyms['SNR']='SNR' build 12-Apr-2018 16:00:58 + synonyms['antpos']='Antenna Positions' build 12-Apr-2018 16:00:58 synonyms['radialvelocity']= synonyms['Radial Velocity'] = 'Radial Velocity [km/s]' build 12-Apr-2018 16:00:58 synonyms['rho']=synonyms['Distance']='Distance (rho) [km]' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_rmfit.py b/gcwrap/python/scripts/task_rmfit.py build 12-Apr-2018 16:00:58 index ee76c35..b269d2a 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_rmfit.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_rmfit.py build 12-Apr-2018 16:00:58 @@ -1,6 +1,7 @@ build 12-Apr-2018 16:00:58 from taskinit import * build 12-Apr-2018 16:00:58 import tempfile build 12-Apr-2018 16:00:58 import shutil build 12-Apr-2018 16:00:58 +from ialib import write_image_history build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def rmfit( build 12-Apr-2018 16:00:58 imagename, rm, rmerr, pa0, pa0err, nturns, chisq, build 12-Apr-2018 16:00:58 @@ -8,6 +9,7 @@ def rmfit( build 12-Apr-2018 16:00:58 ): build 12-Apr-2018 16:00:58 casalog.origin('prom') build 12-Apr-2018 16:00:58 myia = iatool() build 12-Apr-2018 16:00:58 + myia.dohistory(False) build 12-Apr-2018 16:00:58 mypo = potool() build 12-Apr-2018 16:00:58 tmpim = "" build 12-Apr-2018 16:00:58 try: build 12-Apr-2018 16:00:58 @@ -31,6 +33,17 @@ def rmfit( build 12-Apr-2018 16:00:58 rm=rm, rmerr=rmerr, pa0=pa0, pa0err=pa0err, nturns=nturns, chisq=chisq, build 12-Apr-2018 16:00:58 sigma=sigma, rmfg=rmfg, rmmax=rmmax, maxpaerr=maxpaerr build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + param_names = rmfit.func_code.co_varnames[:rmfit.func_code.co_argcount] build 12-Apr-2018 16:00:58 + param_vals = [eval(p) for p in param_names] build 12-Apr-2018 16:00:58 + for im in [rm, rmerr, pa0, pa0err, nturns, chisq]: build 12-Apr-2018 16:00:58 + write_image_history( build 12-Apr-2018 16:00:58 + im, sys._getframe().f_code.co_name, build 12-Apr-2018 16:00:58 + param_names, param_vals, casalog build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + except Exception, instance: build 12-Apr-2018 16:00:58 + casalog.post("*** Error \'%s\' updating HISTORY" % (instance), 'WARN') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 return True build 12-Apr-2018 16:00:58 except Exception, instance: build 12-Apr-2018 16:00:58 casalog.post( str( '*** Error ***') + str(instance), 'SEVERE') build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_specfit.py b/gcwrap/python/scripts/task_specfit.py build 12-Apr-2018 16:00:58 index eaf3d6b..485ce51 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_specfit.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_specfit.py build 12-Apr-2018 16:00:58 @@ -64,28 +64,27 @@ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ########################################################################### build 12-Apr-2018 16:00:58 from taskinit import * build 12-Apr-2018 16:00:58 +from ialib import write_image_history, get_created_images build 12-Apr-2018 16:00:58 +import glob build 12-Apr-2018 16:00:58 +import time build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def specfit( build 12-Apr-2018 16:00:58 - imagename=None, box=None, region=None, chans=None, build 12-Apr-2018 16:00:58 - stokes=None, axis=None, mask=None, ngauss=None, build 12-Apr-2018 16:00:58 - poly=None, estimates=None, minpts=None, multifit=None, build 12-Apr-2018 16:00:58 - model=None, residual=None, amp=None, amperr=None, build 12-Apr-2018 16:00:58 - center=None, centererr=None, fwhm=None, fwhmerr=None, build 12-Apr-2018 16:00:58 - integral=None, integralerr=None, wantreturn=None, build 12-Apr-2018 16:00:58 - stretch=None, logresults=None, pampest=None, build 12-Apr-2018 16:00:58 - pcenterest=None, pfwhmest=None, pfix=None, build 12-Apr-2018 16:00:58 - gmncomps=None, gmampcon=None, gmcentercon=None, build 12-Apr-2018 16:00:58 - gmfwhmcon=None, gmampest=None, gmcenterest=None, build 12-Apr-2018 16:00:58 - gmfwhmest=None, gmfix=None, logfile=None, append=None, build 12-Apr-2018 16:00:58 - pfunc=None, goodamprange=None, goodcenterrange=None, build 12-Apr-2018 16:00:58 - goodfwhmrange=None, sigma=None, outsigma=None build 12-Apr-2018 16:00:58 + imagename, box, region, chans, stokes, axis, mask, ngauss, build 12-Apr-2018 16:00:58 + poly, estimates, minpts, multifit, model, residual, amp, amperr, build 12-Apr-2018 16:00:58 + center, centererr, fwhm, fwhmerr, integral, integralerr, wantreturn, build 12-Apr-2018 16:00:58 + stretch, logresults, pampest, pcenterest, pfwhmest, pfix, build 12-Apr-2018 16:00:58 + gmncomps, gmampcon, gmcentercon, gmfwhmcon, gmampest, gmcenterest, build 12-Apr-2018 16:00:58 + gmfwhmest, gmfix, logfile, append, pfunc, goodamprange, goodcenterrange, build 12-Apr-2018 16:00:58 + goodfwhmrange, sigma, outsigma build 12-Apr-2018 16:00:58 ): build 12-Apr-2018 16:00:58 casalog.origin('specfit') build 12-Apr-2018 16:00:58 retval = None build 12-Apr-2018 16:00:58 myia = iatool() build 12-Apr-2018 16:00:58 + myia.dohistory(False) build 12-Apr-2018 16:00:58 try: build 12-Apr-2018 16:00:58 if (not myia.open(imagename)): build 12-Apr-2018 16:00:58 raise Exception, "Cannot create image analysis tool using " + imagename build 12-Apr-2018 16:00:58 + target_time = time.time() build 12-Apr-2018 16:00:58 retval = myia.fitprofile( build 12-Apr-2018 16:00:58 box=box, region=region, chans=chans, build 12-Apr-2018 16:00:58 stokes=stokes, axis=axis, mask=mask, build 12-Apr-2018 16:00:58 @@ -107,8 +106,23 @@ def specfit( build 12-Apr-2018 16:00:58 goodcenterrange=goodcenterrange, goodfwhmrange=goodfwhmrange, build 12-Apr-2018 16:00:58 sigma=sigma, outsigma=outsigma build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + param_names = specfit.func_code.co_varnames[:specfit.func_code.co_argcount] build 12-Apr-2018 16:00:58 + param_vals = [eval(p) for p in param_names] build 12-Apr-2018 16:00:58 + ims = [model, residual] build 12-Apr-2018 16:00:58 + for x in [amp, amperr, center, centererr, fwhm, fwhmerr, integral, integralerr]: build 12-Apr-2018 16:00:58 + if x: build 12-Apr-2018 16:00:58 + ims.extend(get_created_images(x, target_time)) build 12-Apr-2018 16:00:58 + for im in ims: build 12-Apr-2018 16:00:58 + write_image_history( build 12-Apr-2018 16:00:58 + im, sys._getframe().f_code.co_name, build 12-Apr-2018 16:00:58 + param_names, param_vals, casalog build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + except Exception, instance: build 12-Apr-2018 16:00:58 + casalog.post("*** Error \'%s\' updating HISTORY" % (instance), 'WARN') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 except Exception, instance: build 12-Apr-2018 16:00:58 - casalog.post( str( '*** Error ***') + str(instance), 'SEVERE') build 12-Apr-2018 16:00:58 + casalog.post('*** Error *** ' + str(instance), 'SEVERE') build 12-Apr-2018 16:00:58 retval = None build 12-Apr-2018 16:00:58 myia.done() build 12-Apr-2018 16:00:58 if (wantreturn): build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_tclean.py b/gcwrap/python/scripts/task_tclean.py build 12-Apr-2018 16:00:58 index 0d06803..3e47ca8 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_tclean.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_tclean.py build 12-Apr-2018 16:00:58 @@ -131,6 +131,9 @@ def tclean( build 12-Apr-2018 16:00:58 minbeamfrac,#=0.3, build 12-Apr-2018 16:00:58 cutthreshold,#=0.01, build 12-Apr-2018 16:00:58 growiterations,#=100 build 12-Apr-2018 16:00:58 + dogrowprune,#=True build 12-Apr-2018 16:00:58 + minpercentchange,#=0.0 build 12-Apr-2018 16:00:58 + verbose, #=False build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ## Misc build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -268,10 +271,13 @@ def tclean( build 12-Apr-2018 16:00:58 minbeamfrac=minbeamfrac, build 12-Apr-2018 16:00:58 cutthreshold=cutthreshold, build 12-Apr-2018 16:00:58 growiterations=growiterations, build 12-Apr-2018 16:00:58 + dogrowprune=dogrowprune, build 12-Apr-2018 16:00:58 + minpercentchange=minpercentchange, build 12-Apr-2018 16:00:58 + verbose=verbose, build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 savemodel=savemodel build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 #paramList.printParameters() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 pcube=False build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/task_tsdimaging.py b/gcwrap/python/scripts/task_tsdimaging.py build 12-Apr-2018 16:00:58 index 3c87c0f..2ebf259 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/task_tsdimaging.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/task_tsdimaging.py build 12-Apr-2018 16:00:58 @@ -718,7 +718,7 @@ def tsdimaging(infiles, outfile, overwrite, field, spw, antenna, scan, intent, m build 12-Apr-2018 16:00:58 stokes=stokes, build 12-Apr-2018 16:00:58 # fix specmode to 'cubedata' build 12-Apr-2018 16:00:58 # output spectral coordinate will be determined based on mode, start, and width build 12-Apr-2018 16:00:58 - specmode='cubedata', build 12-Apr-2018 16:00:58 + specmode='cube', build 12-Apr-2018 16:00:58 gridder='singledish', build 12-Apr-2018 16:00:58 # single dish specific parameters build 12-Apr-2018 16:00:58 gridfunction=gridfunction, build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/CMakeLists.txt b/gcwrap/python/scripts/tests/CMakeLists.txt build 12-Apr-2018 16:00:58 index 2e05e33..0e53623 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/CMakeLists.txt build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/CMakeLists.txt build 12-Apr-2018 16:00:58 @@ -233,4 +233,5 @@ casa_add_python( tools tools_tests_python lib/python${PYTHONV}/tests build 12-Apr-2018 16:00:58 testutils.py build 12-Apr-2018 16:00:58 unittests_list.txt build 12-Apr-2018 16:00:58 uTest_list.json build 12-Apr-2018 16:00:58 + uTest_Template.dat build 12-Apr-2018 16:00:58 ) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_FirstLook_Imaging.py b/gcwrap/python/scripts/tests/test_FirstLook_Imaging.py build 12-Apr-2018 16:00:58 index 81a7932..8e58ed8 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_FirstLook_Imaging.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_FirstLook_Imaging.py build 12-Apr-2018 16:00:58 @@ -167,219 +167,238 @@ class Test020_FirstLookatImaging(unittest.TestCase): build 12-Apr-2018 16:00:58 os.unlink(os.getcwd()+'/sis14_twhya_uncalibrated.ms') build 12-Apr-2018 16:00:58 os.unlink(os.getcwd()+'/sis14_twhya_calibrated_flagged.ms') build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - rmtables("secondary*") build 12-Apr-2018 16:00:58 - rmtables("primary_robust*") build 12-Apr-2018 16:00:58 + rmtables("amp_cal*") build 12-Apr-2018 16:00:58 + rmtables("phase_cal*") build 12-Apr-2018 16:00:58 rmtables("twhya*") build 12-Apr-2018 16:00:58 os.system("rm -rf *.last") build 12-Apr-2018 16:00:58 os.system("rm -rf *.flagversions") build 12-Apr-2018 16:00:58 os.system("rm -rf my_script.py") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_1_primary_robust_flux(self): build 12-Apr-2018 16:00:58 - '''Test 1: Check primary_robust.flux''' build 12-Apr-2018 16:00:58 - tableName = 'primary_robust.flux' build 12-Apr-2018 16:00:58 + def test_1_amp_cal_bigpix_image(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_2_primary_robust_image(self): build 12-Apr-2018 16:00:58 - '''Test 2: Check primary_robust.image''' build 12-Apr-2018 16:00:58 - tableName = 'primary_robust.image' build 12-Apr-2018 16:00:58 + def test_2_amp_cal_bigpix_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.mask' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_3_primary_robust_model(self): build 12-Apr-2018 16:00:58 - '''Test 3: Check primary_robust.model''' build 12-Apr-2018 16:00:58 - tableName = 'primary_robust.model' build 12-Apr-2018 16:00:58 + def test_3_amp_cal_bigpix_model(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_4_primary_robust_psf(self): build 12-Apr-2018 16:00:58 - '''Test 4: Check primary_robust.psf''' build 12-Apr-2018 16:00:58 - tableName = 'primary_robust.psf' build 12-Apr-2018 16:00:58 + def test_4_amp_cal_bigpix_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_5_primary_robust_residual(self): build 12-Apr-2018 16:00:58 - '''Test 5: Check primary_robust.residual''' build 12-Apr-2018 16:00:58 - tableName = 'primary_robust.residual' build 12-Apr-2018 16:00:58 + def test_5_amp_cal_bigpix_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_6_secondary_flux(self): build 12-Apr-2018 16:00:58 - '''Test 6: Check secondary.flux''' build 12-Apr-2018 16:00:58 - tableName = 'secondary.flux' build 12-Apr-2018 16:00:58 + def test_6_amp_cal_bigpix_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_7_secondary_image(self): build 12-Apr-2018 16:00:58 - '''Test 7: Check secondary.image''' build 12-Apr-2018 16:00:58 - tableName = 'secondary.image' build 12-Apr-2018 16:00:58 + def test_7_amp_cal_bigpix_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_bigpix.sumwt' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_8_secondary_model(self): build 12-Apr-2018 16:00:58 - '''Test 8: Check secondary.model''' build 12-Apr-2018 16:00:58 - tableName = 'secondary.model' build 12-Apr-2018 16:00:58 + def test_8_amp_cal_robust_image(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_9_secondary_psf(self): build 12-Apr-2018 16:00:58 - '''Test 9: Check secondary.psf''' build 12-Apr-2018 16:00:58 - tableName = 'secondary.psf' build 12-Apr-2018 16:00:58 + def test_9_amp_cal_robust_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.mask' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_10_secondary_residual(self): build 12-Apr-2018 16:00:58 - '''Test 10: Check secondary.residual''' build 12-Apr-2018 16:00:58 - tableName = 'secondary.residual' build 12-Apr-2018 16:00:58 + def test_10_amp_cal_robust_model(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_11_secondary_bigpix_flux(self): build 12-Apr-2018 16:00:58 - '''Test 11: Check secondary_bigpix.flux''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_bigpix.flux' build 12-Apr-2018 16:00:58 + def test_11_amp_cal_robust_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_12_secondary_bigpix_image(self): build 12-Apr-2018 16:00:58 - '''Test 12: Check secondary_bigpix.image''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_bigpix.image' build 12-Apr-2018 16:00:58 + def test_12_amp_cal_robust_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_13_secondary_bigpix_model(self): build 12-Apr-2018 16:00:58 - '''Test 13: Check secondary_bigpix.model''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_bigpix.model' build 12-Apr-2018 16:00:58 + def test_13_amp_cal_robust_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_14_secondary_bigpix_psf(self): build 12-Apr-2018 16:00:58 - '''Test 14: Check secondary_bigpix.psf''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_bigpix.psf' build 12-Apr-2018 16:00:58 + def test_14_amp_cal_robust_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'amp_cal_robust.sumwt' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_15_secondary_bigpix_residual(self): build 12-Apr-2018 16:00:58 - '''Test 15: Check secondary_bigpix.residual''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_bigpix.residual' build 12-Apr-2018 16:00:58 + def test_15_phase_cal_image(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_16_secondary_robust_flux(self): build 12-Apr-2018 16:00:58 - '''Test 16: Check secondary_robust.flux''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_robust.flux' build 12-Apr-2018 16:00:58 + def test_16_phase_cal_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.mask' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_17_secondary_robust_image(self): build 12-Apr-2018 16:00:58 - '''Test 17: Check secondary_robust.image''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_robust.image' build 12-Apr-2018 16:00:58 + def test_17_phase_cal_model(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_18_secondary_robust_model(self): build 12-Apr-2018 16:00:58 - '''Test 18: Check secondary_robust.model''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_robust.model' build 12-Apr-2018 16:00:58 + def test_18_phase_cal_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_19_secondary_robust_psf(self): build 12-Apr-2018 16:00:58 - '''Test 19: Check secondary_robust.psf''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_robust.psf' build 12-Apr-2018 16:00:58 + def test_19_phase_cal_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_20_secondary_robust_residual(self): build 12-Apr-2018 16:00:58 - '''Test 20: Check secondary_robust.residual''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_robust.residual' build 12-Apr-2018 16:00:58 + def test_20_phase_cal_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_21_secondary_uncalibrated_flux(self): build 12-Apr-2018 16:00:58 - '''Test 21: Check secondary_uncalibrated.flux''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_uncalibrated.flux' build 12-Apr-2018 16:00:58 + def test_21_phase_cal_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal.sumwt' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_22_secondary_uncalibrated_image(self): build 12-Apr-2018 16:00:58 - '''Test 22: Check secondary_uncalibrated.image''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_uncalibrated.image' build 12-Apr-2018 16:00:58 + def test_22_phase_cal_robust_image(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_23_secondary_uncalibrated_model(self): build 12-Apr-2018 16:00:58 - '''Test 23: Check secondary_uncalibrated.model''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_uncalibrated.model' build 12-Apr-2018 16:00:58 + def test_23_phase_cal_robust_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.mask' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_24_secondary_uncalibrated_psf(self): build 12-Apr-2018 16:00:58 - '''Test 24: Check secondary_uncalibrated.psf''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_uncalibrated.psf' build 12-Apr-2018 16:00:58 + def test_24_phase_cal_robust_model(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_25_secondary_uncalibrated_residual(self): build 12-Apr-2018 16:00:58 - '''Test 25: Check secondary_uncalibrated.residual''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_uncalibrated.residual' build 12-Apr-2018 16:00:58 + def test_25_phase_cal_robust_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_26_secondary_unflagged_flux(self): build 12-Apr-2018 16:00:58 - '''Test 26: Check secondary_unflagged.flux''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_unflagged.flux' build 12-Apr-2018 16:00:58 + def test_26_phase_cal_robust_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_27_secondary_unflagged_image(self): build 12-Apr-2018 16:00:58 - '''Test 27: Check secondary_unflagged.image''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_unflagged.image' build 12-Apr-2018 16:00:58 + def test_27_phase_cal_robust_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_28_secondary_unflagged_model(self): build 12-Apr-2018 16:00:58 - '''Test 28: Check secondary_unflagged.model''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_unflagged.model' build 12-Apr-2018 16:00:58 + def test_28_phase_cal_robust_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_robust.sumwt' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_29_secondary_unflagged_psf(self): build 12-Apr-2018 16:00:58 - '''Test 29: Check secondary_unflagged.psf''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_unflagged.psf' build 12-Apr-2018 16:00:58 + def test_29_phase_cal_uncalibrated_image(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_30_secondary_unflagged_residual(self): build 12-Apr-2018 16:00:58 - '''Test 30: Check secondary_unflagged.residual''' build 12-Apr-2018 16:00:58 - tableName = 'secondary_unflagged.residual' build 12-Apr-2018 16:00:58 + def test_30_phase_cal_uncalibrated_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.mask' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_40_twhya_cont_flux(self): build 12-Apr-2018 16:00:58 - '''Test 40: Check twhya_cont.flux''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont.flux' build 12-Apr-2018 16:00:58 + def test_31_phase_cal_uncalibrated_model(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_41_twhya_cont_image(self): build 12-Apr-2018 16:00:58 - '''Test 41: Check twhya_cont.image''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont.image' build 12-Apr-2018 16:00:58 + def test_32_phase_cal_uncalibrated_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_42_twhya_cont_model(self): build 12-Apr-2018 16:00:58 - '''Test 42: Check twhya_cont.model''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont.model' build 12-Apr-2018 16:00:58 + def test_33_phase_cal_uncalibrated_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_43_twhya_cont_pbcor_image(self): build 12-Apr-2018 16:00:58 - '''Test 43: Check twhya_cont.pbcor.image''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont.pbcor.image' build 12-Apr-2018 16:00:58 + def test_34_phase_cal_uncalibrated_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_44_twhya_cont_psf(self): build 12-Apr-2018 16:00:58 - '''Test 44: Check twhya_cont.psf''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont.psf' build 12-Apr-2018 16:00:58 + def test_35_phase_cal_uncalibrated_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_uncalibrated.sumwt' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_45_twhya_cont_residual(self): build 12-Apr-2018 16:00:58 - '''Test 45: Check twhya_cont.residual''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont.residual' build 12-Apr-2018 16:00:58 + def test_36_phase_cal_unflagged_image(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.image' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_37_phase_cal_unflagged_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_38_phase_cal_unflagged_model(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.model' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_39_phase_cal_unflagged_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_46_twhya_cont_auto_flux(self): build 12-Apr-2018 16:00:58 - '''Test 46: Check twhya_cont_auto.flux''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_cont_auto.flux' build 12-Apr-2018 16:00:58 + def test_40_phase_cal_unflagged_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_47_twhya_cont_auto_image(self): build 12-Apr-2018 16:00:58 - '''Test 47: Check twhya_cont_auto.image''' build 12-Apr-2018 16:00:58 + def test_41_phase_cal_unflagged_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.residual' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_42_phase_cal_unflagged_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'phase_cal_unflagged.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_43_twhya_cont_auto_image(self): build 12-Apr-2018 16:00:58 tableName = 'twhya_cont_auto.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_48_twhya_cont_auto_model(self): build 12-Apr-2018 16:00:58 - '''Test 48: Check twhya_cont_auto.model''' build 12-Apr-2018 16:00:58 + def test_44_twhya_cont_auto_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont_auto.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_45_twhya_cont_auto_model(self): build 12-Apr-2018 16:00:58 tableName = 'twhya_cont_auto.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_49_twhya_cont_auto_psf(self): build 12-Apr-2018 16:00:58 - '''Test 49: Check twhya_cont_auto.psf''' build 12-Apr-2018 16:00:58 + def test_46_twhya_cont_auto_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont_auto.pb' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_47_twhya_cont_auto_psf(self): build 12-Apr-2018 16:00:58 tableName = 'twhya_cont_auto.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_50_twhya_cont_auto_residual(self): build 12-Apr-2018 16:00:58 - '''Test 50: Check twhya_cont_auto.residual''' build 12-Apr-2018 16:00:58 + def test_48_twhya_cont_auto_residual(self): build 12-Apr-2018 16:00:58 tableName = 'twhya_cont_auto.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_51_twhya_smoothed_ms(self): build 12-Apr-2018 16:00:58 + def test_49_twhya_cont_auto_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont_auto.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_50_twhya_cont_image(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.image' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_51_twhya_cont_mask(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_52_twhya_cont_model(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.model' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_53_twhya_cont_bp(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.pb' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_54_twhya_cont_psf(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.psf' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_55_twhya_cont_residual(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.residual' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_56_twhya_cont_sumwt(self): build 12-Apr-2018 16:00:58 + tableName = 'twhya_cont.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_57_twhya_smoothed_ms(self): build 12-Apr-2018 16:00:58 '''Test 51: Check twhya_smoothed.ms''' build 12-Apr-2018 16:00:58 tableName = 'twhya_smoothed.ms' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_FirstLook_LineImaging.py b/gcwrap/python/scripts/tests/test_FirstLook_LineImaging.py build 12-Apr-2018 16:00:58 index 9a027bb..a4ff199 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_FirstLook_LineImaging.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_FirstLook_LineImaging.py build 12-Apr-2018 16:00:58 @@ -186,36 +186,46 @@ class Test020_FirstLookatLineImaging(unittest.TestCase): build 12-Apr-2018 16:00:58 os.system("rm -rf *.flagversions") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_10_twhya_n2hp_flux(self): build 12-Apr-2018 16:00:58 - '''Test 10: Check twhya_n2hp.flux''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_n2hp.flux' build 12-Apr-2018 16:00:58 + def test_1_twhya_n2hp_residual(self): build 12-Apr-2018 16:00:58 + '''Test 1: Check twhya_n2hp.residual''' build 12-Apr-2018 16:00:58 + tableName = 'twhya_n2hp.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_11_twhya_n2hp_image(self): build 12-Apr-2018 16:00:58 - '''Test 11: Check twhya_n2hp.image''' build 12-Apr-2018 16:00:58 + def test_2_twhya_n2hp_image(self): build 12-Apr-2018 16:00:58 + '''Test 2: Check twhya_n2hp.image''' build 12-Apr-2018 16:00:58 tableName = 'twhya_n2hp.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_12_twhya_n2hp_model(self): build 12-Apr-2018 16:00:58 - '''Test 12: Check twhya_n2hp.model''' build 12-Apr-2018 16:00:58 + def test_3_twhya_n2hp_pbcor_image(self): build 12-Apr-2018 16:00:58 + '''Test 3: Check twhya_n2hp.pbcor.image''' build 12-Apr-2018 16:00:58 + tableName = 'twhya_n2hp.pbcor.image' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_4_twhya_n2hp_model(self): build 12-Apr-2018 16:00:58 + '''Test 4: Check twhya_n2hp.model''' build 12-Apr-2018 16:00:58 tableName = 'twhya_n2hp.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_13_twhya_n2hp_pbcor_image(self): build 12-Apr-2018 16:00:58 - '''Test 13: Check twhya_n2hp.pbcor.image''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_n2hp.pbcor.image' build 12-Apr-2018 16:00:58 + def test_5_twhya_n2hp_mask(self): build 12-Apr-2018 16:00:58 + '''Test 5: Check twhya_n2hp.mask''' build 12-Apr-2018 16:00:58 + tableName = 'twhya_n2hp.mask' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_14_twhya_n2hp_psf(self): build 12-Apr-2018 16:00:58 - '''Test 14: Check twhya_n2hp.psf''' build 12-Apr-2018 16:00:58 - tableName = 'twhya_n2hp.psf' build 12-Apr-2018 16:00:58 + def test_6_twhya_n2hp_pb(self): build 12-Apr-2018 16:00:58 + '''Test 6: Check twhya_n2hp.pb''' build 12-Apr-2018 16:00:58 + tableName = 'twhya_n2hp.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_15_twhya_n2hp_residual(self): build 12-Apr-2018 16:00:58 - '''Test 15: Check twhya_n2hp.residual''' build 12-Apr-2018 16:00:58 + def test_7_twhya_n2hp_residual(self): build 12-Apr-2018 16:00:58 + '''Test 7: Check twhya_n2hp.residual''' build 12-Apr-2018 16:00:58 tableName = 'twhya_n2hp.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_8_twhya_n2hp_sumwt(self): build 12-Apr-2018 16:00:58 + '''Test 8: Check twhya_n2hp.sumwt''' build 12-Apr-2018 16:00:58 + tableName = 'twhya_n2hp.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 #################################################################################################### build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_FirstLook_SelfCalibration.py b/gcwrap/python/scripts/tests/test_FirstLook_SelfCalibration.py build 12-Apr-2018 16:00:58 index 113ce6b..8a92499 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_FirstLook_SelfCalibration.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_FirstLook_SelfCalibration.py build 12-Apr-2018 16:00:58 @@ -188,7 +188,6 @@ class Test020_FirstLookatSelfCalibration(unittest.TestCase): build 12-Apr-2018 16:00:58 pass build 12-Apr-2018 16:00:58 @classmethod build 12-Apr-2018 16:00:58 def tearDownClass(cls): build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 rmtables("first_image*") build 12-Apr-2018 16:00:58 rmtables("second_image*") build 12-Apr-2018 16:00:58 rmtables("third_image*") build 12-Apr-2018 16:00:58 @@ -207,9 +206,9 @@ class Test020_FirstLookatSelfCalibration(unittest.TestCase): build 12-Apr-2018 16:00:58 tableName = 'amp.cal' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_2_first_image_flux(self): build 12-Apr-2018 16:00:58 - '''Test 2: Check first_image.flux''' build 12-Apr-2018 16:00:58 - tableName = 'first_image.flux' build 12-Apr-2018 16:00:58 + def test_2_first_image_pb(self): build 12-Apr-2018 16:00:58 + '''Test 2: Check first_image.pb''' build 12-Apr-2018 16:00:58 + tableName = 'first_image.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_3_first_image_image(self): build 12-Apr-2018 16:00:58 @@ -232,102 +231,146 @@ class Test020_FirstLookatSelfCalibration(unittest.TestCase): build 12-Apr-2018 16:00:58 tableName = 'first_image.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_7_fourth_image_flux(self): build 12-Apr-2018 16:00:58 - '''Test 7: Check fourth_image.flux''' build 12-Apr-2018 16:00:58 - tableName = 'fourth_image.flux' build 12-Apr-2018 16:00:58 + def test_7_first_image_mask(self): build 12-Apr-2018 16:00:58 + '''Test 7: Check first_image.mask''' build 12-Apr-2018 16:00:58 + tableName = 'first_image.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_8_first_image_sumwt(self): build 12-Apr-2018 16:00:58 + '''Test 8: Check first_image.sumwt''' build 12-Apr-2018 16:00:58 + tableName = 'first_image.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_9_fourth_image_pb(self): build 12-Apr-2018 16:00:58 + '''Test 9: Check fourth_image.pb''' build 12-Apr-2018 16:00:58 + tableName = 'fourth_image.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_8_fourth_image_image(self): build 12-Apr-2018 16:00:58 - '''Test 8: Check fourth_image.image''' build 12-Apr-2018 16:00:58 + def test_10_fourth_image_image(self): build 12-Apr-2018 16:00:58 + '''Test 10: Check fourth_image.image''' build 12-Apr-2018 16:00:58 tableName = 'fourth_image.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_9_fourth_image_model(self): build 12-Apr-2018 16:00:58 - '''Test 9: Check fourth_image.model''' build 12-Apr-2018 16:00:58 + def test_11_fourth_image_model(self): build 12-Apr-2018 16:00:58 + '''Test 11: Check fourth_image.model''' build 12-Apr-2018 16:00:58 tableName = 'fourth_image.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_10_fourth_image_psf(self): build 12-Apr-2018 16:00:58 - '''Test 10: Check fourth_image.psf''' build 12-Apr-2018 16:00:58 + def test_12_fourth_image_psf(self): build 12-Apr-2018 16:00:58 + '''Test 12: Check fourth_image.psf''' build 12-Apr-2018 16:00:58 tableName = 'fourth_image.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_11_fourth_image_residual(self): build 12-Apr-2018 16:00:58 - '''Test 11: Check fourth_image.residual''' build 12-Apr-2018 16:00:58 + def test_13_fourth_image_residual(self): build 12-Apr-2018 16:00:58 + '''Test 13: Check fourth_image.residual''' build 12-Apr-2018 16:00:58 tableName = 'fourth_image.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_12_phase_cal(self): build 12-Apr-2018 16:00:58 + def test_14_fourth_image_mask(self): build 12-Apr-2018 16:00:58 + '''Test 14: Check fourth_image.mask''' build 12-Apr-2018 16:00:58 + tableName = 'fourth_image.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_15_fourth_image_sumwt(self): build 12-Apr-2018 16:00:58 + '''Test 8: Check fourth_image.sumwt''' build 12-Apr-2018 16:00:58 + tableName = 'fourth_image.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_16_phase_cal(self): build 12-Apr-2018 16:00:58 '''Test 12: Check phase.cal''' build 12-Apr-2018 16:00:58 tableName = 'phase.cal' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_13_phase_2_cal(self): build 12-Apr-2018 16:00:58 + def test_17_phase_2_cal(self): build 12-Apr-2018 16:00:58 '''Test 13: Check phase_2.cal''' build 12-Apr-2018 16:00:58 tableName = 'phase_2.cal' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_14_second_image_flux(self): build 12-Apr-2018 16:00:58 - '''Test 14: Check second_image.flux''' build 12-Apr-2018 16:00:58 - tableName = 'second_image.flux' build 12-Apr-2018 16:00:58 + def test_18_second_image_pb(self): build 12-Apr-2018 16:00:58 + '''Test 18: Check second_image.pb''' build 12-Apr-2018 16:00:58 + tableName = 'second_image.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_15_second_image_image(self): build 12-Apr-2018 16:00:58 - '''Test 15: Check second_image.image''' build 12-Apr-2018 16:00:58 + def test_19_second_image_image(self): build 12-Apr-2018 16:00:58 + '''Test 19: Check second_image.image''' build 12-Apr-2018 16:00:58 tableName = 'second_image.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_16_second_image_model(self): build 12-Apr-2018 16:00:58 - '''Test 16: Check second_image.model''' build 12-Apr-2018 16:00:58 + def test_20_second_image_model(self): build 12-Apr-2018 16:00:58 + '''Test 20: Check second_image.model''' build 12-Apr-2018 16:00:58 tableName = 'second_image.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_17_second_image_psf(self): build 12-Apr-2018 16:00:58 - '''Test 17: Check second_image.psf''' build 12-Apr-2018 16:00:58 + def test_21_second_image_psf(self): build 12-Apr-2018 16:00:58 + '''Test 21: Check second_image.psf''' build 12-Apr-2018 16:00:58 tableName = 'second_image.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_18_second_image_residual(self): build 12-Apr-2018 16:00:58 - '''Test 18: Check second_image.residual''' build 12-Apr-2018 16:00:58 + def test_22_second_image_residual(self): build 12-Apr-2018 16:00:58 + '''Test 22: Check second_image.residual''' build 12-Apr-2018 16:00:58 tableName = 'second_image.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_23_second_image_mask(self): build 12-Apr-2018 16:00:58 + '''Test 23: Check second_image.mask''' build 12-Apr-2018 16:00:58 + tableName = 'second_image.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_24_second_image_sumwt(self): build 12-Apr-2018 16:00:58 + '''Test 24: Check second_image.sumwt''' build 12-Apr-2018 16:00:58 + tableName = 'second_image.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_25_sis14_twhya_selfcal_ms(self): build 12-Apr-2018 16:00:58 + '''Test 25: Check sis14_twhya_selfcal.ms''' build 12-Apr-2018 16:00:58 + tableName = 'sis14_twhya_selfcal.ms' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_27_sis14_twhya_selfcal_2_ms(self): build 12-Apr-2018 16:00:58 - '''Test 27: Check sis14_twhya_selfcal_2.ms''' build 12-Apr-2018 16:00:58 + def test_26_sis14_twhya_selfcal_2_ms(self): build 12-Apr-2018 16:00:58 + '''Test 26: Check sis14_twhya_selfcal_2.ms''' build 12-Apr-2018 16:00:58 tableName = 'sis14_twhya_selfcal_2.ms' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_28_sis14_twhya_selfcal_3_ms(self): build 12-Apr-2018 16:00:58 - '''Test 28: Check sis14_twhya_selfcal_3.ms''' build 12-Apr-2018 16:00:58 + def test_27_sis14_twhya_selfcal_3_ms(self): build 12-Apr-2018 16:00:58 + '''Test 27: Check sis14_twhya_selfcal_3.ms''' build 12-Apr-2018 16:00:58 tableName = 'sis14_twhya_selfcal_3.ms' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_30_third_image_flux(self): build 12-Apr-2018 16:00:58 - '''Test 30: Check third_image.flux''' build 12-Apr-2018 16:00:58 - tableName = 'third_image.flux' build 12-Apr-2018 16:00:58 + def test_28_third_image_pb(self): build 12-Apr-2018 16:00:58 + '''Test 28: Check third_image.pb''' build 12-Apr-2018 16:00:58 + tableName = 'third_image.pb' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_31_third_image_image(self): build 12-Apr-2018 16:00:58 - '''Test 31: Check third_image.image''' build 12-Apr-2018 16:00:58 + def test_29_third_image_image(self): build 12-Apr-2018 16:00:58 + '''Test 29: Check third_image.image''' build 12-Apr-2018 16:00:58 tableName = 'third_image.image' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_32_third_image_model(self): build 12-Apr-2018 16:00:58 - '''Test 32: Check third_image.model''' build 12-Apr-2018 16:00:58 + def test_30_third_image_model(self): build 12-Apr-2018 16:00:58 + '''Test 30: Check third_image.model''' build 12-Apr-2018 16:00:58 tableName = 'third_image.model' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_33_third_image_psf(self): build 12-Apr-2018 16:00:58 - '''Test 33: Check third_image.psf''' build 12-Apr-2018 16:00:58 + def test_31_third_image_psf(self): build 12-Apr-2018 16:00:58 + '''Test 31: Check third_image.psf''' build 12-Apr-2018 16:00:58 tableName = 'third_image.psf' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test_34_third_image_residual(self): build 12-Apr-2018 16:00:58 - '''Test 34: Check third_image.residual''' build 12-Apr-2018 16:00:58 + def test_32_third_image_residual(self): build 12-Apr-2018 16:00:58 + '''Test 32: Check third_image.residual''' build 12-Apr-2018 16:00:58 tableName = 'third_image.residual' build 12-Apr-2018 16:00:58 self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_33_second_image_mask(self): build 12-Apr-2018 16:00:58 + '''Test 33: Check third_image.mask''' build 12-Apr-2018 16:00:58 + tableName = 'third_image.mask' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_34_third_image_sumwt(self): build 12-Apr-2018 16:00:58 + '''Test 34: Check third_image.sumwt''' build 12-Apr-2018 16:00:58 + tableName = 'third_image.sumwt' build 12-Apr-2018 16:00:58 + self.assertTrue(openTable(tableName)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 # Turn these tests on if Plotting is on. build 12-Apr-2018 16:00:58 #def test_35_sis14_selfcal_phase_scan_png(self): build 12-Apr-2018 16:00:58 # '''Test 35: Check sis14_selfcal_phase_scan.png''' build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_flagdata.py b/gcwrap/python/scripts/tests/test_flagdata.py build 12-Apr-2018 16:00:58 index e9716ed..96007a5 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_flagdata.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_flagdata.py build 12-Apr-2018 16:00:58 @@ -3,7 +3,7 @@ import unittest build 12-Apr-2018 16:00:58 import os build 12-Apr-2018 16:00:58 import filecmp build 12-Apr-2018 16:00:58 import pprint build 12-Apr-2018 16:00:58 -from tasks import flagcmd, flagdata, mstransform build 12-Apr-2018 16:00:58 +from tasks import flagcmd, flagdata, mstransform, setjy build 12-Apr-2018 16:00:58 from taskinit import aftool, tbtool build 12-Apr-2018 16:00:58 from __main__ import default build 12-Apr-2018 16:00:58 import exceptions build 12-Apr-2018 16:00:58 @@ -554,6 +554,10 @@ class test_rflag(test_base): build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_rflag_return_dict1(self): build 12-Apr-2018 16:00:58 '''flagdata:: Use provided value for time stats, but automatically computed value for freq. stats''' build 12-Apr-2018 16:00:58 + if testmms: build 12-Apr-2018 16:00:58 + print "Skip this test in parallel, until CAS-10202 is implemented" build 12-Apr-2018 16:00:58 + return build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 rflag_dict = flagdata(vis=self.vis, mode='rflag', field = '1', spw='10', timedev=0.1, \ build 12-Apr-2018 16:00:58 timedevscale=5.0, freqdevscale=5.0, action='calculate', flagbackup=False) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -637,7 +641,39 @@ class test_rflag(test_base): build 12-Apr-2018 16:00:58 self.assertEqual(res['report1']['antenna']['ea19']['flagged'], 18411) build 12-Apr-2018 16:00:58 self.assertEqual(res['report1']['spw']['7']['flagged'], 0,) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + def test_rflag_residuals(self): build 12-Apr-2018 16:00:58 + '''flagdata: rflag using MODEL and virtual MODEL columns''' build 12-Apr-2018 16:00:58 + from tasks import delmod build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Delete model columns, if any build 12-Apr-2018 16:00:58 + delmod(vis=self.vis,otf=True,scr=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Create MODEL_COLUMN build 12-Apr-2018 16:00:58 + setjy(vis=self.vis, field='3C286_A',usescratch=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # rflag build 12-Apr-2018 16:00:58 + flagdata(vis=self.vis, mode='rflag', spw='9,10',datacolumn='RESIDUAL_DATA',flagbackup=False) build 12-Apr-2018 16:00:58 + # 448772.0 flags on MODEL col build 12-Apr-2018 16:00:58 + # '1': {'flagged': 8224.0 build 12-Apr-2018 16:00:58 + flags_mod = flagdata(vis=self.vis, mode='summary',spw='9,10') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Now use a virtual MODEL column build 12-Apr-2018 16:00:58 + # Unflag build 12-Apr-2018 16:00:58 + flagdata(vis=self.vis, mode='unflag', flagbackup=False) build 12-Apr-2018 16:00:58 + delmod(vis=self.vis,otf=True,scr=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Create virtual MODEL_COLUMN build 12-Apr-2018 16:00:58 + setjy(vis=self.vis, field='3C286_A',usescratch=False) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # rflag build 12-Apr-2018 16:00:58 + flagdata(vis=self.vis, mode='rflag', spw='9,10',datacolumn='RESIDUAL_DATA',flagbackup=False) build 12-Apr-2018 16:00:58 + # 444576.0 flags on virtual MODEL col build 12-Apr-2018 16:00:58 + flags_vmod = flagdata(vis=self.vis, mode='summary',spw='9,10') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Flags should be the same build 12-Apr-2018 16:00:58 + self.assertTrue(flags_mod['flagged'],flags_vmod['flagged']) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 class test_shadow(test_base): build 12-Apr-2018 16:00:58 def setUp(self): build 12-Apr-2018 16:00:58 self.setUp_shadowdata2() build 12-Apr-2018 16:00:58 @@ -3573,6 +3609,63 @@ class test_preaveraging(test_base): build 12-Apr-2018 16:00:58 # Compare results build 12-Apr-2018 16:00:58 self.assertEqual(res2['flagged'], res2['flagged']) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +class test_virtual_col(test_base): build 12-Apr-2018 16:00:58 + def setUp(self): build 12-Apr-2018 16:00:58 + self.setUp_ngc5921(force=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def tearDown(self): build 12-Apr-2018 16:00:58 + os.system('rm -rf ngc5921*') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + @unittest.skip('Skip until CAS-10383 is fixed') build 12-Apr-2018 16:00:58 + def test_no_model_col(self): build 12-Apr-2018 16:00:58 + '''flagdata: catch failure when MODEL or virtual MODEL do not exist''' build 12-Apr-2018 16:00:58 + # Verify that a MODEL or virtual MODEL column do not exist in MS build 12-Apr-2018 16:00:58 + tblocal = tbtool() build 12-Apr-2018 16:00:58 + tblocal.open(self.vis) build 12-Apr-2018 16:00:58 + cols = tblocal.colnames() build 12-Apr-2018 16:00:58 + tblocal.close() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + tblocal.open(self.vis+'/SOURCE') build 12-Apr-2018 16:00:58 + cols_v = tblocal.colnames() build 12-Apr-2018 16:00:58 + tblocal.close() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.assertFalse('MODEL_DATA' in cols, 'Test cannot have a MODEL_DATA column') build 12-Apr-2018 16:00:58 + self.assertFalse('SOURCE_MODEL' in cols_v, 'Test cannot have a virtual MODEL column') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Run flagdata on it. RESIDUAL_DATA = DATA - MODEL build 12-Apr-2018 16:00:58 + flagdata(self.vis, mode='clip',datacolumn='RESIDUAL_DATA',clipminmax=[2.3,3.1],clipoutside=False) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_virtual_model_col(self): build 12-Apr-2018 16:00:58 + '''flagdata: Tests using a virtual MODEL column''' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Copy MS to new MS build 12-Apr-2018 16:00:58 + os.system('cp -RH ngc5921.ms ngc5921_virtual.ms') build 12-Apr-2018 16:00:58 + self.MSvirtual = 'ngc5921_virtual.ms' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # First, run setjy to create a virtual MODEl column (SOURCE_MODEL) build 12-Apr-2018 16:00:58 + setjy(vis=self.MSvirtual, field='1331+305*',modimage='',standard='Perley-Taylor 99', build 12-Apr-2018 16:00:58 + scalebychan=False, usescratch=False) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Verify that the virtual column exist build 12-Apr-2018 16:00:58 + import testhelper as th build 12-Apr-2018 16:00:58 + mcol = th.getColDesc(self.MSvirtual+'/SOURCE', 'SOURCE_MODEL') build 12-Apr-2018 16:00:58 + mkeys = mcol.keys() build 12-Apr-2018 16:00:58 + self.assertTrue(mkeys.__len__() > 0, 'Should have a SOURCE_MODEL column') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Run flagdata on it. RESIDUAL_DATA = DATA - MODEL build 12-Apr-2018 16:00:58 + flagdata(vis=self.MSvirtual,mode='clip',datacolumn='RESIDUAL_DATA',clipminmax=[2.3,3.1],clipoutside=False) build 12-Apr-2018 16:00:58 + res_virtual = flagdata(vis=self.MSvirtual, mode='summary')['flagged'] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Compare with a normal MODEL column flagging build 12-Apr-2018 16:00:58 + # Run setjy to create a normal MODEl column (SOURCE_MODEL) build 12-Apr-2018 16:00:58 + setjy(vis=self.vis, field='1331+305*',modimage='',standard='Perley-Taylor 99', build 12-Apr-2018 16:00:58 + scalebychan=False, usescratch=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + flagdata(vis=self.vis,mode='clip',datacolumn='RESIDUAL_DATA',clipminmax=[2.3,3.1],clipoutside=False) build 12-Apr-2018 16:00:58 + res = flagdata(vis=self.vis, mode='summary')['flagged'] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.assertEqual(res_virtual, res, 'Flagging using virtual MODEL column differs from normal MODEL column') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [test_antint, build 12-Apr-2018 16:00:58 @@ -3598,4 +3691,5 @@ def suite(): build 12-Apr-2018 16:00:58 test_tbuff, build 12-Apr-2018 16:00:58 TestMergeManualTimerange, build 12-Apr-2018 16:00:58 test_preaveraging, build 12-Apr-2018 16:00:58 + test_virtual_col, build 12-Apr-2018 16:00:58 cleanup] build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_flagmanager.py b/gcwrap/python/scripts/tests/test_flagmanager.py build 12-Apr-2018 16:00:58 index b79c244..9732f96 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_flagmanager.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_flagmanager.py build 12-Apr-2018 16:00:58 @@ -42,8 +42,6 @@ class test_base(unittest.TestCase): build 12-Apr-2018 16:00:58 def setUp_flagdatatest(self): build 12-Apr-2018 16:00:58 '''VLA data set, scan=2500~2600 spw=0 1 chan, RR,LL''' build 12-Apr-2018 16:00:58 self.vis = "flagdatatest.ms" build 12-Apr-2018 16:00:58 - if testmms: build 12-Apr-2018 16:00:58 - self.vis = "flagdatatest.mms" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if os.path.exists(self.vis): build 12-Apr-2018 16:00:58 print "The MS is already around, just unflag" build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_imcollapse.py b/gcwrap/python/scripts/tests/test_imcollapse.py build 12-Apr-2018 16:00:58 index 689c835..b6331b9 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_imcollapse.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_imcollapse.py build 12-Apr-2018 16:00:58 @@ -692,5 +692,15 @@ class imcollapse_test(unittest.TestCase): build 12-Apr-2018 16:00:58 self.assertTrue(xx) build 12-Apr-2018 16:00:58 xx.done() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_CAS_11230(self): build 12-Apr-2018 16:00:58 + """Verify output image has correct shape when 0,0 included in region box""" build 12-Apr-2018 16:00:58 + myia = iatool() build 12-Apr-2018 16:00:58 + myia.fromshape("",[20,20,20]) build 12-Apr-2018 16:00:58 + xx = myia.collapse(function="mean",axes=2,region="box[[0pix,0pix],[19pix,19pix]]") build 12-Apr-2018 16:00:58 + shape = xx.shape() build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + xx.done() build 12-Apr-2018 16:00:58 + self.assertTrue((shape == [20, 20, 1]).all(), "wrong shape") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [imcollapse_test] build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_immoments.py b/gcwrap/python/scripts/tests/test_immoments.py build 12-Apr-2018 16:00:58 index 27eb099..b4120c8 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_immoments.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_immoments.py build 12-Apr-2018 16:00:58 @@ -1384,6 +1384,24 @@ class immoment_test2(unittest.TestCase): build 12-Apr-2018 16:00:58 myia.done() build 12-Apr-2018 16:00:58 bb.done() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_CAS_11195(self): build 12-Apr-2018 16:00:58 + """Verify array initialization bug created and fixed in CAS-11195""" build 12-Apr-2018 16:00:58 + myia = iatool() build 12-Apr-2018 16:00:58 + myia.fromshape("", [20, 20, 20]) build 12-Apr-2018 16:00:58 + myia.addnoise() build 12-Apr-2018 16:00:58 + pix = myia.getchunk() build 12-Apr-2018 16:00:58 + mmax = pix.max(axis=2) build 12-Apr-2018 16:00:58 + mmin = pix.min(axis=2) build 12-Apr-2018 16:00:58 + outfile = "CAS-11195.im" build 12-Apr-2018 16:00:58 + mom8 = myia.moments(outfile=outfile, moments=[8, 10]) build 12-Apr-2018 16:00:58 + myia.open(outfile + ".minimum") build 12-Apr-2018 16:00:58 + pmax = mom8.getchunk() build 12-Apr-2018 16:00:58 + pmin = myia.getchunk() build 12-Apr-2018 16:00:58 + mom8.done() build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + self.assertTrue((pmax == mmax).all(), "Error in moment 8") build 12-Apr-2018 16:00:58 + self.assertTrue((pmin == mmin).all(), "Error in moment 10") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [immoment_test1,immoment_test2] build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_importasdm.py b/gcwrap/python/scripts/tests/test_importasdm.py build 12-Apr-2018 16:00:58 index 2c7ba96..9683244 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_importasdm.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_importasdm.py build 12-Apr-2018 16:00:58 @@ -29,6 +29,7 @@ build 12-Apr-2018 16:00:58 import os build 12-Apr-2018 16:00:58 import sys build 12-Apr-2018 16:00:58 import shutil build 12-Apr-2018 16:00:58 +import numpy build 12-Apr-2018 16:00:58 from __main__ import default build 12-Apr-2018 16:00:58 from tasks import importasdm, flagdata, exportasdm, flagcmd build 12-Apr-2018 16:00:58 from taskinit import mstool, tbtool, cbtool build 12-Apr-2018 16:00:58 @@ -236,7 +237,6 @@ class asdm_import1(test_base): build 12-Apr-2018 16:00:58 shutil.rmtree(msname,ignore_errors=True) build 12-Apr-2018 16:00:58 shutil.rmtree(msname+'.flagversions',ignore_errors=True) build 12-Apr-2018 16:00:58 os.system('rm -rf reimported-M51.ms*') build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test1(self): build 12-Apr-2018 16:00:58 '''Asdm-import: Test good v1.2 input with filler v3 and inverse filler v3 ''' build 12-Apr-2018 16:00:58 @@ -1446,7 +1446,7 @@ class asdm_import7(test_base): build 12-Apr-2018 16:00:58 myasdmname = 'uid___A002_X6218fb_X264' build 12-Apr-2018 16:00:58 themsname = myasdmname+".ms" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - self.res = importasdm(myasdmname, vis=themsname, ocorr_mode="ao", lazy=True) build 12-Apr-2018 16:00:58 + self.res = importasdm(myasdmname, vis=themsname, ocorr_mode="ao", bdfflags=True, applyflags=True, lazy=True) build 12-Apr-2018 16:00:58 self.assertEqual(self.res, None) build 12-Apr-2018 16:00:58 print myname, ": Success! Now checking output ..." build 12-Apr-2018 16:00:58 mscomponents = set(["ANTENNA/table.dat", build 12-Apr-2018 16:00:58 @@ -1511,7 +1511,7 @@ class asdm_import7(test_base): build 12-Apr-2018 16:00:58 mslocal.close() build 12-Apr-2018 16:00:58 print myname, ": OK. Checking tables in detail ..." build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - importasdm(asdm="moved_"+myasdmname, vis='reference.ms', ocorr_mode="ao", lazy=False, overwrite=True) build 12-Apr-2018 16:00:58 + importasdm(asdm="moved_"+myasdmname, vis='reference.ms', ocorr_mode="ao", lazy=False, bdfflags=True, applyflags=True, overwrite=True) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 if(os.path.exists('reference.ms')): build 12-Apr-2018 16:00:58 retValue['success'] = th.checkwithtaql("select from [select from reference.ms orderby TIME, DATA_DESC_ID, ANTENNA1, ANTENNA2 ] t1, [select from " build 12-Apr-2018 16:00:58 @@ -1580,6 +1580,314 @@ class asdm_import7(test_base): build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 self.assertTrue(retValue['success'],retValue['error_msgs']) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test7_skiprows1(self): build 12-Apr-2018 16:00:58 + '''Asdm-import: Test TP asdm, comparing output when duplicate DATA rows are skipped versus not-skipped, lazy and regular, with bdflagging on''' build 12-Apr-2018 16:00:58 + retValue = {'success': True, 'msgs': "", 'error_msgs': '' } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + myasdmname = 'uid___A002_X6218fb_X264' build 12-Apr-2018 16:00:58 + themsname = myasdmname+".ms" build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # the same tests are done for lazy being False and True build 12-Apr-2018 16:00:58 + for lazy in [False, True]: build 12-Apr-2018 16:00:58 + print myname," Test loop with lazy = ",lazy build 12-Apr-2018 16:00:58 + # always start with a clean slate build 12-Apr-2018 16:00:58 + shutil.rmtree(themsname,True) build 12-Apr-2018 16:00:58 + shutil.rmtree('referemce.ms',True) build 12-Apr-2018 16:00:58 + # use importasdm, which always looks for and skips duplicate DATA rows. build 12-Apr-2018 16:00:58 + self.res = importasdm(myasdmname, vis=themsname, ocorr_mode="ao", bdfflags=True, lazy=lazy, overwrite=True) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res, None) build 12-Apr-2018 16:00:58 + print myname,": Success! Now checking output ..." build 12-Apr-2018 16:00:58 + mscomponents = set(["ANTENNA/table.dat", build 12-Apr-2018 16:00:58 + "CALDEVICE/table.dat", build 12-Apr-2018 16:00:58 + "DATA_DESCRIPTION/table.dat", build 12-Apr-2018 16:00:58 + "FEED/table.dat", build 12-Apr-2018 16:00:58 + "FIELD/table.dat", build 12-Apr-2018 16:00:58 + "FLAG_CMD/table.dat", build 12-Apr-2018 16:00:58 + "HISTORY/table.dat", build 12-Apr-2018 16:00:58 + "OBSERVATION/table.dat", build 12-Apr-2018 16:00:58 + "POINTING/table.dat", build 12-Apr-2018 16:00:58 + "POLARIZATION/table.dat", build 12-Apr-2018 16:00:58 + "PROCESSOR/table.dat", build 12-Apr-2018 16:00:58 + "SOURCE/table.dat", build 12-Apr-2018 16:00:58 + "SPECTRAL_WINDOW/table.dat", build 12-Apr-2018 16:00:58 + "STATE/table.dat", build 12-Apr-2018 16:00:58 + "SYSCAL/table.dat", build 12-Apr-2018 16:00:58 + "SYSPOWER/table.dat", build 12-Apr-2018 16:00:58 + "WEATHER/table.dat", build 12-Apr-2018 16:00:58 + "ANTENNA/table.f0", build 12-Apr-2018 16:00:58 + "CALDEVICE/table.f0", build 12-Apr-2018 16:00:58 + "DATA_DESCRIPTION/table.f0", build 12-Apr-2018 16:00:58 + "FEED/table.f0", build 12-Apr-2018 16:00:58 + "FIELD/table.f0", build 12-Apr-2018 16:00:58 + "FLAG_CMD/table.f0", build 12-Apr-2018 16:00:58 + "HISTORY/table.f0", build 12-Apr-2018 16:00:58 + "OBSERVATION/table.f0", build 12-Apr-2018 16:00:58 + "POINTING/table.f0", build 12-Apr-2018 16:00:58 + "POLARIZATION/table.f0", build 12-Apr-2018 16:00:58 + "PROCESSOR/table.f0", build 12-Apr-2018 16:00:58 + "SOURCE/table.f0", build 12-Apr-2018 16:00:58 + "SPECTRAL_WINDOW/table.f0", build 12-Apr-2018 16:00:58 + "STATE/table.f0", build 12-Apr-2018 16:00:58 + "SYSCAL/table.f0", build 12-Apr-2018 16:00:58 + "SYSPOWER/table.f0", build 12-Apr-2018 16:00:58 + "WEATHER/table.f0" build 12-Apr-2018 16:00:58 + ]) build 12-Apr-2018 16:00:58 + for name in mscomponents: build 12-Apr-2018 16:00:58 + if not os.access(themsname+"/"+name, os.F_OK): build 12-Apr-2018 16:00:58 + print myname, ": Error ", themsname+"/"+name, "doesn't exist ..." build 12-Apr-2018 16:00:58 + retValue['success']=False build 12-Apr-2018 16:00:58 + retValue['error_msgs']=retValue['error_msgs']+themsname+'/'+name+' does not exist' build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + print myname, ": ", name, "present." build 12-Apr-2018 16:00:58 + print myname, ": MS exists. All tables present. Try opening as MS ..." build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + mslocal.open(themsname) build 12-Apr-2018 16:00:58 + print myname, ": MS can be opened" build 12-Apr-2018 16:00:58 + mslocal.close() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + except: build 12-Apr-2018 16:00:58 + print myname, ": Error Cannot open MS table", themsname build 12-Apr-2018 16:00:58 + retValue['success']=False build 12-Apr-2018 16:00:58 + retValue['error_msgs']=retValue['error_msgs']+'Cannot open MS table '+themsname build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + print myname, ": OK. Generating a reference MS with first integration checking turned off" build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # this must be done using asdm2MS and bdflags2MS directly build 12-Apr-2018 16:00:58 + asdm2MScmd = 'asdm2MS --ocm "ao" --checkdupints false' build 12-Apr-2018 16:00:58 + if lazy: build 12-Apr-2018 16:00:58 + asdm2MScmd = asdm2MScmd + " -lazy" build 12-Apr-2018 16:00:58 + asdm2MScmd = asdm2MScmd + " " + myasdmname + " reference.ms" build 12-Apr-2018 16:00:58 + print myname,'Running asdm2MS standalone invoked as:' build 12-Apr-2018 16:00:58 + print asdm2MScmd build 12-Apr-2018 16:00:58 + exitcode = os.system(asdm2MScmd) build 12-Apr-2018 16:00:58 + if exitcode != 0: build 12-Apr-2018 16:00:58 + print myname,"asdm2MS terminated with exit code ",exitcode build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msgs']=retValue['error_msgs']+' standalone execution of asdm2MS failed' build 12-Apr-2018 16:00:58 + # this should break out of the main loop over lazy values build 12-Apr-2018 16:00:58 + break build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + bdflags2MScmd = 'bdflags2MS -f ALL --ocm "ao" --checkdupints false' build 12-Apr-2018 16:00:58 + if lazy: build 12-Apr-2018 16:00:58 + bdflags2MScmd = bdflags2MScmd + " -lazy=true" build 12-Apr-2018 16:00:58 + bdflags2MScmd = bdflags2MScmd + " " + myasdmname + " reference.ms" build 12-Apr-2018 16:00:58 + print myname,'Running bdflags2MS standalone invoked as:' build 12-Apr-2018 16:00:58 + print bdflags2MScmd build 12-Apr-2018 16:00:58 + exitcode = os.system(bdflags2MScmd) build 12-Apr-2018 16:00:58 + if exitcode != 0: build 12-Apr-2018 16:00:58 + print myname,"bdflags2MS terminated with exit code ",exitcode build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msgs']=retValue['error_msgs']+' standalone execution of bdflags2MS failed' build 12-Apr-2018 16:00:58 + # this should break out of the main loop over lazy values build 12-Apr-2018 16:00:58 + break build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # at this point, reference.ms should exist, with all of the auto rows (ao), including duplicates, with BDF flags applied build 12-Apr-2018 16:00:58 + if(os.path.exists('reference.ms')): build 12-Apr-2018 16:00:58 + # and the test here is to make sure that the two MSs are identical in the Main table. The same values in build 12-Apr-2018 16:00:58 + # the same order except for gaps where rows from the larger table are skipped. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # expected size (rows) build 12-Apr-2018 16:00:58 + msSize = 31972 build 12-Apr-2018 16:00:58 + refSize = 32040 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # expected gaps start at these rows and are always 4 rows long, row numbers in reference.ms build 12-Apr-2018 16:00:58 + gaps = [2280,3176,5328,7120,9276,10172,11432,12328,14480,15376,18752,19648,21800,26636,27896,28792,30944] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + mstb = tbtool() build 12-Apr-2018 16:00:58 + mstb.open(themsname) build 12-Apr-2018 16:00:58 + if mstb.nrows() != msSize: build 12-Apr-2018 16:00:58 + print myname,'MS size is not of the expected number of rows : ',mstb.nrows(),' != ',msSize build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msgs'] = retValue['error_msgs'] + 'bad size for MS' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + reftb = tbtool() build 12-Apr-2018 16:00:58 + reftb.open('reference.ms') build 12-Apr-2018 16:00:58 + if reftb.nrows() != refSize: build 12-Apr-2018 16:00:58 + print myname,'Reference MS size is not of the expected number of rows : ',reftb.nrows(),' != ',refSize build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msgs'] = retValue['error_msgs'] + 'bad size for reference MS' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if retValue['success']: build 12-Apr-2018 16:00:58 + refrow = 0 build 12-Apr-2018 16:00:58 + msrow = 0 build 12-Apr-2018 16:00:58 + gapStart = -1 build 12-Apr-2018 16:00:58 + gapIndex = -1 build 12-Apr-2018 16:00:58 + # assumes set of column names is the same build 12-Apr-2018 16:00:58 + cols = mstb.colnames() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + while((msrow < mstb.nrows()) and (refrow < reftb.nrows())): build 12-Apr-2018 16:00:58 + matchFound = True build 12-Apr-2018 16:00:58 + for col in cols: build 12-Apr-2018 16:00:58 + if mstb.iscelldefined(col,msrow) != reftb.iscelldefined(col,refrow): build 12-Apr-2018 16:00:58 + # defined in one cell, not defined in the other build 12-Apr-2018 16:00:58 + matchFound = False build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + if (mstb.iscelldefined(col,msrow)): build 12-Apr-2018 16:00:58 + msVal = mstb.getcell(col,msrow) build 12-Apr-2018 16:00:58 + refVal = reftb.getcell(col,refrow) build 12-Apr-2018 16:00:58 + # assumes the type is the same for the same column in both tables build 12-Apr-2018 16:00:58 + if isinstance(msVal,numpy.ndarray): build 12-Apr-2018 16:00:58 + matchFound = numpy.array_equal(msVal,refVal) build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + matchFound = msVal == refVal build 12-Apr-2018 16:00:58 + if not matchFound: build 12-Apr-2018 16:00:58 + # no point in checking the other columns build 12-Apr-2018 16:00:58 + break build 12-Apr-2018 16:00:58 + if matchFound: build 12-Apr-2018 16:00:58 + if gapStart >= 0: build 12-Apr-2018 16:00:58 + # a gap has ended, verify that it was exactly 4 rows long build 12-Apr-2018 16:00:58 + if (refrow-gapStart) != 4: build 12-Apr-2018 16:00:58 + print myname,'Unexpected gap length not equal to 4 rows. Gap length = ',(refrow-gapStart),' starting at row ',refRow build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msg'] = 'Unexpected gap length not equal to 4 rows' build 12-Apr-2018 16:00:58 + gapStart = -1 build 12-Apr-2018 16:00:58 + msrow = msrow + 1 build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + # do not increment msrow in this case, keep looking for a match build 12-Apr-2018 16:00:58 + if gapStart < 0: build 12-Apr-2018 16:00:58 + # new gap, increment index and verify it's at the expected place build 12-Apr-2018 16:00:58 + gapIndex = gapIndex+1 build 12-Apr-2018 16:00:58 + gapStart = refrow build 12-Apr-2018 16:00:58 + if gapIndex > len(gaps): build 12-Apr-2018 16:00:58 + print myname,'Unexpected gap seen past end of known gaps. Starting at row ',refrow build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msg'] = 'Unexpected gap after end of known gaps' build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + if gapStart != gaps[gapIndex]: build 12-Apr-2018 16:00:58 + print myname,'Unexpected gap start at row ',gapStart,' expected at row ',gaps[gapIndex] build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + retValue['error_msg'] = 'Unexpected gap start row' build 12-Apr-2018 16:00:58 + # refrow is always incremented build 12-Apr-2018 16:00:58 + refrow = refrow + 1 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # bail out on failure build 12-Apr-2018 16:00:58 + if not retValue['success']: build 12-Apr-2018 16:00:58 + break build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + reftb.close() build 12-Apr-2018 16:00:58 + mstb.close() build 12-Apr-2018 16:00:58 + # break out of the lazy loop on failure build 12-Apr-2018 16:00:58 + if not retValue['success']: build 12-Apr-2018 16:00:58 + break build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.assertTrue(retValue['success'],retValue['error_msgs']) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test7_bdflags1(self): build 12-Apr-2018 16:00:58 + '''Asdm-import: Test good 12 m ASDM with mixed pol/channelisation input with default filler selecting "co" on output and using the BDF flags''' build 12-Apr-2018 16:00:58 + retValue = {'success': True, 'msgs': "", 'error_msgs': '' } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + myasdmname = 'uid___A002_X71e4ae_X317_short' build 12-Apr-2018 16:00:58 + themsname = myasdmname+".ms" build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.res = importasdm(myasdmname, vis=themsname, ocorr_mode="co", bdfflags=True) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res, None) build 12-Apr-2018 16:00:58 + print myname, ": Success! Now checking output ..." build 12-Apr-2018 16:00:58 + mscomponents = set(["ANTENNA/table.dat", build 12-Apr-2018 16:00:58 + "DATA_DESCRIPTION/table.dat", build 12-Apr-2018 16:00:58 + "FEED/table.dat", build 12-Apr-2018 16:00:58 + "FIELD/table.dat", build 12-Apr-2018 16:00:58 + "FLAG_CMD/table.dat", build 12-Apr-2018 16:00:58 + "HISTORY/table.dat", build 12-Apr-2018 16:00:58 + "OBSERVATION/table.dat", build 12-Apr-2018 16:00:58 + "POINTING/table.dat", build 12-Apr-2018 16:00:58 + "POLARIZATION/table.dat", build 12-Apr-2018 16:00:58 + "PROCESSOR/table.dat", build 12-Apr-2018 16:00:58 + "SOURCE/table.dat", build 12-Apr-2018 16:00:58 + "SPECTRAL_WINDOW/table.dat", build 12-Apr-2018 16:00:58 + "STATE/table.dat", build 12-Apr-2018 16:00:58 + "SYSCAL/table.dat", build 12-Apr-2018 16:00:58 + "ANTENNA/table.f0", build 12-Apr-2018 16:00:58 + "DATA_DESCRIPTION/table.f0", build 12-Apr-2018 16:00:58 + "FEED/table.f0", build 12-Apr-2018 16:00:58 + "FIELD/table.f0", build 12-Apr-2018 16:00:58 + "FLAG_CMD/table.f0", build 12-Apr-2018 16:00:58 + "HISTORY/table.f0", build 12-Apr-2018 16:00:58 + "OBSERVATION/table.f0", build 12-Apr-2018 16:00:58 + "POINTING/table.f0", build 12-Apr-2018 16:00:58 + "POLARIZATION/table.f0", build 12-Apr-2018 16:00:58 + "PROCESSOR/table.f0", build 12-Apr-2018 16:00:58 + "SOURCE/table.f0", build 12-Apr-2018 16:00:58 + "SPECTRAL_WINDOW/table.f0", build 12-Apr-2018 16:00:58 + "STATE/table.f0", build 12-Apr-2018 16:00:58 + "SYSCAL/table.f0" build 12-Apr-2018 16:00:58 + ]) build 12-Apr-2018 16:00:58 + for name in mscomponents: build 12-Apr-2018 16:00:58 + if not os.access(themsname+"/"+name, os.F_OK): build 12-Apr-2018 16:00:58 + print myname, ": Error ", themsname+"/"+name, "doesn't exist ..." build 12-Apr-2018 16:00:58 + retValue['success']=False build 12-Apr-2018 16:00:58 + retValue['error_msgs']=retValue['error_msgs']+themsname+'/'+name+' does not exist' build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + print myname, ": ", name, "present." build 12-Apr-2018 16:00:58 + print myname, ": MS exists. All tables present. Try opening as MS ..." build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + mslocal.open(themsname) build 12-Apr-2018 16:00:58 + except: build 12-Apr-2018 16:00:58 + print myname, ": Error Cannot open MS table", themsname build 12-Apr-2018 16:00:58 + retValue['success']=False build 12-Apr-2018 16:00:58 + retValue['error_msgs']=retValue['error_msgs']+'Cannot open MS table '+themsname build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + mslocal.close() build 12-Apr-2018 16:00:58 + print myname, ": OK. Checking tables in detail ..." build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + importasdm(asdm=myasdmname, vis='reference.ms', overwrite=True, ocorr_mode="co", bdfflags=False) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + if(os.path.exists('reference.ms')): build 12-Apr-2018 16:00:58 + retValue['success'] = th.checkwithtaql("select from [select from reference.ms orderby TIME, DATA_DESC_ID, ANTENNA1, ANTENNA2 ] t1, [select from " build 12-Apr-2018 16:00:58 + +themsname+" orderby TIME, DATA_DESC_ID, ANTENNA1, ANTENNA2 ] t2 where (not all(near(t1.DATA,t2.DATA, 1.e-06)))") == 0 build 12-Apr-2018 16:00:58 + if not retValue['success']: build 12-Apr-2018 16:00:58 + print "ERROR: DATA does not agree with reference." build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + print "DATA columns agree." build 12-Apr-2018 16:00:58 + retValueTmp = th.checkwithtaql("select from [select from reference.ms orderby TIME, DATA_DESC_ID, ANTENNA1, ANTENNA2 ] t1, [select from " build 12-Apr-2018 16:00:58 + +themsname+" orderby TIME, DATA_DESC_ID, ANTENNA1, ANTENNA2 ] t2 where (not all(t1.FLAG==t2.FLAG)) ") != 0 build 12-Apr-2018 16:00:58 + if not retValueTmp: build 12-Apr-2018 16:00:58 + print "ERROR: FLAG columns do agree with reference but they shouldn't." build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + print "FLAG columns do not agree as expected." build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + retValue['success'] = retValue['success'] and retValueTmp build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + for subtname in ["ANTENNA", build 12-Apr-2018 16:00:58 + "DATA_DESCRIPTION", build 12-Apr-2018 16:00:58 + "FEED", build 12-Apr-2018 16:00:58 + "FIELD", build 12-Apr-2018 16:00:58 + "FLAG_CMD", build 12-Apr-2018 16:00:58 + "OBSERVATION", build 12-Apr-2018 16:00:58 + "POLARIZATION", build 12-Apr-2018 16:00:58 + "PROCESSOR", build 12-Apr-2018 16:00:58 + "SOURCE", build 12-Apr-2018 16:00:58 + "SPECTRAL_WINDOW", build 12-Apr-2018 16:00:58 + "STATE", build 12-Apr-2018 16:00:58 + "SYSCAL"]: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + print "\n*** Subtable ",subtname build 12-Apr-2018 16:00:58 + excllist = [] build 12-Apr-2018 16:00:58 + if subtname=='SOURCE': build 12-Apr-2018 16:00:58 + excllist=['POSITION', 'TRANSITION', 'REST_FREQUENCY', 'SYSVEL'] build 12-Apr-2018 16:00:58 + if subtname=='SYSCAL': build 12-Apr-2018 16:00:58 + excllist=['TANT_SPECTRUM', 'TANT_TSYS_SPECTRUM'] build 12-Apr-2018 16:00:58 + if subtname=='SPECTRAL_WINDOW': build 12-Apr-2018 16:00:58 + excllist=['CHAN_FREQ', 'CHAN_WIDTH', 'EFFECTIVE_BW', 'RESOLUTION', 'ASSOC_SPW_ID', 'ASSOC_NATURE'] build 12-Apr-2018 16:00:58 + for colname in excllist: build 12-Apr-2018 16:00:58 + if colname!='ASSOC_NATURE': build 12-Apr-2018 16:00:58 + retValue['success'] = th.compVarColTables('reference.ms/SPECTRAL_WINDOW', build 12-Apr-2018 16:00:58 + themsname+'/SPECTRAL_WINDOW', colname, 0.01) and retValue['success'] build 12-Apr-2018 16:00:58 + if subtname=='POLARIZATION': build 12-Apr-2018 16:00:58 + excllist=['CORR_TYPE', 'CORR_PRODUCT'] build 12-Apr-2018 16:00:58 + for colname in excllist: build 12-Apr-2018 16:00:58 + retValue['success'] = th.compVarColTables('reference.ms/POLARIZATION', build 12-Apr-2018 16:00:58 + themsname+'/POLARIZATION', colname, 0.01) and retValue['success'] build 12-Apr-2018 16:00:58 + try: build 12-Apr-2018 16:00:58 + retValue['success'] = th.compTables('reference.ms/'+subtname, build 12-Apr-2018 16:00:58 + themsname+'/'+subtname, excllist, build 12-Apr-2018 16:00:58 + 0.01) and retValue['success'] build 12-Apr-2018 16:00:58 + except: build 12-Apr-2018 16:00:58 + retValue['success'] = False build 12-Apr-2018 16:00:58 + print "ERROR for table ", subtname build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.assertTrue(retValue['success'],retValue['error_msgs']) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [asdm_import1, build 12-Apr-2018 16:00:58 asdm_import2, build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_imsmooth.py b/gcwrap/python/scripts/tests/test_imsmooth.py build 12-Apr-2018 16:00:58 index 6ebae00..2f14f4d 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_imsmooth.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_imsmooth.py build 12-Apr-2018 16:00:58 @@ -1413,13 +1413,33 @@ class imsmooth_test(unittest.TestCase): build 12-Apr-2018 16:00:58 def test_history(self): build 12-Apr-2018 16:00:58 """Test that history is written""" build 12-Apr-2018 16:00:58 myia = self.ia build 12-Apr-2018 16:00:58 - myia.fromshape("", [20,20]) build 12-Apr-2018 16:00:58 - bb = myia.convolve2d("", major="2arcmin", minor="2arcmin", pa="0deg") build 12-Apr-2018 16:00:58 + imagename = "zz.im" build 12-Apr-2018 16:00:58 + myia.fromshape(imagename, [20,20]) build 12-Apr-2018 16:00:58 + major = "2arcmin" build 12-Apr-2018 16:00:58 + minor = "2arcmin" build 12-Apr-2018 16:00:58 + pa = "0deg" build 12-Apr-2018 16:00:58 + bb = myia.convolve2d("", major=major, minor=minor, pa=pa) build 12-Apr-2018 16:00:58 myia.done() build 12-Apr-2018 16:00:58 msgs = bb.history() build 12-Apr-2018 16:00:58 bb.done() build 12-Apr-2018 16:00:58 - self.assertTrue("ia.convolve2d" in msgs[-4]) build 12-Apr-2018 16:00:58 - self.assertTrue("ia.convolve2d" in msgs[-3]) build 12-Apr-2018 16:00:58 + teststr = "ia.convolve2d" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-4], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-3], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + outfile = "zz_out.im" build 12-Apr-2018 16:00:58 + self.assertTrue( build 12-Apr-2018 16:00:58 + imsmooth( build 12-Apr-2018 16:00:58 + imagename=imagename, outfile=outfile, build 12-Apr-2018 16:00:58 + major=major, minor=minor, pa=pa build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + myia.open(outfile) build 12-Apr-2018 16:00:58 + msgs = myia.history() build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + teststr = "version" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-2], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + teststr = "imsmooth" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-1], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [imsmooth_test] build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_imstat.py b/gcwrap/python/scripts/tests/test_imstat.py build 12-Apr-2018 16:00:58 index 7417a66..5deba55 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_imstat.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_imstat.py build 12-Apr-2018 16:00:58 @@ -726,11 +726,35 @@ class imstat_test(unittest.TestCase): build 12-Apr-2018 16:00:58 """Test fix to CAS-10906, accouting issue when computing median""" build 12-Apr-2018 16:00:58 myia = iatool() build 12-Apr-2018 16:00:58 imagename = self.datapath + "CAS-10906.im" build 12-Apr-2018 16:00:58 - print imagename build 12-Apr-2018 16:00:58 myia.open(imagename) build 12-Apr-2018 16:00:58 # running successfully verifies that the issue has been resolved build 12-Apr-2018 16:00:58 self.assertTrue(myia.statistics(robust=True)) build 12-Apr-2018 16:00:58 myia.done() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_biweight(self): build 12-Apr-2018 16:00:58 + """Test biweight algorithm CAS-11100""" build 12-Apr-2018 16:00:58 + myia = iatool() build 12-Apr-2018 16:00:58 + imagename = self.datapath + "biweight_test.im" build 12-Apr-2018 16:00:58 + for i in (0, 1): build 12-Apr-2018 16:00:58 + for niter in (20, 2, -1): build 12-Apr-2018 16:00:58 + if i == 0: build 12-Apr-2018 16:00:58 + myia.open(imagename) build 12-Apr-2018 16:00:58 + res = myia.statistics(algorithm='b', niter=niter) build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + else: build 12-Apr-2018 16:00:58 + res = imstat(imagename=imagename, algorithm='b', niter=niter) build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['min'][0], -5.48938513) build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['max'][0], 104.80391693) build 12-Apr-2018 16:00:58 + self.assertEqual(res['npts'][0], 1.25000000e+08) build 12-Apr-2018 16:00:58 + if niter == 20: build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['sigma'][0], 1.02012422703) build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['mean'][0], -5.43024227e-06) build 12-Apr-2018 16:00:58 + elif niter == 2: build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['sigma'][0], 1.02012435686) build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['mean'][0], 0.00026525095639) build 12-Apr-2018 16:00:58 + elif niter == -1: build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['sigma'][0], 1.02031194) build 12-Apr-2018 16:00:58 + self.assertAlmostEqual(res['mean'][0], 0.00284497) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [imstat_test] build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_imtrans.py b/gcwrap/python/scripts/tests/test_imtrans.py build 12-Apr-2018 16:00:58 index 0895f94..b9ca932 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_imtrans.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_imtrans.py build 12-Apr-2018 16:00:58 @@ -211,13 +211,28 @@ class imtrans_test(unittest.TestCase): build 12-Apr-2018 16:00:58 def test_history(self): build 12-Apr-2018 16:00:58 """Test history records are written""" build 12-Apr-2018 16:00:58 myia = iatool() build 12-Apr-2018 16:00:58 - myia.fromshape("", [10,10,4,10]) build 12-Apr-2018 16:00:58 - kk = myia.transpose("","3210") build 12-Apr-2018 16:00:58 + imagename = "zz.im" build 12-Apr-2018 16:00:58 + myia.fromshape(imagename, [10,10,4,10]) build 12-Apr-2018 16:00:58 + order = "3210" build 12-Apr-2018 16:00:58 + kk = myia.transpose("",order=order) build 12-Apr-2018 16:00:58 myia.done() build 12-Apr-2018 16:00:58 msgs = kk.history() build 12-Apr-2018 16:00:58 kk.done() build 12-Apr-2018 16:00:58 - self.assertTrue("ia.transpose" in msgs[-2]) build 12-Apr-2018 16:00:58 - self.assertTrue("ia.transpose" in msgs[-1]) build 12-Apr-2018 16:00:58 + teststr = "ia.transpose" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-2], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-1], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + outfile = "zz_out.im" build 12-Apr-2018 16:00:58 + self.assertTrue( build 12-Apr-2018 16:00:58 + imtrans(imagename=imagename, outfile=outfile, order=order) build 12-Apr-2018 16:00:58 + ) build 12-Apr-2018 16:00:58 + myia.open(outfile) build 12-Apr-2018 16:00:58 + msgs = myia.history() build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + teststr = "version" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-2], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + teststr = "imtrans" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-1], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_imageinfo(self): build 12-Apr-2018 16:00:58 """Verify image info is copied""" build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_mstool.py b/gcwrap/python/scripts/tests/test_mstool.py build 12-Apr-2018 16:00:58 index 8431d91..6c08204 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_mstool.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_mstool.py build 12-Apr-2018 16:00:58 @@ -34,7 +34,7 @@ import shutil build 12-Apr-2018 16:00:58 import os build 12-Apr-2018 16:00:58 import time build 12-Apr-2018 16:00:58 import unittest build 12-Apr-2018 16:00:58 -from numpy import array, testing, where build 12-Apr-2018 16:00:58 +from numpy import array, ndarray, testing, where build 12-Apr-2018 16:00:58 from math import ceil build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 from taskinit import mstool, cbtool build 12-Apr-2018 16:00:58 @@ -497,6 +497,37 @@ class mstool_test_select(mstool_test_base): build 12-Apr-2018 16:00:58 self.assertAlmostEqual(rec['data'][0][0][0], (2.7459716796875+0j)) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_select_getdata_empty(self): build 12-Apr-2018 16:00:58 + """test ms.select() and ms.getdata() with empty selection""" build 12-Apr-2018 16:00:58 + self.assertTrue(self.ms.selectinit()) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.nrow(True), 22653) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # This ms has scans 1-7 only. casacore will throw a MSSelectionNullSelection build 12-Apr-2018 16:00:58 + # ms.msselect should return false and the selection set to empty=0 rows build 12-Apr-2018 16:00:58 + field = 'N5921_2' build 12-Apr-2018 16:00:58 + scan = '9999' build 12-Apr-2018 16:00:58 + sel={'field': field, 'scan': scan} build 12-Apr-2018 16:00:58 + total_rows = 22653 build 12-Apr-2018 16:00:58 + self.assertEqual(False, self.ms.msselect(sel)) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.nrow(True), 0) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.nrow(), total_rows) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.msselectedindices()['field'].size, 1) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.msselectedindices()['field'][0], 2) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.msselectedindices()['scan'].size, 1) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.msselectedindices()['scan'][0], int(scan)) build 12-Apr-2018 16:00:58 + # ms.getdata should handle the empty selection gracefully and return an empty dict build 12-Apr-2018 16:00:58 + self.assertEqual({}, self.ms.getdata(["axis_info", "data"])) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.ms.reset() build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.nrow(True), total_rows) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.nrow(False), total_rows) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.msselectedindices()['field'].size, 0) build 12-Apr-2018 16:00:58 + self.assertEqual(self.ms.msselectedindices()['scan'].size, 0) build 12-Apr-2018 16:00:58 + get_res = self.ms.getdata(["axis_info", "data"]) build 12-Apr-2018 16:00:58 + self.assertTrue('data' in get_res) build 12-Apr-2018 16:00:58 + self.assertEqual(type(get_res['data']), ndarray) build 12-Apr-2018 16:00:58 + self.assertEqual(get_res['data'].shape, (2, 63, 22653)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 def test_msseltoindex(self): build 12-Apr-2018 16:00:58 """test ms.msseltoindex""" build 12-Apr-2018 16:00:58 # select field id 2 build 12-Apr-2018 16:00:58 @@ -504,6 +535,7 @@ class mstool_test_select(mstool_test_base): build 12-Apr-2018 16:00:58 self.assertEqual(rec['field'], [2]) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 # ------------------------------------------------------------------------------ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 class mstool_test_transform(mstool_test_base): build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_mstransform.py b/gcwrap/python/scripts/tests/test_mstransform.py build 12-Apr-2018 16:00:58 index a77d636..36ad9c6 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_mstransform.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_mstransform.py build 12-Apr-2018 16:00:58 @@ -2555,6 +2555,44 @@ class test_polarization_reindex(test_base): build 12-Apr-2018 16:00:58 summary = flagdata(vis=self.outputms,mode='summary') build 12-Apr-2018 16:00:58 self.assertTrue(summary.has_key('correlation'), 'Flagdata failure due to missformated MS') build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +class test_antenna_reindexing(test_base): build 12-Apr-2018 16:00:58 + '''Test to check proper reindex of subtables''' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def setUp(self): build 12-Apr-2018 16:00:58 + self.setUp_CAS_7259() build 12-Apr-2018 16:00:58 + self.outvis = 'test_reindex_antenna_subtable.ms' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def tearDown(self): build 12-Apr-2018 16:00:58 + os.system('rm -rf '+ self.vis) build 12-Apr-2018 16:00:58 + os.system('rm -rf '+ self.outvis) build 12-Apr-2018 16:00:58 + os.system('rm -rf list.obs') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_antenna_reindexing_va0(self): build 12-Apr-2018 16:00:58 + '''mstransform: check reindexing when selecting a subset of the antennas''' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + mstransform(vis=self.vis,outputvis=self.outvis,antenna='VA0*&&VA0*', datacolumn='all', reindex=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + listobs(self.outvis, listfile='list.obs') build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists('list.obs'), 'Probable error in sub-table re-indexing') build 12-Apr-2018 16:00:58 + mytb = tbtool() build 12-Apr-2018 16:00:58 + mytb.open(self.outvis+'/ANTENNA') build 12-Apr-2018 16:00:58 + nrows = mytb.nrows() build 12-Apr-2018 16:00:58 + mytb.close() build 12-Apr-2018 16:00:58 + self.assertEqual(nrows, 9, 'ANTENNA subtable should be resized to 9 VA0* antennas') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_antenna_reindexing_all_va(self): build 12-Apr-2018 16:00:58 + '''mstransform: check that reindexing keeps all antennas that are involved in the selected baselines''' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + mstransform(vis=self.vis,outputvis=self.outvis,antenna='VA01&&VA*', datacolumn='all', reindex=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + listobs(self.outvis, listfile='list.obs') build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists('list.obs'), 'Probable error in sub-table re-indexing') build 12-Apr-2018 16:00:58 + mytb = tbtool() build 12-Apr-2018 16:00:58 + mytb.open(self.outvis+'/ANTENNA') build 12-Apr-2018 16:00:58 + nrows = mytb.nrows() build 12-Apr-2018 16:00:58 + mytb.close() build 12-Apr-2018 16:00:58 + self.assertEqual(nrows, 27, 'ANTENNA subtable should contain all 27 VA* antennas') build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 class test_alma_wvr_correlation_products(test_base): build 12-Apr-2018 16:00:58 '''Test behaviour of mstransform in split mode when the input MS contains ALMA WVR correlation products''' build 12-Apr-2018 16:00:58 @@ -5689,6 +5727,7 @@ def suite(): build 12-Apr-2018 16:00:58 test_spectrum_transformations_mean, build 12-Apr-2018 16:00:58 test_otf_calibration, build 12-Apr-2018 16:00:58 test_polarization_reindex, build 12-Apr-2018 16:00:58 + test_antenna_reindexing, build 12-Apr-2018 16:00:58 test_no_reindexing, build 12-Apr-2018 16:00:58 test_no_reindexing_ephemeris_copy, build 12-Apr-2018 16:00:58 test_splitUpdateFlagCmd, build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_plotants.py b/gcwrap/python/scripts/tests/test_plotants.py build 12-Apr-2018 16:00:58 index b40b968..7a7cdc4 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_plotants.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_plotants.py build 12-Apr-2018 16:00:58 @@ -41,28 +41,72 @@ class plotants_test(unittest.TestCase): build 12-Apr-2018 16:00:58 tp.setgui(gui=True) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test0(self): build 12-Apr-2018 16:00:58 - '''Test 0: Default parameters''' build 12-Apr-2018 16:00:58 + def test1(self): build 12-Apr-2018 16:00:58 + '''Test 1: Default parameters''' build 12-Apr-2018 16:00:58 self.res = plotants() build 12-Apr-2018 16:00:58 self.assertFalse(self.res) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test1(self): build 12-Apr-2018 16:00:58 - '''Test 1: Bad input file''' build 12-Apr-2018 16:00:58 + def test2(self): build 12-Apr-2018 16:00:58 + '''Test 2: Bad input file''' build 12-Apr-2018 16:00:58 msfile = 'badfile' build 12-Apr-2018 16:00:58 self.res = plotants(vis=msfile) build 12-Apr-2018 16:00:58 self.assertFalse(self.res) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - def test2(self): build 12-Apr-2018 16:00:58 - '''Test 2: Good input file and output exists''' build 12-Apr-2018 16:00:58 - if os.uname()[0] == "Darwin" and \ build 12-Apr-2018 16:00:58 - os.system("sw_vers -productVersion | grep 10.6") == 0 and \ build 12-Apr-2018 16:00:58 - not os.getenv("DISPLAY"): build 12-Apr-2018 16:00:58 - print >> sys.stderr, "Warning: The DISPLAY environment variable is unset, " + \ build 12-Apr-2018 16:00:58 - "required on OS X 10.6, skipping test" build 12-Apr-2018 16:00:58 - else: build 12-Apr-2018 16:00:58 - self.res = plotants(vis=self.msfile, figfile=self.fig) build 12-Apr-2018 16:00:58 - self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 - self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + def test3(self): build 12-Apr-2018 16:00:58 + '''Test 3: Good input file and output exists''' build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test4(self): build 12-Apr-2018 16:00:58 + '''Test 4: Label antenna IDs''' build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig, antindex=True) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test5(self): build 12-Apr-2018 16:00:58 + '''Test 5: Logarithmic antenna positions''' build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig, logpos=True) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test6(self): build 12-Apr-2018 16:00:58 + '''Test 6: Exclude antenna positions''' build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig, build 12-Apr-2018 16:00:58 + exclude='1,5,19,14,10,13') build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test7(self): build 12-Apr-2018 16:00:58 + '''Test 7: checkbaselines''' build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig, build 12-Apr-2018 16:00:58 + checkbaselines=True) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test8(self): build 12-Apr-2018 16:00:58 + '''Test 8: exclude checkbaselines''' build 12-Apr-2018 16:00:58 + # antenna (name) 11 is already excluded by checkbaselines build 12-Apr-2018 16:00:58 + # (warning) build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig, build 12-Apr-2018 16:00:58 + exclude='11', checkbaselines=True) build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test9(self): build 12-Apr-2018 16:00:58 + '''Test 9: Title''' build 12-Apr-2018 16:00:58 + self.res = plotants(vis=self.msfile, figfile=self.fig, build 12-Apr-2018 16:00:58 + title='IC2233') build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test10(self): build 12-Apr-2018 16:00:58 + '''Test 10: All arguments''' build 12-Apr-2018 16:00:58 + self.res = plotants(self.msfile, self.fig, True, True, '1,3,5,7,9', build 12-Apr-2018 16:00:58 + True, "IC2233") build 12-Apr-2018 16:00:58 + self.assertEqual(self.res,None) build 12-Apr-2018 16:00:58 + self.assertTrue(os.path.exists(self.fig)) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 return [plotants_test] build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_plotms.py b/gcwrap/python/scripts/tests/test_plotms.py build 12-Apr-2018 16:00:58 index 6efdb6c..17c9abc 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_plotms.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_plotms.py build 12-Apr-2018 16:00:58 @@ -133,7 +133,7 @@ class test_basic(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=self.plotfile_jpg, expformat="jpg", build 12-Apr-2018 16:00:58 yaxis='freq', showgui=False, highres=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(self.plotfile_jpg, 300000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(self.plotfile_jpg, 250000) build 12-Apr-2018 16:00:58 self.removePlotfile() build 12-Apr-2018 16:00:58 # default yaxis only build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=self.plotfile_jpg, expformat="jpg", build 12-Apr-2018 16:00:58 @@ -291,13 +291,13 @@ class test_basic(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, xaxis='chan', plotfile=self.plotfile_jpg, build 12-Apr-2018 16:00:58 expformat="jpg", showgui=False, highres=True, showatm=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(self.plotfile_jpg, 110000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(self.plotfile_jpg, 90000) build 12-Apr-2018 16:00:58 self.removePlotfile() build 12-Apr-2018 16:00:58 # basic plot with showtsky, xaxis freq build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, xaxis='freq', plotfile=self.plotfile_jpg, build 12-Apr-2018 16:00:58 expformat="jpg", showgui=False, highres=True, showtsky=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(self.plotfile_jpg, 130000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(self.plotfile_jpg, 90000) build 12-Apr-2018 16:00:58 self.removePlotfile() build 12-Apr-2018 16:00:58 # plotfile without overlay: xaxis must be chan or freq build 12-Apr-2018 16:00:58 # so ignores showatm/tsky build 12-Apr-2018 16:00:58 @@ -365,7 +365,7 @@ class test_averaging(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=self.plotfile_jpg, highres=True, build 12-Apr-2018 16:00:58 showgui=False, avgchannel='7') build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(self.plotfile_jpg, 180000, 220000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(self.plotfile_jpg, 170000, 220000) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_averaging_baseline(self): build 12-Apr-2018 16:00:58 @@ -450,7 +450,7 @@ class test_axis(plotms_test_base): build 12-Apr-2018 16:00:58 plotfile=self.plotfile_jpg, expformat='jpg', build 12-Apr-2018 16:00:58 highres=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(self.plotfile_jpg, 247000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(self.plotfile_jpg, 240000) build 12-Apr-2018 16:00:58 self.removePlotfile() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 @@ -772,7 +772,7 @@ class test_calplots(plotms_test_base): build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 class PlotmsPageHeader: build 12-Apr-2018 16:00:58 ''' Analyze PlotMS page header from png image of PlotMS Plot build 12-Apr-2018 16:00:58 - Assumptions: graphical area has a black frame, header background is white build 12-Apr-2018 16:00:58 + Assumptions: graphical area has a black frame, header background color is light build 12-Apr-2018 16:00:58 ''' build 12-Apr-2018 16:00:58 def __init__(self,png_path,debug=False): build 12-Apr-2018 16:00:58 self.png_path = png_path build 12-Apr-2018 16:00:58 @@ -786,11 +786,12 @@ class PlotmsPageHeader: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def _analyze(self): build 12-Apr-2018 16:00:58 gray_img = self.color_img.min(axis=2) build 12-Apr-2018 16:00:58 - gray_xproj = gray_img.min(axis=1) build 12-Apr-2018 16:00:58 # Binarize build 12-Apr-2018 16:00:58 - non_white_pixels = ( gray_xproj < 1.0 ) build 12-Apr-2018 16:00:58 - gray_xproj_bin = gray_xproj.copy() build 12-Apr-2018 16:00:58 - gray_xproj_bin[non_white_pixels] = 0.0 build 12-Apr-2018 16:00:58 + is_light = gray_img > 0.75 build 12-Apr-2018 16:00:58 + bin_img = np.zeros(gray_img.shape,dtype=gray_img.dtype) build 12-Apr-2018 16:00:58 + bin_img[is_light] = 1.0 build 12-Apr-2018 16:00:58 + # Project on X (vertical) axis build 12-Apr-2018 16:00:58 + gray_xproj_bin = bin_img.min(axis=1) build 12-Apr-2018 16:00:58 # White to black transitions build 12-Apr-2018 16:00:58 (steps_down,) = np.where(np.diff(gray_xproj_bin) == -1.0 ) build 12-Apr-2018 16:00:58 if steps_down.size > 0 : build 12-Apr-2018 16:00:58 @@ -1415,9 +1416,9 @@ class test_iteration(plotms_test_base): build 12-Apr-2018 16:00:58 self.assertEqual(fileCount, 3) build 12-Apr-2018 16:00:58 self.checkPlotfile(plotfile1_jpg, 200000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile1_jpg) build 12-Apr-2018 16:00:58 - self.checkPlotfile(plotfile2_jpg, 200000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(plotfile2_jpg, 190000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile2_jpg) build 12-Apr-2018 16:00:58 - self.checkPlotfile(plotfile3_jpg, 180000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(plotfile3_jpg, 170000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile3_jpg) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1486,7 +1487,7 @@ class test_iteration(plotms_test_base): build 12-Apr-2018 16:00:58 self.assertEqual(fileCount, 2) build 12-Apr-2018 16:00:58 self.checkPlotfile(plotfile1_jpg, 250000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile1_jpg) build 12-Apr-2018 16:00:58 - self.checkPlotfile(plotfile2_jpg, 250000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(plotfile2_jpg, 240000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile2_jpg) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1638,7 +1639,7 @@ class test_selection(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=plotfile3_jpg, expformat='jpg', build 12-Apr-2018 16:00:58 overwrite=True, showgui=False, scan='5,7', highres=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(plotfile3_jpg, 80000, 125000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(plotfile3_jpg, 70000, 125000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile3_jpg) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1755,7 +1756,7 @@ class test_transform(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=plotfile, yaxis='freq', build 12-Apr-2018 16:00:58 showgui=False, freqframe=frame, highres=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(plotfile, 210000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(plotfile, 200000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1782,7 +1783,7 @@ class test_transform(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=plotfile, yaxis='freq', build 12-Apr-2018 16:00:58 showgui=False, veldef=vel, highres=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(plotfile, 300000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(plotfile, 290000) build 12-Apr-2018 16:00:58 self.removePlotfile(plotfile) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1794,7 +1795,7 @@ class test_transform(plotms_test_base): build 12-Apr-2018 16:00:58 res = plotms(vis=self.ms, plotfile=self.plotfile_jpg, yaxis='freq', build 12-Apr-2018 16:00:58 showgui=False, restfreq='1420', highres=True) build 12-Apr-2018 16:00:58 self.assertTrue(res) build 12-Apr-2018 16:00:58 - self.checkPlotfile(self.plotfile_jpg, 300000) build 12-Apr-2018 16:00:58 + self.checkPlotfile(self.plotfile_jpg, 290000) build 12-Apr-2018 16:00:58 print build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_transform_shift(self): build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_po_rotationmeasure.py b/gcwrap/python/scripts/tests/test_po_rotationmeasure.py build 12-Apr-2018 16:00:58 index 879bbf0..5209eaf 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_po_rotationmeasure.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_po_rotationmeasure.py build 12-Apr-2018 16:00:58 @@ -166,6 +166,14 @@ class po_rotationmeasure_test(unittest.TestCase): build 12-Apr-2018 16:00:58 mypo.done() build 12-Apr-2018 16:00:58 else: build 12-Apr-2018 16:00:58 rmfit(imagename=imagename, rm=rmim, pa0=pa0im, sigma=sigma) build 12-Apr-2018 16:00:58 + for im in [rmim, pa0im]: build 12-Apr-2018 16:00:58 + myia.open(im) build 12-Apr-2018 16:00:58 + msgs = myia.history() build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + teststr = "version" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-2], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + teststr = "rmfit" build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-1], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 myia.open(rmim) build 12-Apr-2018 16:00:58 stats = myia.statistics(list=True, verbose=True) build 12-Apr-2018 16:00:58 self.assertTrue((abs(stats['min'][0] - RM)) < 1e-4) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_refimager.py b/gcwrap/python/scripts/tests/test_refimager.py build 12-Apr-2018 16:00:58 index 506e862..46305c4 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_refimager.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_refimager.py build 12-Apr-2018 16:00:58 @@ -1717,7 +1717,7 @@ class test_mask(testref_base): build 12-Apr-2018 16:00:58 self.checkfinal(report) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_mask_autobox_multithresh_with_prune(self): build 12-Apr-2018 16:00:58 - """ [mask] test_mask__autobox_multithresh : multi-threshold Autobox (minbeamfrac=0.3)""" build 12-Apr-2018 16:00:58 + """ [mask] test_mask__autobox_multithresh_with_prune : multi-threshold Autobox (minbeamfrac=0.3)""" build 12-Apr-2018 16:00:58 # also test for a bug fix to the new pruneRegions (only caused the failure when image size large build 12-Apr-2018 16:00:58 self.prepData('refim_twochan.ms') build 12-Apr-2018 16:00:58 ret = tclean(vis=self.msfile,imagename=self.img,imsize=1000,cell='8.0arcsec',niter=10,deconvolver='hogbom',interactive=0,usemask='auto-multithresh', build 12-Apr-2018 16:00:58 @@ -1725,6 +1725,24 @@ class test_mask(testref_base): build 12-Apr-2018 16:00:58 report=self.th.checkall(imexist=[self.img+'.mask'], imval=[(self.img+'.mask',1.0,[500,500,0,0]),(self.img+'.mask',0.0,[500,510,0,0])]) build 12-Apr-2018 16:00:58 self.checkfinal(report) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + def test_mask_autobox_multithresh_with_stopmask(self): build 12-Apr-2018 16:00:58 + """ [mask] test_mask__autobox_multithresh_with_stopmask : multi-threshold Autobox (minbeamfrac=0.3) with stop mask on """ build 12-Apr-2018 16:00:58 + # will trigger stop mask condition for the last cycle (Cycle 4) - does not change output mask but can be checked on the log build 12-Apr-2018 16:00:58 + # build 12-Apr-2018 16:00:58 + self.prepData('refim_twochan.ms') build 12-Apr-2018 16:00:58 + ret = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',niter=100,deconvolver='hogbom',interactive=0, build 12-Apr-2018 16:00:58 + usemask='auto-multithresh', minbeamfrac=0.3, minpercentchange=0.2) build 12-Apr-2018 16:00:58 + report=self.th.checkall(imexist=[self.img+'.mask'], imval=[(self.img+'.mask',1.0,[50,50,0,0]),(self.img+'.mask',0.0,[63,50,0,0])]) build 12-Apr-2018 16:00:58 + self.checkfinal(report) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_mask_autobox_multithresh_with_absorption(self): build 12-Apr-2018 16:00:58 + """ [mask] test_mask__autobox_multithresh_on_absorption : multi-threshold Autobox (minbeamfrac=0.3) on the data with both emission and absorption """ build 12-Apr-2018 16:00:58 + # data with a emission pt and absorption pt. build 12-Apr-2018 16:00:58 + self.prepData('refim_point_pos_neg.ms') build 12-Apr-2018 16:00:58 + ret = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',niter=100,deconvolver='hogbom',interactive=0,usemask='auto-multithresh', negativethreshold=5.0) build 12-Apr-2018 16:00:58 + report=self.th.checkall(imexist=[self.img+'.mask'], imval=[(self.img+'.mask',1.0,[50,50,0,0]),(self.img+'.mask',1.0,[60,40,0,0]),(self.img+'.mask',0.0,[65,50,0,0])]) build 12-Apr-2018 16:00:58 + self.checkfinal(report) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 # def test_mask_outregion(self): build 12-Apr-2018 16:00:58 # """ [mask] test_mask_outregion : Input mask has region that goes outside the image """ build 12-Apr-2018 16:00:58 # self.prepData('refim_twochan.ms') build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_setjy.py b/gcwrap/python/scripts/tests/test_setjy.py build 12-Apr-2018 16:00:58 index 8016cc9..c77eabd 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_setjy.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_setjy.py build 12-Apr-2018 16:00:58 @@ -1661,8 +1661,31 @@ class test_tpmAsteroid(SetjyUnitTestBase): build 12-Apr-2018 16:00:58 self.check_eq(sjran['3']['2']['fluxd'][0],expflxs['Vesta'][2],0.0001) build 12-Apr-2018 16:00:58 self.check_eq(sjran['3']['3']['fluxd'][0],expflxs['Vesta'][3],0.0001) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +class test_NullSelection(SetjyUnitTestBase): build 12-Apr-2018 16:00:58 + def setUp(self): build 12-Apr-2018 16:00:58 + msname = 'alma_uid___A002_Xa3f11a_X3df1.ms.split.thinned' build 12-Apr-2018 16:00:58 + self.setUpMS(msname) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def tearDown(self): build 12-Apr-2018 16:00:58 + self.resetMS() build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def test_empty_sel_handled(self): build 12-Apr-2018 16:00:58 + """ setjy with null selection produces False (and not None or empty dictionary) """ build 12-Apr-2018 16:00:58 + # Try to run with a null/empty selection and make sure that it is handled build 12-Apr-2018 16:00:58 + # gracefully. This is to prevent issues such as CAS-11196, where incorrect handling build 12-Apr-2018 16:00:58 + # of null selection issues can produce 'None's and empty output dictionaries which build 12-Apr-2018 16:00:58 + # will confuse the ALMA pipeline. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # Field 1 is Titan and has scanintent 'CALIBRATE_FLUX#ON_SOURCE', there are build 12-Apr-2018 16:00:58 + # SPWs 0-3, but no scan 5 -> null (zero rows) selection build 12-Apr-2018 16:00:58 + res = setjy(vis=self.inpms, field='1', spw='3', scan='5', build 12-Apr-2018 16:00:58 + standard='Butler-JPL-Horizons 2012', intent="*CALIB*FLUX*", build 12-Apr-2018 16:00:58 + usescratch=True) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + self.assertEquals(res, False, "setjy did not return False for a null selection") build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 def suite(): build 12-Apr-2018 16:00:58 - return [test_SingleObservation,test_MultipleObservations,test_ModImage, test_inputs, test_conesearch, test_fluxscaleStandard, test_setpol, test_ephemtbl, test_tpmAsteroid] build 12-Apr-2018 16:00:58 + return [test_SingleObservation,test_MultipleObservations,test_ModImage, test_inputs, build 12-Apr-2018 16:00:58 + test_conesearch, test_fluxscaleStandard, test_setpol, test_ephemtbl, build 12-Apr-2018 16:00:58 + test_tpmAsteroid,test_NullSelection] build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_specfit.py b/gcwrap/python/scripts/tests/test_specfit.py build 12-Apr-2018 16:00:58 index 878a39d..a04a4c1 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_specfit.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_specfit.py build 12-Apr-2018 16:00:58 @@ -390,6 +390,7 @@ class specfit_test(unittest.TestCase): build 12-Apr-2018 16:00:58 multifit = True build 12-Apr-2018 16:00:58 model = "" build 12-Apr-2018 16:00:58 residual = "" build 12-Apr-2018 16:00:58 + myia = iatool() build 12-Apr-2018 16:00:58 kk = [s + "-2g" for s in solims] build 12-Apr-2018 16:00:58 [ build 12-Apr-2018 16:00:58 amp, amperr, center, centererr, build 12-Apr-2018 16:00:58 @@ -407,6 +408,14 @@ class specfit_test(unittest.TestCase): build 12-Apr-2018 16:00:58 for j in ["_0", "_1"]: build 12-Apr-2018 16:00:58 name = im + j build 12-Apr-2018 16:00:58 self.checkImage(name, datapath + name) build 12-Apr-2018 16:00:58 + if code == run_specfit: build 12-Apr-2018 16:00:58 + self.assertTrue(myia.open(name)) build 12-Apr-2018 16:00:58 + msgs = myia.history() build 12-Apr-2018 16:00:58 + myia.done() build 12-Apr-2018 16:00:58 + teststr = 'version' build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-2], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 + teststr = 'specfit' build 12-Apr-2018 16:00:58 + self.assertTrue(teststr in msgs[-1], "'" + teststr + "' not found") build 12-Apr-2018 16:00:58 shutil.rmtree(name) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def test_4_5(self): build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_statwt2.py b/gcwrap/python/scripts/tests/test_statwt2.py build 12-Apr-2018 16:00:58 index dca618d..545c428 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_statwt2.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_statwt2.py build 12-Apr-2018 16:00:58 @@ -606,7 +606,7 @@ class statwt2_test(unittest.TestCase): build 12-Apr-2018 16:00:58 dst = "ngc5921.split.residualwoutmodel.ms" build 12-Apr-2018 16:00:58 ref = datadir + "ngc5921.resid_without_model.ms.ref" build 12-Apr-2018 16:00:58 [refwt, refwtsp, refflag, reffrow] = _get_dst_cols(ref, "", dodata=False) build 12-Apr-2018 16:00:58 - rtol = 1e-7 build 12-Apr-2018 16:00:58 + rtol = 1e-6 build 12-Apr-2018 16:00:58 data = "residual" build 12-Apr-2018 16:00:58 mytb = tbtool() build 12-Apr-2018 16:00:58 myms = mstool() build 12-Apr-2018 16:00:58 @@ -669,7 +669,7 @@ class statwt2_test(unittest.TestCase): build 12-Apr-2018 16:00:58 dst = "ngc5921.split.residualdatawoutmodel.ms" build 12-Apr-2018 16:00:58 ref = datadir + "ngc5921.residdata_without_model.ms.ref" build 12-Apr-2018 16:00:58 [refwt, refwtsp, refflag, reffrow] = _get_dst_cols(ref, "", dodata=False) build 12-Apr-2018 16:00:58 - rtol = 1e-7 build 12-Apr-2018 16:00:58 + rtol = 1e-6 build 12-Apr-2018 16:00:58 data = "residual_data" build 12-Apr-2018 16:00:58 mytb = tbtool() build 12-Apr-2018 16:00:58 myms = mstool() build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_tsdcal.py b/gcwrap/python/scripts/tests/test_tsdcal.py build 12-Apr-2018 16:00:58 index 4ad7ac0..1c72b98 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_tsdcal.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_tsdcal.py build 12-Apr-2018 16:00:58 @@ -1721,6 +1721,14 @@ class sdcal_test_apply(sdcal_test_base): build 12-Apr-2018 16:00:58 tinterp = 'linear' build 12-Apr-2018 16:00:58 if len(finterp) == 0: build 12-Apr-2018 16:00:58 finterp = 'linearflag' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + # CAS-10772 build 12-Apr-2018 16:00:58 + # Linear flag interpolation along spectral axis behaves like "nearest" if science and build 12-Apr-2018 16:00:58 + # calibrater data have same set of frequency channels. This is always true for single build 12-Apr-2018 16:00:58 + # dish sky calibration. build 12-Apr-2018 16:00:58 + # So, finterp option for flags should always be 'nearestflag'. build 12-Apr-2018 16:00:58 + if finterp == 'linearflag': build 12-Apr-2018 16:00:58 + finterp = 'nearestflag' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 # result depends on interp build 12-Apr-2018 16:00:58 print 'Interpolation option:', tinterp, finterp build 12-Apr-2018 16:00:58 @@ -1838,8 +1846,8 @@ class sdcal_test_apply(sdcal_test_base): build 12-Apr-2018 16:00:58 """ build 12-Apr-2018 16:00:58 test_apply_sky06 --- invalid interp value build 12-Apr-2018 16:00:58 """ build 12-Apr-2018 16:00:58 - # 'cubic' interpolation along time axis is not supported yet build 12-Apr-2018 16:00:58 - self.result = sdcal(infile=self.infile, calmode='apply', applytable=[self.applytable], interp='cubic') build 12-Apr-2018 16:00:58 + # 'sinusoid' interpolation along time axis is not supported build 12-Apr-2018 16:00:58 + self.result = sdcal(infile=self.infile, calmode='apply', applytable=[self.applytable], interp='sinusoid') build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @exception_case(RuntimeError, '^Applytable \'.+\' is not a caltable format$') build 12-Apr-2018 16:00:58 def test_apply_sky07(self): build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/test_tsdimaging.py b/gcwrap/python/scripts/tests/test_tsdimaging.py build 12-Apr-2018 16:00:58 index da72093..aef7de3 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/test_tsdimaging.py build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/test_tsdimaging.py build 12-Apr-2018 16:00:58 @@ -162,6 +162,7 @@ class sdimaging_unittest_base(unittest.TestCase, sdimaging_standard_paramset): build 12-Apr-2018 16:00:58 msg='Any error occurred during imaging') build 12-Apr-2018 16:00:58 self._checkfile(outfile) build 12-Apr-2018 16:00:58 self._checkfile(outprefix+".weight") build 12-Apr-2018 16:00:58 + self._checkframe(outfile) build 12-Apr-2018 16:00:58 self._checkshape(outfile, shape[0], shape[1],shape[2],shape[3]) build 12-Apr-2018 16:00:58 self._checkstats(outfile, refstats, compstats=compstats, build 12-Apr-2018 16:00:58 atol=atol, rtol=rtol, ignoremask=ignoremask) build 12-Apr-2018 16:00:58 @@ -172,6 +173,16 @@ class sdimaging_unittest_base(unittest.TestCase, sdimaging_standard_paramset): build 12-Apr-2018 16:00:58 isthere=os.path.exists(name) build 12-Apr-2018 16:00:58 self.assertEqual(isthere,True, build 12-Apr-2018 16:00:58 msg='output file %s was not created because of the task failure'%(name)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + def _checkframe(self, name): build 12-Apr-2018 16:00:58 + _ia.open(name) build 12-Apr-2018 16:00:58 + csys = _ia.coordsys() build 12-Apr-2018 16:00:58 + _ia.close() build 12-Apr-2018 16:00:58 + spectral_frames = csys.referencecode('spectral') build 12-Apr-2018 16:00:58 + csys.done() build 12-Apr-2018 16:00:58 + self.assertEqual(1, len(spectral_frames)) build 12-Apr-2018 16:00:58 + spectral_frame = spectral_frames[0] build 12-Apr-2018 16:00:58 + self.assertEqual('LSRK', spectral_frame) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 def _checkshape(self,name,nx,ny,npol,nchan): build 12-Apr-2018 16:00:58 self._checkfile(name) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/uTest_Template.dat b/gcwrap/python/scripts/tests/uTest_Template.dat build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..1ffa6d3 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/uTest_Template.dat build 12-Apr-2018 16:00:58 @@ -0,0 +1,159 @@ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +%s %s build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +

    %s %s

    build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +
    SettingValue
    Force Tags%s
    Librarylib/CasaRegression.py${INITIAL_ARGS}# manage casa regression run
    build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +
    VariableValue
    ${TEST}%s# name of regression script
    ${MAINTAINER}%s# full name of the maintainer
    ${MAINTAINER_EMAIL}%s# maintainer's email address
    build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +
    Test CaseActionArguments
    Run regression[Tags]%s
    Run${TEST}${PROFILING}@{TEST TAGS}
    Scan log${STATEDB}${MAILDB}${MAINTAINER}
    ...${MAINTAINER_EMAIL}${LOG_FILE}
    Result
    build 12-Apr-2018 16:00:58 +
    build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 diff --git a/gcwrap/python/scripts/tests/uTest_list.json b/gcwrap/python/scripts/tests/uTest_list.json build 12-Apr-2018 16:00:58 index c82df78..0cd8425 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/python/scripts/tests/uTest_list.json build 12-Apr-2018 16:00:58 +++ b/gcwrap/python/scripts/tests/uTest_list.json build 12-Apr-2018 16:00:58 @@ -11,7 +11,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -24,7 +24,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -37,7 +37,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -50,7 +50,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"Mark.Wieringa@csiro.au", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -63,7 +63,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -76,7 +76,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -89,7 +89,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -102,7 +102,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"Mark.Wieringa@csiro.au", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -115,7 +115,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"bgarwood@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -128,7 +128,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"importExport", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -141,7 +141,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -154,7 +154,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -167,7 +167,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -180,7 +180,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -193,7 +193,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -206,7 +206,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -219,7 +219,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -232,7 +232,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -245,7 +245,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -258,7 +258,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"jagonzal@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -271,7 +271,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -284,7 +284,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -297,7 +297,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -310,7 +310,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -323,7 +323,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -336,7 +336,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -349,7 +349,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -362,7 +362,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"manipulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -375,7 +375,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -388,7 +388,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -401,7 +401,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -414,7 +414,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -427,7 +427,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -440,7 +440,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -453,7 +453,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -466,7 +466,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -479,7 +479,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -492,7 +492,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"calibration", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -505,7 +505,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"editing", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -518,7 +518,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"editing", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -531,7 +531,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"editing", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -544,7 +544,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"editing", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -557,7 +557,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"editing", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -570,7 +570,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"editing", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -583,7 +583,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"modeling", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -596,7 +596,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -609,7 +609,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -622,7 +622,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -635,7 +635,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -648,7 +648,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -661,7 +661,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -674,7 +674,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -687,7 +687,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -700,7 +700,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"singleDish", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -713,7 +713,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ahale@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"plotting", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -726,7 +726,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"pford@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"plotting", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -739,7 +739,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"pford@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"plotting", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -752,7 +752,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"takeshi.nakazato@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"plotting", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -765,7 +765,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"pford@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"plotting", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -778,7 +778,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"pford@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"plotting", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -791,7 +791,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"bgarwood@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -804,7 +804,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -817,7 +817,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -830,7 +830,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -843,7 +843,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"drs@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -856,7 +856,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -869,7 +869,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -882,7 +882,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -895,7 +895,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -908,7 +908,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"drs@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -921,7 +921,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"vsuorant@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -934,7 +934,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -947,7 +947,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"mpokorny@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -960,7 +960,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"mpokorny@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -973,7 +973,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"information", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -986,7 +986,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"utility", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -999,7 +999,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ahale@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"utility", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1012,7 +1012,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"utility", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1025,7 +1025,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"analysis", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1038,7 +1038,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"analysis", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1051,7 +1051,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"analysis", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1064,7 +1064,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"jtaylor@partner.eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"analysis", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1077,7 +1077,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"analysis", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1090,7 +1090,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"analysis", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1103,7 +1103,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@ezweb.ne.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"simulation", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1116,7 +1116,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1129,7 +1129,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1142,7 +1142,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1155,7 +1155,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1168,7 +1168,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1181,7 +1181,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1194,7 +1194,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1207,7 +1207,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1220,7 +1220,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1233,7 +1233,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1246,7 +1246,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1259,7 +1259,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1272,7 +1272,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1285,7 +1285,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1298,7 +1298,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1311,7 +1311,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1324,7 +1324,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1337,7 +1337,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1350,7 +1350,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1363,7 +1363,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1376,7 +1376,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1389,7 +1389,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1402,7 +1402,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1415,7 +1415,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1428,7 +1428,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1441,7 +1441,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1454,7 +1454,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1467,7 +1467,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1480,7 +1480,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1493,7 +1493,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1506,7 +1506,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1519,7 +1519,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1532,7 +1532,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1545,7 +1545,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1558,7 +1558,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1571,7 +1571,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1584,7 +1584,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1597,7 +1597,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1610,7 +1610,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1623,7 +1623,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1636,7 +1636,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1649,7 +1649,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1662,7 +1662,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1675,7 +1675,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1688,7 +1688,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1701,7 +1701,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1714,7 +1714,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1727,7 +1727,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1740,7 +1740,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1753,7 +1753,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"ia", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1766,7 +1766,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1779,7 +1779,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1792,7 +1792,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1805,7 +1805,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1818,7 +1818,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1831,7 +1831,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1844,7 +1844,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1857,7 +1857,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1870,7 +1870,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1883,7 +1883,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1896,7 +1896,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1909,7 +1909,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1922,7 +1922,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1935,7 +1935,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1948,7 +1948,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1961,7 +1961,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"po", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1974,7 +1974,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"rg", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -1987,7 +1987,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"rg", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2000,7 +2000,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"rg", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2013,7 +2013,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2026,7 +2026,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kgolap@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2039,7 +2039,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2052,7 +2052,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2065,7 +2065,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kgolap@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2078,7 +2078,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2091,7 +2091,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2104,7 +2104,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2117,7 +2117,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rurvashi@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2130,7 +2130,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"imaging", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2143,7 +2143,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2156,7 +2156,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2169,7 +2169,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2182,7 +2182,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2195,7 +2195,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2208,7 +2208,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2221,7 +2221,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2234,7 +2234,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2247,7 +2247,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2260,7 +2260,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rurvashi@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2273,7 +2273,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2286,7 +2286,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ttsutsum@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2299,7 +2299,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2312,7 +2312,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2325,7 +2325,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2338,7 +2338,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2351,7 +2351,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2364,7 +2364,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"masaya.kuniyoshi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2377,7 +2377,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2390,7 +2390,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2403,7 +2403,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2416,7 +2416,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2429,7 +2429,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2442,7 +2442,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2455,7 +2455,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2468,7 +2468,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2481,7 +2481,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2494,7 +2494,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2507,7 +2507,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2520,7 +2520,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kgolap@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2533,7 +2533,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2546,7 +2546,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dmehring@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"1", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2559,7 +2559,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2572,7 +2572,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2585,7 +2585,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2598,7 +2598,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2611,7 +2611,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2624,7 +2624,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2637,7 +2637,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kgolap@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2650,7 +2650,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"sbhatnag@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2663,7 +2663,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"gmoellen@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2676,7 +2676,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kgolap@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2689,7 +2689,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2702,7 +2702,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kana.sugi@nao.ac.jp", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2715,7 +2715,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2728,7 +2728,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2741,7 +2741,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rindebet@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2755,7 +2755,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"ahale@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2768,7 +2768,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"dpetry@eso.org", build 12-Apr-2018 16:00:58 "priority":"2", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2781,7 +2781,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rurvashi@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2794,7 +2794,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"kgolap@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2807,7 +2807,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"rurvashi@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2820,7 +2820,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2833,7 +2833,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"scastro@eso.org", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"mpi", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2846,7 +2846,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"bkent@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"3", build 12-Apr-2018 16:00:58 "tag":"pipeline", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2859,7 +2859,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2872,7 +2872,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2885,7 +2885,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2898,7 +2898,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2911,7 +2911,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2924,7 +2924,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2937,7 +2937,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2950,7 +2950,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 }, build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 @@ -2963,7 +2963,7 @@ build 12-Apr-2018 16:00:58 "MaintainerEmail":"awells@nrao.edu", build 12-Apr-2018 16:00:58 "priority":"4", build 12-Apr-2018 16:00:58 "tag":"casaguide", build 12-Apr-2018 16:00:58 - "suppressEmail": true, build 12-Apr-2018 16:00:58 + "suppressEmail": false, build 12-Apr-2018 16:00:58 "comment":"" build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 ] build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/CMakeLists.txt b/gcwrap/tasks/CMakeLists.txt build 12-Apr-2018 16:00:58 index 4033e10..65ba20d 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/CMakeLists.txt build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/CMakeLists.txt build 12-Apr-2018 16:00:58 @@ -80,6 +80,7 @@ msview.xml build 12-Apr-2018 16:00:58 mstransform.xml build 12-Apr-2018 16:00:58 msuvbin.xml build 12-Apr-2018 16:00:58 oldhanningsmooth.xml build 12-Apr-2018 16:00:58 +oldplotants.xml build 12-Apr-2018 16:00:58 oldsplit.xml build 12-Apr-2018 16:00:58 plotants.xml build 12-Apr-2018 16:00:58 plotbandpass.xml build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/immoments.xml b/gcwrap/tasks/immoments.xml build 12-Apr-2018 16:00:58 index ba32525..1d0630c 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/immoments.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/immoments.xml build 12-Apr-2018 16:00:58 @@ -28,14 +28,14 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 The momement axis: ra, dec, lat, long, spectral, or stokes build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 spectral build 12-Apr-2018 16:00:58 axis="ra" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Region selection. Default is to use the full image. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 region="myregion.crtf" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/imstat.xml b/gcwrap/tasks/imstat.xml build 12-Apr-2018 16:00:58 index 6ae5769..98463c8 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/imstat.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/imstat.xml build 12-Apr-2018 16:00:58 @@ -69,7 +69,7 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 append=True build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Algorithm to use. Supported values are "chauvenet", "classic", "fit-half", and "hinges-fences". Minimum match is supported. build 12-Apr-2018 16:00:58 + Algorithm to use. Supported values are "biweight", "chauvenet", "classic", "fit-half", and "hinges-fences". Minimum match is supported. build 12-Apr-2018 16:00:58 classic build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -96,6 +96,10 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 Method to use for calculating classical statistics. Supported methods are "auto", "tiled", and "framework". Ignored if algorithm is not "classic". build 12-Apr-2018 16:00:58 auto build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + For biweight, this is the maximum number of iterations to attempt. Iterating will stop when either this limit is reached, or the zscore criterion is met. If negative, do a fast, simple computation (see description). Ignored if the algorithm is not "biweight". build 12-Apr-2018 16:00:58 + 3 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -112,6 +116,7 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 auto build 12-Apr-2018 16:00:58 @@ -138,6 +143,11 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 -1 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + 3 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/oldplotants.xml b/gcwrap/tasks/oldplotants.xml build 12-Apr-2018 16:00:58 new file mode 100644 build 12-Apr-2018 16:00:58 index 0000000..80c2048 build 12-Apr-2018 16:00:58 --- /dev/null build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/oldplotants.xml build 12-Apr-2018 16:00:58 @@ -0,0 +1,59 @@ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Plot the antenna distribution in the local reference frame: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + TO BE DEPRECATED to remove dependence on msplot. Please use build 12-Apr-2018 16:00:58 + the updated plotants. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + The location of the antennas in the MS will be plotted with build 12-Apr-2018 16:00:58 + X-toward local east; Y-toward local north. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Name of input visibility file (MS) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Save the plotted figure to this file build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Plot the antenna distribution in the local reference frame: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + The location of the antennas in the MS will be plotted with build 12-Apr-2018 16:00:58 + X-toward local east; Y-toward local north. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Keyword arguments: build 12-Apr-2018 16:00:58 + vis -- Name of input visibility file. build 12-Apr-2018 16:00:58 + default: none. example: vis='ngc5921.ms' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + figfile -- Save the plotted figure in this file. build 12-Apr-2018 16:00:58 + default: ''. example: figfile='myFigure.png' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + The name of each antenna (egs. vla=antenna number) is build 12-Apr-2018 16:00:58 + shown next to its respective location. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + DO NOT use the buttons on the Mark Region line. These are build 12-Apr-2018 16:00:58 + not implemented yet and might abort CASA. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + You can zoom in by pressing the magnifier button (bottom, build 12-Apr-2018 16:00:58 + third from left) and making a rectangular region with build 12-Apr-2018 16:00:58 + the mouse. Press the home button (left most button) to build 12-Apr-2018 16:00:58 + remove zoom. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + A hard-copy of this plot can be obtained by pressing the build 12-Apr-2018 16:00:58 + button on the right at the bottom of the display. This build 12-Apr-2018 16:00:58 + produces a png format file. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/plotants.xml b/gcwrap/tasks/plotants.xml build 12-Apr-2018 16:00:58 index 7ecbabd..47afa5e 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/plotants.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/plotants.xml build 12-Apr-2018 16:00:58 @@ -20,7 +20,26 @@ build 12-Apr-2018 16:00:58 Save the plotted figure to this file build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Label antennas with name and antenna ID build 12-Apr-2018 16:00:58 + False build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Whether to plot logarithmic positions build 12-Apr-2018 16:00:58 + False build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Antenna name/id selection to exclude from plot build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Whether to check baselines in the main table. build 12-Apr-2018 16:00:58 + False build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Title for the plot build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -28,29 +47,44 @@ build 12-Apr-2018 16:00:58 Plot the antenna distribution in the local reference frame: build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 The location of the antennas in the MS will be plotted with build 12-Apr-2018 16:00:58 - X-toward local east; Y-toward local north. build 12-Apr-2018 16:00:58 + X-toward local east; Y-toward local north. The name of each build 12-Apr-2018 16:00:58 + antenna is shown next to its respective location. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Keyword arguments: build 12-Apr-2018 16:00:58 - vis -- Name of input visibility file. build 12-Apr-2018 16:00:58 - default: none. example: vis='ngc5921.ms' build 12-Apr-2018 16:00:58 + vis -- Name of input visibility file (required) build 12-Apr-2018 16:00:58 + Default: none, example: vis='ngc5921.ms' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + figfile -- Save the plotted figure in this file build 12-Apr-2018 16:00:58 + Default: '', example: figfile='antplot.png' build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + antindex -- Label antennas with id in addition to name build 12-Apr-2018 16:00:58 + Default: False, example: antindex=True build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + logpos -- Produce a logarithmic position plot build 12-Apr-2018 16:00:58 + Default: False, example: logpos=True build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - figfile -- Save the plotted figure in this file. build 12-Apr-2018 16:00:58 - default: ''. example: figfile='myFigure.png' build 12-Apr-2018 16:00:58 + exclude -- Antenna selection string to exclude from plotting build 12-Apr-2018 16:00:58 + Note: integers are treated as names first then as index build 12-Apr-2018 16:00:58 + Default: '', examples: "DV23,DA02" "1,5,7" "0~3" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - The name of each antenna (egs. vla=antenna number) is build 12-Apr-2018 16:00:58 - shown next to its respective location. build 12-Apr-2018 16:00:58 + checkbaselines -- Only plot antennas in the MAIN table build 12-Apr-2018 16:00:58 + This can be useful after a split. WARNING: Setting build 12-Apr-2018 16:00:58 + checkbaselines to True will add to runtime in build 12-Apr-2018 16:00:58 + proportion to the number of rows in the dataset. build 12-Apr-2018 16:00:58 + Default: False, example: checkbaselines=True build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - DO NOT use the buttons on the Mark Region line. These are build 12-Apr-2018 16:00:58 - not implemented yet and might abort CASA. build 12-Apr-2018 16:00:58 + title -- Title written along top of plot build 12-Apr-2018 16:00:58 + Default: '', example: "ALMA Antenna Positions" build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - You can zoom in by pressing the magnifier button (bottom, build 12-Apr-2018 16:00:58 - third from left) and making a rectangular region with build 12-Apr-2018 16:00:58 - the mouse. Press the home button (left most button) to build 12-Apr-2018 16:00:58 - remove zoom. build 12-Apr-2018 16:00:58 + You can zoom in by pressing the magnifier button (bottom, build 12-Apr-2018 16:00:58 + third from right) and making a rectangular region with build 12-Apr-2018 16:00:58 + the mouse. Press the home button (leftmost button) to build 12-Apr-2018 16:00:58 + remove zoom. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - A hard-copy of this plot can be obtained by pressing the build 12-Apr-2018 16:00:58 - button on the right at the bottom of the display. This build 12-Apr-2018 16:00:58 - produces a png format file. build 12-Apr-2018 16:00:58 + A hard-copy of this plot can be obtained by pressing the build 12-Apr-2018 16:00:58 + button on the right at the bottom of the display. A file build 12-Apr-2018 16:00:58 + dialog will allow you to choose the directory, filename, build 12-Apr-2018 16:00:58 + and format of the export. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/plotms.xml b/gcwrap/tasks/plotms.xml build 12-Apr-2018 16:00:58 index ae95504..0329218 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/plotms.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/plotms.xml build 12-Apr-2018 16:00:58 @@ -8,37 +8,34 @@ build 12-Apr-2018 16:00:58 A plotter/interactive flagger for visibility data. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Task for plotting and interacting with visibility build 12-Apr-2018 16:00:58 - data. Limited support for caltable plotting is also build 12-Apr-2018 16:00:58 - included as of CASA v4.1. build 12-Apr-2018 16:00:58 + Task for plotting and interacting with visibility data and build 12-Apr-2018 16:00:58 + calibration tables. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - A variety of axes choices (including data column) along build 12-Apr-2018 16:00:58 - with MS selection and averaging options are provided for data build 12-Apr-2018 16:00:58 - selection. Flag extension parameters are also available for build 12-Apr-2018 16:00:58 - flagging operations in the plotter. build 12-Apr-2018 16:00:58 + Plotms provides a variety of axis choices (including data column) build 12-Apr-2018 16:00:58 + along with selection, averaging, and transformation options for build 12-Apr-2018 16:00:58 + MeasurementSets. Flag extension parameters are also available for build 12-Apr-2018 16:00:58 + interactive flagging operations in the plotter. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - All of the provided parameters can also be set using the GUI once build 12-Apr-2018 16:00:58 - the application has been launched. Additional and more specific build 12-Apr-2018 16:00:58 - operations are available through the GUI and/or through the plotms build 12-Apr-2018 16:00:58 - tool (pm). build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - Most basic functions (plotting, iteration, locate, flagging) build 12-Apr-2018 16:00:58 - will work for most CalTables. Parameterized CalTables build 12-Apr-2018 16:00:58 - (delays, antpos, gaincurve, opacity), will, at best, currently build 12-Apr-2018 16:00:58 - just plot the simple parameters contained in the build 12-Apr-2018 16:00:58 - table, not the effective amplitudes or phases sampled at build 12-Apr-2018 16:00:58 - observing times, frequencies etc. BPOLY and GSPLINE tables build 12-Apr-2018 16:00:58 - are not yet supported. Features currently unsupported for build 12-Apr-2018 16:00:58 - CalTables include Averaging, Transformations (velocity build 12-Apr-2018 16:00:58 - conversions, etc.), and some details of selection (channel and build 12-Apr-2018 16:00:58 - polarization selection are not yet enabled) and axes choices build 12-Apr-2018 16:00:58 - (geometry options are not yet enabled). In the plotms gui, build 12-Apr-2018 16:00:58 - many options irrelevant for CalTables are not hidden when build 12-Apr-2018 16:00:58 - interacting with a CalTable, and such settings will be ignored build 12-Apr-2018 16:00:58 - (when benign) or cause an error message. build 12-Apr-2018 16:00:58 + All of the provided parameters can also be set using the GUI once build 12-Apr-2018 16:00:58 + the application has been launched or through the plotms tool (pm). build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Most of the basic plotms functions will work for calibration tables. build 12-Apr-2018 16:00:58 + The correlation selection string may be used to select polarization build 12-Apr-2018 16:00:58 + in a cal table, including ratio plots ("/"). The antenna selection build 12-Apr-2018 16:00:58 + string is used to select antenna1 only, rather than baselines as in build 12-Apr-2018 16:00:58 + an MS. When plotting parameterized CalTables, such as delays, antpos, build 12-Apr-2018 16:00:58 + gaincurve, or opacity, plotms will currently just plot the simple build 12-Apr-2018 16:00:58 + parameters contained in the table, not the effective amplitudes or build 12-Apr-2018 16:00:58 + phases sampled at observing times, frequencies etc. BPOLY and build 12-Apr-2018 16:00:58 + GSPLINE tables are not yet supported. Features currently unsupported build 12-Apr-2018 16:00:58 + for CalTables include averaging, transformations (velocity build 12-Apr-2018 16:00:58 + conversions, etc.), and some axis and selection options which do not build 12-Apr-2018 16:00:58 + exist in these tables. In the plotms GUI, many options irrelevant build 12-Apr-2018 16:00:58 + for CalTables are not hidden when interacting with a CalTable, and build 12-Apr-2018 16:00:58 + such settings will be ignored (when benign) or cause an error message. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -228,6 +225,9 @@ MS Parameters build 12-Apr-2018 16:00:58 SNR build 12-Apr-2018 16:00:58 tec build 12-Apr-2018 16:00:58 TEC build 12-Apr-2018 16:00:58 + antpos build 12-Apr-2018 16:00:58 + Antenna Positions build 12-Apr-2018 16:00:58 + antenna positions build 12-Apr-2018 16:00:58 radialvelocity build 12-Apr-2018 16:00:58 Radial Velocity build 12-Apr-2018 16:00:58 rho build 12-Apr-2018 16:00:58 @@ -400,6 +400,9 @@ MS Parameters build 12-Apr-2018 16:00:58 SNR build 12-Apr-2018 16:00:58 tec build 12-Apr-2018 16:00:58 TEC build 12-Apr-2018 16:00:58 + antpos build 12-Apr-2018 16:00:58 + Antenna Positions build 12-Apr-2018 16:00:58 + antenna positions build 12-Apr-2018 16:00:58 radialvelocity build 12-Apr-2018 16:00:58 Radial Velocity build 12-Apr-2018 16:00:58 rho build 12-Apr-2018 16:00:58 @@ -925,7 +928,7 @@ Canvas Parameters build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Show major grid lines (horiz and vert) build 12-Apr-2018 16:00:58 + Show major grid lines build 12-Apr-2018 16:00:58 False build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -953,7 +956,7 @@ Canvas Parameters build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Show minor grid lines (horiz and vert) build 12-Apr-2018 16:00:58 + Show minor grid lines build 12-Apr-2018 16:00:58 False build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1865,14 +1868,14 @@ Constraints build 12-Apr-2018 16:00:58 default: 0 (autosize) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - showmajorgrid -- show major grid lines (horiz and vert.) build 12-Apr-2018 16:00:58 + showmajorgrid -- show major grid lines build 12-Apr-2018 16:00:58 default: False build 12-Apr-2018 16:00:58 >>> showmajorgrid expandable parameters build 12-Apr-2018 16:00:58 majorwidth -- line width in pixels of major grid lines build 12-Apr-2018 16:00:58 majorstyle -- major grid line style: solid dash dot none build 12-Apr-2018 16:00:58 majorcolor -- color in hex code of major grid lines build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - showminorgrid -- show minor grid lines (horiz and vert.) build 12-Apr-2018 16:00:58 + showminorgrid -- show minor grid lines build 12-Apr-2018 16:00:58 default: False build 12-Apr-2018 16:00:58 >>> showminorgrid expandable parameters build 12-Apr-2018 16:00:58 minorwidth -- line width in pixels of minor grid lines build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/slsearch.xml b/gcwrap/tasks/slsearch.xml build 12-Apr-2018 16:00:58 index a5d6248..775cb98 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/slsearch.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/slsearch.xml build 12-Apr-2018 16:00:58 @@ -47,7 +47,7 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 -1 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - S*mu*mu range in Debye**2. -1 -> do not use an S*mu*mu range. build 12-Apr-2018 16:00:58 + Quantum mechanical line strength. -1 -> do not use a smu2 range. build 12-Apr-2018 16:00:58 -1 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tasks/tclean.xml b/gcwrap/tasks/tclean.xml build 12-Apr-2018 16:00:58 index e54968f..2e9c7a2 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tasks/tclean.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tasks/tclean.xml build 12-Apr-2018 16:00:58 @@ -294,12 +294,15 @@ file:///opt/casa/code/xmlcasa/xml/casa.xsd"> build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Phase center of the image build 12-Apr-2018 16:00:58 -Phase center of the image (string or field id) build 12-Apr-2018 16:00:58 +Phase center of the image (string or field id); if the phasecenter is the name known major solar system object ('MERCURY', 'VENUS', 'MARS', 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE', 'PLUTO', 'SUN', 'MOON') or is an ephemerides table then that source is tracked and the background sources get smeared. There is a special case, when phasecenter='TRACKFIELD', which will use the ephemerides or polynomial phasecenter in the FIELD table of the MS's as the source center to track. build 12-Apr-2018 16:00:58 example: phasecenter=6 build 12-Apr-2018 16:00:58 phasecenter='J2000 19h30m00 -40d00m00' build 12-Apr-2018 16:00:58 phasecenter='J2000 292.5deg -40.0deg' build 12-Apr-2018 16:00:58 phasecenter='J2000 5.105rad -0.698rad' build 12-Apr-2018 16:00:58 - phasecenter='ICRS 13:05:27.2780 -049.28.04.458' build 12-Apr-2018 16:00:58 + phasecenter='ICRS 13:05:27.2780 -049.28.04.458' build 12-Apr-2018 16:00:58 + phasecenter='myComet_ephem.tab' build 12-Apr-2018 16:00:58 + phasecenter='MOON' build 12-Apr-2018 16:00:58 + phasecenter='TRACKFIELD' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1812,7 +1815,7 @@ HPX HEALPix grid. --> build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 auto-multithresh: automask by multiple thresholds for deconvolution build 12-Apr-2018 16:00:58 subparameters : sidelobethreshold, noisethreshold, lownoisethreshold, negativethrehsold, smoothfactor, build 12-Apr-2018 16:00:58 - minbeamfrac, cutthreshold, pbmask, growiterations build 12-Apr-2018 16:00:58 + minbeamfrac, cutthreshold, pbmask, growiterations, dogrowprune, minpercentchange, verbose build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Note: By default the intermidiate mask generated by automask at each deconvolution cycle build 12-Apr-2018 16:00:58 is over-written in the next cycle but one can save them by setting build 12-Apr-2018 16:00:58 @@ -2004,6 +2007,41 @@ HPX HEALPix grid. --> build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Do pruning on the grow mask build 12-Apr-2018 16:00:58 + True build 12-Apr-2018 16:00:58 +Experimental sub-parameter for "auto-multithresh": Do pruning on the grow mask build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + minimum percentage change in mask size (per channel plane) to trigger updating of mask by automask build 12-Apr-2018 16:00:58 + -1.0 build 12-Apr-2018 16:00:58 +mininum percentage change in mask size (per channel plane) to trigger updating of mask by automask for subsequent cycles. This check is only applied when noise based threshold is used and when cyclethreshod reached to threshold in the previous cycle. In other words, if the mask size change in a particular channel is less than minpercentchange, it will stop masking for the channel for subsequent cycles. The default, -1.0 (or any value less than 0.0) will turn off this check. Automask will still stop masking if the current channel mask is an empty mask. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + True: print more automasking information in the logger build 12-Apr-2018 16:00:58 + False build 12-Apr-2018 16:00:58 + If it is set to True, the summary of automasking at the end of each automasking process build 12-Apr-2018 16:00:58 + is printed in the logger. Following information per channel will be listed in the summary. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + chan: channel number build 12-Apr-2018 16:00:58 + masking?: F - stop updating automask for the subsequent iteration cycles build 12-Apr-2018 16:00:58 + RMS: robust rms noise build 12-Apr-2018 16:00:58 + peak: peak in residual image build 12-Apr-2018 16:00:58 + thresh_type: type of threshold used (noise or sidelobe) build 12-Apr-2018 16:00:58 + thresh_value: the value of threshold used build 12-Apr-2018 16:00:58 + N_reg: number of the automask regions build 12-Apr-2018 16:00:58 + N_pruned: nubmer of the automask regions removed by pruning build 12-Apr-2018 16:00:58 + N_grow: number of the grow mask regions build 12-Apr-2018 16:00:58 + N_grow_pruned: number of the grow mask regions removed by pruning build 12-Apr-2018 16:00:58 + N_neg_pix: number of pixels for negative mask regions build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Note that for a large cube, extra logging may slow down the process. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -2547,6 +2585,9 @@ HPX HEALPix grid. --> build 12-Apr-2018 16:00:58 0.3 build 12-Apr-2018 16:00:58 0.01 build 12-Apr-2018 16:00:58 75 build 12-Apr-2018 16:00:58 + True build 12-Apr-2018 16:00:58 + -1.0 build 12-Apr-2018 16:00:58 + False build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/images/coordsys_cmpt.cc b/gcwrap/tools/images/coordsys_cmpt.cc build 12-Apr-2018 16:00:58 index 91b0542..4c401e1 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/images/coordsys_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/images/coordsys_cmpt.cc build 12-Apr-2018 16:00:58 @@ -4038,74 +4038,68 @@ void coordsys::trim (Vector& inout, build 12-Apr-2018 16:00:58 inout = out; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -void coordsys::setDirectionCode (const String& code, Bool adjust) build 12-Apr-2018 16:00:58 -{ build 12-Apr-2018 16:00:58 - _setup(__func__); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Exception if type not found build 12-Apr-2018 16:00:58 - Int ic = findCoordinate (Coordinate::DIRECTION, true); build 12-Apr-2018 16:00:58 - // Convert type build 12-Apr-2018 16:00:58 - String code2 = code; build 12-Apr-2018 16:00:58 - casacore::MDirection::Types typeTo; build 12-Apr-2018 16:00:58 - code2.upcase(); build 12-Apr-2018 16:00:58 - if (!casacore::MDirection::getType(typeTo, code2)) { build 12-Apr-2018 16:00:58 - *_log << "Invalid direction code '" << code build 12-Apr-2018 16:00:58 - << "' given. Allowed are : " << endl; build 12-Apr-2018 16:00:58 - for (uInt i=0; idirectionCoordinate(ic)); // Copy build 12-Apr-2018 16:00:58 - if (dirCoordFrom.directionType() == typeTo) return; build 12-Apr-2018 16:00:58 - Vector unitsFrom = dirCoordFrom.worldAxisUnits(); build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - Vector radUnits(2); build 12-Apr-2018 16:00:58 - radUnits = String("rad"); build 12-Apr-2018 16:00:58 - if (!dirCoordFrom.setWorldAxisUnits(radUnits)) { build 12-Apr-2018 16:00:58 - *_log << "Failed to set radian units for DirectionCoordinate" build 12-Apr-2018 16:00:58 - << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 - // Create output DirectionCoordinate build 12-Apr-2018 16:00:58 - Vector refValFrom = dirCoordFrom.referenceValue(); build 12-Apr-2018 16:00:58 - Vector refPixFrom = dirCoordFrom.referencePixel(); build 12-Apr-2018 16:00:58 - Vector incrFrom = dirCoordFrom.increment(); build 12-Apr-2018 16:00:58 - DirectionCoordinate dirCoordTo (typeTo, dirCoordFrom.projection(), build 12-Apr-2018 16:00:58 - refValFrom(0), refValFrom(1), build 12-Apr-2018 16:00:58 - incrFrom(0), incrFrom(1), build 12-Apr-2018 16:00:58 - dirCoordFrom.linearTransform(), build 12-Apr-2018 16:00:58 - refPixFrom(0), refPixFrom(1)); build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - if (adjust) { build 12-Apr-2018 16:00:58 - casacore::MDirection::Convert machine; build 12-Apr-2018 16:00:58 - const ObsInfo& obsInfo = _csys->obsInfo(); build 12-Apr-2018 16:00:58 - Bool madeMachine = build 12-Apr-2018 16:00:58 - CoordinateUtil::makeDirectionMachine(*_log, machine, dirCoordTo, build 12-Apr-2018 16:00:58 - dirCoordFrom, obsInfo, obsInfo); build 12-Apr-2018 16:00:58 - // cerr << "made DirectionMachine = " << madeMachine << endl; build 12-Apr-2018 16:00:58 - // build 12-Apr-2018 16:00:58 - if (madeMachine) { build 12-Apr-2018 16:00:58 - MVDirection mvdTo, mvdFrom; build 12-Apr-2018 16:00:58 - Bool ok = dirCoordFrom.toWorld (mvdFrom, refPixFrom); build 12-Apr-2018 16:00:58 - if (ok) { build 12-Apr-2018 16:00:58 - mvdTo = machine(mvdFrom).getValue(); build 12-Apr-2018 16:00:58 - Vector referenceValueTo(2); build 12-Apr-2018 16:00:58 - referenceValueTo(0) = mvdTo.getLong(); build 12-Apr-2018 16:00:58 - referenceValueTo(1) = mvdTo.getLat(); build 12-Apr-2018 16:00:58 - if (!dirCoordTo.setReferenceValue(referenceValueTo)) { build 12-Apr-2018 16:00:58 - *_log << dirCoordTo.errorMessage() << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - if (!dirCoordTo.setWorldAxisUnits(unitsFrom)) { build 12-Apr-2018 16:00:58 - *_log << dirCoordTo.errorMessage() << LogIO::EXCEPTION; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 +void coordsys::setDirectionCode( build 12-Apr-2018 16:00:58 + const casacore::String& code, casacore::Bool adjust build 12-Apr-2018 16:00:58 +) { build 12-Apr-2018 16:00:58 + _setup(__func__); build 12-Apr-2018 16:00:58 + // Exception if type not found build 12-Apr-2018 16:00:58 + auto ic = findCoordinate (Coordinate::DIRECTION, true); build 12-Apr-2018 16:00:58 + // Convert type build 12-Apr-2018 16:00:58 + String code2 = code; build 12-Apr-2018 16:00:58 + casacore::MDirection::Types typeTo; build 12-Apr-2018 16:00:58 + code2.upcase(); build 12-Apr-2018 16:00:58 + if (!casacore::MDirection::getType(typeTo, code2)) { build 12-Apr-2018 16:00:58 + *_log << "Invalid direction code '" << code build 12-Apr-2018 16:00:58 + << "' given. Allowed are : " << endl; build 12-Apr-2018 16:00:58 + for (uInt i=0; ireplaceCoordinate(dirCoordTo, ic); build 12-Apr-2018 16:00:58 + // Bug out if nothing to do build 12-Apr-2018 16:00:58 + auto dirCoordFrom(_csys->directionCoordinate(ic)); // Copy build 12-Apr-2018 16:00:58 + if (dirCoordFrom.directionType() == typeTo) return; build 12-Apr-2018 16:00:58 + auto unitsFrom = dirCoordFrom.worldAxisUnits(); build 12-Apr-2018 16:00:58 + auto radUnits = Vector(2, "rad"); build 12-Apr-2018 16:00:58 + ThrowIf ( build 12-Apr-2018 16:00:58 + ! dirCoordFrom.setWorldAxisUnits(radUnits), build 12-Apr-2018 16:00:58 + "Failed to set radian units for DirectionCoordinate" build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + // Create output DirectionCoordinate build 12-Apr-2018 16:00:58 + auto refValFrom = dirCoordFrom.referenceValue(); build 12-Apr-2018 16:00:58 + auto refPixFrom = dirCoordFrom.referencePixel(); build 12-Apr-2018 16:00:58 + auto incrFrom = dirCoordFrom.increment(); build 12-Apr-2018 16:00:58 + DirectionCoordinate dirCoordTo( build 12-Apr-2018 16:00:58 + typeTo, dirCoordFrom.projection(), refValFrom(0), refValFrom(1), build 12-Apr-2018 16:00:58 + incrFrom(0), incrFrom(1), dirCoordFrom.linearTransform(), build 12-Apr-2018 16:00:58 + refPixFrom(0), refPixFrom(1) build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + if (adjust) { build 12-Apr-2018 16:00:58 + casacore::MDirection::Convert machine; build 12-Apr-2018 16:00:58 + const auto& obsInfo = _csys->obsInfo(); build 12-Apr-2018 16:00:58 + auto madeMachine = CoordinateUtil::makeDirectionMachine( build 12-Apr-2018 16:00:58 + *_log, machine, dirCoordTo, build 12-Apr-2018 16:00:58 + dirCoordFrom, obsInfo, obsInfo build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + if (madeMachine) { build 12-Apr-2018 16:00:58 + MVDirection mvdTo, mvdFrom; build 12-Apr-2018 16:00:58 + if (dirCoordFrom.toWorld (mvdFrom, refPixFrom)) { build 12-Apr-2018 16:00:58 + mvdTo = machine(mvdFrom).getValue(); build 12-Apr-2018 16:00:58 + Vector referenceValueTo(2); build 12-Apr-2018 16:00:58 + referenceValueTo(0) = mvdTo.getLong(); build 12-Apr-2018 16:00:58 + referenceValueTo(1) = mvdTo.getLat(); build 12-Apr-2018 16:00:58 + ThrowIf( build 12-Apr-2018 16:00:58 + ! dirCoordTo.setReferenceValue(referenceValueTo), build 12-Apr-2018 16:00:58 + dirCoordTo.errorMessage() build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + ThrowIf( build 12-Apr-2018 16:00:58 + ! dirCoordTo.setWorldAxisUnits(unitsFrom), build 12-Apr-2018 16:00:58 + dirCoordTo.errorMessage() build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + _csys->replaceCoordinate(dirCoordTo, ic); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 void coordsys::setSpectralCode (const String& code, Bool adjust) build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/images/image.xml b/gcwrap/tools/images/image.xml build 12-Apr-2018 16:00:58 index ddfb805..1fe54b1 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/images/image.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/images/image.xml build 12-Apr-2018 16:00:58 @@ -4560,17 +4560,17 @@ We use the Componentlist GUI to look at the strongest component. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Initial estimate PCF profile amplitudes. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Initial estimate PCF profile centers, in pixels. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Initial estimate PCF profile FWHMs, in pixels. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -4585,17 +4585,17 @@ We use the Componentlist GUI to look at the strongest component. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 The amplitude ratio constraints for non-reference components to reference component in gaussian multiplets. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 The center offset constraints (in pixels) for non-reference components to reference component in gaussian multiplets. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 The FWHM ratio constraints for non-reference components to reference component in gaussian multiplets. build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Initial estimate of individual gaussian amplitudes in gaussian multiplets. build 12-Apr-2018 16:00:58 @@ -4666,6 +4666,11 @@ We use the Componentlist GUI to look at the strongest component. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + string build 12-Apr-2018 16:00:58 + intVec build 12-Apr-2018 16:00:58 + intArray build 12-Apr-2018 16:00:58 + doubleVec build 12-Apr-2018 16:00:58 + doubleArray build 12-Apr-2018 16:00:58 Standard deviation array or image name. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -9512,7 +9517,7 @@ ib.done() build 12-Apr-2018 16:00:58 true build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Algorithm to use. Supported values are "chauvenet", "classic", "fit-half", and "hinges-fences". Minimum match is supported. build 12-Apr-2018 16:00:58 + Algorithm to use. Supported values are "biweight", "chauvenet", "classic", "fit-half", and "hinges-fences". Minimum match is supported. build 12-Apr-2018 16:00:58 classic build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -9532,13 +9537,17 @@ ib.done() build 12-Apr-2018 16:00:58 -1 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - For chauvenet, this is the maximum number of iterations to attempt. Iterating will stop when either this limit is reached, or the zscore criterion is met. If negative, iterate until the zscore criterion is met. Ignored if algortihm is not "chauvenet". build 12-Apr-2018 16:00:58 + For chauvenet, this is the maximum number of iterations to attempt. Iterating will stop when either this limit is reached, or the zscore criterion is met. If negative, iterate until the zscore criterion is met. Ignored if algorithm is not "chauvenet". build 12-Apr-2018 16:00:58 -1 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Method to use for calculating classical statistics. Supported methods are "auto", "tiled", and "framework". Ignored if algorithm is not "classic". build 12-Apr-2018 16:00:58 auto build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + For biweight, this is the maximum number of iterations to attempt. Iterating will stop when either this limit is reached, or the zscore criterion is met. If negative, do a fast, simple computation (see description). Ignored if the algorithm is not "chauvenet". build 12-Apr-2018 16:00:58 + 3 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -9763,6 +9772,79 @@ Several types of statistical algorithms are supported: build 12-Apr-2018 16:00:58 6.5 6,225,098,696 build 12-Apr-2018 16:00:58 7.0 195,341,107,722 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +* biweight: The biweight algorithm is a robust iterative algorithm that computes two build 12-Apr-2018 16:00:58 + quantities called the "location" and the "scale", which are analogous to the mean build 12-Apr-2018 16:00:58 + and the standard deviation. In this case, the only keys present in the returned build 12-Apr-2018 16:00:58 + dictionary are 'mean' (location), 'sigma' (scale), 'npts', 'min', and 'max'. The build 12-Apr-2018 16:00:58 + last three represent the values using the entire distribution. Note that the build 12-Apr-2018 16:00:58 + biweight algorithm does not support computation of quantile-like values (median, build 12-Apr-2018 16:00:58 + madm, q1, q3, and iqr), so setting robust=True will cause a warning message to build 12-Apr-2018 16:00:58 + be logged regarding that, and the computation will proceed. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Important equations for the biweight algorithm are build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + A. How to compute u_i values, which are related to the weights w_i = (1 - u_i*u_i), build 12-Apr-2018 16:00:58 + using the build 12-Apr-2018 16:00:58 + equation build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + u_i = (x_i - c_bi)/(6.0*s_bi) (1) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + where x_i are the data values, c_bi is the biweight location and s_bi is the build 12-Apr-2018 16:00:58 + biweight scale. For the initial computation of the u_i values, c_bi is set build 12-Apr-2018 16:00:58 + equal to the median of the distribution and s_bi is set equal to build 12-Apr-2018 16:00:58 + the normalized median of the absolute deviation about the median (that is the build 12-Apr-2018 16:00:58 + median of the absolute deviation about the median multiplied by the value of build 12-Apr-2018 16:00:58 + the probit function at 0.75). build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + B The location, c_bi, is computed from build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + c_bi = sum(x_i * w_i^2)/sum(w_i^2) (2) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + where only values of u_i which satisfy abs(u_i) < 1 (w_i > 0) are used in the sums. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + C. The scale value is computed using build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + n * sum((x_i - c_bi)^2 * w_i^4) build 12-Apr-2018 16:00:58 + s_bi^2 = _______________________________ (3) build 12-Apr-2018 16:00:58 + p * max(1, p - 1) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + where n is the number of points for the entire distribution (which includes all build 12-Apr-2018 16:00:58 + the data, even for which abs(u_i) >= 1) and p is given by build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + p = abs(sum((w_i) * (5*w_i - 4))) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Again, the sums include only data for which abs(u_i) < 1. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + The algorithm proceeds as follows. build 12-Apr-2018 16:00:58 + 1. Compute initial u_i values (and hence w_i values) from equation (1), setting build 12-Apr-2018 16:00:58 + c_bi equal to the median of the distribution and s_bi equal to the normalized build 12-Apr-2018 16:00:58 + median of the absolute deviation about the median. build 12-Apr-2018 16:00:58 + 2. Compute the initial value of the scale using the w_i values computed in build 12-Apr-2018 16:00:58 + step 1. using equation 3. build 12-Apr-2018 16:00:58 + 3. Recompute u_i/w_i values using the most recent previous scale and location build 12-Apr-2018 16:00:58 + values. build 12-Apr-2018 16:00:58 + 4. Compute the location using the u_i.w_i values from step 3 and equation (2). build 12-Apr-2018 16:00:58 + 5. Recompute u_i/w_i values using the most recent previous scale and location build 12-Apr-2018 16:00:58 + values. build 12-Apr-2018 16:00:58 + 6. Compute the new scale value using the the u_i/w_i values computed in build 12-Apr-2018 16:00:58 + step 5 and the value of the location computed in step 4. build 12-Apr-2018 16:00:58 + 7. Steps 3. - 6. are repeated until convergence occurs or the maximum number of build 12-Apr-2018 16:00:58 + iterations (specified in the niter parameter) is reached. The convergence build 12-Apr-2018 16:00:58 + criterion is given by build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + abs(s_bi - s_bi,prev) < 0.03 * sqrt(0.5/(n - 1)) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + where s_bi,prev is the value of the scale computed in the previous iteration. build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + In the special case where niter is specified to be negative, the faster, build 12-Apr-2018 16:00:58 + non-iterative algorithm proceeds as follows: build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + 1. Compute u_i/w_i values using the median for the location and the normalized build 12-Apr-2018 16:00:58 + median of the absolute deviation about the median as the scale build 12-Apr-2018 16:00:58 + 2. Compute the location and scale (which can be carried out simultaneously) build 12-Apr-2018 16:00:58 + using the u_i/w_i values computed in step 1. The value of the location is build 12-Apr-2018 16:00:58 + just the median that is used in equation (3) to compute the scale build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 NOTES ON FLUX DENSITIES AND FLUXES build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Fluxes and flux densities are not computed if any of the following conditions is met: build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/images/image_cmpt.cc b/gcwrap/tools/images/image_cmpt.cc build 12-Apr-2018 16:00:58 index 34bb48a..66dc82c 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/images/image_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/images/image_cmpt.cc build 12-Apr-2018 16:00:58 @@ -5114,7 +5114,7 @@ record* image::statistics( build 12-Apr-2018 16:00:58 bool stretch, const string& logfile, build 12-Apr-2018 16:00:58 bool append, const string& algorithm, double fence, build 12-Apr-2018 16:00:58 const string& center, bool lside, double zscore, build 12-Apr-2018 16:00:58 - int maxiter, const string& clmethod build 12-Apr-2018 16:00:58 + int maxiter, const string& clmethod, int niter build 12-Apr-2018 16:00:58 ) { build 12-Apr-2018 16:00:58 _log << _ORIGIN; build 12-Apr-2018 16:00:58 if (detached()) { build 12-Apr-2018 16:00:58 @@ -5172,7 +5172,18 @@ record* image::statistics( build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 String myalg = algorithm; build 12-Apr-2018 16:00:58 myalg.downcase(); build 12-Apr-2018 16:00:58 - if (myalg.startsWith("ch")) { build 12-Apr-2018 16:00:58 + if (myalg.startsWith("b")) { build 12-Apr-2018 16:00:58 + _stats->configureBiweight(niter); build 12-Apr-2018 16:00:58 + if (robust) { build 12-Apr-2018 16:00:58 + _log << LogIO::WARN << "The biweight algorithm " build 12-Apr-2018 16:00:58 + << "does not support computation of quantile-like " build 12-Apr-2018 16:00:58 + << "(median, MADM, first/third quartile, IQR) " build 12-Apr-2018 16:00:58 + << "statistics (robust=True). Proceeding without " build 12-Apr-2018 16:00:58 + << "calculating those stats." << LogIO::POST; build 12-Apr-2018 16:00:58 + robust = False; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else if (myalg.startsWith("ch")) { build 12-Apr-2018 16:00:58 _stats->configureChauvenet(zscore, maxiter); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else if (myalg.startsWith("cl")) { build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/images/imagepol_cmpt.cc b/gcwrap/tools/images/imagepol_cmpt.cc build 12-Apr-2018 16:00:58 index c87276e..3fdaa8f 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/images/imagepol_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/images/imagepol_cmpt.cc build 12-Apr-2018 16:00:58 @@ -138,7 +138,7 @@ imagepol::complexlinpol(const std::string& outfile) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 bool rstat(false); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -178,7 +178,7 @@ imagepol::depolratio(const std::string& infile, const bool debias, const double build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -221,11 +221,14 @@ imagepol::done() build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 bool build 12-Apr-2018 16:00:58 -imagepol::fourierrotationmeasure(const std::string& complex, const std::string& amp, const std::string& pa, const std::string& real, const std::string& imag, const bool zerolag0) build 12-Apr-2018 16:00:58 -{ build 12-Apr-2018 16:00:58 +imagepol::fourierrotationmeasure( build 12-Apr-2018 16:00:58 + const std::string& complex, const std::string& amp, build 12-Apr-2018 16:00:58 + const std::string& pa, const std::string& real, build 12-Apr-2018 16:00:58 + const std::string& imag, const bool zerolag0 build 12-Apr-2018 16:00:58 +) { build 12-Apr-2018 16:00:58 bool rstat(false); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -272,7 +275,7 @@ image * build 12-Apr-2018 16:00:58 imagepol::fractotpol(const bool debias, const double clip, const double sigma, const std::string& outfile) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -352,7 +355,7 @@ imagepol::makecomplex(const std::string& complex, const std::string& real, const build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 bool rstat(false); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -415,29 +418,31 @@ imagepol::pol(const std::string& which, const bool debias, const double clip, co build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 -bool build 12-Apr-2018 16:00:58 -imagepol::rotationmeasure(const std::string& rm, const std::string& rmerr, const std::string& pa0, const std::string& pa0err, const std::string& nturns, const std::string& chisq, const double sigma, const double rmfq, const double rmmax, const double maxpaerr, const std::string& , const int , const int ) build 12-Apr-2018 16:00:58 -{ build 12-Apr-2018 16:00:58 - bool rstat(false); build 12-Apr-2018 16:00:58 - try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 - if(itsImPol==0){ build 12-Apr-2018 16:00:58 - *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 - << LogIO::POST; build 12-Apr-2018 16:00:58 - return rstat; build 12-Apr-2018 16:00:58 +bool imagepol::rotationmeasure( build 12-Apr-2018 16:00:58 + const std::string& rm, const std::string& rmerr, build 12-Apr-2018 16:00:58 + const std::string& pa0, const std::string& pa0err, build 12-Apr-2018 16:00:58 + const std::string& nturns, const std::string& chisq, build 12-Apr-2018 16:00:58 + const double sigma, const double rmfq, const double rmmax, build 12-Apr-2018 16:00:58 + const double maxpaerr, const std::string&, const int, const int build 12-Apr-2018 16:00:58 +) { build 12-Apr-2018 16:00:58 + try { build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 + if(! itsImPol) { build 12-Apr-2018 16:00:58 + *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 + << LogIO::POST; build 12-Apr-2018 16:00:58 + return False; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + itsImPol->rotationMeasure( build 12-Apr-2018 16:00:58 + rm, rmerr, pa0, pa0err, nturns, build 12-Apr-2018 16:00:58 + chisq, -1, sigma, rmfq, rmmax, maxpaerr build 12-Apr-2018 16:00:58 + ); build 12-Apr-2018 16:00:58 + return True; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - itsImPol->rotationMeasure(String(rm), String(rmerr), build 12-Apr-2018 16:00:58 - String(pa0), String(pa0err), build 12-Apr-2018 16:00:58 - String(nturns), String(chisq), build 12-Apr-2018 16:00:58 - -1, Float(sigma), Float(rmfq), build 12-Apr-2018 16:00:58 - Float(rmmax), Float(maxpaerr)/*, build 12-Apr-2018 16:00:58 - String(plotter), nx, ny*/); build 12-Apr-2018 16:00:58 - rstat = true; build 12-Apr-2018 16:00:58 - } catch (AipsError x) { build 12-Apr-2018 16:00:58 - *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 12-Apr-2018 16:00:58 - RETHROW(x); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - return rstat; build 12-Apr-2018 16:00:58 + catch (const AipsError& x) { build 12-Apr-2018 16:00:58 + *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 12-Apr-2018 16:00:58 + RETHROW(x); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + return True; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 double build 12-Apr-2018 16:00:58 @@ -445,7 +450,7 @@ imagepol::sigma(const double clip) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 double rvalue(-1.0); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -463,7 +468,7 @@ image * build 12-Apr-2018 16:00:58 imagepol::sigmadepolratio(const std::string& infile, const bool debias, const double clip, const double sigma, const std::string& outfile) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -491,7 +496,7 @@ image * build 12-Apr-2018 16:00:58 imagepol::sigmafraclinpol(const double clip, const double sigma, const std::string& outfile) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -517,7 +522,7 @@ image * build 12-Apr-2018 16:00:58 imagepol::sigmafractotpol(const double clip, const double sigma, const std::string& outfile) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -545,7 +550,7 @@ imagepol::sigmalinpolint(const double clip, const double sigma, const std::strin build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 double rvalue(-1.0); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -563,7 +568,7 @@ image * build 12-Apr-2018 16:00:58 imagepol::sigmalinpolposang(const double clip, const double sigma, const std::string& outfile) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -591,7 +596,7 @@ imagepol::sigmastokes(const std::string& which, const double clip) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 double rvalue(-1.0); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -698,7 +703,7 @@ imagepol::sigmatotpolint(const double clip, const double sigma) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 double rvalue(-1.0); build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 - *itsLog << LogOrigin("imagepol", __FUNCTION__); build 12-Apr-2018 16:00:58 + *itsLog << LogOrigin("imagepol", __func__); build 12-Apr-2018 16:00:58 if(itsImPol==0){ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE <<"No attached image, please use open " build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/measures/measures_cmpt.cc b/gcwrap/tools/measures/measures_cmpt.cc build 12-Apr-2018 16:00:58 index d106b70..1c43012 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/measures/measures_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/measures/measures_cmpt.cc build 12-Apr-2018 16:00:58 @@ -12,7 +12,7 @@ build 12-Apr-2018 16:00:58 ***/ build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -1937,7 +1937,14 @@ measures::doframe(const String &in) { build 12-Apr-2018 16:00:58 if (in.empty()) { build 12-Apr-2018 16:00:58 pcomet_p = new MeasComet; build 12-Apr-2018 16:00:58 } else { build 12-Apr-2018 16:00:58 - pcomet_p = new MeasComet(in); build 12-Apr-2018 16:00:58 + if(Table::isReadable(in, False)){ build 12-Apr-2018 16:00:58 + Table laTable(in); build 12-Apr-2018 16:00:58 + Path leSentier(in); build 12-Apr-2018 16:00:58 + pcomet_p=new MeasComet(laTable, leSentier.absoluteName()); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else{ build 12-Apr-2018 16:00:58 + pcomet_p = new MeasComet(in); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 }; build 12-Apr-2018 16:00:58 if (!pcomet_p->ok()) { build 12-Apr-2018 16:00:58 delete pcomet_p; pcomet_p = 0; build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/ms/ms.xml b/gcwrap/tools/ms/ms.xml build 12-Apr-2018 16:00:58 index 0761050..55b8db4 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/ms/ms.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/ms/ms.xml build 12-Apr-2018 16:00:58 @@ -2245,12 +2245,13 @@ ms.tosdfits("myfile.sdfits") # write SDFITS file build 12-Apr-2018 16:00:58 getfielddirmeas build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Name of the direction column in the FIELD table. build 12-Apr-2018 16:00:58 + Name of the direction column in the FIELD table or 'EPHEMERIS_DIR'. build 12-Apr-2018 16:00:58 PHASE_DIR build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 PHASE_DIR build 12-Apr-2018 16:00:58 DELAY_DIR build 12-Apr-2018 16:00:58 REFERENCE_DIR build 12-Apr-2018 16:00:58 + EPHEMERIS_DIR build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -2277,11 +2278,17 @@ ms.tosdfits("myfile.sdfits") # write SDFITS file build 12-Apr-2018 16:00:58 This function returns the direction measures from the given build 12-Apr-2018 16:00:58 direction column of the MS FIELD table as a either a measure build 12-Apr-2018 16:00:58 dictionary or sexigesimal string representation. build 12-Apr-2018 16:00:58 + If there is an ephemeris attached, this will give you the time dependent build 12-Apr-2018 16:00:58 + direction for the given direction column including the offset which each build 12-Apr-2018 16:00:58 + field may have to the ephemeris it is referencing. You can use the value build 12-Apr-2018 16:00:58 + "EPHEMERIS_DIR" for parameter "dircolname" to access the unaltered ephemeris build 12-Apr-2018 16:00:58 + direction without any potential mosaic offsets. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 ms.open('3C273XC1.MS') build 12-Apr-2018 16:00:58 - print "Delay direction from FIELD table row 3 =", \ build 12-Apr-2018 16:00:58 - ms.getfielddirmeas("DELAY_DIR", 3) build 12-Apr-2018 16:00:58 + print "Delay direction from FIELD table row 3 =", ms.getfielddirmeas("DELAY_DIR", 3) build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + print "Phase direction from ephemeris FIELD table row 4 for time = 5019988459.968 s", ms.getfielddirmeas("PHASE_DIR", 4, 5019988459.968) build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -3707,16 +3714,21 @@ in spectral window 1. build 12-Apr-2018 16:00:58 "corrected" for the CORRECTED_DATA column and "data" for the DATA build 12-Apr-2018 16:00:58 column are supported (minimum match, case insensitive). One may build 12-Apr-2018 16:00:58 specify 'residual' in which case the values used are the result of build 12-Apr-2018 16:00:58 - the CORRECTED_DATA - MODEL_DATA columns, or 'residual_data' in which build 12-Apr-2018 16:00:58 - case the values used are the DATA - MODEL_DATA columns. The last two build 12-Apr-2018 16:00:58 - options are to allow for operatation on timescales or frequency build 12-Apr-2018 16:00:58 - ranges which are larger than that over which the sky signal is build 12-Apr-2018 16:00:58 - expected to be constant. This situation arises in eg, OTF mapping, build 12-Apr-2018 16:00:58 - and also perhaps with sources with significant spectral structure. build 12-Apr-2018 16:00:58 - In cases where the one of the residual columns is specified and the build 12-Apr-2018 16:00:58 - MODEL_DATA column doesn't exist, the default model visibility of build 12-Apr-2018 16:00:58 - value 1 + 0i will be used. In cases where a necessary column doesn't build 12-Apr-2018 16:00:58 + the CORRECTED_DATA column - model, or 'residual_data' in which build 12-Apr-2018 16:00:58 + case the values used are the DATA column - model, where model build 12-Apr-2018 16:00:58 + is the CORRECTED_DATA column if it exists, or if it doesn't, build 12-Apr-2018 16:00:58 + the virtual source model if one exists, or if that doesn't, then build 12-Apr-2018 16:00:58 + no model is used and the 'residual' and 'residual_data' cases build 12-Apr-2018 16:00:58 + are equivalent to the 'corrected' and 'data' cases, respectively. build 12-Apr-2018 16:00:58 + The last two options are to allow for operation on timescales or build 12-Apr-2018 16:00:58 + frequency ranges which are larger than that over which the sky build 12-Apr-2018 16:00:58 + signal is expected to be constant. This situation arises in eg, build 12-Apr-2018 16:00:58 + OTF mapping, and also perhaps with sources with significant build 12-Apr-2018 16:00:58 + spectral structure. In cases where a necessary column doesn't build 12-Apr-2018 16:00:58 exist, an exception will be thrown and no data will be changed. build 12-Apr-2018 16:00:58 + NOTE: It is the user's responsibility to ensure that a model has build 12-Apr-2018 16:00:58 + been set for all selected fields before using datacolumn='residual' build 12-Apr-2018 16:00:58 + or 'residual_data'. build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 RETURN VALUE build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/ms/ms_cmpt.cc b/gcwrap/tools/ms/ms_cmpt.cc build 12-Apr-2018 16:00:58 index e14e0b6..6d2de1a 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/ms/ms_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/ms/ms_cmpt.cc build 12-Apr-2018 16:00:58 @@ -803,9 +803,7 @@ ms::getspectralwindowinfo() build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 variant* build 12-Apr-2018 16:00:58 -ms::getfielddirmeas( build 12-Apr-2018 16:00:58 - const std::string& dircolname, int fieldid, build 12-Apr-2018 16:00:58 - double time, const string& format) build 12-Apr-2018 16:00:58 +ms::getfielddirmeas(const std::string& dircolname, int fieldid, double time, const string& format) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 variant *retval = 0; build 12-Apr-2018 16:00:58 try{ build 12-Apr-2018 16:00:58 @@ -825,6 +823,9 @@ ms::getfielddirmeas( build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else if(colname=="REFERENCE_DIR"){ build 12-Apr-2018 16:00:58 d = msfc.referenceDirMeas(fieldid, time); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + else if(colname=="EPHEMERIS_DIR"){ build 12-Apr-2018 16:00:58 + d = msfc.ephemerisDirMeas(fieldid, time); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 else{ build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE build 12-Apr-2018 16:00:58 @@ -2297,7 +2298,7 @@ ms::selectinit(const int datadescid, const bool resetsel) build 12-Apr-2018 16:00:58 if (retval) build 12-Apr-2018 16:00:58 retval = doMSSelection(*casacRec); // onlyparse=false build 12-Apr-2018 16:00:58 initSel_p = retval; build 12-Apr-2018 16:00:58 - } catch (AipsError x) { // MSSelectionNullSelection build 12-Apr-2018 16:00:58 + } catch (const AipsError &x) { // MSSelectionNullSelection build 12-Apr-2018 16:00:58 String mesg = "selectinit failed for datadescid " + selDDID; build 12-Apr-2018 16:00:58 *itsLog << LogOrigin("ms", "selectinit"); build 12-Apr-2018 16:00:58 *itsLog << LogIO::WARN << mesg << LogIO::POST; build 12-Apr-2018 16:00:58 @@ -3588,6 +3589,12 @@ ms::getdata(const std::vector& items, const bool ifraxis, const int build 12-Apr-2018 16:00:58 ::casac::record *retval(0); build 12-Apr-2018 16:00:58 try { build 12-Apr-2018 16:00:58 if(!detached()) { build 12-Apr-2018 16:00:58 + uInt nrows = itsSelectedMS->nrow(); build 12-Apr-2018 16:00:58 + if (nrows == 0) { build 12-Apr-2018 16:00:58 + *itsLog << LogIO::WARN << "Selected table is empty, cannot get data" << LogIO::POST; build 12-Apr-2018 16:00:58 + return retval; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 if (checkinit()) { build 12-Apr-2018 16:00:58 Record out(RecordInterface::Variable); build 12-Apr-2018 16:00:58 Vector itemnames(items); build 12-Apr-2018 16:00:58 @@ -3595,12 +3602,6 @@ ms::getdata(const std::vector& items, const bool ifraxis, const int build 12-Apr-2018 16:00:58 doingAveraging_p = average; build 12-Apr-2018 16:00:58 bool chanAverage = ((chansel_p.size() > 0) && (chansel_p[2] > 1)); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - uInt nrows = itsSelectedMS->nrow(); build 12-Apr-2018 16:00:58 - if (nrows == 0) { build 12-Apr-2018 16:00:58 - *itsLog << LogIO::WARN << "Selected table is empty - use selectinit" << LogIO::POST; build 12-Apr-2018 16:00:58 - return retval; build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 if (axisgap>0 && ifraxis==false) { build 12-Apr-2018 16:00:58 *itsLog << LogIO::WARN << "ifraxis not requested, ignoring ifraxisgap argument" << LogIO::POST; build 12-Apr-2018 16:00:58 axisgap = 0; build 12-Apr-2018 16:00:58 @@ -3899,7 +3900,7 @@ ms::getdata(const std::vector& items, const bool ifraxis, const int build 12-Apr-2018 16:00:58 retval = casa::fromRecord(out); build 12-Apr-2018 16:00:58 } // checkinit build 12-Apr-2018 16:00:58 } // !detached build 12-Apr-2018 16:00:58 - } catch (AipsError x) { build 12-Apr-2018 16:00:58 + } catch (const AipsError &x) { build 12-Apr-2018 16:00:58 *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 12-Apr-2018 16:00:58 Table::relinquishAutoLocks(true); build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 @@ -6831,6 +6832,12 @@ bool ms::msselect(const ::casac::record& exprs, const bool onlyparse) build 12-Apr-2018 16:00:58 return retVal; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 +void ms::setNewSel(const MeasurementSet& newSelectedMS) { build 12-Apr-2018 16:00:58 + *itsSelectedMS = newSelectedMS; build 12-Apr-2018 16:00:58 + *itsMS = newSelectedMS; build 12-Apr-2018 16:00:58 + if (itsSel) itsSel->setMS(*itsMS); build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 Bool ms::doMSSelection(const ::casac::record& exprs, const bool onlyparse) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 // for internal use build 12-Apr-2018 16:00:58 @@ -6881,18 +6888,23 @@ Bool ms::doMSSelection(const ::casac::record& exprs, const bool onlyparse) build 12-Apr-2018 16:00:58 obsExpr); build 12-Apr-2018 16:00:58 retVal=(itsMSS->getTEN(itsMS).isNull() == false); build 12-Apr-2018 16:00:58 } else { build 12-Apr-2018 16:00:58 - MeasurementSet newSelectedMS(*itsSelectedMS); build 12-Apr-2018 16:00:58 - retVal = mssSetData(*itsSelectedMS, newSelectedMS, "",/*outMSName*/ build 12-Apr-2018 16:00:58 - timeExpr, baselineExpr, fieldExpr, spwExpr, uvDistExpr, build 12-Apr-2018 16:00:58 - taQLExpr, polnExpr, scanExpr, build 12-Apr-2018 16:00:58 - arrayExpr, scanIntentExpr, obsExpr, itsMSS); build 12-Apr-2018 16:00:58 - *itsSelectedMS = newSelectedMS; build 12-Apr-2018 16:00:58 - *itsMS = newSelectedMS; build 12-Apr-2018 16:00:58 - if (itsSel) itsSel->setMS(*itsMS); build 12-Apr-2018 16:00:58 - } build 12-Apr-2018 16:00:58 + MeasurementSet newSelectedMS(*itsSelectedMS); build 12-Apr-2018 16:00:58 + try { build 12-Apr-2018 16:00:58 + retVal = mssSetData(*itsSelectedMS, newSelectedMS, "",/*outMSName*/ build 12-Apr-2018 16:00:58 + timeExpr, baselineExpr, fieldExpr, spwExpr, uvDistExpr, build 12-Apr-2018 16:00:58 + taQLExpr, polnExpr, scanExpr, build 12-Apr-2018 16:00:58 + arrayExpr, scanIntentExpr, obsExpr, itsMSS); build 12-Apr-2018 16:00:58 + } catch (const MSSelectionNullSelection &mssns) { build 12-Apr-2018 16:00:58 + // Empty selections are valid in principle, and after this happens build 12-Apr-2018 16:00:58 + // one should be able to know that for example nrow(true) is 0. build 12-Apr-2018 16:00:58 + setNewSel(newSelectedMS); build 12-Apr-2018 16:00:58 + throw; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + setNewSel(newSelectedMS); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 return retVal; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 - catch (AipsError x) build 12-Apr-2018 16:00:58 + catch (const AipsError &x) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 Table::relinquishAutoLocks(true); build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/ms/ms_private.h b/gcwrap/tools/ms/ms_private.h build 12-Apr-2018 16:00:58 index 1ebdd35..2a0ca1c 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/ms/ms_private.h build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/ms/ms_private.h build 12-Apr-2018 16:00:58 @@ -2,6 +2,7 @@ casacore::Bool detached(); build 12-Apr-2018 16:00:58 casacore::Bool ready2write_(); build 12-Apr-2018 16:00:58 casacore::Bool doMSSelection(const ::casac::record& exprs, build 12-Apr-2018 16:00:58 const bool onlyparse=false); build 12-Apr-2018 16:00:58 +void setNewSel(const casacore::MeasurementSet& newSelectedMS); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::Bool checkinit(); build 12-Apr-2018 16:00:58 casacore::Vector getCorrTypes(casa::vi::VisBuffer2* vb2); build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/mstransformer/mstransformer_cmpt.cc b/gcwrap/tools/mstransformer/mstransformer_cmpt.cc build 12-Apr-2018 16:00:58 index d5510b5..81ad9f3 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/mstransformer/mstransformer_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/mstransformer/mstransformer_cmpt.cc build 12-Apr-2018 16:00:58 @@ -36,7 +36,7 @@ mstransformer::mstransformer() build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 build 12-Apr-2018 16:00:58 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 build 12-Apr-2018 16:00:58 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 @@ -54,7 +54,7 @@ mstransformer::~mstransformer() build 12-Apr-2018 16:00:58 Table::relinquishAutoLocks(true); build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -77,7 +77,7 @@ mstransformer::done() build 12-Apr-2018 16:00:58 Table::relinquishAutoLocks(true); build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -107,7 +107,7 @@ mstransformer::config(const ::casac::record& pars) build 12-Apr-2018 16:00:58 } catch(AipsError x) { build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -130,7 +130,7 @@ mstransformer::open() build 12-Apr-2018 16:00:58 } catch(AipsError x) { build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -155,7 +155,7 @@ mstransformer::open() build 12-Apr-2018 16:00:58 } catch(AipsError x){ build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -177,7 +177,7 @@ mstransformer::mergespwtables(const std::vector &filenames) build 12-Apr-2018 16:00:58 } catch(AipsError x){ build 12-Apr-2018 16:00:58 *logger_p << LogIO::DEBUG1 << "Stack Trace: " << x.getStackTrace() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 - *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 + *logger_p << LogIO::DEBUG1 << "Exception Reported: " << x.getMesg() build 12-Apr-2018 16:00:58 << LogIO::POST; build 12-Apr-2018 16:00:58 RETHROW(x); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/plotms/plotms.xml b/gcwrap/tools/plotms/plotms.xml build 12-Apr-2018 16:00:58 index f5c062a..29630a1 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/plotms/plotms.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/plotms/plotms.xml build 12-Apr-2018 16:00:58 @@ -1886,7 +1886,7 @@ Canvas Methods build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Show major grid lines (horiz. and vert.)? build 12-Apr-2018 16:00:58 + Show major grid lines? build 12-Apr-2018 16:00:58 false build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 @@ -1903,7 +1903,7 @@ Canvas Methods build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 - Show minor grid lines (horiz. and vert.)? build 12-Apr-2018 16:00:58 + Show minor grid lines? build 12-Apr-2018 16:00:58 false build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/synthesis/CalTables/PlotCal.h b/gcwrap/tools/synthesis/CalTables/PlotCal.h build 12-Apr-2018 16:00:58 index c183fb9..25181b1 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/synthesis/CalTables/PlotCal.h build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/synthesis/CalTables/PlotCal.h build 12-Apr-2018 16:00:58 @@ -191,7 +191,8 @@ class PlotCal build 12-Apr-2018 16:00:58 // Return which MAIN table column to return for "CAL_DESC_ID", build 12-Apr-2018 16:00:58 // depending on whether we are plotting a new or old table build 12-Apr-2018 16:00:58 inline casacore::String CDIcol() { return (isNCT_p ? "SPECTRAL_WINDOW_ID" : "CAL_DESC_ID"); }; build 12-Apr-2018 16:00:58 - inline casacore::String GAINcol() { return (isNCT_p ? "CPARAM" : "GAIN"); }; build 12-Apr-2018 16:00:58 + inline casacore::String GAINcol() { return (isNCT_p ? build 12-Apr-2018 16:00:58 + (ct_p.isComplex() ? "CPARAM" : "FPARAM") : "GAIN"); }; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // Private data build 12-Apr-2018 16:00:58 TablePlot *tp_p; build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/synthesis/calibrater.xml b/gcwrap/tools/synthesis/calibrater.xml build 12-Apr-2018 16:00:58 index e2d12db..63257d1 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/synthesis/calibrater.xml build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/synthesis/calibrater.xml build 12-Apr-2018 16:00:58 @@ -2734,6 +2734,35 @@ cb.done(); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Bootstrap the flux density scale from standard calibrators build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + Input cal library file name build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +TBD build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +TBD build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 TEMPORARY method to control use of new VI2 regime build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/synthesis/calibrater_cmpt.cc b/gcwrap/tools/synthesis/calibrater_cmpt.cc build 12-Apr-2018 16:00:58 index f7417eb..581695c 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/synthesis/calibrater_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/synthesis/calibrater_cmpt.cc build 12-Apr-2018 16:00:58 @@ -31,6 +31,7 @@ build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 +#include build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 #include build 12-Apr-2018 16:00:58 @@ -1348,6 +1349,46 @@ calibrater::done() build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //---------------------------------------------------------------------------- build 12-Apr-2018 16:00:58 +// parsecallibfile - convert callib file to a record build 12-Apr-2018 16:00:58 +casac::record* calibrater::parsecallibfile(const std::string& filein ) build 12-Apr-2018 16:00:58 +{ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + casac::record* oRec; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + try { build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + /* build 12-Apr-2018 16:00:58 + if (! itsMS) { build 12-Apr-2018 16:00:58 + *itsLog << LogIO::SEVERE << "Must first open a MeasurementSet." build 12-Apr-2018 16:00:58 + << endl << LogIO::POST; build 12-Apr-2018 16:00:58 + throw( AipsError( "Must first open a MeasurementSet." ) ); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + */ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Log build 12-Apr-2018 16:00:58 + logSink_p.clearLocally(); build 12-Apr-2018 16:00:58 + LogIO os(LogOrigin("calibrater", "parsecallibfile"), logSink_p); build 12-Apr-2018 16:00:58 + os << "Beginning parsecallibfile-)-------" << LogIO::POST; build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Check existence of specified file build 12-Apr-2018 16:00:58 + File diskfile(filein); build 12-Apr-2018 16:00:58 + if (!diskfile.exists()) build 12-Apr-2018 16:00:58 + throw( AipsError( "Specified cal library file ('"+filein+ "') does not exist!") ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + // Call parser build 12-Apr-2018 16:00:58 + Record callibRec = callibSetParams(filein); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + oRec = fromRecord( callibRec ); build 12-Apr-2018 16:00:58 + } catch (AipsError x) { build 12-Apr-2018 16:00:58 + *itsLog << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST; build 12-Apr-2018 16:00:58 + RETHROW(x); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + return( oRec ); build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +} build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 +//---------------------------------------------------------------------------- build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 bool calibrater::setvi(const bool old, const bool quiet) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/synthesis/synthesisimager_cmpt.cc b/gcwrap/tools/synthesis/synthesisimager_cmpt.cc build 12-Apr-2018 16:00:58 index 40781bd..f3d9515 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/synthesis/synthesisimager_cmpt.cc build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/synthesis/synthesisimager_cmpt.cc build 12-Apr-2018 16:00:58 @@ -62,7 +62,7 @@ namespace casac { build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 // itsImager = new SynthesisImagerVi2(); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + itsLog = new LogIO(); build 12-Apr-2018 16:00:58 //itsImager = new SynthesisImager(); build 12-Apr-2018 16:00:58 itsImager = makeSI(true); build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 @@ -179,22 +179,55 @@ synthesisimager::selectdata(const casac::record& selpars) build 12-Apr-2018 16:00:58 bool synthesisimager::defineimage(const casac::record& impars, const casac::record& gridpars) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 Bool rstat(false); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + *itsLog << casacore::LogOrigin("synthesisimager", __func__); build 12-Apr-2018 16:00:58 try build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 //if( ! itsImager ) itsImager = new SynthesisImager(); build 12-Apr-2018 16:00:58 itsImager = makeSI(); build 12-Apr-2018 16:00:58 casacore::Record irecpars = *toRecord( impars ); build 12-Apr-2018 16:00:58 + ////Temporary fix till we get the checking for phasecenter in fromRecord build 12-Apr-2018 16:00:58 + ////to deal with this build 12-Apr-2018 16:00:58 + ////////////// build 12-Apr-2018 16:00:58 + String movingSource=""; build 12-Apr-2018 16:00:58 + if( irecpars.dataType("phasecenter") == TpString ){ build 12-Apr-2018 16:00:58 + String pcen=irecpars.asString("phasecenter"); build 12-Apr-2018 16:00:58 + //seems to be a table so assuming ephemerides table build 12-Apr-2018 16:00:58 + //Or A known planet build 12-Apr-2018 16:00:58 + //Or special case build 12-Apr-2018 16:00:58 + casacore::MDirection::Types refType; build 12-Apr-2018 16:00:58 + Bool trackingNearSource= (Table::isReadable(pcen, False)) build 12-Apr-2018 16:00:58 + || ( (casacore::MDirection::getType(refType, pcen)) && (refType > casacore::MDirection::N_Types && refType < casacore::MDirection:: N_Planets )) build 12-Apr-2018 16:00:58 + || (upcase(pcen)==String("TRACKFIELD")); build 12-Apr-2018 16:00:58 + if(trackingNearSource){ build 12-Apr-2018 16:00:58 + *itsLog << "Detected tracking of moving source " << casacore::LogIO::POST; build 12-Apr-2018 16:00:58 + if(refType > casacore::MDirection::N_Types && refType < casacore::MDirection::COMET){ build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + *itsLog << "Will be Using measures internal ephemeris for " << casacore::MDirection::showType(refType) << " to track " << casacore::LogIO::POST; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + movingSource=pcen; build 12-Apr-2018 16:00:58 + irecpars.define("phasecenter", ""); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + //cerr << "PCEN " << pcen << " " << irecpars.asString("phasecenter")<< endl; build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 SynthesisParamsImage ipars; build 12-Apr-2018 16:00:58 ipars.fromRecord( irecpars ); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 casacore::Record grecpars = *toRecord( gridpars ); build 12-Apr-2018 16:00:58 SynthesisParamsGrid gpars; build 12-Apr-2018 16:00:58 gpars.fromRecord( grecpars ); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + if(movingSource != casacore::String("")){ build 12-Apr-2018 16:00:58 + itsImager->setMovingSource(movingSource); build 12-Apr-2018 16:00:58 + } build 12-Apr-2018 16:00:58 itsImager->defineImage( ipars, gpars ); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 + build 12-Apr-2018 16:00:58 /* build 12-Apr-2018 16:00:58 itsImager->defineImage( ipars.imageName, ipars.imsize[0], ipars.imsize[1], build 12-Apr-2018 16:00:58 ipars.cellsize[0], ipars.cellsize[1], ipars.stokes, ipars.phaseCenter, build 12-Apr-2018 16:00:58 @@ -654,6 +687,9 @@ synthesisimager::done() build 12-Apr-2018 16:00:58 delete itsImager; build 12-Apr-2018 16:00:58 itsImager=NULL; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 + if(itsLog) build 12-Apr-2018 16:00:58 + delete itsLog; build 12-Apr-2018 16:00:58 + itsLog=NULL; build 12-Apr-2018 16:00:58 } build 12-Apr-2018 16:00:58 catch (AipsError x) build 12-Apr-2018 16:00:58 { build 12-Apr-2018 16:00:58 diff --git a/gcwrap/tools/synthesis/synthesisimager_private.h b/gcwrap/tools/synthesis/synthesisimager_private.h build 12-Apr-2018 16:00:58 index 785f6a2..e9729cd 100644 build 12-Apr-2018 16:00:58 --- a/gcwrap/tools/synthesis/synthesisimager_private.h build 12-Apr-2018 16:00:58 +++ b/gcwrap/tools/synthesis/synthesisimager_private.h build 12-Apr-2018 16:00:58 @@ -1,5 +1,5 @@ build 12-Apr-2018 16:00:58 casa::SynthesisImager *itsImager; build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 casacore::String checkStr(std::string instr); build 12-Apr-2018 16:00:58 - build 12-Apr-2018 16:00:58 +casacore::LogIO *itsLog; build 12-Apr-2018 16:00:58 casa::SynthesisImager* makeSI(bool forceNew=false, bool oldvi=false); build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Comparison returned: 1 build 12-Apr-2018 16:00:58 Checkout: git checkout ARD-3 error 12-Apr-2018 16:00:58 Already on 'ARD-3' build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 [git, tag, -a, 5.3.0-84-test-ARD-3-3, -m 'Automatic tag'] build 12-Apr-2018 16:00:58 build 12-Apr-2018 16:00:58 Done tagging 5.3.0-84-test-ARD-3-3 build 12-Apr-2018 16:00:58 Pushing 5.3.0-84-test-ARD-3-3 to origin error 12-Apr-2018 16:00:59 To ssh://git@open-bitbucket.nrao.edu:7999/casa/casa.git error 12-Apr-2018 16:00:59 * [new tag] 5.3.0-84-test-ARD-3-3 -> 5.3.0-84-test-ARD-3-3 build 12-Apr-2018 16:00:59 build 12-Apr-2018 16:00:59 Pushed 5.3.0-84-test-ARD-3-3 to origin build 12-Apr-2018 16:00:59 build 12-Apr-2018 16:00:59 BUILD SUCCESSFUL build 12-Apr-2018 16:00:59 build 12-Apr-2018 16:00:59 Total time: 7.922 secs simple 12-Apr-2018 16:00:59 Finished task 'Script' with result: Success simple 12-Apr-2018 16:00:59 Running post build plugin 'Docker Container Cleanup' simple 12-Apr-2018 16:00:59 Running post build plugin 'NCover Results Collector' simple 12-Apr-2018 16:00:59 Running post build plugin 'Clover Results Collector' simple 12-Apr-2018 16:00:59 Running post build plugin 'npm Cache Cleanup' simple 12-Apr-2018 16:00:59 Running post build plugin 'Artifact Copier' simple 12-Apr-2018 16:00:59 Finalising the build... simple 12-Apr-2018 16:00:59 Stopping timer. simple 12-Apr-2018 16:00:59 Build ARD-BPT4-TBFP-3 completed. simple 12-Apr-2018 16:00:59 Running on server: post build plugin 'NCover Results Collector' simple 12-Apr-2018 16:00:59 Running on server: post build plugin 'Build Hanging Detection Configuration' simple 12-Apr-2018 16:00:59 Running on server: post build plugin 'Clover Delta Calculator' simple 12-Apr-2018 16:00:59 Running on server: post build plugin 'Maven Dependencies Postprocessor' simple 12-Apr-2018 16:00:59 All post build plugins have finished simple 12-Apr-2018 16:00:59 Generating build results summary... simple 12-Apr-2018 16:00:59 Saving build results to disk... simple 12-Apr-2018 16:00:59 Logging substituted variables... simple 12-Apr-2018 16:00:59 Indexing build results... simple 12-Apr-2018 16:00:59 Finished building ARD-BPT4-TBFP-3.