ALMA SIS14 apcal: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Line 22: Line 22:


This lesson covers basic calibration. We will use observations of a quasar, which can be assumed to be a point source at the middle of the field. Mainly using the task '''gaincal''', we will derive the time-dependent corrections to the phase and amplitude response of each antenna that case the observations to best match this model. These corrections are stored in calibration table by CASA and can then be applied to the data, correcting observations of both the source and the quasar. There is an underlying assumption here about the quasar's geometry (point source) and that antenna-dependent terms are calibration issues rather than something astronomical. The latter is a very good assumption that underlies most of the calibration we do. The geometry of the quasar can be checked and modeled in a more sophisticated way if necessary. A future lesson gives an example for planets.
This lesson covers basic calibration. We will use observations of a quasar, which can be assumed to be a point source at the middle of the field. Mainly using the task '''gaincal''', we will derive the time-dependent corrections to the phase and amplitude response of each antenna that case the observations to best match this model. These corrections are stored in calibration table by CASA and can then be applied to the data, correcting observations of both the source and the quasar. There is an underlying assumption here about the quasar's geometry (point source) and that antenna-dependent terms are calibration issues rather than something astronomical. The latter is a very good assumption that underlies most of the calibration we do. The geometry of the quasar can be checked and modeled in a more sophisticated way if necessary. A future lesson gives an example for planets.
The flow of the lesson is:
* We orient ourselves using '''listobs'''
* We derive phase corrections for each antenna using '''gaincal'''
* We inspect these phase corrections using '''plotcal'''
* We derive amplitude corrections for each antenna using '''gaincal''' and taking into account the phase corrections
* We inspect the amplitude corrections using '''plotcal'''
After the main lesson we discuss some additional options and advanced strategies that can be used with '''gaincal.'''


== Phase Calibration (per Scan) ==
== Phase Calibration (per Scan) ==

Revision as of 15:50, 28 February 2014

This lesson steps through the basic calibration of the phase and amplitude response of each telescope as a function of time.

Setup

To run this tutorial, you need the measurements set "sis14_ampandphase.ms." This measurement set contains only a quasar (the phase calibrator from the parent data set). If you are using the pre-provided directory structure then you want to work in the directory:

lessons/basic_cal/

(relative to the root for the package) and you can copy the data to your working directory using the commands

# In CASA
os.system("rm -rf sis14_ampandphase.ms")
os.system("cp -r ../../working_data/sis14_ampandphase.ms sis14_ampandphase.ms")

With this measurement set in place, you can follow the tutorial below inside the "basic_cal/" directory.

Overview

This lesson covers basic calibration. We will use observations of a quasar, which can be assumed to be a point source at the middle of the field. Mainly using the task gaincal, we will derive the time-dependent corrections to the phase and amplitude response of each antenna that case the observations to best match this model. These corrections are stored in calibration table by CASA and can then be applied to the data, correcting observations of both the source and the quasar. There is an underlying assumption here about the quasar's geometry (point source) and that antenna-dependent terms are calibration issues rather than something astronomical. The latter is a very good assumption that underlies most of the calibration we do. The geometry of the quasar can be checked and modeled in a more sophisticated way if necessary. A future lesson gives an example for planets.

The flow of the lesson is:

  • We orient ourselves using listobs
  • We derive phase corrections for each antenna using gaincal
  • We inspect these phase corrections using plotcal
  • We derive amplitude corrections for each antenna using gaincal and taking into account the phase corrections
  • We inspect the amplitude corrections using plotcal

After the main lesson we discuss some additional options and advanced strategies that can be used with gaincal.

Phase Calibration (per Scan)

First, we calibrate phase as a function of time.

# In CASA
listobs("sis14_ampandphase.ms")

Now we calibrate the phase correction for each antenna as a function of time.

# In CASA
os.system("rm -rf phase.cal")
gaincal(vis="sis14_ampandphase.ms",
        caltable="phase.cal",
        field="0",
        solint="inf",
        calmode="p",
        refant="DV22",
        gaintype="G")

Now we plot the results of the calibration.

# In CASA
plotcal(caltable="phase.cal", 
        xaxis="time",
        yaxis="phase",
        subplot=331,
        iteration="antenna",
        plotrange=[0,0,-180,180])

Amplitude Calibration (per Scan)

Now calibrate the amplitude response of each antenna as a function of time.

# In CASA
os.system("rm -rf amp.cal")
gaincal(vis="sis14_ampandphase.ms",
        caltable="amp.cal",
        field="0",
        solint="inf",
        calmode="a",
        refant="DV22",
        gaintype="G",
        gaintable="phase.cal")

Plot the results of this fit.

# In CASA
plotcal(caltable="amp.cal", 
        xaxis="time",
        yaxis="amp",
        subplot=331,
        iteration="antenna",
        plotrange=[0,0,0,0])

Phase and Amplitude Calibration (per Integration)

We can also solve for the antenna corrections on shorter timescales.

# In CASA
os.system("rm -rf apcal_int.cal")
gaincal(vis="sis14_ampandphase.ms",
        caltable="apcal_int.cal",
        field="0",
        solint="int",
        calmode="ap",
        refant="DV22",
        gaintype="G")

Plot the per-integration variation of the phase.

# In CASA
plotcal(caltable="apcal_int.cal", 
        xaxis="time",
        yaxis="phase",
        subplot=331,
        iteration="antenna",
        plotrange=[0,0,-180,180])

Now plot the per-integration variation of the amplitude.

# In CASA
plotcal(caltable="apcal_int.cal", 
        xaxis="time",
        yaxis="amp",
        subplot=331,
        iteration="antenna",
        plotrange=[0,0,0,0])

Advanced Considerations

Averaging Options

"Layering" Calibrations

Removing Short-Timescale Phase Variations Before Amplitude Calibration?