{ "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", "![f48ce1a412dae937209cd7488fb13550a88d2757](https://github.com/casangi/casadocs/blob/master/docs/notebooks/media/f48ce1a412dae937209cd7488fb13550a88d2757.png?raw=1){.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", "
\n", "Disclaimer: the information in this document is provided by users and not verified by the CASA team. The information does not reflect official CASA recommendations and should be used at your own risk.\n", "
\n", "\n", "\n", "CASA officially supports certain versions of LINUX Redhat and Mac OSX. See the [CASA Download page](https://casa.nrao.edu/casa_obtaining.shtml) for more information.\n", "\n", "We realize that many users wish to try and run CASA on different operating systems. Below are some tips from the user community on installing CASA on unsupported platforms. CASA will not run on Windows.\n", "\n", "- **Ubuntu or Debian** - Please see the following PDF: [Installing CASA on Unbuntu or Debian](https://drive.google.com/file/d/1bEJWtvY1qMmr1FH4BtPScyPT6F6zg0qK/view?usp=sharing)\n", "\n", "- **Fedora** - Fedora 32 may cause CASA to crash on startup with the error *\\\"code for hash md5 was not found\\\"*. This is caused by changes to libssl.so in the compat-openssl10 package, which prevents the CASA supplied version of this library from loading. An easy fix is to replace the CASA version of libssl.so.10 with the OS version in /lib64 (i.e., libssl.so.1.0.2o).\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "8s0jiIe2znls" }, "source": [ "### Wideband Mosaic Imaging and Pointing Corrections for the VLA Sky Survey\n", "\n", "This Knowledgebase article describes testing results for wideband mosaic imaging and pointing corrections for VLASS.\n", "\n", "The Very Large Array Sky Survey ([VLASS](https://science.nrao.edu/vlass)) critically depends on accurate wideband mosaicing algorithms for its single epoch imaging and ultimately cumulative imaging. To a large degree, VLASS requirements have driven CASA's development of the AW-projection and related algorithms for [widefield](synthesis_imaging.ipynb#Wide-Field-Imaging) and [wideband](synthesis_imaging.ipynb#Wide-Band-Imaging) imaging in CASA. This Knowledgebase article provides complementary reports on the testing of Wideband Mosaic Imaging and Pointing Corrections for VLASS.\n", "\n", "- [ARDG Test Report: Wideband Mosaic Imaging for VLASS](https://drive.google.com/file/d/1JZH9x0KxZTVqMe4hE-xvRgUAZiJ3wPaM/view?usp=sharing)\n", "\n", "- [CASA development report: Pointing Corrections for VLASS](https://drive.google.com/file/d/1pq6Xx1AQAFldbWfSXC1An5zysjVnUYGq/view?usp=sharing)\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "YFa5bfIDznlt" }, "source": [ "### Calculation of Weights for Data with Varying Integration Time\n", "\n", "Knowledgebase Article: Calculation of Weights for Data with Varying Integration Time\n", "\n", "**George Moellenbrock** *Original 18 Dec 2018, latest edited version 04 Nov 2019*\n", "\n", "When the nominal weights are expected to be uniform (because integration time, channel bandwidth, effective Tsys, collecting area, etc. are all uniform, or the visibilities are normalized), extracting weight information from the apparent statistics of otherwise stable visibility measurements is a simple matter of calculating the apparent simple variance in the visibility real and imaginary parts over a sufficient local sample of values. The real and imaginary part variances should be approximately equal, and the inverse of their mean is the correct weight to assign to each of the visibility values within the sample. Here, \\\"stable visibility\\\" means no *systematic* variation of amplitude or phase within the local sample. Noise-dominated visibilities are ideal; otherwise, well-calibrated data with no true visibility variation are desirable. These conditions are also needed for the more general case described below.\n", "\n", "When the integration time (aka \\\"exposure\\\") varies within the local sample (such as can be generated by averaging of the data post-correlation, where the number of samples per averaging bin may vary, especially at the end of scans), we expect the correct variance for each visibility to be inversely proportional to the net integration time, and this complicates the calculation. It is necessary to determine a weighted variance per unit inverse integration time, wherein the sample weights for the variance calculation are the per-visibility integration times, $e_i$. If the only reason the underlying variance differs among samples is the variable integration time, then a uniform normalized variance estimate of the whole sample may be obtained by scaling the residual data per sampleby the square root of their (known) integration times. Here, residual data means any underlying visibility signal\\-\\--presumably the average of the visibility samples, using nominal (proportional to integration time, etc.) weights\\-\\--has been subtracted. The simple variance of thisrescaled sample is, in effect, the variance per unit inverseintegration time.\n", "\n", "For visibilities $V_i$, with integration times $e_i$:\n", "\n", "$<$var$_{norm}$$>$ = Sum ($e_i$ ($V_i$ - $<$$V$$>$)$^2$/$N$ [1]\n", "\n", "where $<$$V$$>$ = Sum($w_i$$V_i$)/Sum($w_i$) [1a]\n", "\n", "and $w_i$ are the nominal data weights presumably proportional tointegration time and other relevant factors. In practice, we could probably just use $w_i$ = $e_i$ in equation [1a] since all of the other relevant factors witin $w_i$ are assumed constant within the sample. Note that the units of $<$var$_{norm}$$>$ are in squared visibility amplitude (${\\rm Jy}^{2}$, presumably) times seconds. Note also that $<$var$_{norm}$$>$ is essentially the simple variance of the ensemble $\\sqrt{(e_i)}$.d$V_i$ (where d$V_i$ is ($V_i$-$<$$V$$>$)), i.e., of the residual visibilities scaled so that their noise is independent of integration time.\n", "\n", "The normalized weight-per-unit-integration time is thus the inverse of $<$var$_{norm}$$>$:\n", "\n", "$W_{norm}$ = 1/$<$var$_{norm}$$>$ \\[2\\]\n", "\n", "and per-datum revised weights may be calculated as:\n", "\n", "$W_i$ = $W_{norm}$ * $e_i$ \\[3\\]\n", "\n", "Another way of arriving at this result is to calculate a weighted variance:\n", "\n", "$<$var$>$ = Sum($e_i$ ($V_i$ - $<$$V$$>$)$^2$) / Sum($e_i$) \\[4\\]\n", "\n", "which corresponds to the (simple) mean exposure time, which is:\n", "\n", "$<$$e$$>$ = Sum($e_i$) / N \\[5\\]\n", "\n", "The product of these yields $<$var$_{norm}$$>$, as above in \\[1\\]:\n", "\n", "$<$var$_{norm}$> = $<$var$>$$<$$e$$>$ \\[6\\]\n", "\n", "and $W_{norm}$ may be formed and applied as in \\[2\\] and \\[3\\] above.\n", "\n", "This calculation should be done for both real and imaginary parts ofthe visibility sample and averaged, or for both parts jointly, and \\[3\\] used to form the revised weights.\n", "\n", "NB: In calculating sample variance, it is generally customary to acknowledge the loss of one degree of freedom due to use of the meanvisibility, $<$$V$$>$ in the calculation. Essentially, $<$$V$$>$ will have a finite error that tends to bias the resulting variance downward. For simple variance calculations, a factor N/(N-1) is applied to the variance calculation to unbias it, and this factor can be significant for modest N. Since a non-trivially weighted mean is used in the above (otherwise simple, non-weighted) variance calculation (eqn \\[1\\]), it may be appropriate to consider a more carefully weighted calculationfor the N/(N-1) factor. The required factor is:\n", "\n", "D = 1 - ( Sum($w_i$$^2$) / Sum($w_i$)$^2$ ) \\[9\\]\n", "\n", "where $w_i$ are the a priori nominal weights used in \\[1a\\] above. This factor can be shown to equal (N-1)/N and so should be *divided* into the $<$var$_{norm}$$>$ result.\n", "\n", "However, since the nominal error in the variance (and thus the weights) will be <10% (an accuracy we are unlikely to achieve ingeneral anyway) for N\\>10, and will be uniform over many sample groups in the overall statwt execution, we assume that it is adequate to use thesimpler N/(N-1) factor, or omit it entirely.\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "RYe4Ul8xznlt" }, "source": [ "### Bug affecting polarization visibility data in concatenated data\n", "\n", "Knowledgebase Article: characterization of a bug that affected polarization visibility data in concatenated data in CASA versions up to 5.6.\n", "\n", "**George Moellenbrock** *Original 17 Apr 2020, latest edited version 12 May 2020*\n", "\n", "CASA 5.7/6.1 fixed a bug in **concat** and **importfitsidi** that affected polarization visibility data in concatenated MSs. The problem that occurs in CASA versions earlier than 5.7/6.1 is that the cross-hands may be spuriously mis-ordered on a subset of baselines in the concatenated MS.This Knowledgebase Article describes the main effects that this bug has on concat\\'d data in general, and in particular on the processing of ALMA and VLA data with CASA up to and including version 5.6.A careful analysis has revealed the following effects in concat\\'d MSs in CASA versions prior to 5.7/6.1:\n", "\n", "1. *In general,* visibility data cross-hands may be spuriously swapped on some baselines in concat\\'d data when the antenna lists in the input MSs are *partially* different. The concat task adopts the first (in time order) MS\\'s antenna list for the output MS, and appends unique antennas from later MS(s), typically with larger indices than in their original MSs. Depending on the original antenna indexing, baselines between these additional antennas and antennas that did occur in the first MS may sometimes require conjugation (reversal of the order of antennas in the baseline) to maintain internal indexing consistency within the output MS (for all baselines in an MS, the first antenna must have an index which is lower than (or same as) the index of the second antenna). When baselines are conjugated in this way, the sign of the phase of each correlation and the UVWs must be reversed, and the cross-hands swapped (RL or XY will become LR or YX, respectively, and vice-versa). Prior to CASA 5.7/6.1, the sign reversals were correct, but the cross-hand swap was spuriously omitted. For successfully calibrated data (i.e., calibrated *prior* to running concat), this means that the sign of the imaginary part of the cross-hand visibilities will be incorrect, and thus the sign Stokes U (for circular feeds) or Stokes V (for linear feeds) will be incorrect on the affected baselines in concat\\'d data. Since the pathology affects only the cross-hands, polarimetry calibration of concat\\'d data may be adversely affected.\n", "\n", "For reconfigurable arrays, note that an antenna\\'s particular position (pad) makes it unique, i.e., a specific physical antenna that has moved is a new unique antenna in this context. Concatenation of *entirely* disjoint antenna lists are unaffected, since all additional antennas in the concatenation will have uniformly incremented indices, and no baseline conjugation will be required. Certain unique cases of different antenna lists are immune to this problem, e.g., new unique antennas with already-higher indices than all other common antennas, etc.\n", "\n", "2. The concat task initially sorts the MSs into time order (only at whole-MS granularity), so the effect cannot be controlled merely by adjusting the order in which the input MSs are specified in the concat call (i.e., there is no easy user-directed fix).\n", "\n", "3. An implicit concat happens in importfitsidi (i.e., VLBI, typically) when specifying multiple FITS-IDI files. Here the antenna re-indexing occurs upon fill, and thus most-likely *before* calibration. Since ordinary gain calibration uses only the parallel-hands, it will not be affected by the underlying cross-hand swap error. However, polarimetry calibration will be affected to the extent that there are spuriously swapped cross-hands within the filled MS. EVN observations consisting of multiple FITS-IDI will have the same antenna table in each file and are therefore unaffected by this bug.\n", "\n", "4. Since the pathology affects only the cross-hands, purely Stokes I (total intensity) observations of any kind should not be affected (even if the cross-hand are present and some are affected, and thus technically incorrect).\n", "\n", "5. For ALMA and VLA data, calibration typically occurs prior to any potentially pathological use of concat, and the impact will be as follows:\n", "\n", "- ALMA: Total intensity observations of any kind are not affected. For successfully calibrated (per session) ALMA polarization data not subject to this pathology in the concat of multiple contiguous execblocks within each session\\*, the pathology affects only Stokes V (circular polarization) when concat-ing multiple sessions subject to the baseline conjugation conditions described in item 1 above. This is because the spurious cross-hand swap effectively sabotages only the sign of the imaginary part of the cross-hands in some baselines, i.e., the apparent Stokes V signal sampled by linear feeds. The net effect will be to suppress the net Stokes V signal in imaging. This presumably affects only a very tiny minority of existing ALMA observations.\n", "\n", "
\n", "* **Note:** In the course of standard scripted ALMA polarimetry calibration, the split task does not remove antennas from the ANTENNA subtable, even when they are fully flagged and keepflags=False. The data rows are not retained in this case, but the ANTENNA subtable seen by concat remains complete. Therefore, as long as the execblocks within the contiguous polarization session are uniform as regards to antenna population (as is intended), the polarization calibration within an individual session should not be subject to this this pathology.\n", "
\n", "\n", "- VLA: Total intensity observations of any kind are not affected. For successfully calibrated VLA polarization observations (which typically do not require a prior concat), the pathology affects only Stokes U when concat-ing multiple observations subject to the baseline conjugation conditions described in item 1 above. By the same logic as for ALMA, the Stokes U (cross-hand imaginary part for circular feeds) will be suppressed. Since this affects part of the linearly polarized net response, a larger fraction of VLA cases (cf ALMA) may be affected. The pathological condition arises when antennas are variously removed from the array (typically up to 2 or 3 at any given time) for incidental maintenance, so as to generate datasets with fewer than the full complement of 27 antennas, or when antennas move in and out of the barn (even when there are 27 antennas present in each observation), and when such disparate observations are concat\\'d. For concats of different VLA configurations, some baselines to antennas that did *not* move (typically \\~12 out of 27 antennas) between the configurations will be affected, even if the total antenna lists (by name/number) have not changed. This is because antennas that did move (only) are unique new antennas in the concat by virtue of their new positions, and some baselines between them and the stationary antennas must be conjugated in the concat.\n", "\n", "6. If observations are combined implicitly in imaging by specifying a list of MSs to tclean, there should be no problem, since the bug is an artifact of the mechanical combination of MSs into a single MS on disk.\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "FHO2uDB0znlu" }, "source": [ "### Single Dish imaging bug for EBs with different antenna positions in common antenna names and IDs\n", "\n", "A bug was found for imaging of single-dish data with the tasks **sdimaging** and **tsdimaging**in CASA versions 5.6 and lower. This bug could cause an inaccurate direction conversion when more than one MS is given and these data contain the same antenna with the same antenna ID but with different location, i.e., station or pad where the antenna is placed. The bug affects the brightness distribution and flux density in the combined image, since the coordinates are not correct for some fraction of the data set.\n", "\n", "Details of this bug can be found in this [Knowledgebase Article](https://drive.google.com/file/d/1Fu8_GGwnxaoNthmwDu4z2BF6_igB-k9-/view?usp=sharing).\n", "\n", "The bug was fixed in CASA 5.7/6.1\n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "aTPopMRHyvv2" }, "source": [ "###CASA Data Repository for developers building from source\n", "\n", "For general users, information on the CASA Data Repository can be found on the [\"External Data\" pages](external-data.ipynb) in CASA Docs.\n", "\n", "For the build from source, such as those the developers use, the \"casadata\" is taken from a list of directories given in .casa/config.py. A second set of datasets is necessary if the developer wants to run the CASA tests. The new casatestdata repository can be cloned following the instructions given in Bitbucket: https://open-bitbucket.nrao.edu/projects/CASA/repos/casatestdata/browse\n", "\n", "For example, for developers at NRAO Charlottesville, the entries in their config.py could look like:\n", "\n", "```\n", "datapath=['/home/casa/data/casatestdata/','/home/casa/data/distro/']\n", "```\n", "\n", "or just this:\n", "\n", "```\n", "datapath=['/home/casa/data/casatestdata/']\n", "```\n", "\n", "where:\n", "/home/casa/data/casatestdata/ is the new test data repository of CASA that contains all the data needed to run CASA tests.\n", "/home/casa/data/distro/ contains only the \"casadata\" needed to launch CASA and from here it is packaged to be included in the casalith tarballs.\n", "\n", "For CASA build from source, the distro data is found in the following place:\n", "\n", "```\n", "casa6 build from source: distro is taken from .casa/config.py under: \n", "datapath=['/some-directory/distro/']\n", "```\n", "\n", "```\n", "casa5 build from source: distro is taken from under: \n", "$CASAPATH/data/\n", "```\n", "\n", "**Warning:** to developers regarding awproject using CASA 6.1 or earlier:\n", "\n", "In CASA 6.2 a bug was fixed in the way that the awproject gridder in tclean calls the data repository in CASA 6. Previously tclean was looking at .casa/config.py for the location of the distro data but only considering the root data directory existence and not checking existence of the data (more specifically, antenna response data) actually used by it. As of CASA 6.2, the logic of checking the data path to look for the antenna response using the awproject gridder in tclean is as follows:\n", "\n", "1. It looks for the antenna response data directory by constructing the full path with the root data paths from dataPath(), which returns data paths defined in config.py (for casa6). The specific data directory to look for varies by telescope (i.e. ALMA vs VLA).\n", "\n", "2. If 1 fails, it looks for the data in the path determined by the function, distroDataPath(), which returns the default root data directory path in the case of casalith tarballs.\n", "\n", "3. If all above fail, it tries the path defined by CASAPATH (only relevant for casa5)\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "m7mWdCRxarTx" }, "source": [ "###Cube Refactor\n", "\n", "A [refactor of cube imaging](https://github.com/casangi/casadocs/blob/master/docs/notebooks/media/Cube_Refactor_Docs.pdf?raw=1) in **tclean** was implemented in CASA 6.2 with the following goals:\n", "\n", "- Parallel and serial should, within numerical precision, be equal (6.1 and previous gave slightly different results depending on the number of processors used)\n", "\n", "- Eliminate *refconcat* cubes, which could be a performance problem in image analysis.\n", "\n", "- Ability to restart *tclean* for cubes with different number of processors ( 6.1 and previous had to be restarted with the exact same number of processors used in the first run of tclean).\n", "\n", "- Ability to save model visibilities in *MODEL_DATA* (or virtual) when running tclean in parallel.\n", "\n", "- Remove the clash of *chanchunking* and parallel numprocesses (e.g multiple field cubes and chanchunking).\n", "\n", "\n", "As part of this extensive cube refactor, the following features were implemented in 6.2:\n", "\n", "- Parallel and serial runs now use the same code and that has fixed the differences which used to be found between serial and different n-parallel runs. Serial and parallel runs now give identical results to within numerical precision.\n", "\n", "- Refconcat cubes are no longer produced (also the directory *workingdir* is no longer made for cube runs)\n", "\n", "- *tclean* can be restarted in parallel or serial independent of how the first run was achieved.\n", "\n", "- For cubes, model visibilities can now be saved in parallel.\n", "\n", "- In parallel run, a common beam can now be given (e.g *restoringbeam=’common’*). Previously, *tclean* had to be re-run in serial to restore to a single restoring beam for all channels.\n", "\n", "- Tracking a moving source (with ephemeris tables) now works in parallel with *specmode=’cubesource’*.\n", "\n", "- The *chanchunks* parameter has been removed, as the refactor code made it redundant.\n", "\n", "- *parallel=True* or *parallel=False* is not considered for cube imaging. If casa is launched via the mpicasa call then cube imaging is in parallel else if it is invoked via the casa call then it is run in serial.\n", "\n", "- Interactive *tclean* for cubes now works when launched in parallel.\n", "\n", "- Using a psf to reset to another *psfphasecenter* for mosaic now works for serial and parallel.\n", "\n", "- The major and minor cycles states have been dissociated when a major cycle is happening, the minor cycle code does not hold any state in memory and vice versa. This is the reason why a *selectvis* message will be seen  at every major cycle. This should reduce the amount of memory used.\n", "\n", "\n", "Details of the cube refactor efforts can be found in this [this pdf](https://github.com/casangi/casadocs/blob/master/docs/notebooks/media/Cube_Refactor_Docs.pdf?raw=1).\n" ] }, { "cell_type": "markdown", "metadata": { "id": "MgpBBuAMOveY" }, "source": [ "### Installing mutiple Python versions on Mac OS 11\n", "\n", "One solution for handling multiple Python installations across versions (e.g. Python 3.6 and 3.8) is to use *pyenv*.\n", "\n", "*Pyenv* can be installed on Mac OS 11 a number of ways, but perhaps the simplest is to use homebrew:\n", "\n", "```\n", "brew install pyenv\n", "```\n", "Installation of a given version of Python via pyenv is normally a single simple command such as:\n", "\n", "```\n", "pyenv install 3.8.0\n", "```\n", "which can be repeated for each version of Python desired.\n", "\n", "For Mac OS 11, however, there is currently a [known issue](https://github.com/pyenv/pyenv/issues/1737) preventing this simple command from working. As a workaround, the following command has worked in testing on Mac OS 11 with an Intel x86 64 bit architecture. See the github issue, however, for the most up to date information on the bug.\n", "\n", "```\n", "CFLAGS=\"-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include\"\n", "LDFLAGS=\"-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib\"\n", "arch -x86_64 pyenv install --patch 3.8.0 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\\?full_index\\=1)\n", "```\n", "\n", "In this example, 3.8.0 may be replaced by the desired installation version of Python.\n", "\n", "Finally, the .zshrc file (or similar configuration file for your desired terminal) should be modified to include the following:\n", "\n", "```\n", "PYENV_ROOT=/Users/username/.pyenv\n", "export PATH=\"$PYENV_ROOT/bin:$PATH\"\n", "export PATH=\"$PYENV_ROOT/shims:$PATH\"\n", "eval \"$(pyenv init -)\"\n", "```\n", "\n", "With this complete, the Python version can be switched by setting the local or global Python using *pyenv*, and then restarting the terminal. Modular CASA can then be installed within a virtual environment following the instructions on the [CASA Installation](../notebooks/introduction.ipynb#Installation) page.\n", "\n", "```\n", "pyenv local 3.8.0\n", "pyenv global 3.8.0\n", "```\n", "\n" ] }, { "cell_type": "markdown", "source": [ "### Preventing high load on cores for previews with pip install\n", "\n", "
\n", "Disclaimer: the information in this document is provided by users and not verified by the CASA team. The information does not reflect official CASA recommendations and should be used at your own risk.\n", "
\n", "\n", "When using the pip version of CASA for the previews, each preview run is done on a separate core. This behavior is triggered because *numpy* is looking for additional cores on a machine and uses those. This results in a very high load of the machine as each of the preview processes is spawning work on the other cores.\n", "\n", "Such behaviour can be prevented by setting\n", "\n", "```\n", "export OMP_NUM_THREADS=1\n", "```\n", "\n", "before running a python program that contains numpy work. Note that this setting is applied automatically for CASA runs in mpicasa.\n", "\n", "Users can set OMP_NUM_THREADS=1 also directly in python, before importing anything else, using the command\n", "\n", "```\n", "import os\n", "os.environ[\"OMP_NUM_THREADS\"] = \"1\"\n", "```\n" ], "metadata": { "id": "8pJo6_zDsDXg" } }, { "cell_type": "markdown", "metadata": { "id": "_BvHq031znlv" }, "source": [ "## Reference Material\n", "\n", "Collection of relevant reference material\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "DmM0bswFznlv" }, "source": [ "### AIPS-CASA Dictionary\n", "\n", "CASA tasks equivalent to AIPS tasks\n", "\n", " AIPS tasks and their corresponding CASA tasks. Note that this list is not complete and there is also not a one-to-one translation.\n", "\n", " AIPS Task CASA task/tool Description\n", " ------------ ---------------------------- -----------------------------------------------------------------------------------------------------\n", " APROPOS taskhelp List tasks with a short description of their purposes\n", " BLCAL blcal Calculate a baseline-based gain calibration solution\n", " BLCHN blcal Calculate a baseline-based bandpass calibration solution\n", " BPASS bandpass Calibrate bandpasses\n", " CALIB gaincal Calibrate gains (amplitudes and phases)\n", " CLCAL applycal Apply calibration to data\n", " COMB immath Combine images\n", " CPASS bandpass Calibrate bandpasses by polynomial fitting\n", " CVEL cvel/mstransform Regid visibility spectra\n", " DBCON concat/virtualconcat Concatenate u-v datasets\n", " DEFAULT default Load a task with default parameters\n", " FILLM importvla Import old-format VLA data\n", " FITLD importuvfits/importfitsidi Import a u-v dataset which is in FITS format\n", " FITLD importfits Import an image which is in FITS format\n", " FITTP exportuvfits Write a u-v dataset to FITS format\n", " FITTP exportfits Write an image to FITS format\n", " FRING fringefit Calibrate group delays and phase rates\n", " GETJY fluxscale Determine flux densities for other cals\n", " GO go Run a task\n", " HELP help Display the help page for a task (also use [casa.nrao.edu/casadocs](http://casa.nrao.edu/casadocs))\n", " IMAGR clean/tclean Image and deconvolve\n", " IMFIT imfit Fit gaussian components to an image\n", " IMHEAD vishead View header for u-v data\n", " IMHEAD imhead View header for an image\n", " IMLIN imcontsub Subtract continuum in image plane\n", " IMLOD importfits Import a FITS image\n", " IMSTAT imstat Measure statistics on an image\n", " INP inp View task parameters\n", " JMFIT imfit Fit gaussian components to an image\n", " LISTR listobs Print basic data\n", " MCAT ls List image data files\n", " MOMNT immoments Compute moments from an image\n", " OHGEO imregrid Regrids an image onto another image's geometry\n", " PBCOR impbcor/widebandpbcor Correct an image for the primary beam\n", " PCAL polcal Calibrate polarization\n", " POSSM plotms Plot bandpass calibration tables\n", " POSSM plotms Plot spectra\n", " PRTAN listobs Print antenna locations\n", " PRTAN plotants Plot antenna locations\n", " QUACK flagdata Remove first integrations from scans\n", " RENAME mv Rename an image or dataset\n", " RFLAG flagdata Auto-flagging\n", " SETJY setjy Set flux densities for flux cals\n", " SMOTH imsmooth Smooth an image\n", " SNPLT plotms Plot gain calibration tables\n", " SPFLG msview Flag raster image of time v. channel\n", " SPLIT split Write out u-v files for individual sources\n", " STATWT statwt Weigh visibilities based on their noise\n", " TASK inp Load a task with current parameters\n", " TGET tget Load a task with parameters last used for that task\n", " TVALL imview Display image\n", " TVFLG msview Flag raster image of time v. baseline\n", " UCAT ls List u-v data files\n", " UVFIX fixvis Compute u, v, and w coordinates\n", " UVFLG flagdata Flag data\n", " UVLIN uvcontsub/mstransform Subtract continuum from u-v data\n", " UVLSF uvcontsub/mstransform Subtract continuum from u-v data\n", " UVPLT plotms Plot u-v data\n", " UVSUB uvsub Subtracts model u-v data from corrected u-v data\n", " WIPER plotms Plot and flag u-v data\n", " ZAP rmtables Delete data files\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "bypf_hn1znlw" }, "source": [ "### MIRIAD-CASA Dictionary\n", "\n", "CASA tasks equivalent to MIRIAD tasks\n", "\n", "The Table below provides a list of common Miriad tasks, and their equivalent CASA tool or tool function names. The two packages differ in both their architecture and calibration and imaging models, and there is often not a direct correspondence. However, this index does provide a scientific user of CASA who is familiar with MIRIAD, with a simple translation table to map their existing data reduction knowledge to the new package.\n", "\n", "In particular, note that the procedure of imaging and cleaning of visibility data between CASA and MIRIAD differs slightly. In MIRIAD the tasks invert, clean and restor are used in order to attain \\\"CLEAN\\\" images, whereas in CASA the task **clean**/**tclean** achieves the same steps as a single task.\n", "\n", " MIRIAD Task CASA task/tool Description\n", " ------------- ----------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------\n", " atlod importatca Import ATCA RPFITS files\n", " blflag plotms/msview Interactive baseline based editor/flagger\n", " cgcurs imview Interactive image analysis\n", " cgdisp imview Image display, overlays\n", " clean clean/tclean Clean an image\n", " delhd imhead (mode=\\'del\\'), clearcal Delete values in dataset/remove calibration tables\n", " fits importmiriad,importfits, exportfits, importuvfits, exportuvfits FITS uv/image filler\n", " gethd imhead (mode=\\'get\\') Return values in image header\n", " gpboot fluxscale Set flux density scale\n", " gpcal gaincal, polcal Polarization leakage and gain calibration\n", " gpcopy applycal Copy calibration tables from one source to another\n", " gpplt plotms Plot calibration solutions\n", " imcomb immath Image combination\n", " imfit imfit Image-plane component fitter\n", " impol immath (mode=\\'poli\\' or \\'pola\\') Manipulate polarization images (see [example](http://www.atnf.csiro.au/computing/software/miriad/userguide/node149.html))\n", " imstat imstat Image statistics\n", " imsub imsubimage Extract sub-image\n", " invert clean/tclean Synthesis imaging/make dirty map\n", " linmos im tool (im.linearmosaic) Linear mosaic combination of images\n", " maths immath Calculations involving images\n", " mfboot fluxscale Set flux density scale\n", " mfcal bandpass, gaincal Bandpass and gain calibration\n", " moment immoments Calculate image moments\n", " prthd imhead, listobs, vishead Print header of image or uvdata\n", " puthd imhead (mode=\\'put\\') Add/edit values in image header\n", " restor clean Restore a clean component model\n", " selfcal clean, gaincal, etc. Selfcalibration of visibility data\n", " uvplt plotms Plot visibility data\n", " uvspec plotms Plot visibility spectra data\n", " uvsplit split Split visibility dataset by source/frequency etc\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "TzMGMi2fznlw" }, "source": [ "### Dan Briggs\\' Dissertation - Robust Weighting\n", "\n", "Dan Briggs\\' Dissertation on high fidelity imaging with interferometers, including robust (\\'Briggs\\') weighting.\n", "\n", "Link to [Dan Briggs' Dissertation](http://www.aoc.nrao.edu/dissertations/dbriggs/) \\([pdf version](https://drive.google.com/file/d/1Q0kCOlRJwXV2aww_Dr9GnGFsq9dCWjMX/view?usp=sharing)\\)\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "jqZ3L8y3znlw" }, "source": [ "### Flux Calibrator Models\n", "\n", "Descriptions of flux calibrator models for flux density scaling\n", "\n", "There are two categories of flux calibrator models available to determine flux density scales: compact extra-galactic sources and solar system objects. The models for bright extragalactic sources are described in the form of polynomial expressions for spectral flux densities and clean component images for spatial information. The flux density scales based on the solar system objects are commonly used to establish flux density scales for mm and sub-mm astronomy. These models consist of brightness temperature models and their ephemeris data.\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "_9i8Ylg6znlx" }, "source": [ "#### Compact extragalactic sources\n", "\n", "For the VLA, the default source models are customarily point sources defined by the 'Baars', 'Perley 90', 'Perley-Taylor 99', 'Perley-Butler 2010', 'Perley-Butler 2013' (time-variable), \\'Perley-Butler 2017\\' (time-variable) or 'Scaife-Heald 2012' flux density scales ('Perley-Butler 2017' is the current standard by default), or point sources of unit flux density if the flux density is unknown. \\'Stevens-Reynolds 2016\\' currently contains only one source, 1934-638, which is primarily used for flux calibrator for the ACTA.\n", "\n", "The model images (CLEAN component images) are readily available in CASA for the sub set of the sources listed below. The task **setjy** provides listing of the available model images included in the CASA package\\'s data directory. You can find the path to the directory containing your list of VLA Stokes I models by typing (inside CASA) [print os.getenv(\\'CASAPATH\\').split(\\' \\')[\\[0\\]]{.error} + \\'/data/nrao/VLA/CalModels/\\']. The [setjy Description Page](../api/casatasks.rst) in CASA Docs also lists the models that are available in CASA. These models can be plotted in plotms.\n", "\n", "Alternatively, the user can provide a model image at the appropriate frequency in Jy/pixel units, typically the .model made by **clean** (which is a list of components per pixel, as required, although the restored .image is in Jy/beam). For unknown calibrators, however, the spectral flux distribution has to be explicitely specified in **setjy**. If you do not specify the correct path to a model (and you have not provided your own model), the default model of a point sources of unit flux density will be adopted.\n", "\n", "\n", "\n", " \n", " \n", "3C/Common Name | B1950 Name | J2000 Name | Alt. J2000 Name | Standards\n", "--- | --- | --- | --- | ---\n", " -- | -- | -- | J0133-3629 | 9\n", "3C48 | 0134+329 | 0137+331 | J0137+3309 | 1,2,3,4,5,6,7,9\n", "FORNAX X | -- | -- | J0322-3712 | 9\n", "3C123 | 0433+295 | 0437+296 | J0437+2940 | 2, 9\n", "3C138 | 0518+165 | 0521+166 | J0521+1638 | 1,3,4,5,6\n", "PICTOR A | -- | -- | J0519-4546 | 9\n", "3C144 (TAURUS A/CRAB) | -- | -- | J0534+2200 | 9\n", "3C147 | 0538+498 | 0542+498 | J0542+4951 | 1,3,4,5,6,7,9\n", "3C196 | 0809+483 | 0813+482 | J0813+4813 | 1,2,7,9\n", "3C218(HYDRA A) | -- | -- | J0918-1205 | 9\n", "3C274 (VIRGO A) | -- | -- | J1230+1223 | 9\n", "3C286 | 1328+307 | 1331+305 | J1331+3030 | 1,2,3,4,5,6,7,9\n", "3C295 | 1409+524 | 1411+522 | J1411+5212 | 1,2,3,4,5,6,7,9\n", "3C438 (HERCULES A) | -- | -- | J1651+0459 | 9\n", "3C353 | -- | -- | J1720-0059 | 9\n", "-- | 1934-638 | -- | J1939-6342 | 1,3,4,5,6,8\n", "C380 | 1828+487 | 1829+487 | J1829+4845 | 7,9\n", "3C405 (CYGNUS A) | -- | -- | J1959+4044 | 9\n", "3C444 | -- | -- | J2214-1701 | 9\n", "3C461 (CASSIOPEIA A) | -- | -- | J2323+5848 | 9\n", "\n", "\n", "Standards are: (1) [Perley-Butler 2010](#perley-butler-2010), (2) [Perley-Butler 2013](#perley-butler-2013), (3) [Perley-Taylor 99](#perley-taylor-99), (4) [Perley-Taylor 95](#perley-taylor-95), (5) [Perley 90](#perley-90), (6) [Baars](#baars), (7) [Scaife-Heald 2012](#scaife-heald-2012), (8) [Stevens-Reynolds 2016](#stevens-reynolds-2016) (9) [Perley-Butler 2017](#perley-butler-2017)\n", "\n", "\n", "\n", ">Known sources and their alternative names recognized by **setjy** task\n", " \n", "\n", "ALMA also uses a few dozen compact QSO as flux standards, monitored 2-4 times a month at bands 3, 6 and 7 (90 - 345 GHz). Due to rapid variability these data are not packaged with CASA, but can be accessed via \n", "\n", "\n", "\n", "**Baars**\n", "\n", "\n", "The only standard to not have the year in the name. It is 1977. The models are second order polynomials in log(ν), valid between 408 MHz and 15 GHz.\n", "\n", "Reference: Baars et al. (1977) [\\[1\\]](#Bibliography) with a commentary by Kellermann, K. I. (1999) [\\[2\\]](#Bibliography)\n", "\n", "**Perley 90**\n", "\n", "This standard also includes 1934-638 from Reynolds (7/94) and 3C138 from Baars et al. (1977) [\\[1\\]](#Bibliography) .\n", "\n", "Details can be found at .\n", "\n", "**Perley-Taylor 95**\n", "\n", "Perley and Taylor (1995.2); plus Reynolds (1934-638; 7/94) Details can be found at .\n", "\n", "**Perley-Taylor 99**\n", "\n", "Perley and Taylor (1999.2); plus Reynolds (1934-638; 7/94) Details can be found at .\n", "\n", "**Perley-Butler 2010**\n", "\n", "A preliminary version of Perley-Butler 2013. This version also has coefficients for sources that showed some degree of variability (see Perley & Butler (2013) [\\[3\\]](#Bibliography)) but they are treated as the steady sources (i.e. no time dependent models are used).\n", "\n", "**Perley-Butler 2013**\n", "\n", "Flux scale for the constant flux sources 3C123, 3C196, 3C286, and 3C295 as well as variable sources (3C48, 3C138, and 3C147). The models for the variable sources are time-dependent.Reference: Perley & Butler (2013) [\\[3\\]](#Bibliography) .\n", "\n", "**Scaife-Heald 2012**\n", "\n", "Low frequency, 30-300MHz, calibrators 3C48, 3C147, 3C196, 3C286, 3C295, and 3C380.\n", "\n", "Reference: Scaife & Heald (2012) [\\[4\\]](#Bibliography)\n", "\n", "**Stevens-Reynolds 2016**\n", "\n", "Low frequency (\\<11GHz) polynomial from Reynolds and updated high frequecy polynomial from Stevens.\n", "\n", "Reference: Partridge et al. (2016) [\\[5\\]](#Bibliography)\n", "\n", "\n", "\n", "**Perley-Butler 2017**\n", "\n", "\n", "The flux density scale of Perley-Butler 2013 extended downward to \\~50 MHz. Twenty sources were drawn from the Baar, Perley-Butler 2013, and Scaife-Heald 2012. Flux scale for the constant flux sources Fornax A, 3C123, J0444-2809, Pictor A, 3C144, (Taurus A or Crab), 3C196, 3C218 (Hydra A), 3C274 (Virgo A or M87), 3C286, 3C295, 3C348 (Hercules A), 3C353, 3C380, 3C405 (Cygnus A), 3C444, and 3C461 (Cassiopeia A) as well as variable sources (3C48, 3C138, and 3C147). The models for the variable sources are time-dependent. The frequency range valid for the model for each source is also listed below.\n", "\n", " Source Valid frequency range in GHz\n", " -------------- ------------------------------\n", " J0133-3649 0.2-4\n", " 3C48 0.05-50\n", " Fornax X 0.2-0.5\n", " 3C123 0.06-50\n", " J0444-2809 0.2-2.0\n", " 3C138 0.2-50\n", " Pictor A 0.2-4.0\n", " Taurus A 0.05-4.0\n", " 3C147 0.05-50\n", " 3C196 0.050-50\n", " Hydra A 0.05-12\n", " Virgo A 0.05-3\n", " 3C286 0.05-50\n", " 3C295 0.05-50\n", " Hercules A 0.2-12\n", " 3C353 0.2-4\n", " 3C380 0.05-4.0\\*\n", " Cygnus A 0.05-12\n", " 3C444 0.2-12\n", " Cassiopeia A 0.2-4\n", "\n", "\\* The corrected frequency range for 3C380 is noted here based on B. J. Butler 2018, private comunication (CAS-9538)Reference: Perley & Butler (2017) [\\[7\\]](#Bibliography)\n", "\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "opdSTrurznlx" }, "source": [ "#### Solar System objects\n", "\n", "The usual approach in mm and sub-mm regimes is to use models that are, to first order, thermal sources in the Solar System. Their apparent brightness varies in time with their distance from the Earth (and Sun), and orientation if they are not perfect spheres with zero obliquity. However, most of them have almost constant surface properties, so once those properties are measured their apparent brightness distributions, they can in principle be predicted for any time, given an ephemeris. Planets, in particular, have more complex spectra and effects such as atmospheric lines, magnetic fields, seasons, polar caps and surface features that need to be taken into account when they are available and significant. In CASA, the Solar System objects supported by **setjy** are available through the 'Butler-JPL-Horizons 2010', and 'Butler-JPL-Horizons 2012' standards. It is recommended to use \\'Butler-JPL-Horizons 2012\\' as it contains updated models. The 2012 models are described in ALMA Memo 594, which is available on [https://science.nrao.edu/facilities/alma/\\~aboutALMA/Technology/ALMA_Memo_Series/alma594/abs594](https://science.nrao.edu/facilities/alma/aboutALMA/Technology/ALMA_Memo_Series/alma594/abs594) . Models can be found by typing (in CASA) [print os.getenv(\\'CASAPATH\\').split(\\' \\')[\\[0\\]]{.error} + \\'/data/alma/SolarSystemModels\\'.]\n", "\n", "The following objects are supported based on models from Butler-JPL-Horizons 2012, updated where necessary as mentioned under each object. Please refer ALMA Memo594 for the detailed comparisons with the models in Butler-JPL-Horizons-2010.\n", "\n", "**Venus**\n", "\n", "The model spans the frequencies from \\~300MHz to 1THz. No atmospheric lines such as CO,H~2~O~,~ HDO, and etc are included. Modeled based on Clancy et al. (2012) [\\[6\\]](#Bibliography).\n", "\n", "**Mars**\n", "\n", "Full implementation of the model of Rudy et al. (1987) [\\[7\\]](#Bibliography), tabulated as a function of time and frequency (30-1000GHz). No atmospheric lines are included.\n", "\n", "**Jupiter**\n", "\n", "Model for 30-1020GHz (from Glenn Orton, private communication), does not include synchrotron emission.\n", "\n", "**Uranus**\n", "\n", "Model for 60-1800GHz (from Glenn Orton and Raphael Moreno, private communication), contains no rings or synchrotron.\n", "\n", "**Neptune**\n", "\n", "Model for 2-2000 GHz (from Glenn Orton and Raphael Moreno, private communication), contains no rings or synchrotron.\n", "\n", "**Io**\n", "\n", "Spline interpolation of data points from 15 to 29980 GHz (references: please refer to the ALMA memo 594 Table 1). Strongly not recommended to use for the primary flux calibrator for ALMA observations.\n", "\n", "**Europa**\n", "\n", "Spline interpolation of data points from 15 to 29980 GHz (references: please refer to the ALMA memo 594 Table 1). Strongly not recommended to use for the primary flux calibrator for ALMA observations.\n", "\n", "**Ganymede**\n", "\n", "Spline interpolation of data points from 5 to 29980 GHz (references: please refer to the ALMA memo 594 Table 1).\n", "\n", "**Callisto**\n", "\n", "Spline interpolation of data points from 5 to 29980 GHz (references: please refer to the ALMA memo 594 Table 1).\n", "\n", "**Titan**\n", "\n", "Model from Mark Gurwell, from 53.3-­1024.1 GHz. Contains surface and atmospheric emission. The atmosphere includes N2-­N2 and N2-­CH4 Collision-­Induced Absorption (CIA), and lines from minor species CO, ^13^CO, C^18^O, HCN, H^13^CN and HC^15^N. See, e.g., Gurwell & Muhleman (2000) [\\[8\\]](#Bibliography); Gurwell (2004) [\\[9\\]](#Bibliography).\n", "\n", "**Asteroids**\n", "\n", "Some asteroids, namely Ceres, Pallas, Vesta, and Juno are included in the Butler-JPL-Horizons 2012. The models consists of the constant brightness temperature in frequency. For Ceres, Pallas, and Vesta, updated models based on thermophysical models (TPM) (T. Mueller, private communication) which are tabulated in time and frequency, are available for the observations taken after January 1st 2015, 0:00 UT. **setjy** task will automatically switch to the new models for the observations taken on and after that date. The TPM are also available for Lutetia but it is not advised to use for the absolute flux calibration for ALMA. Each of the tabulated models contains the flux density at 30, 80, 115, 150, 200, 230, 260, 300, 330, 360, 425, 650, 800, 950, and 1000 GHz. The time resolution is 1 hour for Ceres and 15 min for Lutetia, Pallas, and Vesta. The cubic interpolation is employed to obtain the flux densities at other frequencies.\n", "\n", "**Ceres**\n", "\n", "Model with a constant $T_b$ = 185K over frequencies (Moullet et al. 2010 [\\[10\\]](#Bibliography), Muller & Lagerros 2002 [\\[11\\]](#Bibliography), Redman et al. 1998 [\\[12\\]](#Bibliography), Altenhoff et al. 1996 [\\[13\\]](#Bibliography)) if time of the observations took place ($t_{obs}$) is before 2015.01.01, 0:00 UT, TPM if $t_{obs}$ $\\ge$ 2015.01.01, 0:00 UT.\n", "\n", "**Pallas**\n", "\n", "Model with a constant $T_b$ = 189K (Chamberlain et al. 2009 [\\[14\\]](#Bibliography), Altenhoff et al. 1994 [\\[15\\]](#Bibliography)) for $t_{obs}$ $\\lt$ 2015.01.01, 0:00 UT, and TPM for $t_{obs}$ $\\ge$ 2015.01.01, 0:00 UT\n", "\n", "**Vesta**\n", "\n", "Model with a constant $T_b$ = 155K (Leyrat et al. 2012 [\\[16\\]](#Bibliography), Chamberlain et al. 2009 [\\[14\\]](#Bibliography), Redman et al. 1998 [\\[12\\]](#Bibliography), Altenhoff et al. 1994 [\\[15\\]](#Bibliography)) for $t_{obs}$ $\\lt$ 2015.01.01, 0:00 UT, and TPM for $t_{obs}$ $\\ge$ 2015.01.01, 0:00 UT\n", "\n", "**Juno**\n", "\n", "Model with a constant $T_b$ = 153K (Chamberlain et al. 2009 [\\[14\\]](#cit), Altenhoff et al. 1994 [\\[15\\]](#cit))\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "DlhqgWDrznly" }, "source": [ "#### Bibliography\n", "\n", "1. Baars,\\ J.\\ W.\\ M.\\ et\\ al.\\ 1977,\\ A&A,\\ 61,\\ 99\\ [ADS](http://adsabs.harvard.edu/abs/1977A%26A....61...99B)\n", "2. Kellermann,\\ K.\\ I.\\ 2009*,*\\ A&A\\ 500,\\ 143\\ [ADS](http://adsabs.harvard.edu/abs/2009A%26A...500..143K)\n", "3. Perley,\\ R.\\ A.,\\ &\\ Butler,\\ B.\\ J.\\ 2013,\\ ApJS,\\ 204,\\ 19\\ [ADS](http://adsabs.harvard.edu/abs/2013ApJS..204...19P)\n", "4. Scaife,\\ A.\\ M.,\\ &\\ Heald,\\ G.\\ H.\\ 2012,\\ MNRAS,\\ 423,\\ 30\\ [ADS](http://adsabs.harvard.edu/abs/2012MNRAS.423L..30S)\n", "5. Partridge\\ et\\ al.\\ 2016,\\ ApJ\\ 821,1\\ [ADS](http://adsabs.harvard.edu/abs/2016ApJ...821...61P)\n", "6. Clancy,\\ R.T.\\ et\\ al.\\ 2012,\\ Icarus,\\ 217,\\ 779\\ [ADS](http://adsabs.harvard.edu/abs/2012Icar..217..779C)\n", "7. Perley,\\ R.\\ A.\\ &\\ Butler,\\ B.\\ J.\\ 2017,\\ ApJS,\\ 230,7[ADS](http://adsabs.harvard.edu/abs/2017ApJS..230....7P)\n", "7. Rudy,\\ D.J.\\ et\\ al.\\ 1987,\\ Icarus,\\ 71,\\ 159\\ [ADS](http://adsabs.harvard.edu/abs/1987Icar...71..159R)\n", "8. Gurwell,\\ M.A.\\ &\\ D.O.\\ Muhleman\\ 2000,\\ Icarus,\\ 145,\\ 65w\\ [ADS](http://adsabs.harvard.edu/abs/2000Icar..145..653G)\n", "9. Gurwell,\\ M.A.\\ 2004,\\ ApJ,\\ 616,\\ L7\\ [ADS](http://adsabs.harvard.edu/abs/2004ApJ...616L...7G)\n", "10. Moullet,\\ A.\\ et\\ al.\\ 2010,\\ A&A,\\ 516,\\ L10\\ [ADS](http://adsabs.harvard.edu/abs/2010A%26A...516L..10M)\n", "11. Muller,\\ T.G.\\ &\\ J.S.V.\\ Lagerros\\ 2002,\\ A&A,\\ 381,\\ 324\\ [ADS](http://adsabs.harvard.edu/abs/2002A%26A...381..324M)\n", "12. Redman,\\ R.O.\\ et\\ al.\\ 1998,\\ AJ,\\ 116,\\ 1478\\ [ADS](http://adsabs.harvard.edu/abs/1998AJ....116.1478R)\n", "13. Altenhoff,\\ W.J.\\ et\\ al.\\ 1996,\\ A&A,\\ 309,\\ 953\\ [ADS](http://adsabs.harvard.edu/abs/1996A%26A...309..953A)\n", "14. Chamberlain,\\ M.A.\\ et\\ al.\\ 2009,\\ Icarus,\\ 202,\\ 487\\ [ADS](http://adsabs.harvard.edu/abs/2009Icar..202..487C)\n", "15. Altenhoff,\\ W.J.\\ et\\ al.\\ 1994,\\ A&A,\\ 287,\\ 641\\ [ADS](http://adsabs.harvard.edu/abs/1994A%26A...287..641A)\n", "16. Leyrat,\\ C.\\ et\\ al.\\ 2012,\\ A&A,\\ 539,\\ A154\\ [ADS](http://adsabs.harvard.edu/abs/2012A%26A...539A.154L)\n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "N8mIDiXqznly" }, "source": [ "### Flux Calibrator Models - Data Formats\n", "\n", "Conventions and Data Formats\n", "\n", "This section describes the conventions, the formats as well as the locations of the data of the flux density calibrator models used in setjy. The detailed descriptions of specific flux standards and list of the calibrators are found in [Flux Calibrator Models](memo-series.ipynb#flux-calibrator-models) in the Reference Material section.\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "7tMCIgWfznlz" }, "source": [ "#### Extragalactic flux calibrator source models\n", "\n", "The spectral flux density models are expressed in a polynomial in the form$$\\begin{equation} log S[Jy] = a + b*log\\nu + c*log^2\\nu + … \\end{equation}$$where $\\nu$ is a frequency either in MHz or GHz depending on the standard. In setjy, the point source model is constructed as a *componentlist* scaled by the spectral flux density model. For the standards, Baars, Perley 90, Perley-Taylor 95, Perley-Taylor 99, Perley-Butler 2010, and Stevens-Reynolds 2016,the polynomial coefficients are hard-coded in the code.\n", "\n", "For Perley-Butler 2013 and Scaife-Heald 2012, the coefficients are stored in CASA tables called PerleyButler2013Coeffs and ScaifeHeald2012Coeffs, respectively located in \\~/nrao/VLA/standards/ in the CASA data directory(from CASA prompt, you can find the data root path by typing casa\\['dirs'\\]\\['data'\\]). The separation of the data from the flux calibration code makes the maintenace easy and enable a user to acces the informaiton directly. Your can access these tables using the table tool (**tb**) and **browsetable** task. The list of the column header for PerleyButler2013Coeffs is shown below:\n", "\n", "```python\n", "CASA <8>: tb.colnames\n", "--------> tb.colnames()\n", "Out[8]:\n", "['Epoch',\n", "'3C48_coeffs',\n", "'3C48_coefferrs',\n", "'3C138_coeffs',\n", "'3C138_coefferrs',\n", "'3C147_coeffs',\n", "'3C147_coefferrs',\n", "'3C286_coeffs',\n", "'3C286_coefferrs',\n", "'3C123_coeffs',\n", "'3C123_coefferrs',\n", "'3C295_coeffs',\n", "'3C295_coefferrs',\n", "'3C196_coeffs',\n", "'3C196_coefferrs']\n", "```\n", "\n", "The coefficients of each source are stored in a column as a vector and the corresponding errors are stored in a seperate column. The different row represents the corresponding coefficinets at that epoch for the time variable sources while for the steady sources each row contains identical information. The frequency is assumed in GHz.\n", "\n", "The list of the column header for ScaifeHeald2012Coeffs is shown below:\n", "\n", "```python\n", "CASA <11>: tb.colnames\n", "---------> tb.colnames()\n", "Out[11]:\n", "['Epoch',\n", "'3C48_coeffs',\n", "'3C48_coefferrs',\n", "'3C147_coeffs',\n", "'3C147_coefferrs',\n", "'3C196_coeffs',\n", "'3C196_coefferrs',\n", "'3C286_coeffs',\n", "'3C286_coefferrs',can b\n", "'3C295_coeffs',\n", "'3C295_coefferrs',\n", "'3C380_coeffs',\n", "'3C380_coefferrs']\n", "```\n", "\n", " The reference frequnecy for Scaife-Heald 2012 is 150MHz.\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "xn-pMqZ5znlz" }, "source": [ "#### Solar System objects\n", "\n", "For the solar system object used as a flux calibrator, **setjy** contstruct a model visibiity of the calibrator with the (averaged) brightness temperature model and ephemeris data of the sources as described in [ALMA Memo \\#594](https://library.nrao.edu/public/memos/alma/memo594.pdf \"ALMA Memo #594\"). While the older Bulter-JPL-Horizons 2010 standard, hard-coded the brightness temperature models in the code, the models for Butler-JPL-Horizons 2012 are tabulated in ASCII files (SSobject_name_Tb.dat) located in the CASA data directory under \\~/alma/SolarSystemModels. With an exception of Mars, the data for the brightness temparature models are stored in a simple format: 1st column - source frequency in GHz; 2nd column - the brightness temperature in Kelvin. The follow example script shows how it can be plotted for Titan.\n", "\n", "```\n", "import numpy as np\n", "\n", "rootdatapath=casa['dirs']['data']\n", "source='Titan'\n", "datapath=rootdatapath+'/alma/SolarSystemModels/'+source+'_Tb.dat'\n", "data=np.genfromtxt(datapath)\n", "data=data.transpose()\n", "\n", "freq=data[0]\n", "temp=data[1]\n", "pl.plot(freq,temp)\n", "pl.title(source+' Tb model')\n", "pl.xlabel('Frequency (GHz)')\n", "pl.ylabel('Tb (K)')\n", "\n", "\n", "```\n", "\n", "And the following is the output plot by executing the script above.\n", "\n", "![be05be49165cd565e14b3473344dfb5d8c00c674](https://github.com/casangi/casadocs/blob/master/docs/notebooks/media/be05be49165cd565e14b3473344dfb5d8c00c674.png?raw=1){.image-inline}\n", "\n", "\n", "\n", "The Tb model for Mars (Mars_Tb.dat) is calculated as a function of time and frequency, with tabulations every hour and at frequencies of: 30, 80, 115, 150, 200, 230, 260, 300, 330, 360, 425, 650, 800, 950, and 1000 GHz. The first line of the file contain frequencies in GHz. The data starts at the second line of the file with the format: YYYY MM DD HH MJD Tb for at each frequency sepearated by a space.\n", "\n", "\n", "\n", "**New Asteroid models**\n", "\n", "Ceres_fd_time.dat, Luthetia_fd_time.dat, Pallas_fd_time.dat, and Vesta_fd_time.dat contain thermophysical models by Th. Mueller (private communication). These time variable models are already converted to flux densities and are tabulated for 30, 80, 115, 150, 200, 230, 260, 300, 330, 360, 425, 650, 800, 950, and 1000 GHz. Time intevals are 1 hr. for Ceres and 15min. for Luthetia, Pallas, and Vesta with the data available from 2015 01 01 0UT to 2021 01 01 0 UT. In **setjy** task,these models are automatically selected for the data with the observation dates falls within this time range.\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "QQ6FpdFvznlz" }, "source": [ "### Spectral Frames\n", "\n", "Spectral Frames supported in CASA\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "mt_fPmzTznl1" }, "source": [ "#### Spectral Frames\n", "\n", "CASA supported spectral frames:\n", "\n", " Frame Description Definition \n", " ---------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n", " REST rest frequency Lab frame or source frame; cannot be converted to any other frame\n", " LSRK LSR as a kinematic (radio) definition (J2000) based on average velocity of stars in the Solar neighborhood 20km/s in direction of RA, Dec - \\[270,+30\\] deg (B1900.0) (Gordon 1975 [\\[1\\]](#Bibliography) )\n", " LSRD Local Standard of Rest (J2000), dynamical, IAU definition. Solar peculiar velocity in the reference frame of a circular orbit about the Galactic Center, based on average velocity of stars in the Solar neighborhood and solar peculiar motion U$\\odot$=9kms/s, V$\\odot$=12km/s,W$\\odot$=7km/s. Or 16.552945km/s towards l,b = 53.13, +25.02 deg (Delhaye 1965 [\\[2\\]](#Bibliography))\n", " BARY Solar System Baryceneter (J2000) \n", " GEO Geocentric, referenced to the Earth\\'s center \n", " TOPO Topocentric Local observatory frame, fixed in observing frequency, no doppler tracking\n", " GALACTO Galactocentric (J2000), referenced to dynamical center of the Galaxy 220 km/s in the direction l,b = 270, +0 deg. (Kerr and Lynden-Bell 1986 [\\[3\\]](#Bibliography))\n", " LGROUP Mean motion of Local Group Galaxies with respect to its bary center 308km/s towards l,b = 105,-7\n", " CMB Cosmic Microwave Background, COBE measurements of dipole anisotropy 369.5km/s towards l,b = 264.4,48.4. (Kogut et al. 1993 [\\[4\\]](#Bibliography))\n", " Undefined \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "_2GXbJhVznl2" }, "source": [ "#### Doppler Types\n", "\n", "CASA supported Doppler types (velocity conventions) where $f_v$ is the observed frequency and $f_0$ is the rest frame frequency of a given lineand positive velocity V is increasing away from the observer:\n", "\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| Name | Description |\n", "+================+=====================================================================================================================================+\n", "| RADIO | $V = c \\frac{(f_0 - f_v)}{f_0}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| Z | $V=cz$ $z = \\frac{(f_0 - f_v)}{f_v}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| RATIO | $V=c(\\frac{f_v}{f_o})$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| BETA | $V=c\\frac{(1-(\\frac{f_v}{f_0})^2)}{(1+(\\frac{f_v}{f_0})^2)}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| GAMMA | $V=c\\frac{(1 + (\\frac{f_v}{f_0})^2)}{2\\frac{f_v}{f_0}}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| OPTICAL | $V= c\\frac{(f_0 - f_v)}{f_v}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| TRUE | $V=c\\frac{(1-(\\frac{f_v}{f_0})^2)}{(1+(\\frac{f_v}{f_0})^2)}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "| RELATIVISTIC | $V=c\\frac{(1-(\\frac{f_v}{f_0})^2)}{(1+(\\frac{f_v}{f_0})^2)}$ |\n", "+----------------+-------------------------------------------------------------------------------------------------------------------------------------+\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "u2KuOytPznl2" }, "source": [ "#### Bibliography\n", "\n", "1. Gordon\\ 1975:\\ \\\"**Methods\\ of\\ Experimental\\ Physics:\\ Volume\\ 12:**\\ Astrophysics,\\ Part\\ C:\\ Radio\\ Observations\\\",\\ ed.\\ M.L.Meeks,\\ Academic\\ Press\\ 1976\\\n", "2. Delhaye\\ 1965\\ (\n", "3. Kerr\\ F.\\ J.\\ &\\ Lynden-Bell\\ D.\\ 1986\\ MNRAS,\\ 221,\\ 1023\\ (\n", "4. Kogut\\ A.\\ et\\ al.\\ 1993\\ (\n", "^\n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "bKcojv7gznl3" }, "source": [ "### Time Reference Frames\n", "\n", "CASA supported time reference frames:\n", "\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| Acronym | Name | Description |\n", "+=========+=====================================================+=================================================================================================================================+\n", "| ET | Ephemeris Time | The time scale used prior to 1984 as the independent variable in gravitational theories of the solar system. In 1984, ET was |\n", "| | | replaced by dynamical time (see TDB, TT). |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| GAST | Greenwich Apparent Sidereal Time | The Greenwich hour angle of the true equinox [1] of date. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| GMST | Greenwich Mean Sidereal Time | The Greenwich hour angle of the mean equinox [1] of date, defined as the angular distance on the |\n", "| | | celestial sphere measured westward along the celestial equator from the Greenwich meridian to the hour circle that passes |\n", "| | | through a celestial object or point. |\n", "| | | |\n", "| | | GMST (in seconds at UT1=0) = 24110.54841 + 8640184.812866 * T + 0.093104 * $T^2$ - 0.0000062 * $T^3$ |\n", "| | | |\n", "| | | where T is in Julian centuries from 2000 Jan. 1 12h UT1: |\n", "| | | |\n", "| | | T = d / 36525 |\n", "| | | |\n", "| | | d = JD - 2451545.0 |\n", "| | | |\n", "| | | (http://www.cv.nrao.edu/~rfisher/Ephemerides/times.html) |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| GMST1 | | GMST calculated specifically with reference to UT1 |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| IAT | International Atomic Time (a.k.a. TAI en Francais): | The continuous time scale resulting from analysis by the Bureau International des Poids et Mesures of atomic time standards in |\n", "| | | many countries. The fundamental unit of TAI is the SI second [2] on the geoid |\n", "| | | [3] , and the epoch is 1958 January 1. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| LAST | Local Apparent Sidereal Time | LAST is derived from LMST by applying the equation of equinoxes [1] or nutation of the mean pole |\n", "| | | of the Earth from mean to true position yields LAST. |\n", "| | | |\n", "| | | http://tycho.usno.navy.mil/sidereal.html |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| LMST | Local Mean Sidereal Time | Sidereal time is the hour angle of the vernal equinox, the ascending node of the ecliptic on the celestial equator. The daily |\n", "| | | motion of this point provides a measure of the rotation of the Earth with respect to the stars, rather than the Sun. |\n", "| | | It corresponds to the coordinate right ascension of a celestial body that is presently on the local meridian. |\n", "| | | LMST is computed from the current GMST plus the local offset in longitude measured positive to the east of Greenwich, |\n", "| | | (converted to a sidereal offset by the ratio 1.00273790935 of the mean solar day to the mean sidereal day.) |\n", "| | | LMST = GMST + (observer's east longitude) |\n", "| | | |\n", "| | | http://www.cv.nrao.edu/~rfisher/Ephemerides/times.html |\n", "| | | |\n", "| | | http://tycho.usno.navy.mil/sidereal.html |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| TAI | International Atomic Time (a.k.a. TAI en Francais) | see IAT |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| TCB | Barycentric Coordinate Time | The coordinate time of the Barycentric Celestial Reference System (BCRS), which advances by SI seconds |\n", "| | | [2] within that system. TCB is related to TCG and TT by relativistic transformations that include |\n", "| | | a secular term. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| TCG | | |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| TDB | Barycentric Dynamical Time | A time scale defined by the IAU (originally in 1976; named in 1979; revised in 2006) used in barycentric ephemerides and |\n", "| | | equations of motion. TDB is a linear function of TCB that on average tracks TT over long periods of time; differences between |\n", "| | | TDB and TT evaluated at the Earth's surface remain under 2 ms for several thousand years around the current epoch. TDB is |\n", "| | | functionally equivalent to Teph, the independent argument of the JPL planetary and lunar ephemerides DE405/LE405. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| TDT | Terrestrial Dynamical Time | The time scale for apparent geocentric ephemerides defined by a 1979 IAU resolution. In 1991 it was replaced by TT. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| TT | Terrestrial Time | An idealized form of International Atomic Time (TAI) with an epoch offset; in practice TT = TAI + 32s.184. TT thus advances by |\n", "| | | SI seconds on the geoid [3] |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| UT | Universal Time | Loosely, mean solar time on the Greenwich meridian (previously referred to as Greenwich Mean Time). In current usage, UT refers |\n", "| | | either to UT1 or to UTC. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| UT1 | | UT1 is formally defined by a mathematical expression that relates it to sidereal time. Thus, UT1 is observationally determined |\n", "| | | by the apparent diurnal motions of celestial bodies, and is affected by irregularities in the Earth's rate of rotation. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| UT2 | | Before 1972 the time broadcast services kept their time signals within 0.1 seconds [2] of UT2, |\n", "| | | which is UT1 with annual and semiannual variations in the earth's rotation removed. The formal relation between UT1 and |\n", "| | | UT2 is |\n", "| | | |\n", "| | | UT2 = UT1 + 0.022 * sin(2 * Pi * t) - 0.012 * cos(2 * Pi * t) |\n", "| | | |\n", "| | | 0.006 * sin(4 * Pi * t) + 0.007 * cos(4 * Pi * t) |\n", "| | | |\n", "| | | where |\n", "| | | |\n", "| | | t = 2000.0 + (MJD - 51544.03) / 365.2422 |\n", "| | | |\n", "| | | is the Besselian day fraction, and MJD is the Modified Julian Date (Julian Date - 2400000.5) |\n", "| | | |\n", "| | | http://www.cv.nrao.edu/~rfisher/Ephemerides/times.html |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "| UTC | Coordinated Universal Time | UTC is based on IAT but is maintained within 0s.9 of UT1 by the introduction of leap seconds when necessary. |\n", "+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+\n", "\n", "Footnote(s)\n", "\n", "1. mean equator and equinox v. true equator and equinox: The mean equator and equinox are used for the celestial coordinate system defined by the orientation of the Earth's equatorial plane on some specified date together with the direction of the dynamical equinox on that date, neglecting nutation. Thus, the mean equator and equinox moves in response only to precession. Positions in a star catalog have traditionally been referred to a catalog equator and equinox that approximate the mean equator and equinox of a standard epoch.\n", "The true equator and equinox are affected by both precession and nutation. The Equation of the Equinoxes is the difference (apparent sidereal time minus mean sidereal time). Equivalently, the difference between the right ascensions of the true and mean equinoxes, expressed in time units.\n", "\n", "2. The Systeme International (SI) second is defined as the duration of 9,192,631,770 cycles of radiation corresponding to the transition between two hyperfine levels of the ground state of caesium 133.\n", "\n", "3. The geoid is an equipotential surface that coincides with mean sea level in the open ocean. On land it is the level surface that would be assumed by water in an imaginary network of frictionless channels connected to the ocean.\n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "EoEgx9Q2znl4" }, "source": [ "### Coordinate Frames\n", "\n", "\n", "CASA supported spatial coordinate frames:\n", "\n", " \n", "\n", " Name Description\n", " ----------- -------------------------------------------------\n", " J2000 mean equator and equinox at J2000.0 (FK5)\n", " JNAT geocentric natural frame\n", " JMEAN mean equator and equinox at frame epoch\n", " JTRUE true equator and equinox at frame epoch\n", " APP apparent geocentric position\n", " B1950 mean epoch and ecliptic at B1950.0.\n", " B1950_VLA mean epoch (1979.9) and ecliptic at B1950.0\n", " BMEAN mean equator and equinox at frame epoch\n", " BTRUE true equator and equinox at frame epoch\n", " GALACTIC Galactic coordinates\n", " HADEC topocentric HA and declination\n", " AZEL topocentric Azimuth and Elevation (N through E)\n", " AZELSW topocentric Azimuth and Elevation (S through W)\n", " AZELNE topocentric Azimuth and Elevation (N through E)\n", " AZELGEO geodetic Azimuth and Elevation (N through E)\n", " AZELSWGEO geodetic Azimuth and Elevation (S through W)\n", " AZELNEGEO geodetic Azimuth and Elevation (N through E)\n", " ECLIPTC ecliptic for J2000 equator and equinox\n", " MECLIPTIC ecliptic for mean equator of date\n", " TECLIPTIC ecliptic for true equator of date\n", " SUPERGAL supergalactic coordinates\n", " ITRF coordinates wrt ITRF Earth frame\n", " TOPO apparent topocentric position\n", " ICRS International Celestial reference system\n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "Zi-BDjovznl4" }, "source": [ "### Physical Units\n", "\n", "CASA regonizes physical units as listed in the following Tables.\n", "\n", " Prefix Name Value\n", " -------->Physical units: Prefixes\n", " \n", "\n", " \n", "\n", " Unit Name Value\n", " -------- --------------------- --------------------------\n", " \\$ (currency) 1 \\_\n", " \\% (percent) 0.01\n", " %% (permille) 0.001\n", " A (ampere) 1 A\n", " AE (astronomical unit) 149597870659 m\n", " AU (astronomical unit) 149597870659 m\n", " Bq (becquerel) 1 s^−1^\n", " C (coulomb) 1 s A\n", " F (farad) 1 m^−2^ kg^−1^ s^4^ A^2^\n", " Gy (gray) 1 m^2^ s^−2^\n", " H (henry) 1 m^2^ kg s^−2^ A^−2^\n", " Hz (hertz) 1 s^−1^\n", " J (joule) 1 m^2^ kg s^−2^\n", " Jy (jansky) 10^−26^ kg s^−2^\n", " K (kelvin) 1 K\n", " L (litre) 0.001 m^3^\n", " M0 (solar mass) 1.98891944407× 10^30^ kg\n", " N (newton) 1 m kg s^−2^\n", " Ohm (ohm) 1 m^2^ kg s^−3^ A^−2^\n", " Pa (pascal) 1 m^−1^ kg s^−2^\n", " S (siemens) 1 m^−2^ kg^−1^ s^3^ A^2^\n", " S0 (solar mass) 1.98891944407× 10^30^ kg\n", " Sv (sievert) 1 m^2^ s^−2^\n", " T (tesla) 1 kg s^−2^ A^−1^\n", " UA (astronomical unit) 149597870659 m\n", " V (volt) 1 m^2^ kg s^−3^ A^−1^\n", " W (watt) 1 m^2^ kg s^−3^\n", " Wb (weber) 1 m^2^ kg s^−2^ A^−1^\n", " \\_ (undimensioned) 1 \\_\n", " a (year) 31557600 s\n", " arcmin (arcmin) 0.000290888208666 rad\n", " arcsec (arcsec) 4.8481368111×10^−6^ rad\n", " as (arcsec) 4.8481368111e×10^−6^ rad\n", " cd (candela) 1 cd\n", " cy (century) 3155760000 s\n", " d (day) 86400 s\n", " deg (degree) 0.0174532925199 rad\n", " g (gram) 0.001 kg\n", " h (hour) 3600 s\n", " l (litre) 0.001 m^3^\n", " lm (lumen) 1 cd sr\n", " lx (lux) 1 m^−2^ cd sr\n", " m (metre) 1 m\n", " min (minute) 60 s\n", " mol (mole) 1 mol\n", " pc (parsec) 3.08567758065×10^16^ m\n", " rad (radian) 1 rad\n", " s (second) 1 s\n", " sr (steradian) 1 sr\n", " t (tonne) 1000 kg\n", "\n", ">Physical SI Units\n", "\n", "\n", "\n", "\n", "Unit | Name | Value\n", "----------- | ------------------------------ | ----------------------------------------------\n", "\\\" | (arcsec) | 4.8481368111×10^−6^ rad\n", "\\\"\\_2 | (square arcsec) | 2.35044305391× 10^−11^ sr\n", "' | (arcmin) | 0.000290888208666 rad\n", "'\\_2 | (square arcmin) | 8.46159499408×10^−8^ sr\n", ": | (hour) | 3600 s\n", "::​ | (minute) | 60 s\n", "Ah | (ampere hour) | 3600 s A\n", "Angstrom | (angstrom) | 1e-10 m\n", "Btu | (British thermal unit (Int)) | 1055.056 m^2^ kg s^−2^\n", "CM | (metric carat) | 0.0002 kg\n", "Cal | (large calorie (Int)) | 4186.8 m^2^ kg s^−2^\n", "FU | (flux unit) | 10^−26^ kg s^−2^\n", "G | (gauss) | 0.0001 kg s^−2^ A^−1^\n", "Gal | (gal) | 0.01 m s^−2^\n", "Gb | (gilbert) | 0.795774715459 A\n", "Mx | (maxwell) | 10^−8^ m^2^ kg s^−2^ A^−1^\n", "Oe | (oersted) | 79.5774715459 m^−1^ A\n", "R | (mile) | 0.000258 kg^−1^ s A\n", "St | (stokes) | 0.0001 m^2^ s−1\n", "Torr | (torr) | 133.322368421 m^−1^ kg s^−2^\n", "USfl_oz | (fluid ounce (US)) | 2.95735295625×10^−5^ m^3^\n", "USgal | (gallon (US)) | 0.003785411784 m^3^\n", "WU | (WSRT flux unit) | 5× 10^−29^ kg s^−2^\n", "abA | (abampere) | 10 A\n", "abC | (abcoulomb) | 10 s A\n", "abF | (abfarad) | 10^9^ m^−2^ kg^−1^ s^4^ A^2^\n", "abH | (abhenry) | 10^−9^ m^2^ kg s^−2^ A^−2^\n", "abOhm | (abohm) | 10^−9^ m^2^ kg s^−3^ A^−2^\n", "abV | (abvolt) | 10^−8^ m^2^ kg s^−3^ A^−1^\n", "ac | (acre) | 4046.8564224 m^2^\n", "arcmin_2 | (square arcmin) | 8.46-2159499408×10^−8^ sr\n", "arcsec_2 | (square arcsec) | 2.35044305391×10^−11^ sr\n", "ata | (technical atmosphere) | 98066.5 m^−1^.kg.s^−2^\n", "atm | (standard atmosphere) | 101325 m^−1^.kg.s^−2^\n", "bar | (bar) | 100000 m^−1^.kg.s^−2^\n", "beam | (undefined beam area) | 1 \\_\n", "cal | (calorie (Int)) | 4.1868 m^2^ kg s^−2^\n", "count | (count) | 1 \\_\n", "cwt | (hundredweight) | 50.80234544 kg\n", "deg_2 | (square degree) | 0.000304617419787 sr\n", "dyn | (dyne) | 10^−5^ m kg s^−2^\n", "eV | (electron volt) | 1.60217733×10^−19^ m^2^ kg s^−2^\n", "erg | (erg) | 10^−7^ m^2^ kg s^−2^\n", "fl_oz | (fluid ounce (Imp)) | 2.84130488996×10^−5^ m^3^\n", "ft | (foot) | 0.3048 m\n", "fu | (flux unit) | 10^−26^ kg s^−2^\n", "fur | (furlong) | 201.168 m\n", "gal | (gallon (Imp)) | 0.00454608782394 m^3^\n", "ha | (hectare) | 10000 m^2^\n", "hp | (horsepower) | 745.7 m^2^ kg s^−3^\n", "in | (inch) | 0.0254 m\n", "kn | (knot (Imp)) | 0.514773333333 m s^−1^\n", "lambda | (lambda) | 1 \\_\n", "lb | (pound (avoirdupois)) | 0.45359237 kg\n", "ly | (light year) | 9.46073047×10^15^ m\n", "mHg | (metre of mercury) | 133322.387415 m^−1^ kg s^−2^\n", "mile | (mile) | 1609.344 m\n", "n_mile | (nautical mile (Imp)) | 1853.184 m\n", "oz | (ounce (avoirdupois)) | 0.028349523125 kg\n", "pixel | (pixel) | 1 \\_\n", "sb | (stilb) | 10000 m^−2^ cd\n", "sq_arcmin | (square arcmin) | 8.46159499408×10^−8^ sr\n", "sq_arcsec | (square arcsec) | 2.35044305391×10^−11^ sr\n", "sq_deg | (square degree) | 0.000304617419787 sr\n", "statA | (statampere) | 3.33564095198×10^−10^ A\n", "statC | (statcoulomb) | 3.33564095198×10^−10^ s A\n", "statF | (statfarad) | 1.11188031733×10^−12^ m^−2^ kg^−1^ s^4^ A^2^\n", "statH | (stathenry) | 899377374000 m^2^ kg s^−2^ A^−2^\n", "statOhm | (statohm) | 899377374000 m^2^ kg s^−3^ A^−2^\n", "statV | (statvolt) | 299.792458 m^2^ kg s^−3^ A^−1^\n", "u | (atomic mass unit) | 1.661×10^−27^ kg\n", "yd | (yard) | 0.9144 m\n", "yr | (year) | 31557600 s\n", "\n", ">Custom units available in CASA\n", " \n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "gS5zlWFfznl5" }, "source": [ "### Physical Constants\n", "\n", "Physical constants recognized by CASA\n", "\n", "The physical constants listed below are defined in CASA. They can be listed with the command\n", "\n", "```\n", "import casatools.constants\n", "print qa.map('Constants')\n", "```\n", "\n", "For information about the constants as stored in the code, please see this [Casacore document](http://casacore.github.io/casacore/group__Quanta__module.html)\n", "\n", "\n", "\n", " Constant Name Value\n", " ---------- -------------------- --------------------------------\n", " pi 3.14.. 3.14159\n", " ee 2.71.. 2.71828\n", " c speed of light 2.99792×10^8^ m s^−1^\n", " G grav. constant 6.67259×10^11^ N m^2^ kg^−2^\n", " h Planck constant 6.62608×10^−34^ J s\n", " HI HI line frequency 1420.41 MHz\n", " R gas constant 8.31451 J K^−1^ mol^−1^\n", " NA Avogadro \\# 6.02214×10^23^ mol^−1^\n", " e electron charge 1.60218×10^−19^ C\n", " mp proton mass 1.67262×10^−27^ kg\n", " mp_me mp/me 1836.15\n", " mu0 permeability vac. 1.25664×10^−6^ H m^−1^\n", " eps0 permittivity vac. 8.85418782×10^−12^ F m^-1^\n", " k Boltzmann constant 1.38066×10^−23^ J K^−1^\n", " F Faraday constant 96485.3 C mol^−1^\n", " me electron mass 9.10939×10^−31^ kg\n", " re electron radius 2.8179e×10^−15^ m\n", " a0 Bohrs radius 5.2918×10^−11^ m\n", " R0 solar radius 6.9599×10^8^ m\n", " k2 IAU grav. const^2^ 0.000295912 AU^3^ d^−2^ S0^−1^\n", "\n", "\n", "\n", "\n", "\n", "***\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "EC0HERVIznl5" }, "source": [ "## Resources and Links\n", "\n", "Useful supplementary information relevant to CASA\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "0sehd4y3znl6" }, "source": [ "### Tutorials\n", "\n", "- [CASAguides](https://casaguides.nrao.edu/) contains the most comprehensive data reduction tutorials for ALMA (including simulations) and the VLA. Tutorials also exist for other telescopes, such as ATCA, SMA, and CARMA. The [CASAguides](https://casaguides.nrao.edu/) wiki is also a great resource for tips and tricks in using CASA and contains user contributed scripts.\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "sOmAAPcUznl6" }, "source": [ "### Workshops\n", "\n", "- [ALMA community days](https://science.nrao.edu/facilities/alma/community1) webpages provide material that was used during workshops\n", "- The [2018 VLA data reduction workshop](http://www.cvent.com/events/16th-synthesis-imaging-workshop/event-summary-b36e4bc16b574d5d94229f9d885d0eff.aspx) contains course material\n", "- Synthesis Imaging in Radio Astronomy II ([pdf book](https://drive.google.com/file/d/1qOcQ1xR96LVPCssTu2IxYA3ItkGdVMKj/view?usp=sharing) \\([chapters](http://www.aspbooks.org/a/volumes/table_of_contents/?book_id=292)\\)\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "SPhdPizzznl7" }, "source": [ "### Python\n", "\n", "- [Python documentation](https://casa.nrao.edu/python.shtml)\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "yUhq2y8hznl7" }, "source": [ "### Science Data Model\n", "\n", "- The SDM description and SDM definition document can be found on [this page](casa-fundamentals.ipynb#science-data-model)\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "b0tbe8ZSznl8" }, "source": [ "### Dependencies/Libraries\n", "\n", "- [CASA package code libraries and dependencies](https://safe.nrao.edu/wiki/bin/view/Software/CASA/CASADevelopmentToolsAndLibraries)\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "05lX_dqQznl8" }, "source": [ "### Memos\n", "\n", "- [ALMA](http://library.nrao.edu/alma.shtml)\n", "- [VLA](http://www.aoc.nrao.edu/evla/memolist.shtml)\n", "- [ngVLA](http://library.nrao.edu/ngvla.shtml)\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "id": "olctjMRaznl9" }, "source": [ "### Related Telescopes\n", "\n", "- [ALMA](http://www.almascience.org/)\n", "- [VLA](https://public.nrao.edu/telescopes/vla/)\n", "- [Greenbank](https://greenbankobservatory.org/science/)\n", "- [VLBA](https://www.lbo.us/)\n", "- [ATCA](https://www.narrabri.atnf.csiro.au/)\n", "- [GMRT](http://www.ncra.tifr.res.in/ncra/gmrt)\n", "- [Nobeyama](http://www.nro.nao.ac.jp/~nro45mrt/html/index-e.html)\n", "- [SMA](https://www.cfa.harvard.edu/sma/)\n", "- [NOEMA](http://iram-institute.org/EN/noema-project.php)\n", "- [MeerKAT](https://www.ska.ac.za/gallery/meerkat/)\n", "- [Next Generation VLA](http://ngvla.nrao.edu/)\n", "- [Square Kilometre Array](https://www.skatelescope.org/)\n" ] } ] }