NRAO Home > CASA > CASA Cookbook and User Reference Manual

Contents

1 Introduction
  1.0.1 Reference for Publications
 1.1 About This Release
 1.2 Obtaining CASA
  1.2.1 What’s New in Release 3.4.0
 1.3 CASA Basics — Information for First-Time Users
  1.3.1 Before Starting CASA
  1.3.2 Starting CASA
  1.3.3 Ending CASA
  1.3.4 What happens if something goes wrong?
  1.3.5 Aborting CASA execution
  1.3.6 What happens if CASA crashes?
  1.3.7 Python Basics for CASA
  1.3.8 Getting Help in CASA
 1.4 Tasks and Tools in CASA
  1.4.1 What Tasks are Available?
  1.4.2 Running Tasks and Tools
  1.4.3 Getting Return Values
  1.4.4 Running Tasks Asynchronously
  1.4.5 Setting Parameters and Invoking Tasks
  1.4.6 Tools in CASA
 1.5 Getting the most out of CASA
  1.5.1 Your command line history
  1.5.2 Logging your session
  1.5.3 Where are my data in CASA?
  1.5.4 What’s in my data?
  1.5.5 Data Selection in CASA
 1.6 From Loading Data to Images
  1.6.1 Loading Data into CASA
  1.6.2 Data Examination, Editing, and Flagging
  1.6.3 Calibration
  1.6.4 Synthesis Imaging
  1.6.5 Self Calibration
  1.6.6 Data and Image Analysis
  1.6.7 Getting data and images out of CASA
2 Visibility Data Import, Export, and Selection
 2.1 CASA Measurement Sets
  2.1.1 Under the Hood: Structure of the Measurement Set
 2.2 Data Import and Export
  2.2.1 ALMA: Filling of Science Data Model (ASDM) data
  2.2.2 EVLA/JVLA: Filling of Science Data Model (ASDM) data
  2.2.3 VLA: Filling data from archive format (importvla)
  2.2.4 UVFITS Import and Export
  2.2.5 Handling Measurement Set metadata and data
  2.2.6 Summarizing your MS (listobs)
  2.2.7 Listing MS data (listvis)
  2.2.8 Listing and manipulating MS metadata (vishead)
  2.2.9 MS statistics (visstat)
  2.2.10 Concatenating multiple datasets (concat)
 2.3 Data Selection
  2.3.1 General selection syntax
  2.3.2 The field Parameter
  2.3.3 The spw Parameter
  2.3.4 The selectdata Parameters
3 Data Examination and Editing
 3.1 Plotting and Flagging Visibility Data in CASA
 3.2 Managing flag versions with flagmanager
 3.3 X-Y Plotting and Editing of the Data
  3.3.1 MS Plotting and Editing using plotms
  3.3.2 Plotting and Editing using plotxy
  3.3.3 Plotting antenna positions using plotants
 3.4 Data Flagging using tflagdata
  3.4.1 The action parameter
  3.4.2 Flagging Modes
 3.5 Command-based flagging using flagcmd
  3.5.1 Input modes inpmode
  3.5.2 Operation types action
  3.5.3 Flagging command syntax
 3.6 Non-Interactive Flagging using flagdata2
  3.6.1 Flag Antenna/Channels
 3.7 Flagging auto-correlations with flagautocorr
 3.8 Browse the Data
4 Synthesis Calibration
 4.1 Calibration Tasks
 4.2 The Calibration Process — Outline and Philosophy
  4.2.1 The Philosophy of Calibration in CASA
  4.2.2 Keeping Track of Calibration Tables
  4.2.3 The Calibration of VLA data in CASA
  4.2.4 Loading JVLA data in CASA
 4.3 Preparing for Calibration
  4.3.1 System Temperature Correction
  4.3.2 Antenna Gain-Elevation Curve Calibration
  4.3.3 Atmospheric Optical Depth Correction
  4.3.4 Setting the Flux Density Scale using (setjy)
  4.3.5 Correction for delay and antenna position offsets using gencal
  4.3.6 Applying JVLA switched power or ALMA Tsys using gencal
  4.3.7 Generate a gain table based on Water Vapor Radiometer data wvrgcal
  4.3.8 Other a priori Calibrations and Corrections
 4.4 Solving for Calibration — Bandpass, Gain, Polarization
  4.4.1 Common Calibration Solver Parameters
  4.4.2 Spectral Bandpass Calibration (bandpass)
  4.4.3 Complex Gain Calibration (gaincal)
  4.4.4 Establishing the Flux Density Scale (fluxscale)
  4.4.5 Instrumental Polarization Calibration (D,X)
  4.4.6 Baseline-based Calibration (blcal)
 4.5 Plotting and Manipulating Calibration Tables
  4.5.1 Plotting Calibration Solutions (plotcal)
  4.5.2 Listing calibration solutions with (listcal)
  4.5.3 Calibration table statistics (calstat)
  4.5.4 Calibration Smoothing (smoothcal)
  4.5.5 Calibration Interpolation and Accumulation (accum)
 4.6 Application of Calibration to the Data
  4.6.1 Application of Calibration (applycal)
  4.6.2 Examine the Calibrated Data
  4.6.3 Resetting the Calibration Models (delmod and clearcal)
 4.7 Other Calibration and UV-Plane Analysis Options
  4.7.1 Splitting out Calibrated uv data (split)
  4.7.2 Recalculation of uvw values (fixvis)
  4.7.3 Hanning smoothing of uv data (hanningsmooth)
  4.7.4 Model subtraction from uv data (uvsub)
  4.7.5 UV-Plane Continuum Subtraction (uvcontsub)
  4.7.6 Spectral regridding of the MS (cvel)
  4.7.7 UV-Plane Model Fitting (uvmodelfit)
  4.7.8 Reweighing visibilities based on their scatter (statwgt)
 4.8 Examples of Calibration
