Difference between revisions of "Measurement Set Contents"

From CASA Guides
Jump to: navigation, search
(Overview)
(Inspecting MS contents in CASA)
Line 44: Line 44:
 
While it's possible to get some sense of the layout of an MS just from the command line, it's much more interesting to look at the contents using CASA tasks.  One such task is {{browsetable}}, which can be run from the command line using <tt>casabrowser</tt> or within CASA as <tt>browsetable</tt>.  This task allows one to investigate the information contained within a table, and if desired, the ability to edit this information.
 
While it's possible to get some sense of the layout of an MS just from the command line, it's much more interesting to look at the contents using CASA tasks.  One such task is {{browsetable}}, which can be run from the command line using <tt>casabrowser</tt> or within CASA as <tt>browsetable</tt>.  This task allows one to investigate the information contained within a table, and if desired, the ability to edit this information.
  
Let's have a look at the contents of the MAIN table, using the command-line version.  Since we're already in the MS directory, use a <tt>.</tt> to indicate we wish to open the current working directory.  If you were in a different directory, give the full path to the MS directory:
+
Let's have a look at the contents of the MAIN table, using the command-line version.  Since we're already in the MS directory, use a <tt>.</tt> to indicate we wish to open the current working directory.  If you are in a different directory, give the full path to the MS directory:
  
 
<source lang='bash'>
 
<source lang='bash'>
Line 50: Line 50:
 
</source>
 
</source>
  
[[Image:browsetable.main.png|200px|thumb|right|main table / browsetable figure]]
+
[[Image:browsetable.main.png|200px|thumb|right|main table / browsetable]]
 
 
  
 +
Now we can inspect the contents of the MAIN table.
  
 
listobs?
 
listobs?
  
 
== Advanced information about MS structure ==
 
== Advanced information about MS structure ==

Revision as of 14:08, 5 April 2012


Overview

In order to fully understand your data and the way CASA operates on it, it's helpful to have a full picture of the way the data are stored, and what a "measurement set" really is. This CASA Guide describes the measurement set (MS) structure, and demonstrates some ways in which you can explore the information stored within an MS. This is particularly useful when exploring the lower-level CASA Toolkit functions, but is also good information to keep in mind when performing basic analysis.

Throughout this Guide, we will be using the same data as the Carbon Star IRC+10216: high frequency (36GHz), spectral line data reduction. You can use this as well if you would like identical results to what is presented here.

The post-split averaged data can be downloaded from http://casa.nrao.edu/Data/EVLA/IRC10216/day2_TDEM0003_10s_norx.tar.gz (data size: 1.1GB)

Once the download is complete, unzip and unpack the file:

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

The measurement set directory structure and contents

A measurement set is actually a directory; the data and metadata are stored in tables and subdirectories within this directory. To see these components, open a terminal window, go into the MS directory, and type ls:

cd <directory_path>/day2_TDEM0003_10s_norx
ls
ANTENNA          POLARIZATION     table.f10        table.f17_TSM1   table.f21        table.f26        table.f9
DATA_DESCRIPTION PROCESSOR        table.f11        table.f18        table.f22        table.f26_TSM1   table.info
FEED             SOURCE           table.f12        table.f18_TSM1   table.f23        table.f3         table.lock
FIELD            SPECTRAL_WINDOW  table.f13        table.f19        table.f23_TSM0   table.f4
FLAG_CMD         STATE            table.f14        table.f19_TSM1   table.f24        table.f5
HISTORY          WEATHER          table.f15        table.f2         table.f24_TSM1   table.f6
OBSERVATION      table.dat        table.f16        table.f20        table.f25        table.f7
POINTING         table.f1         table.f17        table.f20_TSM1   table.f25_TSM1   table.f8

Note that the listings in all-caps are also directories, in which more table.* files live.

The table.* files in the root MS directory are part of the "MAIN" table, and hold the data, along with identifying characteristics. The subdirectories are additional tables which contain metadata, referenced to columns within the MAIN table.

Inspecting MS contents in CASA

While it's possible to get some sense of the layout of an MS just from the command line, it's much more interesting to look at the contents using CASA tasks. One such task is browsetable, which can be run from the command line using casabrowser or within CASA as browsetable. This task allows one to investigate the information contained within a table, and if desired, the ability to edit this information.

Let's have a look at the contents of the MAIN table, using the command-line version. Since we're already in the MS directory, use a . to indicate we wish to open the current working directory. If you are in a different directory, give the full path to the MS directory:

casabrowser .
main table / browsetable

Now we can inspect the contents of the MAIN table.

listobs?

Advanced information about MS structure