Guide to the NA Imaging Template

From CASA Guides
Jump to navigationJump to search

Most recently updated for CASA Version 6.6.6 using Python 3.10

About this Guide

This guide describes template scripts that were used to manually image data for quality assurance by the North America ALMA Science Center (NAASC). These scripts is designed to guide the user through the decisions needed when imaging ALMA data. It should not be applied blindly; some editing of the scripts will be required in almost all cases. Not all sections of the template 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.

Current versions of the scripts can be found on github.

These scripts are now rarely used. Pipeline imaging is done in most cases. When manual imaging is required for QA2, the newer script generators (as opposed to templates) are used more frequently; however, they are less informative for new users. The scripts in this guide describe manual masking, self-calibration, and continuum subtraction in detail.

Restore Calibrated Data

Before you begin imaging, determine whether the dataset was 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.

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 running CASA in the script directory and executing scriptForPI.py in CASA:

More details can be found in the following Knowledgebase Article:

https://help.almascience.org/kb/articles/how-do-i-obtain-a-file-of-calibrated-visibilities-measurement-set-for-alma-data

For this guide it is recommended to use the DOSPLIT option, described here:

https://help.almascience.org/kb/articles/what-global-variables-are-available-in-scriptforpi-py

This should be the default for manually calibrated data. For pipeline calibrated, you need to set the parameter explicitly:

# In bash
casa --pipeline -c "global DOSPLIT; DOSPLIT=True; execfile('scriptForPI.py')"

Guide Contents

This guide discusses two template scripts and is split into 4 sections:

scriptForImagingPrep_template.py
1. Imaging Prep: This page creates the calibrated_final.ms that will be used for imaging.
scriptForImaging_template.py
2. Image Continuum: This page starts with calibrated_final.ms to then create a continuum measurement set (MS) named calibrated_final_cont.ms and continuum images.
3. Self-Calibration: This page provides a basic template for phase and amplitude self calibration of the continuum.
4. Image Line: This page performs continuum subtraction on calibrated_final.ms and creates spectral line cubes.

The NA imaging workflow used with these scripts is shown below.

Version History

Guide history for past CASA versions:

Imaging Prep 6.6.1 6.5.4 6.1.1
Image Continuum 6.6.1 6.5.4 6.1.1
Self-Calibration 6.6.1 6.5.4 6.1.1
Image Line 6.6.1 6.5.4 6.1.1

References

The following references are mentioned in this guide (see each subpage for more):


Some additional resources that may be helpful:

  • QA2 Data Products: A description of ALMA QA2 data products, procedure and standards.
  • ALMA Technical Handbook: QA stages are described in Chapter 11.
  • Script Generators: These automatically populate template scripts with information specific to your data set. They have largely replaced the use of generic template scripts for QA2, but they are less informative for new users.


For more general resources, see: ALMA_Tutorials#Resources