5 Synthesis Imaging
 5.1 Imaging Tasks Overview
 5.2 Common Imaging Task Parameters
  5.2.1 Parameter cell
  5.2.2 Parameter field
  5.2.3 Parameter imagename
  5.2.4 Parameter imsize
  5.2.5 Parameter mode
  5.2.6 Parameter phasecenter
  5.2.7 Parameter restfreq
  5.2.8 Parameter spw
  5.2.9 Parameter stokes
  5.2.10 Parameter uvtaper
  5.2.11 Parameter weighting
  5.2.12 Parameter vis
  5.2.13 Primary beams in imaging
 5.3 Deconvolution using CLEAN (clean)
  5.3.1 Parameter psfmode
  5.3.2 The multiscale parameter
  5.3.3 Parameter gain
  5.3.4 Parameter imagermode
  5.3.5 Parameter interactive
  5.3.6 Parameter mask
  5.3.7 Parameter minpb
  5.3.8 Parameter modelimage
  5.3.9 Parameter niter
  5.3.10 Parameter pbcor
  5.3.11 Parameter restoringbeam
  5.3.12 Parameter threshold
  5.3.13 Parameter gridmode
  5.3.14 Interactive Cleaning — Example
  5.3.15 Mosaic imaging
  5.3.16 Heterogeneous imaging
  5.3.17 Polarization imaging
  5.3.18 Wide-field imaging and deconvolution in clean
 5.4 Primary Beam Correction (impbcor)
 5.5 Combined Single Dish and Interferometric Imaging (feather)
 5.6 Making Deconvolution Masks or Box Regions
  5.6.1 Making Deconvolution Regions from an Image (boxit)
 5.7 Insert an Image Model (ft)
 5.8 Image-plane deconvolution (deconvolve)
 5.9 Self-Calibration
 5.10 Examples of Imaging
6 Image Analysis
 6.1 Common Image Analysis Task Parameters
  6.1.1 Region Selection (box)
  6.1.2 Plane Selection (chans, stokes)
  6.1.3 Lattice Expressions (expr)
  6.1.4 Masks (mask)
  6.1.5 Regions (region)
 6.2 Image Header Manipulation (imhead)
  6.2.1 Examples for imhead
 6.3 Continuum Subtraction on an Image Cube (imcontsub)
  6.3.1 Examples for imcontsub)
 6.4 Image-plane Component Fitting (imfit)
  6.4.1 Examples for imfit
 6.5 Mathematical Operations on an Image (immath)
  6.5.1 Examples for immath
  6.5.2 Using masks in immath
 6.6 Computing the Moments of an Image Cube (immoments)
  6.6.1 Hints for using (immoments)
  6.6.2 Examples using (immoments)
 6.7 Computing image statistics (imstat)
  6.7.1 Using the task return value
  6.7.2 Examples for imstat
 6.8 Extracting data from an image (imval)
 6.9 Reordering the Axes of an Image Cube (imtrans)
 6.10 Collapsing an Image Along an Axis (imcollapse)
 6.11 Regridding an Image (imregrid)
 6.12 Image Convolution(imsmooth)
 6.13 Spectral Line fitting with specfit
  6.13.1 Polynomial Fits
  6.13.2 Lorentzian and Gaussian Fits
  6.13.3 Pixel-by-pixel fits
 6.14 Search for Spectral Line Rest Frequencies (slsearch)
 6.15 Convert Exported Splatalogue Catalogs to CASA Tables (splattotable)
 6.16 Image Import/Export to FITS
  6.16.1 FITS Image Export (exportfits)
  6.16.2 FITS Image Import (importfits)
 6.17 Using the CASA Toolkit for Image Analysis
 6.18 Examples of CASA Image Analysis
