Guide to the NA Imaging Template
About this Guide
This guide describes the template script used to manually image data for quality assurance by the North America ALMA Science Center (NAASC). This script is designed to guide the user through the decisions needed when imaging ALMA data. It should not be applied blindly; not all sections of the template imaging scripts are relevant for all data sets. It can be adapted for use with partial pipeline processing of images. For example, you could do continuum subtraction in the pipeline, but use the scripts here as a template for manual imaging. See the ALMA Imaging Pipeline Reprocessing guide for information on pipeline processed images.
A current version of the script can be found on github. A description of how the script is used at the NAASC can be found in Kepley et al. Proceedings of the SPIE, 9910, 99100C
All example images were produced using ALMA Science Verification Data of TW Hya. More information along with the dataset can be obtained from the TW Hydra Band 7 Calibration and Imaging Guide.
Prepare for Imaging
Before you begin imaging, you should determine whether the data is manually or pipeline calibrated. The README file should state how the dataset was calibrated. If it does not, look in the script directory of the delivered data package. If you see a file named <ASDM UID>.ms.scriptForCalibration.py, the dataset was manually calibrated. If you see a filename PPR_*.xml, the dataset was pipeline calibrated.
If the data was calibrated prior to CASA 4.3, we recommend that you image the data in the same version of CASA that it was calibrated in because the weighting scheme for the data in CASA was in flux. See Data Weights and Combination for more information. If the data was calibrated in CASA version 4.3 or later, imaging the data in a later version of CASA should work. The README or CASA log file will indicate which CASA version was used to calibrate the data. Different versions of CASA can be obtained from Download CASA. Remember to check the operating system requirements before proceeding with the installation.
Instructions on restoring the calibrated measurement set should be found in the README of your delivered dataset. For most cases, this can be done by executing scriptForPI.py in CASA in the script directory:
# in CASA
execfile(“scriptForPI.py”)
Attached Scripts
Two template scripts are available for this guide. These contain commands with minimal instructions and are intended to be used by those more familiar with imaging.
Obtaining Analysis Utilities
Some optional steps in this guide use the Analysis Utilities package. If you wish to use any of these tasks, follow the link above for download and installation instructions.
CASA and Interferometry Basics
If you are new to interferometry or CASA, we recommend you follow the “First Look” Imaging Tutorials. The Synthesis Imaging Summer School Lectures provide a wealth of information on interferometry.
In addition, many frequently asked questions can be found in the ALMA Knowledgebase. If you have additional questions after reviewing this guide, please contact the ALMA Helpdesk.
Outline
This guide has been split into 4 sections:
- Prepare the data for Imaging This page creates the calibrated_final.ms that will be used in during imaging. Commands can be found in scriptForImagingPrep_template.py attached to this page.
- Image the Continuum Template This page creates a continuum measurement set (MS) and continuum images. The MS created in Imaging_Prep is needed for this guide. Commands can be found in scriptForImaging.py attached to this page.
- Self-Calibration Template This page provides a basic template for phase and amplitude self calibration of the continuum. The MS created in Image_Continuum is needed for this guide. Commands can be found in scriptForImaging.py attached to this page.
- Spectral Line Imaging Template This page performs continuum subtraction and creates spectral line cubes. The MS created in Imaging_Prep is needed for this guide. Commands can be found in scriptForImaging.py attached to this page.
The Imaging Workflow gives an outline of possible imaging you may do with the above guides.
How to Use A CASA Guide
For tips on using CASA and ways CASA can be run, see EVLA_Spectral_Line_Calibration_IRC+10216#How_to_Use_This_casaguide page.
To learn how to extract executable Python scripts from the tutorial, see Extracting_scripts_from_these_tutorials.
Within the guides:
# In CASA
# Regions of this color are CASA commands (or definitions) that need to be cut and
# pasted in sequence. Wait until one command is finished before pasting another.
# Tabs matter in python, make sure that commands that span more than one line and
# "for" loops keep their spacing. Sometimes (especially "for" loops) you may need to
# explicitly hit enter twice to get the command going.
Information in this color shows excerpts from the CASA Logger output
This color shows you background information about the data or other types of reference material