Transient reduction pipeline

From CASA Guides
Revision as of 12:35, 20 June 2010 by Jlazio (talk | contribs) (Calibration)


Transient Reduction Pipeline

2010 June 20 - T. Joseph W. Lazio

There are a class of observations for which only relatively simple data reduction steps are needed. One such example is that of transient observations, which are typically conducted in continuum mode and for which one is merely trying to determine a flux density of an essentially unresolved or only partially resolved source. This guide describes the steps in such a pipeline.

In order to process these data in a semi-automatic fashion, certain assumptions are made

  • Data stored as an Archive Science Data Model (ASDM) file on disk.
  • Sources, listed in order of appearance, are structured as Option A or Option B
    • Option A: phase calibrator, target source, amplitude calibrator
    • Option B: amplitude calibrator, phase calibrator, target source

This guide should be set up so that a pipeline script can be extracted from it.

Warning: This guide was written at the time when the EVLA was still in its commissioning phase. As the instrument matures, specific steps taken here may need to be adjusted. Caveat emptor. Possible issues include

  • calwt=F because at the time of writing the EVLA is not reporting accurate weights (though I believe that this has a stronger effect on extended sources rather than compact sources);
  • the pipeline assumes the same number of channels per spectral window;
  • the pipeline assumes that the first scan is a dummy scan, as such is required at the time of writing.

Further, to the best of the author's knowledge, the infrastructure does not yet exist within CASA to determine if there are antenna position corrections that should be applied (via gencal).


I've restructured the document to describe the processing steps (conceptually) first, then list the actual script itself.

User Input

I am attempting to migrate the script to become a "pipeline," in the sense of not requiring any user input. However, there are some pieces of information that it is useful or required to know in order to process the data.

  • What is the name of the initial Archive Science Data Model (ASDM) file? It would be possible to assume that the script is being run in a directory that contains only a single file, which is in ASDM format, but that also seems a bit limiting.
  • What antenna should be used as a reference antenna? At the time of writing, it is not clear that a robust algorithm exists within CASA for choosing a reference antenna if the user has not specified one.
  • How much flagging should be done? The script does some simple clipping, designed to remove any egregious RFI or horribly performing antenna or baseline. This clipping is done in terms of the rms visibility amplitude in the science target data, flagging data above some large threshold (e.g., 50[math]\sigma[/math]). This threshold is under user control, but the current flagging in this script is certainly not equal to a human lovingly massaging the visibility data.

These must be done before invoking the script/pipeline. For example

CASA <1> ASDM_name='AL007_sb123456789_1.56000.1234567890'
CASA <2> refant='ea21'
CASA <3> clip_sigma=50.0
CASA <4> execfile('transient_pipeline.py')

A sensible, large value is adopted for clip_sigma if it is omitted.

Processing Steps

Initial Stuff

  • Read the data from the ASDM file converting it to a Measurement Set with importevla. Apply basic flagging operations (zeros, shadowing) here.
  • Flag the first (dummy) scan. (This step is required at the time of development, but it may be relaxed in the future.)
  • Flag (quack) first 10 seconds of each scan.
  • Having constructed the initial measurement set, pause to extract various useful items from it, such as the frequency of observation, number of spectral channels, etc. Use these to then calculate various quantities such as the primary beam, synthesized beam, tolerable amount of bandwidth smearing, and tolerable amount of time-average smearing.
  • Reduce the data in size for faster processing downstream by averaging in time and frequency. Also, reject the edge channels.

Calibration

  • Set the flux density of the amplitude calibrator. There is a potential issue, at the time of writing, if the frequency setting is such that one should use a model image at a different band than one is observing, e.g., observing near the top of the C band where an X band model might be more appropriate. Presumably once all of the new receivers have been installed, new calibrator models will follow at some point.
  • Make a quick-n-dirty bandpass.
  • Amplitude and phase calibration. This is done in two steps, first the amplitude calibrator, then the phase calibrator, but the two steps could be combined.
  • Apply the calibration, from the phase calibrator to the science target.
  • Form target source measurement set.
  • Clip data above some a threshold. The user can select this threshold by specifying clip_sigma prior to invoking the pipeline. If no value is given, a value of 50[math]\sigma[/math] is assumed.

Imaging

  • The source is imaged and a light CLEANing is applied.