7 Visualization With The CASA Viewer
 7.1 Starting the viewer
  7.1.1 Running the CASA viewer outside casapy
 7.2 The viewer GUI
  7.2.1 The Viewer Display Panel
  7.2.2 Saving and Restoring Display Panel State
  7.2.3 Region Selection and Positioning
  7.2.4 The Load Data Panel
  7.2.5 The Save Data Panel
 7.3 Viewing Images
  7.3.1 Viewing a raster map
  7.3.2 Viewing a contour map
  7.3.3 Overlay contours on a raster map
  7.3.4 Spectral Profile Plotting
  7.3.5 Managing Regions and Annotations
  7.3.6 Adjusting Canvas Parameters/Multi-panel displays
 7.4 Viewing Measurement Sets
  7.4.1 Data Display Options Panel for Measurement Sets
 7.5 Printing from the Viewer
 7.6 Image Viewer (imview)
 7.7 Measurement Viewer (msview)
8 Single Dish Data Processing
 8.1 Guidelines for Use of ASAP and SDtasks in CASA
  8.1.1 Environment Variables
  8.1.2 Assignment
  8.1.3 Lists
  8.1.4 Dictionaries
  8.1.5 Line Formatting
  8.1.6 Logging
 8.2 Single Dish Analysis Tasks
  8.2.1 SDtask Summaries
  8.2.2 Single Dish Analysis Use Cases With SDTasks
 8.3 Using The ASAP Toolkit Within CASA
  8.3.1 Environment Variables
  8.3.2 Import
  8.3.3 Scantable Manipulation
  8.3.4 Calibration
  8.3.5 Averaging
  8.3.6 Spectral Smoothing
  8.3.7 Baseline Fitting
  8.3.8 Line Fitting
  8.3.9 Plotting
  8.3.10 Setting/Getting Rest Frequencies
  8.3.11 Single Dish Spectral Analysis Use Case With ASAP Toolkit
 8.4 Single Dish Imaging
  8.4.1 Single Dish Imaging Use Case With ASAP Toolkit
 8.5 Known Issues, Problems, Deficiencies and Features
9 Simulation
 9.1 Simulating ALMA with simobserve and simanalyze
10 Parallel Processing in CASA
A Appendix: Obtaining, Installing, and Customizing CASA
 A.1 Installation On Linux
  A.1.1 Installation
  A.1.2 Unsupported platforms
  A.1.3 Download & Unpack
 A.2 Installation on Mac OS
 A.3 Startup
 A.4 Startup Customization
 A.5 Updating the data repository
B Appendix: Python and CASA
 B.1 Python Packages
 B.2 Automatic parentheses
 B.3 Indentation
 B.4 Lists and Ranges
 B.5 Dictionaries
  B.5.1 Saving and Reading Dictionaries
 B.6 Control Flow: Conditionals, Loops, and Exceptions
  B.6.1 Conditionals
  B.6.2 Loops
 B.7 System shell access
  B.7.1 Using the os.system methods
  B.7.2 Directory Navigation
  B.7.3 Shell Command and Capture
 B.8 Logging
 B.9 History and Searching
 B.10 Macros
 B.11 On-line editing
 B.12 Executing Python scripts
 B.13 How do I exit from CASA?
C Appendix: Models, Conventions and Reference Frames
 C.1 Flux Density Models for setjy
  C.1.1 Long wavelength calibration
  C.1.2 Short wavelength calibration
  C.1.3 References to this Section
 C.2 Velocity Reference Frames
  C.2.1 Doppler Types
 C.3 Time Reference Frames
 C.4 Coordinate Framess
 C.5 Physical Units
 C.6 Physical Constants
D Appendix: CASA Region File Format
 D.1 Region definitions
 D.2 Allowed shapes
 D.3 Annotation definitions
 D.4 Global definitions
 D.5 Allowed additional parameters
 D.6 Examples
 D.7 Fonts and Symbols
  D.7.1 Allowed symbols
  D.7.2 Allowed fonts
E Appendix: The Measurement Equation and Calibration
 E.1 The HBS Measurement Equation
 E.2 General Calibrater Mechanics
F Appendix: Annotated Example Scripts
 F.1 NGC 5921 — VLA red-shifted HI emission
 F.2 Jupiter — VLA continuum polarization
 F.3 BIMA Mosaic Spectral Imaging
G Appendix: CASA Dictionaries
 G.1 AIPS – CASA dictionary
 G.2 MIRIAD – CASA dictionary
 G.3 CLIC – CASA dictionary
H Appendix: Writing Tasks in CASA
 H.1 The XML file
 H.2 The task_yourtask.py file
 H.3 Example: The clean task
  H.3.1 File clean.xml
  H.3.2 File task_clean.py


More information about CASA may be found at the CASA web page

Copyright © 2010 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search