NRAO Home > CASA > CASA Toolkit Reference Manual

2.1 calibrater - Module

Module for synthesis calibration
include calibrater.g

  2.1.1 calibrater - Tool
    calibrater.calibrater - Function - Function
    calibrater.selectvis - Function
    calibrater.setmodel - Function
    calibrater.setptmodel - Function
    calibrater.setapply - Function
    calibrater.setcallib - Function
    calibrater.validatecallib - Function
    calibrater.setsolve - Function
    calibrater.setsolvegainspline - Function
    calibrater.setsolvebandpoly - Function
    calibrater.state - Function
    calibrater.reset - Function
    calibrater.initcalset - Function
    calibrater.delmod - Function
    calibrater.solve - Function
    calibrater.correct - Function
    calibrater.corrupt - Function
    calibrater.initweights - Function
    calibrater.fluxscale - Function
    calibrater.accumulate - Function
    calibrater.activityrec - Function
    calibrater.specifycal - Function
    calibrater.smooth - Function
    calibrater.listcal - Function
    calibrater.posangcal - Function
    calibrater.linpolcor - Function
    calibrater.plotcal - Function
    calibrater.modelfit - Function
    calibrater.createcaltable - Function
    calibrater.updatecaltable - Function
    calibrater.close - Function
    calibrater.done - Function
  2.1.2 calanalysis - Tool

Description The calibrater module provides synthesis calibration capabilities within CASA. The primary purpose of this module is to solve for calibration components, and to optionally apply these corrections to the observed data. The calibration module is designed to be used in conjunction with the imager module which provides support for synthesis imaging.

The calibration model adopted by calibrater is that of the Hamaker-Bregman-Sault measurement equation for synthesis radio telescopes (see CASANote 189). This represents calibration corrections as matrices acting on 4-vectors representing the four possible correlations measured by an interferometer in full polarization. The calibration matrices cover a diversity of instrumental effects, including: parallactic angle and feed configuration (P,C), atmospheric phase (T), electronic gain (G), bandpass (B), instrumental polarization (D), baseline-based (correlator) corrections (M, MF), and baseline-based fringe-fitting (K).

The calibration data are stored in CASAtables and can be directly examined, manipulated or edited in the Glish command line interpreter (CLI) via the table tool. The calibration tables may be interpolated when applied to the observed uv-data.

The solver allows the calibration components to be determined over different time intervals, thus allowing, as an example, the solution for atmospheric phase effects (T) over a much shorter interval than electronic gain terms (G). This also allows polarization self-calibration for time variable instrumental polarization corrections.

The measurement equation is designed to model calibration effects for a generic radio telescope and the calibration and synthesis modules are, in general, not instrument specific.

Each calibrater tool created acts on a specified Measurement Set (MS), containing the observed uv-data. The Measurement Set format is described in (see CASANote 191). The interaction of the calibrater tool with specific MS data columns is important. The observed data, as recorded by the instrument, are stored in the DATA column of the MS, and are referred to as the observed data. If calibration corrections are applied by calibrater, the resulting calibrated data are stored in a separate CORRECTED_DATA column in the MS. These columns can be selected when imaging the data using the imager tool. A further MS column is used by calibrater, namely the MODEL_DATA column. The difference between the model data and corrected data columns is used to form χ2, when solving for individual calibration components. It is important to set the MODEL_DATA column before using calibrater to solve for calibration. This can be done using the imager functions setjy or ft.

The capabilities of the calibrater module are made available by including the associated Glish initialization script for the module, as:

- include ’calibrater.g’  

where a hyphen precedes user input. The Glish response is indicated without the prompt.

A calibrater tool is created and attached to a specified measurement set as indicated in the following example:

- c:=calibrater(’3C273XC1.MS’);  

A variety of functions can be invoked for any given calibrater tool. These functions fall broadly into two categories: i) functions which set parameters to be used by the calibrater; and ii) the execution of explicit calibration procedures such as solving for, or applying calibration corrections.

Option (i) may equivalently be viewed as setting the state of the calibrater tool. These functions are named with the prefix set, such as in setdata and setapply. When created, the calibrater tool sets default internal information for each of the calibration components (measurement equation correction matrices). This information is modified using the setapply and setsolve functions as shown in the following example:

# Set the solution interval for the electronic gain matrix (G) to  
# 300 seconds, specify input and output calibration table names,  
# and enable this component for phase and amplitude solution.  
# Use antenna number 3 as the reference for the solutions.  
- c.setapply ("G", 0.0, "gcal_in", "");  
- c.setsolve ("G", 300, F, 3, "gcal_out", F);  

Once the state of the calibrater tool has been set, explicit calibration functions, as outlined in option (ii) above, are executed as follows:

# Solve for the selected calibration components  
- c.solve()  
# Apply the calibration components to the measurement set data  
- c.correct()  

Example The following example illustrates the quickest way to perform simple self-calibration, starting from an input FITS file in the local area. The imager module should be consulted for detailed information on the imaging functions.

# Include the synthesis scripts  
include ’imager.g’;  
include ’calibrater.g’;  
include ’ms.g’;  
# Construct a measurement set from the input FITS file  
m:=fitstoms (msfile=’3C273XC1.MS’, fitsfile=’3C273XC1.FITS’);  
# Create an imager tool  
# Set image parameters  
sk.setimage (nx=256, ny=256, cellx=’0.7arcsec’, celly=’0.7arcsec’);  
# Make a dirty image and deconvolve using CLEAN  
sk.image (’observed’, image=’3C273XC1.dirty’);  
sk.clean (niter=1000, threshold=’3mJy’, model=’3C273XC1.clean.model’);  
# Fourier transform the model to the uv-plane  
sk.ft (model=’3C273XC1.clean.model’);  
# Close the imager tool  
# Create a calibrater tool  
# Select solution for electronic gain (G) and atmospheric phase (T)  
c.setsolve ("G", 300.0, F, 3, "gcal_out", F);  
c.setsolve ("T", 30.0, T, 3, "tcal_out", F);  
# Solve for the selected G and T components  
# Close the calibrater tool  

More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense

Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search