MG0414+0534 P-band Spectral Line Tutorial - CASA 5.0.0: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Line 57: Line 57:
Click "Get My Data" will forward you to the next page, where you should choose the delivery method (either downloading over the internet, or sending home a hard-drive with the data). If you opt to retrieve the data over the internet, wait until you get an email confirming that the data is ready for download. -->
Click "Get My Data" will forward you to the next page, where you should choose the delivery method (either downloading over the internet, or sending home a hard-drive with the data). If you opt to retrieve the data over the internet, wait until you get an email confirming that the data is ready for download. -->


== Examining and Editing the Data ==
== Examining the Data ==


=== Loading data into CASA & applying online flags===
=== Loading data into CASA ===
 
We will have to untar the 15 Gb data set that you've downloaded. In a terminal enter:
 
<pre style="background-color:lightgrey;">
# in a terminal, outside of CASA:
tar -xzf day2_TDEM0003_10s_norx.tar.gz
</pre>
 
Please use CASA 5.0.0 for this tutorial (typing ''casa -ls'' in a linux window shows the available versions and the current version; to explicitly change the current version type e.g. ''casa -r 5.0.0-218'')


Start CASA by typing
<source lang='bash'>
<source lang='bash'>
casa
casa -r 5.0.0-218
</source>
</source>
on the command line. This should start a CASA interactive python (iPython) session, and open a separate log window. To guarantee that the below mentioned procedure for data reduction and imaging works, make sure you are using CASA version 5.0.0. While older version may work as well for the purpose of this tutorial, it is good read instructions on how to [https://casa.nrao.edu/casa_obtaining.shtml download and install] the latest version of CASA.
on the command line. This should start a CASA interactive python (iPython) session, and open a separate log window. To guarantee that the below mentioned procedure for data reduction and imaging works, make sure you are using CASA version 5.0.0. While older version may work as well for the purpose of this tutorial, it is good read instructions on how to [https://casa.nrao.edu/casa_obtaining.shtml download and install] the latest version of CASA.
Line 73: Line 81:
</source>
</source>


In this case, we do not apply the flags that were created as part of the observations, but we will write them out to a <i>flagfile.txt</i> file. We will inspect and apply the flags as follows:
<!-- In this case, we do not apply the flags that were created as part of the observations, but we will write them out to a <i>flagfile.txt</i> file. We will inspect and apply the flags as follows:


<source lang='python'>
<source lang='python'>

Revision as of 16:18, 24 April 2018


This CASA Guide is for Version 5.0.0 of CASA.

DISCLAIMER
The following guide is for users who are experts in data reduction using CASA. If you are a beginning or novice user, please review other CASA guides found at VLA Tutorials.

Overview

This tutorial describes how to use CASA 5.0.0 to reduce spectral-line data in the low-frequency P-band of the VLA (230–470 MHz). The goal is to make an image cube containing HI 21cm absorption against the strong radio continuum of gravitationally lensed radio galaxy MG0414+0534. As a results of the high redshift of z=2.6365, the HI absorption signal in MG0414+0534 is redshifted to an observed frequency of 390.597 GHz. The HI absorption in MG0414+0534 was previously imaged with the VLA by Moore, Carilli & Menten 1999 (ApJ, 510, 87), before the upgrade to the WIDAR system.

Observing strategy

To perform P-band spectrsocopy, there are three important considerations for planning the observations:

  • Use a bandpass calibrator that is strong enough to accurately calibrate the frequency-dependent gain variations. This is particularly important for most HI 21cm absorption projects, which are typically performed against strong radio continuum sources. As a rule-of-thumb, use tcal > tobj × (Sobj / Scal)2, with t the exposure time and S the source flux density. This rule-of-thumb serves to avoid introducing excessive additional noise in the spectrum.
  • Additionally, if very high spectral dynamic range is needed (i.e., when expecting a ratio between the detection limit and the radio continuum of about 1:10,000 or more), consider observing a bandpass calibrator several times during your run to be able to correct for time-varying bandpass changes, which scale with the continuum emission in the target field. See the Calibration section of the Guide to Observing at the VLA for more information.
  • Use a bandwidth that is wide enough to perform accurate self calibration. Using a wide bandwidth for self-calibration is important for fields with relatively weak continuum sources. For strong continuum sources, a narrower bandwidth can be used to avoid excessive RFI.

The P-band test data on MG0414+0534 that we use in this tutorial were obtained using a large bandwidth. This to ensure that good bandpass solutions can be procured, and that self-calibration can accurately be performed. However, due to the strong radio continuum of MG0414+0534 (3.3 Jy at 390m MHz), and the large amounts of RFI across the entire band, we only use a small fraction of the total band for data reduction and analysis in this tutorial.

Obtaining the data

This 15 Gb data set can be downloaded by clicking here. The filename should be MG0414_d1_data.ms.tgz (add the ".tgz" if this is missing), and the file can be unpacked by typing tar xzf MG0414_d1_data.ms.tgz

We will use test data that was taken in a hybrid configuration when the VLA array was moved from B-config to A-config. The data set can be downloaded from the NRAO archive by searching for the following Project Code:

TSUB0001

This returns a long list with test-data that are publicly available. Our observations were performed on 14 Sept 2016:

TSUB0001.sb32720781.eb32763188.57645.263958564814

Note that this observation was duplicated on 15 September 2016. For the purpose of this tutorial, we only reduce and image the first data set. The 15 Gb data set from the download has already had online flagging and Hanning smoothing applied, and the smaller data set split out from the larger data set. If you wish, you can download the SDM from the NRAO archive in order to apply the online flags and run Hanning smoothing on the large data set before splitting out the smaller data set to work on.


Examining the Data

Loading data into CASA

We will have to untar the 15 Gb data set that you've downloaded. In a terminal enter:

# in a terminal, outside of CASA:
tar -xzf day2_TDEM0003_10s_norx.tar.gz

Please use CASA 5.0.0 for this tutorial (typing casa -ls in a linux window shows the available versions and the current version; to explicitly change the current version type e.g. casa -r 5.0.0-218)

casa -r 5.0.0-218

on the command line. This should start a CASA interactive python (iPython) session, and open a separate log window. To guarantee that the below mentioned procedure for data reduction and imaging works, make sure you are using CASA version 5.0.0. While older version may work as well for the purpose of this tutorial, it is good read instructions on how to download and install the latest version of CASA. We will begin by importing our data from the binary format (SDM-BDF) into the MeasurementSet format, which is the standard for CASA data. For this, we use importevla:

# In CASA
importevla(asdm='TSUB0001.sb32720781.eb32763188.57645.263958564814', vis='MG0414_d1.ms', flagpol=False, applyflags=False, savecmds=True, outfile='flagfile.txt')


Last checked on CASA Version 5.0.0