M100 Band3 SingleDish 4.2.2

From CASA Guides
Jump to navigationJump to search

M100 Single Dish Data Reduction (under modification by AH)


Overview

This portion of the M100 Single Dish Data Reduction CASA Guide will cover the reduction of the Total Power (TP) array data into units of Kelvins on the antenna temperature (Ta*) scale and imaging. Converting this image to the Jansky scale (Jy/beam) to be combined with interferometric data is covered in the M100 Band3 Combine 4.1 section.

This guide is designed for CASA 4.1.0.

If you haven't downloaded the data, you can XXXXXXX and XXXXXX:

Once the download has finished, upack the file:

# In a terminal outside CASA
tar -xvzf XXXsingledish_datasetXXX_TBD.tgz

cd XXrelevant_directoryXXX

# Start CASA
casapy

Summary of the observing

There were six observations made. The table below indicates the uid reference of each and the start and end times.

uid___A002_X60b415_X39a     Observed from   14-Apr-2013/05:34:15.7   to   14-Apr-2013/05:58:23.8 (UTC)
uid___A002_X60b415_X6f7     Observed from   14-Apr-2013/06:23:03.0   to   14-Apr-2013/06:47:11.0 (UTC)
uid___A002_X6218fb_X264     Observed from   28-Apr-2013/04:12:06.1   to   28-Apr-2013/04:36:07.5 (UTC)
uid___A002_X6218fb_X425     Observed from   28-Apr-2013/04:38:56.8   to   28-Apr-2013/05:03:00.3 (UTC)
uid___A002_X6321c5_X3a7     Observed from   12-May-2013/02:22:16.9   to   12-May-2013/02:43:59.8 (UTC)
uid___A002_X6321c5_X5ca     Observed from   12-May-2013/02:47:16.8   to   12-May-2013/03:09:00.9 (UTC)

Which version of CASA to use

This guide has been written for CASA release 4.1.0. Please confirm your version before proceeding.

# In CASA
version = casadef.casa_version
print "You are using " + version
if (version < '4.1.0'):
    print "YOUR VERSION OF CASA IS TOO OLD FOR THIS GUIDE."
    print "PLEASE UPDATE IT BEFORE PROCEEDING."
else:
    print "Your version of CASA is appropriate for this guide."


Initial Inspection, Sky subtraction, Tsys application

We will eventually concatenate the six datasets used here into one large dataset. However, we will keep them separate for now, as some of the steps to follow require individual datasets to be calibrated separately (namely, the sky/Tsys calibration and baseline subtraction). We therefore start by defining an array "basename" that includes the names of the six files in chronological order. This will simplify the following steps by allowing us to loop through the files using a simple for-loop in python. Remember that if you log out of CASA, you will have to re-issue this command. We will remind you of this in the relevant sections by repeating the command at the start.

# In CASA
basename=['uid___A002_X60b415_X39a','uid___A002_X60b415_X6f7','uid___A002_X6218fb_X264', 'uid___A002_X6218fb_X425','uid___A002_X6321c5_X3a7','uid___A002_X6321c5_X5ca']

Creating the MS and ASAP dataset

The raw data have been provided to you in the ASDM format. ASDM stands for ALMA Science Data Model. It is the native format of the data produced by the observatory. Before we can proceed to the calibration, we will need to convert those data to the CASA MS format. This is done simply with the task importasdm. For example:

In CASA
importasdm(vis = 'uid___A002_X60b415_X39a')

Note: importasdm has an option singledish, which you may be tempted to use. It works, but it has some limitations (which will be removed in the future), so for now, we recommend not using it.


We are now going to go through each of them with a bit more explanations. We will take the example of uid___A002_X6218fb_X264.ms.

Before starting, you need to know that most of the tasks that we will use are part of the ASAP package, which was incorporated into CASA. The ASAP package is using a different data format, so from a global point of view, what we are going to do is, first convert the MS to the ASAP format, then run the necessary calibration tasks, then convert the data back to the MS format. Another important difference with interferometric data reduction is that the calibration is performed directly on the dataset, we will not produce calibration tables and apply them at the end. An effort is on-going to update the SD routines so that this is done, that should be available soon, but until then, please remember that all SD calibration operations apply to the data directly, so you may want to always create a new dataset each time, so that you do not have to start all over again.

Calibration

About the calibration itself: the two main steps are 1. the calibration of the spectra into K, by applying the Tsys calibration and removing the signal from the OFF position, 2. removing the baselines (i.e. subtracting the background emission, to keep only the line emission.)

Combine all executions to one MS

Concatenate all of the calibrated measurement sets into one for imaging. The CASA task "concat" will do this.

In CASA
os.system('rm -rf concat_m100.ms')
concat(vis='uid___A002_X60b415_X39a.ms.cal.split', 'uid___A002_X60b415_X6f7.ms.cal.split', 'uid___A002_X6218fb_X264.ms.cal.split', 'uid___A002_X6218fb_X425.ms.cal.split', 'uid___A002_X6321c5_X3a7.ms.cal.split', 'uid___A002_X6321c5_X5ca.ms.cal.split'],
       concatvis='concat_m100.ms',
       freqtol='10MHz')

The individual calibrated MSs have slightly different observing frequencies, although the rest frequencies are the same. The freqtol parameter sets the tolerance for considering whether the different spectral windows from the input datasets should be output as the same spectral window ID.

Image the Total Power Data

Run listobs on the total power data to see what spw contains the CO

In CASA
os.system('rm -rf concat_m100.ms.listobs')
listobs(vis='concat_m100.ms',listfile='concat_m100.ms.listobs')

Spectral window SPWID=3 contains the 115.27 GHz line, so we image this window. The task "sdimaging" will do this.

In CASA
os.system('rm -rf TP_CO_cube')
sdimaging(infile='concat_m100.ms',
          field=0,spw=3,
          specunit='km/s',restfreq='115.271204GHz',
          dochannelmap=True,
          nchan=70,start=1400,step=5,
          gridfunction='gjinc',imsize=[50,50],
          cell=['10arcsec','10arcsec'],
          outfile='TP_CO_cube')

The restfreq parameter must be specified when using "km/s" as the units, as in this case. Start and step parameters are specified in units that the user chooses for specunit. The numbers here are chosen so that the resulting image has the same number of channels, velocity range and channel width as the 7m and 12m array images. The gridfunction is the weighting function that is used to grid the observed flux to individual pixels in the image. "SF" is a spheroidal function, which minimizes aliasing effects. "BOX" is a pillbox function, which defaults to a kernel box size of 1 pixel. The "PB" (primary beam) assumes an Airy disk, corresponding to an antenna with 10.7m diameter, the effective diameter of an ALMA 12m antenna. The "GAUSS" is a gaussian, and its size can be defined by additional subparameters (truncate and gwidth). "GJINC" is a gaussian convolved with the Bessel function, and can minimize the broadening of the effective beam. Any of the functions which require the obseving frequency for determining the beam size will read the frequency from the dataset, and the user can use the default.

The cell size should be chosen so that it is about 1/3 to 1/4 of the FWHM of the effective beam.