{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "memo-series.ipynb", "provenance": [] } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "CDWZ_RZAznlo" }, "source": [ "# Memo Series & Knowledgebase\n" ] }, { "cell_type": "markdown", "metadata": { "id": "_hfWHSoAznlp" }, "source": [ "## CASA Memos\n", "\n", "CASA Memo Series\n", "\n", "- [CASA Memo 1: MeasurementSet Definition version 2.0](https://drive.google.com/file/d/1IapBTsFYnUT1qPu_UK09DIFGM81EIZQr/view?usp=sharing) -\n", " A.J. Kemball & M.H. Wieringa, v. 01/2000\n", "\n", "- [CASA Memo 2: Convention for UVW calculations in CASA](https://drive.google.com/file/d/1a-eUwNrfnYjaUQTjJDfOjJCa8ZaSzZcn/view?usp=sharing) - U. Rau, v. 02/2013\n", "\n", "- [CASA Memo 3: MeasurementSet Selection Syntax](https://drive.google.com/file/d/1LXrVu529pI_Di2-J6BJqmlXbgfihc2nf/view?usp=sharing) - S. Bhatnagar, v. 06/2015\n", "\n", "- [CASA Memo 4: CASA Imager Paralellization: Measurement and Analysis of Runtime Performance for Continuum Imaging](https://drive.google.com/file/d/14GoBf8kiBCEITfyURnoFuTAAj49_FxXA/view?usp=sharing) - S. Bhatnagar & CASA HPC team, v. 03/2016\n", "\n", "- [CASA Memo 5: CASA Performance on Lustre: serial vs parallel and comparison with AIPS](https://drive.google.com/file/d/1J4BxUl_AjxbAiFQwJLl8RZ5MYW3r-if_/view?usp=sharing) - B. Emonts, v. 06/2018\n", "\n", "- [CASA Memo 6: User Survey and Helpdesk Statistics 2018](https://drive.google.com/file/d/18OHYERd11S2zZ8Hkx1h6j8e8iqsStkJs/view?usp=sharing) - B. Emonts, v. 11/2018\n", "\n", "- [CASA Memo 7: ALMA Mosaicing Imaging Issues Prior to Cycle 6](https://drive.google.com/file/d/1F2LoWnJlRTdq-hRrlPfHfz78sfdhBRzM/view?usp=sharing) - North American ALMA Science Center (NAASC) Software Support Team, v. 09/2018. Copy of NAASC Memo 117 (credit: NAASC).\n", "\n", "- [CASA Memo 8: Non-Amnesic CLEAN: A boxless/maskless CLEAN style deconvolution algorithm](https://drive.google.com/file/d/1atGvO-2ehMeWZk3FuoL2OMIKtkxjSYei/view?usp=sharing) - K. Golap, v. 12/2015\n", "\n", "- [CASA Memo 9: Improvements to Multi-Scale CLEAN and Multi-Term Multi-Frequency CLEAN](https://drive.google.com/file/d/1_M3f4QNsMw2k-FpxtWSCKwXWC8YTRwgL/view?usp=sharing) - J.-W. Steeb & U. Rau, v. 07/2019\n", "\n", "- [CASA Memo 10: Restoring/Common Beam and Flux Scaling in tclean](https://drive.google.com/file/d/1ngPiUsGDazhfno8RxV4MXuPI6SnbLgO0/view?usp=sharing) - J.-W. Steeb & U. Rau, v. 08/2019\n", "\n", "- [CASA Memo 11: Heterogeneous Pointing Corrections in AW-Projection](https://drive.google.com/file/d/1Z2BZKTqp0hmQkYFNltY1X0YDWX2gPFG5/view?usp=sharing) - P. Jagannathan & S. Bhatnagar 10/2019\n", "\n", "- [CASA Memo 12: The Fringefit Task in CASA](https://drive.google.com/file/d/1yYIoMraHO_AxdnT5__Twqn4qAg_8z3ej/view?usp=sharing) - D. Small & G. Moellenbrock 08/2022\n" ] }, { "cell_type": "markdown", "metadata": { "id": "LfttVacXznlq" }, "source": [ "## CASAcore Memos\n", "\n", "CASA's underlying structure is based on [casacore](http://casacore.github.io/). The [CASAcore Notes](http://casacore.github.io/casacore-notes/) describe some of the most fundamental properties, such as on the table system, data selection syntax, and data model definitions.\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "ysZRAi5-znlq" }, "source": [ "## CASA Knowledgebase\n", "\n", "The CASA Knowledgebase pages provide bits of wisdom on CASA that should be preserved, and that may be of use to expert users.\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "l_26_BqNznlr" }, "source": [ "### Correcting bad common beam\n", "\n", "This script re-calculates the common beam by discarding certain channels where the point-spread-function (PSF) or \\'beam\\' deviates substantially from those of the other channels.\n", "\n", "It can happen that an MS contains one or more channels for which the point-spread-function (PSF) or 'beam' deviates a lot from those of the other channels. This can be the result of substantial flagging, missing data, or other factors. When making a data cube with *restoringbeam=\\'common\\'*, these \\\"outlier\\\" channels can create a common beam that does not reflect the beam for the bulk of the channels.\n", "\n", "[This example_robust_common_beam.py script](https://colab.research.google.com/drive/1ad9GFgd58xwxAxyg4mhAzSR-pAcICjt0?usp=sharing) will correct the common beam by detecting and/or flagging outliers channels in the calculation of the common beam. The outlier channels are identified as those channels for which the area of those beams deviate from the median beam by a user-specified factor in computation of the median area beam. The script will do the following:\n", "\n", "- Run tclean with niter=0\n", "- Detect/flag outliers in chan beams\n", "- Use the remaining beams with ia.commonbeam() to get a new commonbeam\n", "- Specify this explicitly to tclean in the subsequent niter\\>0 run.\n", "\n", "The attach script primarily demonstrates the solution of iter0 -\\> calc_good_beam -\\> specify_restoringbeam_in_iter1 along with tclean. If the new commonbeam is not larger than all the bad beams, then the iter0 tclean run\\'s restoration step will throw warnings for all channels that cannot be convolved to the new common beam.\n", "\n", "The functionality provided by this script is not yet implemented in the commonbeam method of the image analysis tool (*ia.commonbeam*).\n", "\n", "Please note that the script is based on an ALMA test-data that was used for characterizing the problem in pipeline processing at the NAASC (JIRA ticket PIPE-375). Parameters have to be adjusted for each use case, including heuristics to detect outlier channels and what to substitute the \\'bad\\' beams with.\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "oFRiBt7Tznlr" }, "source": [ "### ALMA polarization: XY-phase solver avoids +-45 deg solution\n", "\n", "The XY-phase calibration obtained with CASA task gaical (gaintype=\\'XYf+QU\\') avoids to output +/- 45 degree solutions. This is a subtle consequence of the algorithm used to solve for the cross-hand phase, and should be harmless for the calibration of ALMA full-polarization data.\n", "\n", "When using the task **gaincal** with parameter *gaintype=\\'XYf+QU\\'*, the solution to solve is a fit for a slope in 2D data (imag vs. real) from data that has noise is *both* dimensions. In such cases, it is always better to fit a *shallow* (not steep) slope, so if the slope (for imag vs. real) comes out \\>1.0, it flips the axes (to real vs. imag) and re-fits it (and inverts the resulting value to account for the swap). This minimizes the effect of the real axis noise on the slope calculation. This yields far more accurate solutions when the nominal slope is very large (\\>\\>1.0, e.g., the data nearly parallel to the imag axis == cross-hand phase approaching +/-90 deg).\n", "\n", "The case of slope = 1.0 (which is cross-hand phase of 45 deg) corresponds to the slope at which to pivot the axis swap decision. When plotting the cross-hand phase solutions, a gap appears at +-45 deg (see figure). This gap is a property of the typical spacings between values in the statistical distribution of slope values. I.e., for a sample of N points filling a distribution with a finite width, there is a characteristic *minimum* spacing between values that is some small *fraction* of the width of the distribution. Of course, smaller spacings are not forbidden, but they are rare. The axis swap reveals this property since all of the (nominal) slopes that are \\>1.0 (cross-hand phases \\>45.0 deg) are fit with swapped data and yield the inverse slope (\\<1.0), and than inverted to be \\>1.0 again. The typical slopes mostly do not get arbitrarily close to exactly 1.0, so the gap appears. This is essentially an extension of the fact that (for *any* slope), the precise exact value need not be realized in any instance in a sample of solutions for it. E.g., in a sample of N gaussian-distributed values centered on some specific value the likelihood of any sample having that *precise* central value is vanishingly small.\n", "\n", "The gap should become smaller when either the noise decreases, or the number of channels (for the same noise) increases.\n", "\n", "This feature should be harmless for the calibration of ALMA full-polarization data.\n", "\n", "{.image-inline}\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "CK0s2Zhiznls" }, "source": [ "### User tips on installing CASA on unsupported OSs\n", "\n", "This document provide tips from users on how to install CASA on unsupported operating systems, like LINUX Ubuntu, Debian, and Fedora.\n", "\n", "