[an error occurred while processing this directive] Getting Started with CASA (Release 0, Version 3.0.0) [an error occurred while processing this directive]  NRAO Home > CASA > Getting Started [an error occurred while processing this directive]

CASA Primer

CASAGuides Wiki



Release Notes

Release FAQ


Reference Manual

CASA Training

CASA Scripts & Data

[an error occurred while processing this directive] Getting Started with CASA:

Valid for Release 0 (CASA Version 3.0.0). See the Release Notes for more instructions and known issues.

This quick reference is intended to get the user up an running quickly with CASA. The user should refer to the CASA Data Analysis Cookbook for more detailed explanations of this material, and also if problems are encountered.

NOTE: There is also a CASAGuides Wiki Page that contains much of the same information as this page.

Installing CASA

You should first obtain and install CASA.It is available via your my.nrao.edu portal at NRAO. You may need to register if you don't have an my.nrao.edu account yet.

In the following, we will assume that the installation was successful.

Before Starting CASA

If you have done a default installation under Linux using rpms, or on the Mac with the CASA application, then there should be a sh script called casapy in the /usr/bin area which is in your path. This shell will set up its environment and run the version of casapy that it points to. If this is how you set up the system, then you need to nothing further and can run casapy.

Depending on your setup, there may be other specially built versions available. For example at the NRAO AOC, the ``stable build'' can be started by running ``casapy-test'', e.g.

Before starting up casapy, you should set or reset any environment variables needed, as CASA will adopt these on startup. For example, the PAGER environment variable determines how help is displayed in the CASA terminal window. We recommend using the cat option for most users, as this works smoothly both interactively and in scripts. In bash:
or in csh or tcsh:
setenv PAGER cat
The actions of these are as if you were using the equivalent Unix shell command to view the help material.

Where is CASA

Note that the path to the CASA installation, which contains the casainit shell scripts and data repository, will also depend upon the installation. With a default installation under Linux this will probably be in
while in a Mac OSX default install it will likely be a self-contained application (in the Applications area) with the data repository in /opt/casa/

You can find the location after initialization by looking at the CASAPATH environment variable. You can find it within casapy by typing:

print pathname

For example, at the NRAO AOC, the current release is executed as
and uses the pathname to

Sometimes, you will have multiple non-default versions (for example, various development versions). For example at the NRAO AOC, the ``stable build'' is in /home/casa. Then, to use this version you invoke the appropriate casainit shell script, e.g.
. /home/casa/casainit.sh (bash or Bourne)
source /home/casa/casainith.csh (csh or tcsh).

Starting CASA

Generally, you will want to start CASA from a working directory for your project. Just make this directory and cd to it. As usual, things go better if this is on a disk local to your machine.

After having run the appropriate casainit script, CASA is started by typing casapy on the UNIX command line, e.g.

On the Mac, you can also double-click the CASA Application to start. It will then start up in your home area.

After startup information, you should get an IPython CASA <1>: command prompt in the xterm window where you started CASA. CASA will take approximately 10 seconds to initialize at startup in a new working directory; subsequent startups are faster. CASA is active when you get a CASA <1>: prompt in the command line interface. You will also see a logger GUI appear on your Desktop (usually near the upper left).

You also have the option of starting CASA without the logger, for example if you are running remotely in a terminal window without an X11 connection, or if you just do not want to see the logger GUI. In this case use the --nologger option:

casapy --nologger

The logger messages will still go into the casapy.log file. If you want to see these at your terminal, use the --log2term option also:

casapy --nologger --log2term

Quitting CASA

You can exit CASA by typing quit, %exit, or CTRL-D at the casapy prompt. If you don't want to see the question "Do you really want to exit [y]/n?", then just type Exit and CASA will stop right then and there.

What If Something Goes Wrong?

First, always check that your inputs are correct; use
inp <taskname>
Next, check the inline documentation using the "pdoc" facility:
pdoc <taskname>
pdoc par.<parameter_name>
to review the allowed parameters. For example,
pdoc par.selectdata
will give guidance on the use of this parameter (and in this case its sub-parameters).

If something has gone wrong and you want to stop what is executing, then typing CNTL-C will usually cleanly abort the application. Alert: Note that you will likely lose contact with the logger GUI if you have one, so you will then want to restart CASA.

If CASA crashes, then usually restarting casapy is sufficient to get you going again. Note that there may be spawned subprocesses still running, such as the casaviewer or the logger. These can be dismissed manually in the usual manner. After a crash, there may also be hidden processes. You can find these by listing processes, e.g. in linux:
ps -elf | grep casa
or on MacOSX (or other BSD Unix):
ps -aux | grep casa
You can then kill these, for example using the Unix kill or killall commands. This may be necessary if you are running remotely using ssh, as you cannot logout until all your background processes are terminated. For example,
killall ipcontroller
killall Python
will terminate the most common post-crash zombies.

For More Information

See the CASA Data Analysis Cookbook.

Copyright © 1995-2007 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense [an error occurred while processing this directive] Modified on Tuesday, 07-May-2019 13:15:15 EDT [an error occurred while processing this directive]