Introduction to CASA for radio interferometry data

You need about 1 G of disk space. The data you need are

These can be downloaded and extracted using:

wget -c
tar -xvf alma_solar.tar
The tarball also includes these html files so if necessary you can consult them off-line.

Download and install CASA; also see data and instructions for a quick test.

These VLA solar data are a small data set so they can be reduced quickly as a first introduction to calibration and imaging radio interferometry data in CASA. They comprise one scan on a primary flux scale calibrator B021+735, followed by scans alternating between the phase-reference B0945+664 and the Sun. The VLA was in D-array, with a maximum baseline of just over 1 km.

The most obvious observational differences with ALMA are the wavelength (20 cm) and the antenna diameter D=25 m, which means that the Sun can be observed in a single pointing. They are observed in circular polarization, whilst ALMA used linear polarization receivers (we only process total intensity here). These old VLA data also just have a single IF with a single channel, whilst ALMA data are multi-channel. As with ALMA, special observing modes are used and these data have been pre-cooked by applying applying flags reported by the on-line system and Tsys corrections (which will also be used, albeit measured differently, by ALMA).

Calibration and imaging

Read the script Go to a terminal and subdirectory containing the script and the data DULK16081984.UVFITS and also sun_vla.flagcmds, and start CASA.

Run one step at a time by inserting the step number(s) in the script where it says mysteps = []. You need to insert some missing values for parameters called SETTHIS1 - SETTHIS6, see below or in script. It is best to run one step at a time to start with.

To run the script, in CASA, type

CASA <>: execfile('')

The steps in (with main differences from ALMA) are:

When imaging has finished, load all 3 images into the viewer and use the animator to blink between them. Use the 'spanner' button to set the same intensity range for all three (and change the colour scale if you want). You can add a colour bar and change the axes etc. You can draw regions of different shapes round parts of the Sun and double-click to get statistics for each image in the CASA terminal (or for serious analysis, script this using imstat).

If time permits, you can experiment with other imaging. Look at the clean settings in the script (or in clean.last), and investigate different values of robust, selecting different time intervals etc.

Simple simulation with mosaicing


This is set up for the properties of an image made from the calibrated VLA data, qsun20cm_all.clean_ap.fits; you can use the downloaded version or make your own. Note the slightly smaller pixel size (to reduce artefacts due to resampling) and smaller image size (to reduce mosaicing time). You can change the clean parameters for the input image to select a time-range etc. if you want.

We will simulate observations at the lowest frequency which will eventually be available for ALMA, 36 GHz (lambda about 9 mm), in Band 1, to minimise the number of pointings needed. The usual continuum (TDM) mode of ALMA has four spectral windows (spw) of 2 GHz, each in 128 channels (for dual polarization). You can average these up to a limit determined by bandwidth smearing; for a mosaic one should be cautious in real life but here I use the full-sensitivity width of one spw, 1.875 GHz, which will be simulated as a single channel.

ALMA's field of view is given by
FoV = 1.12*lambda/D
so you can estimate roughly how many pointings are needed to cover the Sun with 12-m or 7-m dishes (the task will do this for you exactly, at Nyquist spacing).

The VLA D-configuration is sensitive to scales up to at least 900 arcsec at 20 cm but the largest angular scale apparent in the VLA image is about 200 arcsec. The largest angular scale which the ALMA ACA is sensitive to is determined by the shortest antenna spacing, and is just over 200 arcsec but it is simplest in simulation just to use the main 12-m array (most compact configuration) and the ACA 7-m array.

The input image peak (if you use the suggested image) is 4.6 Jy/beam, where the primary beam correction has been applied. simalma interprets the input as Jy per pixel, so you can ask it to rescale the input if necessary. I used 10 Jy/pixel to get decent S/N in one second per pointing. I set the total time set to 21 min for each of the ACA and the main array. Although the main array is more sensitive, it needs 1003 pointings whilst the ACA only needs 351 pointings, so this gives approximately 1 visit per main array pointing and 3 visits per ACA pointing.

The simulated MS and diagnostic png's go in a directory here called qsun_sim. If you re-run the simulation, either set overwrite=T or use a different project name or delete the old one.

When it has finished, type 'ls qsun_sim'. You can inspect the .png's and the mosaic pointing files , *.ptg.txt. You will see two MS, and we will concatenate them using concat. The relative weights can be adjusted either more precisely (looking at the exact uv coverage) to optimise sensitivity, or to give finer/coarser resolution by giving more/less weight to the 12-m array. Here, we will roughly optimise sensitivity by weighting the 12-m v. 7-m arrays in proportion to the antenna areas. Enter suitable values at SETTHIS below. Enter the following in CASA:

default concat
inp(concat)     # to see the inputs, then enter:

concatvis=''  # delete any old file of the same name first
inp(concat)    # check again and when happy:

concat()          # execute the task.
You can check concat.last if you want to try different inputs. You can run listobs or plotms on the combined output.

Set up clean yourself. Have a look at or at clean.last for initial guidance. Start by with

and choose a suitable imagename (and delete previous images of the same name if you run clean more than once).

The main other things which you need to set are:

Remove any old mask setting or scan selection (since the simulations are not time variable), and set
so you can set a mask interactively - or stop if things go wrong. See Solutions.html if you are stuck.

If you have time, use help(clean) or the Cookbook and experiment with settings such as: