Previous Up Next

Appendix A  Obtaining, Installing, and Customizing CASA

A.1  Installation On Linux

To install CASA for Linux, we have packaged up a binary distribution of CASA which is available as a downloadable tar file. We believe this binary distribution works with most Linux distributions. While the binary distribution is the only supported public distribution, most CASA developers use RPMs for many third-party packages installed with yum to do development on RedHat Enterprise Linux. Installing the developer RPMs requires root access and we only provide developer support for organizations which have a cooperative agreement to participate in the development of CASA. We are currently working on the development of a distribution for developers similar to our standard binary distribution, but it is not yet ready for testing.

A.1.1  Installation

You do not have to have root or sudo permission, you can easily install CASA, delete it, move it, and it works for many versions of Linux. The one caveat is that CASA on Linux currently will not run if the Security-Enhanced Linux option of the linux operating system is set to enforcing. For the non-root install to work. SElinux must be set to disabled or permissive (in /etc/selinux/config) or you must run (as root):

setsebool -P allow_execheap=1

Otherwise, you will encounter errors like:

casapy: error while loading shared libraries: 
  cannot restore segment prot after reloc: Permission denied

The non-root installation is thought to work on a wide variety of linux platforms, see Sect. 1.2 for the latest supported OSs.

A.1.1.1  Using more than one Linux version of CASA

Up to CASA 3.3.0, CASA .rpm files prohibited installing more than one CASA release at a time. Starting with CASA 3.4.0, CASA .rpm files allow previously installed CASA releases to remain installed.

A.1.1.2  CASA at NRAO

At NRAO many versions are preinstalled, including versions with CASA pipelines.

Please check:

for the latest details.

A.1.2  Unsupported platforms

The non-root install may work on other platforms not listed, please let us know if you find that this binary distribution of CASA works on other linux platforms. Also note, that the plotting tasks like plotxy and plotcal are the ones that typically give problems for new platforms, so a check of these after attempting an unsupported platform installation is advisable.

A.1.3  Download & Unpack

You can download the distribution tar file from

This directory will contain two tar files one will be the 32-bit version of CASA and the other will be the 64-bit version of CASA. The file name of the 64-bit version ends with -64b.tar.gz. After downloading the appropriate tar file, untar it with

tar -zxf casapy-*.tar.gz

This will extract a directory with the same basename as the tar file. Change to that directory and add it to your path with, for example,


After that, you should be able to start CASA by running


A.2  Installation on Mac OS

CASA for Macintosh is distributed as self-contained Macintosh application. For installation purposes, this means that you can install CASA by simply dragging the application to your hard disk. It should be as easy as copying a file.

  1. Download the CASA disk image for your OS version from our download site
  2. Open the disk image file (if your browser does not do so automatically).
  3. Drag the CASA application to the Applications folder of your hard disk.
  4. Eject the CASA disk image.
  5. Double-click the CASA application to run it for the first time. This ensures everything is properly updated if you had installed a previous version.
  6. Optional: Create symbolic links to the CASA version and its executables (Administrator privileges are required), which will allow you to run casa, casaviewer, casaplotms, etc. from any terminal command line. To do so, run !create-symlinks from a CASA prompt. (In CASA 4.2.2 and earlier you will be prompted to update the symlinks on double clicking the Application)

You may need to unload the dbus before the copy will work

launchctl remove org.freedesktop.dbus-session
launchctl remove org.freedesktop.dbus-system

Versions after 12115 are 64bit only and will not work on older mac intel machines The first time you launch the CASA application, it will prompt you to set up an alias to the casa command. You will be taken through the process of creating several casa symbolic links, it is advisable to do so as this will allow you to run casa from a terminal window by typing casa. Additionally, the viewer (casaviewer), table browser (casabrowser), plotms (casaplotms), and buildmytasks will also be available via the command line. Creating the symbolic links will require that you have administrator privileges.

A.2.0.1  Using more than one Mac version of CASA

By dragging the into the Applications folder, any previous version of CASA will be replaced. If one would like to keep older versions, one can simply rename them, e.g., to Double clicking any of the CASA*.app applications will prompt to update the symlinks to that specific CASA version. So any startup of casa, casaviewer, casaplotms will point to that version. If one decides to switch to a different version, just double click the respective CASA*.app and follow the instructions to update the symlinks.

A.3  Startup

in a terminal type


and the world of CASA will open its doors for you.

There are a number of options to casa (see casa --help): Options are:

   --rcdir     directory
   --logfile   logfilename              specify the name of the log
                                         file if other than casa-DATE.log
   --maclogger                          will use the Mac Console program for the logger
   --log2term                           output the logger text in the terminal
   --nologger                           run without launching the logger
   --nologfile                          does not create a logfile 
   --nogui                              will not open the logger GUI 
   --colors=[NoColor|Linux|LightBG]     selects color theme for prompt task inputs
   --release <VERSION>                  launches CASA version
                                         <VERSION> when installed as Linux rpm
   -r <VERSION>                         alias for --release
   -c filename-or-expression            execute a CASA python script from the command line 
   --help                               print this text and exit

E.g. you can execute a CASA script directly with the command

casa -c

You can also launch the plotms and viewer GUIs separately without starting CASA itself. To do so, type:


to launch plotms and


for the viewer.

A.4  Startup Customization

There are two initialization files that are loaded upon startup. The first is loaded very early in the startup of casa:


This allows for limited customization of the casa environment, e.g. setting the path to an alternate logger. The second startup file should be used for most purposes:


This file is loaded just before the casa prompt is display. This is the place where users can load their own python modules and casa tasks. For example  /.casa/ might contain:

 import os
 import analysisUtils as aU

and might contain:

 import numpy as np
 from mpfit import mpfit
 from pylab import *
 from numpy.fft import fft
 from scipy import polyfit
 import taskinit as ti
 from importasdm import importasdm

Many options can also be set in the file



# Set these so that bug(), ask(), etc. know who you are
#  Sheila User   NRAO

#NOTE: Fill this value in as appropriate - the units are MB
#It is important that you not set this value larger than your actual
#physical memory
#system.resources.memory: 2000
#help.popup.type: mb3long

#catalog       T
catalog.confirm:        T
catalog.view.PostScript:        ghostview
catalog.edit.ascii:             xterm -e vi

#logger.file:    ./aips++.log
#logger.height:  12
logger.default: screen

#progress meter GUI pop-ups - disable F

#toolmanager - disable   F

#Use current working directory for cache/scratch files
user.aipsdir: .
user.cache: .  .
user.initfiles: almainit.g

display.axislabels: on
display.colormaps.defaultcolormap: Hot Metal 1


#ms.async: ddd ./ms %s

A.5  Updating the data repository

Each CASA release for linux comes with an up to date data repository (containing information such as observatory coordinates, calibrator models, leap second tables, etc.). However, the files that make up the data repository are updated regularly. Therefore, if you install (or have installed) a release that is a few weeks to a month old, it makes sense to update the data repository because it is very easy.

To do so, issue the following command from the CASA prompt:

CASA <2>: !update-data

Previous Up Next