EVLA 3-bit Tutorial G192: Difference between revisions

From CASA Guides
Jump to navigationJump to search
(Redirected page to EVLA 3-bit Tutorial G192-CASA4.4)
 
(127 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This is an advanced Jansky VLA data reduction tutorial that calibrates and images a 3-bit dataset.
#REDIRECT [[EVLA 3-bit Tutorial G192-CASA4.4]]
 
<b>This casaguide is for Version 4.1.0 of CASA.</b>
 
== Overview ==
 
This article describes the calibration and imaging of the protostar G192.16-3.84.  The data were taken in Ka-band using the 3-bit samplers and widely-spaced basebands centered at 29 and 36.5 GHz, each with 4 GHz of bandwidth (comprised of 32 128-MHz spectral windows).  In this tutorial, we will use wideband imaging techniques, as well as corrections for the requantizer gains (which are necessary for 3-bit data calibration and harmless on 8-bit data).
 
This is a more advanced tutorial, so if you are a relative novice (and <em>particularly</em> for EVLA continuum calibration and imaging), it is <em>strongly</em> recommended that you start with the [[EVLA Continuum Tutorial 3C391]] (at least read it through) before tackling this dataset.  We will not include basic information on CASA processing in this tutorial.
 
From the [http://casaguides.nrao.edu MainPage] of the CASA Guides you can find helpful information:
* [[What is CASA?]]
* [[Getting Started in CASA]]
* [[CASA Reference Manuals]]
* [[Hints, Tips, & Tricks]]
* [[AIPS-to-CASA Cheat Sheet]]
 
In this tutorial we will be invoking the tasks as function calls.  You can cut and paste these to your casapy session. We also recommend that you copy all the commands you use, with any relevant commentary, to a text file.  This is ''very'' good practice when tackling large datasets.  If you wish, you can use the [http://casaguides.nrao.edu/index.php?title=Extracting_scripts_from_these_tutorials Script Extractor] to create a file with the tutorial commands, which can subsequently be edited as desired.
 
Occasionally we will be setting Python variables (e.g. as lists for flags) outside the function call so make sure you set those before running the task command.  Note that when you call a CASA task as a function the task parameters which are not set in the function call (assuming there is at least one) will be set to their defaults, and will ''not'' use values
you set in previous calls or outside the call. See [[Getting_Started_in_CASA#Task_Execution]] for more on calling tasks and setting parameters in the scripting interface.
 
NOTE: If you find that the figures on the right margin of the browser window overlap the text too much and make reading difficult, go ahead and widen the browser window.
 
== Obtaining the Data ==
 
The data for this tutorial were taken with the VLA as part of its commissioning phase as the scheduling block (SB) <tt>TVER0004.sb14459364.eb14492359.56295.26287841435</tt>, which was run on 2013-01-03 from 6:18 to 7:47 UT (raw size is 57.04 GB). 
 
The data can be directly downloaded from [http://casa.nrao.edu/Data/EVLA/G192/G192_6s.ms.tar.gz http://casa.nrao.edu/Data/EVLA/G192/G192_6s.ms.tar.gz] (dataset size:  GB)
 
Your first step will be to unzip and untar the file in a terminal, before you start CASA:
 
<source lang="bash">
tar -xzvf G192_6s.ms.tar.gz
</source>
 
If you are brave enough, you can also get the data straight from the EVLA archive. Go to the [https://archive.nrao.edu/archive/advquery.jsp NRAO Science Data Archive], and search for "TVER0004.sb14459364" in the Archive File ID field.  Then select the dataset and choose a time-averaging value of 6 seconds. (Although the data were taken in A-configuration, we will not be imaging outside of the center of the field, so we aren't too worried about time-average smearing and will take advantage of averaging to reduce dataset size.) Also select the "Create tar file" option. 
 
In addition, only the fields used for analysis and observation are included in the downloadable file.  This can be accomplished using the {{split}} task in CASA:
<source lang="python">
# In CASA
split('TVER0004.sb14459364.eb14492359.56295.26287841435.ms', outputvis='G192_6s.ms', \
      datacolumn='all', field='3,6,7,10', keepflags=False, spw='2~65')
</source>
 
This will create a file equivalent to what is used at the start of this tutorial.
 
== Starting CASA ==
 
{{CaltechCASAStartup}}
 
== Examining the MS ==
 
We use {{listobs}} to summarize our MS:
<source lang="python">
# In CASA
listobs('G192_6s.ms', listfile='G192_listobs.txt')
</source>
 
This will write the output to a file called <tt>G192_listobs.txt</tt>, which we can print to the terminal using the <tt>cat</tt> command:
 
<source lang="python">
# In CASA
cat G192_listobs.txt
</source>
 
<pre>
================================================================================
          MeasurementSet Name:  /lustre/mkrauss/casa_guides/3bit/G192_6s.ms      MS Version 2
================================================================================
  Observer: Dr. Debra Shepherd    Project: uid://evla/pdb/7303457 
Observation: EVLA
Data records: 10061248      Total integration time = 4557 seconds
  Observed from  03-Jan-2013/06:31:51.0  to  03-Jan-2013/07:47:48.0 (UTC)
 
  ObservationID = 0        ArrayID = 0
  Date        Timerange (UTC)          Scan  FldId FieldName            nRows    SpwIds  Average Interval(s)    ScanIntent
  03-Jan-2013/06:31:48.0 - 06:36:42.0    6      0 3c147-J0542+49        1019200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5.94, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [CALIBRATE_FLUX#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:46:15.0 - 06:46:54.0    10      1 gcal-J0603+174          145600  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57, 5.57] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:47:09.0 - 06:47:54.0    11      2 G192.16-3.84            163200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65, 5.65] [OBSERVE_TARGET#UNSPECIFIED]
              06:48:06.0 - 06:48:39.0    12      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:48:51.0 - 06:49:39.0    13      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              06:49:51.0 - 06:50:24.0    14      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:50:36.0 - 06:51:24.0    15      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              06:51:36.0 - 06:52:09.0    16      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:52:19.5 - 06:53:09.0    17      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              06:53:21.0 - 06:53:54.0    18      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:54:06.0 - 06:54:54.0    19      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              06:55:06.0 - 06:55:39.0    20      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:55:51.0 - 06:56:39.0    21      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              06:56:51.0 - 06:57:24.0    22      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:57:36.0 - 06:58:24.0    23      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              06:58:36.0 - 06:59:12.0    24      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              06:59:21.0 - 07:00:12.0    25      2 G192.16-3.84            187200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67] [OBSERVE_TARGET#UNSPECIFIED]
              07:00:19.5 - 07:00:57.0    26      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:01:06.0 - 07:01:57.0    27      2 G192.16-3.84            187200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67] [OBSERVE_TARGET#UNSPECIFIED]
              07:02:03.0 - 07:02:42.0    28      1 gcal-J0603+174          125184  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99, 5.99] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:02:48.0 - 07:03:36.0    29      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:03:48.0 - 07:04:21.0    30      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:04:33.0 - 07:05:21.0    31      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:05:33.0 - 07:06:06.0    32      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:06:18.0 - 07:07:06.0    33      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:07:18.0 - 07:07:51.0    34      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:08:03.0 - 07:08:51.0    35      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:09:03.0 - 07:09:36.0    36      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:09:48.0 - 07:10:36.0    37      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:10:46.5 - 07:11:21.0    38      1 gcal-J0603+174          123200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49, 5.49] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:11:33.0 - 07:12:21.0    39      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:12:33.0 - 07:13:06.0    40      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:13:18.0 - 07:14:06.0    41      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:14:16.5 - 07:14:51.0    42      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:15:01.5 - 07:15:51.0    43      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:16:03.0 - 07:16:36.0    44      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:16:48.0 - 07:17:39.0    45      2 G192.16-3.84            187200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67] [OBSERVE_TARGET#UNSPECIFIED]
              07:17:48.0 - 07:18:24.0    46      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:18:33.0 - 07:19:24.0    47      2 G192.16-3.84            187200  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67, 5.67] [OBSERVE_TARGET#UNSPECIFIED]
              07:19:30.0 - 07:20:09.0    48      1 gcal-J0603+174          124864  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:20:18.0 - 07:21:06.0    49      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:21:15.0 - 07:21:48.0    50      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:22:00.0 - 07:22:48.0    51      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:23:00.0 - 07:23:33.0    52      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:23:45.0 - 07:24:33.0    53      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:24:45.0 - 07:25:18.0    54      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:25:30.0 - 07:26:18.0    55      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:26:30.0 - 07:27:03.0    56      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:27:15.0 - 07:28:03.0    57      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:28:15.0 - 07:28:48.0    58      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:29:00.0 - 07:29:48.0    59      2 G192.16-3.84            166400  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [OBSERVE_TARGET#UNSPECIFIED]
              07:30:00.0 - 07:30:33.0    60      1 gcal-J0603+174          124800  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5] [CALIBRATE_AMPLI#UNSPECIFIED, CALIBRATE_PHASE#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
              07:40:27.0 - 07:47:51.0    64      3 3c84-J0319+413        1537600  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]  [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] [CALIBRATE_BANDPASS#UNSPECIFIED, OBSERVE_TARGET#UNSPECIFIED]
          (nRows = Total number of rows per scan)
Fields: 4
  ID  Code Name                RA              Decl          Epoch  SrcId      nRows
  0    E    3c147-J0542+49      05:42:36.137916 +49.51.07.23356 J2000  0        1019200
  1    D    gcal-J0603+174      06:03:09.130269 +17.42.16.81070 J2000  1        3264448
  2    NONE G192.16-3.84        05:58:13.540000 +16.31.58.30001 J2000  2        4240000
  3    F    3c84-J0319+413      03:19:48.160102 +41.30.42.10305 J2000  3        1537600
Spectral Windows:  (64 unique spectral windows and 1 unique polarization setups)
  SpwID  Name            #Chans  Frame  Ch1(MHz)  ChanWid(kHz)  TotBW(kHz) BBC Num  Corrs         
  0      EVLA_KA#A1C1#2    128  TOPO  34476.000      1000.000    128000.0      10  RR  LL
  1      EVLA_KA#A1C1#3    128  TOPO  34604.000      1000.000    128000.0      10  RR  LL
  2      EVLA_KA#A1C1#4    128  TOPO  34732.000      1000.000    128000.0      10  RR  LL
  3      EVLA_KA#A1C1#5    128  TOPO  34860.000      1000.000    128000.0      10  RR  LL
  4      EVLA_KA#A1C1#6    128  TOPO  34988.000      1000.000    128000.0      10  RR  LL
  5      EVLA_KA#A1C1#7    128  TOPO  35116.000      1000.000    128000.0      10  RR  LL
  6      EVLA_KA#A1C1#8    128  TOPO  35244.000      1000.000    128000.0      10  RR  LL
  7      EVLA_KA#A1C1#9    128  TOPO  35372.000      1000.000    128000.0      10  RR  LL
  8      EVLA_KA#A1C1#10    128  TOPO  35500.000      1000.000    128000.0      10  RR  LL
  9      EVLA_KA#A1C1#11    128  TOPO  35628.000      1000.000    128000.0      10  RR  LL
  10    EVLA_KA#A1C1#12    128  TOPO  35756.000      1000.000    128000.0      10  RR  LL
  11    EVLA_KA#A1C1#13    128  TOPO  35884.000      1000.000    128000.0      10  RR  LL
  12    EVLA_KA#A1C1#14    128  TOPO  36012.000      1000.000    128000.0      10  RR  LL
  13    EVLA_KA#A1C1#15    128  TOPO  36140.000      1000.000    128000.0      10  RR  LL
  14    EVLA_KA#A1C1#16    128  TOPO  36268.000      1000.000    128000.0      10  RR  LL
  15    EVLA_KA#A1C1#17    128  TOPO  36396.000      1000.000    128000.0      10  RR  LL
  16    EVLA_KA#A2C2#18    128  TOPO  36476.000      1000.000    128000.0      11  RR  LL
  17    EVLA_KA#A2C2#19    128  TOPO  36604.000      1000.000    128000.0      11  RR  LL
  18    EVLA_KA#A2C2#20    128  TOPO  36732.000      1000.000    128000.0      11  RR  LL
  19    EVLA_KA#A2C2#21    128  TOPO  36860.000      1000.000    128000.0      11  RR  LL
  20    EVLA_KA#A2C2#22    128  TOPO  36988.000      1000.000    128000.0      11  RR  LL
  21    EVLA_KA#A2C2#23    128  TOPO  37116.000      1000.000    128000.0      11  RR  LL
  22    EVLA_KA#A2C2#24    128  TOPO  37244.000      1000.000    128000.0      11  RR  LL
  23    EVLA_KA#A2C2#25    128  TOPO  37372.000      1000.000    128000.0      11  RR  LL
  24    EVLA_KA#A2C2#26    128  TOPO  37500.000      1000.000    128000.0      11  RR  LL
  25    EVLA_KA#A2C2#27    128  TOPO  37628.000      1000.000    128000.0      11  RR  LL
  26    EVLA_KA#A2C2#28    128  TOPO  37756.000      1000.000    128000.0      11  RR  LL
  27    EVLA_KA#A2C2#29    128  TOPO  37884.000      1000.000    128000.0      11  RR  LL
  28    EVLA_KA#A2C2#30    128  TOPO  38012.000      1000.000    128000.0      11  RR  LL
  29    EVLA_KA#A2C2#31    128  TOPO  38140.000      1000.000    128000.0      11  RR  LL
  30    EVLA_KA#A2C2#32    128  TOPO  38268.000      1000.000    128000.0      11  RR  LL
  31    EVLA_KA#A2C2#33    128  TOPO  38396.000      1000.000    128000.0      11  RR  LL
  32    EVLA_KA#B1D1#34    128  TOPO  26976.000      1000.000    128000.0      13  RR  LL
  33    EVLA_KA#B1D1#35    128  TOPO  27104.000      1000.000    128000.0      13  RR  LL
  34    EVLA_KA#B1D1#36    128  TOPO  27232.000      1000.000    128000.0      13  RR  LL
  35    EVLA_KA#B1D1#37    128  TOPO  27360.000      1000.000    128000.0      13  RR  LL
  36    EVLA_KA#B1D1#38    128  TOPO  27488.000      1000.000    128000.0      13  RR  LL
  37    EVLA_KA#B1D1#39    128  TOPO  27616.000      1000.000    128000.0      13  RR  LL
  38    EVLA_KA#B1D1#40    128  TOPO  27744.000      1000.000    128000.0      13  RR  LL
  39    EVLA_KA#B1D1#41    128  TOPO  27872.000      1000.000    128000.0      13  RR  LL
  40    EVLA_KA#B1D1#42    128  TOPO  28000.000      1000.000    128000.0      13  RR  LL
  41    EVLA_KA#B1D1#43    128  TOPO  28128.000      1000.000    128000.0      13  RR  LL
  42    EVLA_KA#B1D1#44    128  TOPO  28256.000      1000.000    128000.0      13  RR  LL
  43    EVLA_KA#B1D1#45    128  TOPO  28384.000      1000.000    128000.0      13  RR  LL
  44    EVLA_KA#B1D1#46    128  TOPO  28512.000      1000.000    128000.0      13  RR  LL
  45    EVLA_KA#B1D1#47    128  TOPO  28640.000      1000.000    128000.0      13  RR  LL
  46    EVLA_KA#B1D1#48    128  TOPO  28768.000      1000.000    128000.0      13  RR  LL
  47    EVLA_KA#B1D1#49    128  TOPO  28896.000      1000.000    128000.0      13  RR  LL
  48    EVLA_KA#B2D2#50    128  TOPO  28976.000      1000.000    128000.0      14  RR  LL
  49    EVLA_KA#B2D2#51    128  TOPO  29104.000      1000.000    128000.0      14  RR  LL
  50    EVLA_KA#B2D2#52    128  TOPO  29232.000      1000.000    128000.0      14  RR  LL
  51    EVLA_KA#B2D2#53    128  TOPO  29360.000      1000.000    128000.0      14  RR  LL
  52    EVLA_KA#B2D2#54    128  TOPO  29488.000      1000.000    128000.0      14  RR  LL
  53    EVLA_KA#B2D2#55    128  TOPO  29616.000      1000.000    128000.0      14  RR  LL
  54    EVLA_KA#B2D2#56    128  TOPO  29744.000      1000.000    128000.0      14  RR  LL
  55    EVLA_KA#B2D2#57    128  TOPO  29872.000      1000.000    128000.0      14  RR  LL
  56    EVLA_KA#B2D2#58    128  TOPO  30000.000      1000.000    128000.0      14  RR  LL
  57    EVLA_KA#B2D2#59    128  TOPO  30128.000      1000.000    128000.0      14  RR  LL
  58    EVLA_KA#B2D2#60    128  TOPO  30256.000      1000.000    128000.0      14  RR  LL
  59    EVLA_KA#B2D2#61    128  TOPO  30384.000      1000.000    128000.0      14  RR  LL
  60    EVLA_KA#B2D2#62    128  TOPO  30512.000      1000.000    128000.0      14  RR  LL
  61    EVLA_KA#B2D2#63    128  TOPO  30640.000      1000.000    128000.0      14  RR  LL
  62    EVLA_KA#B2D2#64    128  TOPO  30768.000      1000.000    128000.0      14  RR  LL
  63    EVLA_KA#B2D2#65    128  TOPO  30896.000      1000.000    128000.0      14  RR  LL
Sources: 256
  ID  Name                SpwId RestFreq(MHz)  SysVel(km/s)
  0    3c147-J0542+49      0    -              -           
  0    3c147-J0542+49      1    -              -           
  0    3c147-J0542+49      2    -              -           
  0    3c147-J0542+49      3    -              -           
  0    3c147-J0542+49      4    -              -           
  0    3c147-J0542+49      5    -              -           
  0    3c147-J0542+49      6    -              -           
  0    3c147-J0542+49      7    -              -           
  0    3c147-J0542+49      8    -              -           
  0    3c147-J0542+49      9    -              -           
  0    3c147-J0542+49      10    -              -           
  0    3c147-J0542+49      11    -              -           
  0    3c147-J0542+49      12    -              -           
  0    3c147-J0542+49      13    -              -           
  0    3c147-J0542+49      14    -              -           
  0    3c147-J0542+49      15    -              -           
  0    3c147-J0542+49      16    -              -           
  0    3c147-J0542+49      17    -              -           
  0    3c147-J0542+49      18    -              -           
  0    3c147-J0542+49      19    -              -           
  0    3c147-J0542+49      20    -              -           
  0    3c147-J0542+49      21    -              -           
  0    3c147-J0542+49      22    -              -           
  0    3c147-J0542+49      23    -              -           
  0    3c147-J0542+49      24    -              -           
  0    3c147-J0542+49      25    -              -           
  0    3c147-J0542+49      26    -              -           
  0    3c147-J0542+49      27    -              -           
  0    3c147-J0542+49      28    -              -           
  0    3c147-J0542+49      29    -              -           
  0    3c147-J0542+49      30    -              -           
  0    3c147-J0542+49      31    -              -           
  0    3c147-J0542+49      32    -              -           
  0    3c147-J0542+49      33    -              -           
  0    3c147-J0542+49      34    -              -           
  0    3c147-J0542+49      35    -              -           
  0    3c147-J0542+49      36    -              -           
  0    3c147-J0542+49      37    -              -           
  0    3c147-J0542+49      38    -              -           
  0    3c147-J0542+49      39    -              -           
  0    3c147-J0542+49      40    -              -           
  0    3c147-J0542+49      41    -              -           
  0    3c147-J0542+49      42    -              -           
  0    3c147-J0542+49      43    -              -           
  0    3c147-J0542+49      44    -              -           
  0    3c147-J0542+49      45    -              -           
  0    3c147-J0542+49      46    -              -           
  0    3c147-J0542+49      47    -              -           
  0    3c147-J0542+49      48    -              -           
  0    3c147-J0542+49      49    -              -           
  0    3c147-J0542+49      50    -              -           
  0    3c147-J0542+49      51    -              -           
  0    3c147-J0542+49      52    -              -           
  0    3c147-J0542+49      53    -              -           
  0    3c147-J0542+49      54    -              -           
  0    3c147-J0542+49      55    -              -           
  0    3c147-J0542+49      56    -              -           
  0    3c147-J0542+49      57    -              -           
  0    3c147-J0542+49      58    -              -           
  0    3c147-J0542+49      59    -              -           
  0    3c147-J0542+49      60    -              -           
  0    3c147-J0542+49      61    -              -           
  0    3c147-J0542+49      62    -              -           
  0    3c147-J0542+49      63    -              -           
  1    gcal-J0603+174      0    -              -           
<snip>       
  2    G192.16-3.84        0    -              -           
<snip>       
  3    3c84-J0319+413      63    -              -           
Antennas: 26:
  ID  Name  Station  Diam.    Long.        Lat.                Offset from array center (m)                ITRF Geocentric coordinates (m)       
                                                                    East        North    Elevation              x              y              z
  0    ea01  N48      25.0 m  -107.37.38.1  +33.59.06.2      -855.2759    9405.9595      -25.9351 -1600374.885000 -5036704.201000  3562667.881900
  1    ea02  N56      25.0 m  -107.37.47.9  +34.00.38.4      -1105.2071    12254.3069      -34.2426 -1600128.383400 -5035104.146500  3565024.672100
  2    ea03  N16      25.0 m  -107.37.10.9  +33.54.48.0      -155.8511    1426.6436      -9.3827 -1601061.956000 -5041175.880700  3556058.037600
  3    ea05  W08      25.0 m  -107.37.21.6  +33.53.53.0      -432.1184    -272.1472      -1.5070 -1601614.092200 -5042001.650900  3554652.508900
  4    ea06  N32      25.0 m  -107.37.22.0  +33.56.33.6      -441.7237    4689.9748      -16.9332 -1600781.042100 -5039347.435200  3558761.533000
  5    ea07  E40      25.0 m  -107.32.35.4  +33.52.16.9      6908.8279    -3240.7316      39.0057 -1595124.924100 -5045829.461500  3552210.685200
  6    ea09  E24      25.0 m  -107.35.13.4  +33.53.18.1      2858.1754    -1349.1257      13.7290 -1598663.097500 -5043581.389700  3553767.027800
  7    ea10  E32      25.0 m  -107.34.01.5  +33.52.50.3      4701.6588    -2209.7063      25.2191 -1597053.120700 -5044604.691600  3553059.009300
  8    ea11  W56      25.0 m  -107.44.26.7  +33.49.54.6    -11333.2153    -7637.6824      15.3542 -1613255.404300 -5042613.085000  3548545.901400
  9    ea12  E08      25.0 m  -107.36.48.9  +33.53.55.1        407.8285    -206.0065      -3.2272 -1600801.926000 -5042219.366500  3554706.448200
  10  ea13  W24      25.0 m  -107.38.49.0  +33.53.04.0      -2673.3434    -1784.5870      10.4960 -1604008.742800 -5042135.827600  3553403.728800
  11  ea14  W16      25.0 m  -107.37.57.4  +33.53.33.0      -1348.7083    -890.6269        1.3068 -1602592.853600 -5042055.005300  3554140.703900
  12  ea15  W72      25.0 m  -107.48.24.0  +33.47.41.2    -17419.4730  -11760.2869      14.9578 -1619757.314900 -5042937.673700  3545120.385300
  13  ea16  N08      25.0 m  -107.37.07.5  +33.54.15.8        -68.9252      433.1901      -5.0683 -1601147.956700 -5041733.824100  3555235.952500
  14  ea17  E48      25.0 m  -107.30.56.1  +33.51.38.4      9456.5938    -4431.6366      37.9317 -1592894.088800 -5047229.121000  3551221.221100
  15  ea18  E72      25.0 m  -107.24.42.3  +33.49.18.0      19041.8754    -8769.2059        4.7234 -1584460.867200 -5052385.599300  3547599.997600
  16  ea19  W64      25.0 m  -107.46.20.1  +33.48.50.9    -14240.7600    -9606.2738      17.1055 -1616361.584300 -5042770.519200  3546911.442800
  17  ea20  N72      25.0 m  -107.38.10.5  +34.04.12.2      -1685.6775    18861.8403      -43.4734 -1599557.932000 -5031396.371000  3570494.760600
  18  ea21  E64      25.0 m  -107.27.00.1  +33.50.06.7      15507.6045    -7263.7280      67.1961 -1587600.190400 -5050575.873800  3548885.396600
  19  ea22  N24      25.0 m  -107.37.16.1  +33.55.37.7      -290.3745    2961.8582      -12.2374 -1600930.087700 -5040316.398500  3557330.387000
  20  ea23  N64      25.0 m  -107.37.58.7  +34.02.20.5      -1382.3750    15410.1463      -40.6373 -1599855.675100 -5033332.371000  3567636.622500
  21  ea24  W40      25.0 m  -107.41.13.5  +33.51.43.1      -6377.9740    -4286.7919        8.2191 -1607962.456900 -5042338.214500  3551324.943600
  22  ea25  W48      25.0 m  -107.42.44.3  +33.50.52.1      -8707.9407    -5861.7854      15.5265 -1610451.925400 -5042471.123100  3550021.056800
  23  ea26  W32      25.0 m  -107.39.54.8  +33.52.27.2      -4359.4561    -2923.1223      11.7579 -1605808.647100 -5042230.071500  3552459.203400
  24  ea27  E16      25.0 m  -107.36.09.8  +33.53.40.0      1410.0316    -673.4696      -0.7909 -1599926.110000 -5042772.967300  3554319.791200
  25  ea28  N40      25.0 m  -107.37.29.5  +33.57.44.4      -633.6167    6878.5984      -20.7748 -1600592.764000 -5038121.352000  3560574.847300
</pre>
 
This task displays a lot of information about the MS. We can see that the observation was performed with the EVLA, and the included integration time is 4557 seconds (1.3 hour).  The number of data records (10,061,248) is approximately equal to the number of baselines (N_antenna * [N_antenna - 1] / 2) X the number of integrations (observing time / time-average binning) X the number of spectral windows.  For this observation, this is roughly 325 baselines (26X25/2) X 760 integrations (4557s total/6s avg) X 64 spectral windows = 15,808,000.  Note that this is high by ~50%; this is because the "total time" reported is simply (start time) - (end time) of the MS, which includes periods of flagged data.  Extra exercise: examine the MS using {{browsetable}} to see what a data record looks like (equivalent to a row, as displayed by this task).
 
The most useful parts of the {{listobs}} output are the scan, field, and spectral window listings. 
 
From the spectral window information, we can see that there are a total of 64 (0 through 63) spectral windows in this dataset, and that these are in the Ka-band.  (Data taken for pointing calibration have already been deleted.) 
 
The field listing shows four sources:
 
* 3C147 (Field ID 0), the flux calibration source;
* J0603+174 (1), used for calibrating the complex gains;
* G192.16-3.84 (2), the science target; and
* 3C84 (3), used for calibrating the spectral bandpass.
 
== Flagging the MS ==
 
[[Image:PlotG192_flagcmd_4.1.png|200px|thumb|right|online flags plotted from flagcmd]]
 
The online flags, which are a record of known bad data produced by the EVLA online system, have already been applied by the archive as it generated the MS.  However, it's good to have a sense of what was deleted in this process.  A record of the flags is also stored in a separate table in the MS, called <tt>FLAG_CMD</tt>.  (In fact, the information for this table is actually a subdirectory within the MS; you can see this by listing the contents of <tt>G192_6s.ms</tt>.)
 
You can examine the commands stored in the <tt>FLAG_CMD</tt> table using {{flagcmd}}:
<source lang="python">
# In CASA
flagcmd(vis='G192_6s.ms', inpmode='table', action='list', \
        useapplied=True)
</source>
These will go to the logger.  Note that we need to set <tt>useapplied</tt> to True, otherwise the flags that have already been applied to the MS (which includes all online flags) will be ignored by the task.
 
You can also plot the commands stored in the <tt>FLAG_CMD</tt> table:
<source lang="python">
# In CASA
myrows = range(2868)
flagcmd(vis='G192_6s.ms', inpmode='table', action='plot', \
        useapplied=True, tablerows=myrows)
</source>
 
Note that we are only plotting the first 2868 rows -- this is because the last two are from flagging zeros in the data (caused by correlator errors) and data which have been flagged due to [http://evlaguides.nrao.edu/index.php?title=Observational_Status_Summary#Shadowing_and_Cross-Talk antenna shadowing]. Note that you can omit the <tt>tablerows</tt> selection and plot those too; you will just get lines at the bottom marked as "All" antennas for these flags.
 
This will bring up a <tt>matplotlib</tt> plotter.  You can have it plot to a PNG file instead:
 
<source lang="python">
# In CASA
flagcmd(vis='G192_6s.ms', inpmode='table', action='plot', tablerows=myrows,
        useapplied=True, plotfile='PlotG192_flagcmd_4.1.png')
</source>
 
The flags as plotted in the figure to the above right look normal.  They are color-coded by REASON, and you see ANTENNA_NOT_ON_SOURCE flags between scans, some FOCUS_ERROR flags here and there, and the occasional SUBREFLECTOR_ERROR flag also between scans (most likely after band changes when the subreflector rotates to pick up the new feed on the ring, some are slower than others).  What you watch for here are long blocks of unexpected flags, which might be false alarms and cause you to flag too much data.  In that case, look at the data itself in {{plotms}} (see below for examples) to decide whether or not to apply all flags.  (Note: for the dataset in this tutorial, we have already deleted all the flagged data to reduce the file size, so you won't be able to inspect the flagged data within the MS.  To do so, you will need to download the original dataset from the  [https://archive.nrao.edu/archive/advquery.jsp NRAO Archive].)
 
[[Image:plotG192_plotants.png|200px|thumb|right|plotants plotter]]
To plot up the antenna positions in the array:
<source lang="python">
# In CASA
plotants('G192_6s.ms')
</source>
 
NOTE: if after this point (or any other) you get "table locks", which may occur erroneously and are sometimes triggered by plotting tasks, use {{clearstat}} to clear them:
 
<source lang="python">
# In CASA
clearstat
</source>
 
Now we examine the MS looking for bad data to flag. We will use {{plotms}} to bring up an interactive GUI that will display 2-D Y vs. X style line plots. <b>NOTE: We do not recommend using the editing/flagging features of {{plotms}}.</b>  It is very easy to mess up your data this way.  Also, to improve speed we will be restricting the scope of plotting, so most box/flag operations would not get rid of all the bad data -- although they would ''appear'' to delete it, which is misleading. 
 
We will instead use {{plotms}} to identify bad data and then use {{flagcmd}} to flag it.  This will also allow full scripting of the flagging, which is ultimately the best way to keep track of what's been deleted.  Given the large dataset sizes now being generated, reproducibility is extremely important.  Imagine spending a day flagging your data, then a disk error corrupts the MS.  It's imperative that you have an automated way to regenerate your work.  This is also why we encourage you to keep a running file with all the commands you use on a dataset.
 
NOTE: If you need an introduction to {{plotms}}, see:
* [[Data flagging with plotms]]
* [[Averaging data in plotms]]
* [[What's the difference between Antenna1 and Antenna2? Axis definitions in plotms]]
 
WARNING: The '''Flag''' [[Image:FlagThoseData.png]] button on the plotms GUI is close to other buttons you will be using, in particular the one that gets rid of boxes you have drawn.  Be careful and don't hit the '''Flag''' button by mistake!
 
To get an idea of the data layout, plot a single baseline (ea02&ea05), and channel (31, for all spectral windows) versus time:
 
[[Image:screenshotPlotG192_plotms_ant02-05_4.1.png|200px|thumb|right|plotms of ea02&ea05 amp vs time]]
<source lang="python">
# In CASA
plotms(vis='G192_6s.ms', field='', spw='*:31~31', \
      antenna='ea02&ea05', xaxis='time', yaxis='amp', \
      coloraxis='field')
</source>
 
Here, we can see the alternating phase calibration and science target scans, as well as the (brighter) flux calibrator at the end of the observation.  Feel free to play with ways to view -- for example, you can change the size of the plotted points, if they are too small to see easily, by setting "Unflagged Points Symbol" to "Custom" and increasing the number of pixels under "Style".
 
[[Image:screenshotPlotG192_plotms_baseline_4.1.png|200px|thumb|right|plotms baseline amplitudes for field 3]]
 
Look for bad antennas by picking the last field and plotting baselines.  We color the points by "antenna1" to see which antennas might be troublesome:
<source lang="python">
# In CASA
plotms(vis='G192_6s.ms', field='3', spw='*:31~31', \
      antenna='', xaxis='baseline',\
      yaxis='amp', coloraxis='antenna1')
</source>
 
You should be able to see that three of the antennas have lower amplitudes than the rest.  Boxing with the '''Mark Regions''' [[Image:MarkRegionsButton.png]] tool and using the '''Locate''' [[File:casaplotms-locate-tool.png]] tool will show in the logger that these are antennas ea01, ea10 and ea19; indeed, checking the [https://archive.nrao.edu/archive/ArchiveRouter?OBS_LOGS=EVLA,TVER0004,56295.000000,56296.000000 Operator Log] for this observation shows that these antennas have collimation offsets and that the data have been corrupted.  We will delete these antennas.
 
[[Image:plotG192_plotms_field3_ea05_ea13.png|200px|thumb|right|plotms field 3 ea05 and ea13 amp vs frequency]]
 
Now look at the bandpasses of baselines to ea05.  It is in the inner core of the array and a prospective reference antenna. Exclude antennas ea01, ea10, and ea19 using negation (represented by "!") in the selection, and iterate by antenna:
<source lang="python">
# In CASA
plotms(vis='G192_6s.ms', field='3', \
      antenna='ea05;!ea01;!ea10;!ea19', \
      xaxis='frequency', yaxis='amp',
      coloraxis='corr', iteraxis='antenna')
</source>
 
The plot for ea05 and ea13 shows that ea13's RCP is weak, as noted in the log file as well.  We will flag this antenna, since current restrictions do not allow for single-polarization data to be imaged if included in a full-polarization dataset. 
 
Also, note that spectral windows 16 through 31 for antenna ea18 look very suspicious.  We won't flag these right away, but need to keep an eye out for issues down the line.
 
For antenna ea24, there appear to be some issues with spectral windows 47 and 48, and the RCP of SPW 40 also looks problematic, so we'll flag this preemptively.
 
Now plot the phases, iterating through baselines to ea05:
<source lang="python">
# In CASA
plotms(vis='G192_6s.ms', field='3', \
      antenna='ea05;!ea01;!ea10;!ea13;!ea19', \
      xaxis='frequency', yaxis='phase', coloraxis='corr', \
      iteraxis='antenna')
</source>
 
You see the slopes due to residual delays. Mostly a turn or less over a 128MHz subband, but there are some outliers. Step through to ea18.  You see that there are jumps between spectral windows for SPW 16-31.  This reinforces that something is amiss with these SPWs, and we will flag them as well. 
 
To carry out flagging, we again use {{flagcmd}} in the mode where it takes a list of command strings:
<source lang="python">
# In CASA
flaglist = ['antenna="ea01,ea10,ea19,ea13"',
            'antenna="ea24" spw="40,47~48"',
            'antenna="ea18" spw="16~31"']
flagcmd(vis='G192_6s.ms', inpmode='list', inpfile=flaglist, \
        action='apply', flagbackup=True)
</source>
These commands will be carried out as well as being added to the FLAG_CMD table (marked as applied).  Before applying the flags, a backup version will be stored as <tt>flagcmd_1</tt>, in case you would like to restore the flagged data to the MS (this can be done with {{flagmanager}}).
 
Plot the data again, now that is has been flagged:
<source lang="python">
# In CASA
plotms(vis='G192_6s.ms', field='3', antenna='ea05', \
      xaxis='frequency', yaxis='amp')
</source>
 
[[Image:plotG192_plotms_ea02fld3.png|200px|thumb|right|plotms field 3 ea05 amp vs frequency]]
 
Now let's look at our phase calibrator -- it is weaker, and we now start to really see the RFI:
<source lang="python">
# In CASA
plotms(vis='G192_6s.ms', field='1', antenna='ea05', \
      xaxis='frequency', yaxis='amp', scan='10,20,30,40,50,60')
</source>
Note that we've chosen a subset of scans to limit the amount of data being plotted.  This will give a sense of whether there was RFI (or other issues) present in the observation, but will obviously not display everything -- later on, when we plot the calibrated data, we will need to again inspect for possible bad data (and may need to iterate and recalibrate).
 
Use the Zoom feature, Mark rectangles and use Locate to identify the frequency/channel of RFI. In particular, we note in our analysis:
* 27.228 GHz (spw 33 ch 124)
* 27.707 GHz (spw 37 ch 91)
* 27.81-27.811 GHz (spw 38 ch 66-67)
* 27.819-27.821 GHz (spw 38 ch 75-77)
* 28.894 GHz (spw 46 ch 126)
* 28.976 GHz (spw 48 ch 0)
* 29.684-20.685 GHz (spw 53 ch 68-69)
* 30.976 GHz (spw 63 ch 80) very strong
* 35.782 GHz (spw 10 ch 26)
* 36.523 GHz (spw 15 ch 127)
* 37.946 GHz (spw 27 ch 62)
* 37.948 GHz (spw 27 ch 64)
 
Flag these channels:
<source lang="python">
# In CASA
flaglist = ['spw="37:91,33:124,38:66~67;75~77,46:126,48:0"', \
            'spw="53:68~69,63:80,10:26,15:127,27:62,27:64"']
flagcmd(vis='G192_6s.ms', inpmode='list', inpfile=flaglist, \
        action='apply', flagbackup=True)
</source>
When this is finished, it's useful to have a look at the flagged data.  To reload the plotms window taking the new flags into account, hold down the "Shift" key while clicking on the "Plot" button.
 
Finally, split off the good data, without retaining the flagged data.  This will allow us to work on the data without having to start completely over (if we mess something up badly) as well as letting us do simpler data selections.
 
<source lang="python">
# In CASA
# Remove any existing split data, otherwise split will not happen
os.system('rm -rf G192_flagged_6s.ms')
split(vis='G192_6s.ms', outputvis='G192_flagged_6s.ms', \
      datacolumn='data', keepflags=False)
</source>
* keepflags=False: again, to limit the size of the MS, we do not propagate flagged data to the split-off MS.
 
You now have a MS called <tt>G192_flagged_6s.ms</tt> in your working area.  This should be 16GB in size, which you can see while still at the CASA command prompt by typing:
 
<source lang="python">
# In CASA
os.system('du -sh G192_flagged_6s.ms')
</source>
 
Note that the built-in <tt>system</tt> function allows one to execute UNIX shell commands within a CASA session.  (Some, like <tt>ls</tt>, don't need this extra wrapper, but most are not automatically understood.)
 
[[Image:PlotG192_plotms_datastream.png|200px|thumb|right|plotms antenna2 vs. time "datastream" plot]]
At this point it is useful to plot a "datastream" view of the dataset to show what antennas are present at what time. You can do this using
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', xaxis='time', yaxis='antenna2', \
      plotrange=[-1,-1,0,26], coloraxis='field')
</source>
This shows the times where data is present on baselines TO a given Antenna2 (which means there is no line for ea01 which is antenna 0). You can pick up ea01 (and drop ea28) by setting <tt>yaxis='antenna1'</tt>. To the right we show this plot. You see that for the most part, the antennas are present for the entire observation.  One exception to this is antenna ea16, which comes in a little late on the first scan of G192.
 
== Calibration ==
 
Summarize the split flagged MS:
<source lang="python">
# In CASA
listobs('G192_flagged_6s.ms', listfile='G192_flagged_listobs.txt')
</source>
 
As before, cat'ing the file we see that there are now 7,121,197 data records present, and 22 antennas remain in the MS.
 
=== Setting the flux density scale ===
 
It is now time to begin calibrating the data.  The general data reduction strategy is to derive a series of scaling factors or corrections from the calibrators, which are then collectively applied to the science data.  For <em>much</em> more discussion of the philosophy, strategy, and implementation of calibration of synthesis data within CASA, see [http://casa.nrao.edu/docs/UserMan/UserManch4.html#x195-1920004 Synthesis Calibration] in the CASA Cookbook and User Reference Manual .
 
Before calibrating, we insert a model for the flux calibration source 3C147 into the MS.  In order to do this, we first have to locate the model image on our system with {{setjy}}, which we will also use to set the flux density scale.  The {{setjy}} task has an option to list possible model images it knows about:
 
<source lang="python">
# In CASA
setjy(vis='G192_flagged_6s.ms', listmodels=True)
</source>
which sends output to your terminal (but not the logger). For example, on an NRAO workstation:
<pre>
No candidate modimages matching '*.im* *.mod*' found in .
 
Candidate modimages (*) in /usr/lib64/casapy/release/4.1.0/data/nrao/VLA/CalModels:
3C138_A.im  3C138_Q.im 3C147_A.im  3C147_Q.im 3C286_A.im  3C286_Q.im 3C48_A.im  3C48_Q.im  README
3C138_C.im  3C138_S.im 3C147_C.im  3C147_S.im 3C286_C.im  3C286_S.im 3C48_C.im  3C48_S.im
3C138_K.im  3C138_U.im 3C147_K.im  3C147_U.im 3C286_K.im  3C286_U.im 3C48_K.im  3C48_U.im
3C138_L.im  3C138_X.im 3C147_L.im  3C147_X.im 3C286_L.im  3C286_X.im 3C48_L.im  3C48_X.im
</pre>
 
The relevant image for our purposes is <tt>3C147_A.im</tt>, in the directory <tt>/usr/lib64/casapy/release/4.1.0/data/nrao/VLA/CalModels/</tt>.  Your system may show a different location (for example <tt>/home/casa/data/nrao/VLA/CalModels/</tt>, or <tt>/Applications/CASA.app/Contents/data/nrao/VLA/CalModels</tt> on a Mac).  Since it knows about this image, we only have to give the image name and not the entire path. Otherwise, you will need to give it the entire path. 
 
In addition, we need to edit the name of the flux calibrator to be "3C147-J0542+49" rather than its current version, which has a lower-case "c" that will cause {{setjy}} to become confused.  We can do this with the CASA Toolkit commands:
<source lang="python">
# In CASA
tb.open('G192_flagged_6s.ms/SOURCE', nomodify=False)
srcNames = tb.getcol('NAME')
</source>
 
You can look at the resulting array by typing "srcNames" -- the first 64 entries are '3c147-J0542+49', which we want to modify.  We can do this with a little Python:
<source lang="python">
# In CASA
for element in range (0,64):
    srcNames[element] = '3C147'
 
</source>
 
Now, put the modified values back into the MS table:
<source lang="python">
# In CASA
tb.putcol('NAME', srcNames)
tb.close()
</source>
 
There's one more place where we need to make this modification -- the "FIELD" table:
<source lang="python">
# In CASA
tb.open('G192_flagged_6s.ms/FIELD', nomodify=False)
fldNames = tb.getcol('NAME')
fldNames[0] = '3C147'
tb.putcol('NAME', fldNames)
tb.close()
</source>
 
We can now run the {{setjy}} task using this model:
 
<source lang="python">
# In CASA
setjy(vis='G192_flagged_6s.ms', field='0', scalebychan=True, \
      modimage='3C147_A.im')
</source>
 
[[Image:screenshotPlotG192_setjy_4.1.png|200px|thumb|right|plotms of model amp vs freq for 3C147]]
* <tt>scalebychan=True</tt>: will fill the model with per-channel values; otherwise, {{setjy}} would use a single value per spectral window.
* <tt>usescratch=False</tt>: put the model in the header instead of creating scratch columns in the MS.  This will take up considerably less disk space.
 
We can plot the model data using {{plotms}}:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='0', antenna='ea02&ea05', \
      xaxis='freq', yaxis='amp', ydatacolumn='model')
</source>
 
Inspecting the logger report shows that 3C147 is about 0.98 Jy at the lower end of the band to 0.67 Jy at the upper end.
 
=== Deriving pre-determined calibrations ===
 
Some calibration products are carried along throughout the calibration process and used as priors for subsequent calibration steps.  These include the antenna position corrections, gain-elevation curves, tropospheric opacity corrections, and requantizer gains.
 
==== Antenna position corrections ====
 
We use {{gencal}} to determine any antenna-position corrections that need to be applied to the data. This is based on a database of corrections with the time they were determined and when they were applied by the observing system, compared to the times in your observations.
<source lang="python">
# In CASA
gencal('G192_flagged_6s.ms', caltable='calG192.antpos', \
      caltype='antpos', antenna='')
</source>
You should see in the logger:
<pre style="background-color: #fffacd;">
No offsets found for this MS
*** Warning *** No offsets found. No caltable created.
gencal::::casa An error occurred running task gencal.
</pre>
Although it looks like the task has failed, reading the warning and error show that in fact, there simply aren't any antenna corrections to apply.
 
==== Gain-elevation curves ====
 
In CASA 4.1, we now have the option to use {{gencal}} to create calibration tables containing the gain curves and tropospheric opacity corrections for the antennas. Although you can still use the <tt>gaincurve=True</tt> and <tt>opacity</tt> options in the calibration tasks, we will make use of this new feature (note that the <tt>gaincurve=True</tt> will be phased out in future CASA releases):
<source lang="python">
# In CASA
gencal('G192_flagged_6s.ms', caltable='calG192.gaincurve', caltype='gc')
</source>
 
==== Tropospheric opacity corrections ====
 
[[Image:G192_plotWX.png|200px|thumb|right|plotweather output]]
 
The opacity of the observation can be computed from a seasonal model and/or weather station information. We are planning to have a task available for this information.  We will use the {{plotweather}} task to display the weather information and to calculate the zenith opacities for each spectral window. After the zenith opacities are derived, they will be recomputed for the correct elevation of the data automatically using <math>e^{(-\csc[el]\tau_z)}</math> in {{gaincal}}, {{applycal}}, {{bandpass}} etc.
 
To start, we want to plot the opacity of the atmosphere at the time this observation was taken so it can be corrected for in subsequent calibrations.  {{plotweather}} plots the weather conditions at the time of observation and calculates the atmospheric opacities based on these data, in combination with a seasonal model that contains long-term statistics at the VLA site. Using 'seasonal_weight=0.5' gives both equal weights:
 
We will be running '''plotweather''' in a way that will assign the opacity list (one entry for each SPW in ascending order) to the variable myTau:
 
<source lang="python">
# In CASA
myTau = plotweather(vis='G192_flagged_6s.ms', doPlot=T)
</source>
 
The logger should display:
<pre style="background-color: #fffacd;">
##########################################
##### Begin Task: plotweather        #####
plotweather(vis="G192_flagged_6s.ms",seasonal_weight=0.5,doPlot=True,plotName="")
2013-06-18 21:47:00 INFO plotweather SPW : Frequency (GHz) : Zenith opacity (nepers)
0  :  34.476  :  0.03
1  :  34.604  :  0.031
2  :  34.732  :  0.031
3  :  34.860  :  0.031
4  :  34.988  :  0.032
<snip>
61  :  30.640  :  0.024
62  :  30.768  :  0.024
63  :  30.896  :  0.024
wrote weather figure: G192_flagged_6s.ms.plotweather.png
##### End Task: plotweather          #####
##########################################
</pre>
 
It also creates a file '''"G192_flagged_6s.ms.plotweather.png"'''  with the elevation of the sun, the wind speed and direction, the temperature, precipitable water vapor (PWV) as functions of time over the observation (view this file with your preferred image viewer like gthumb, xv or Preview), and assigns the myTau variable to the full list of opacities per spectral window.
 
We can now create a calibration table for the opacities via {{gencal}} with the ''calmode='opac' '' parameter.  We could input the opacities directly, but it's easier to use the myTau variable with a little Python:
 
<source lang="python">
# In CASA
SPWs = []
for window in range(0,64):
    SPWs.append(str(window))
spwString = ','.join(SPWs)
gencal(vis='G192_flagged_6s.ms', caltable='calG192.opacity',
      caltype='opac', spw=spwString, parameter=myTau)
</source>
''' Note that this method replaces the ''opacity'' option in the calibrations tasks in CASA 3.4 and earlier '''
 
==== Requantizer gain corrections ====
 
Finally, we will use {{gencal}} to create a calibration table containing corrections for the requantizer gains.  Although this is only necessary for 3-bit data, such as our G192 dataset, it can be done for 8-bit datasets without any ill effects.  For 3-bit data, this step is needed to account for the small gain changes (~5-10%) that result from resetting the quantizer gains as the correlator changes to a new 3-bit configuration.
<source lang="python">
# In CASA
gencal('G192_flagged_6s.ms', caltable='calG192.requantizer', caltype='rq')
</source>
 
The caltables we have generated, <tt>calG192.gaincurve</tt>, and <tt>calG192.requantizer</tt>, will need to be pre-applied in subsequent calibration steps.
 
=== Calibrating delays and initial bandpass solutions ===
 
[[Image:plotG192_plotcal_G0p1_4.0.png|200px|thumb|right|plotcal G0 phase ant 0~15]]
[[Image:plotG192_plotcal_G0p2_4.0.png|200px|thumb|right|plotcal G0 phase ant 16~26]]
 
[[Image:plotG192_plotcal_delays.png|200px|thumb|right|plotcal K0 delay vs. antenna]]
 
[[Image:plotG192_plotcal_B0a1_4.0.png|200px|thumb|right|plotcal B0 bandpass amp ant ea06 spw 0-31]]
[[Image:plotG192_plotcal_B0a2_4.0.png|200px|thumb|right|plotcal B0 bandpass amp ant ea06 spw 32-63]]
[[Image:plotG192_plotcal_B0p1_4.0.png|200px|thumb|right|plotcal B0 bandpass phase ant ea06 spw 0-31]]
[[Image:plotG192_plotcal_B0p2_4.0.png|200px|thumb|right|plotcal B0 bandpass phase ant ea06 spw 32-63]]
 
First, we do a phase-only calibration solution on a narrow range of channels near the center of each SPW on the bandpass calibrator 3C84 to flatten them with respect to time before solving for the bandpass. The range 23~28 should work. Pick a refant near center -- ea05 is a reasonable bet (see above):
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G0', \
        field='3', spw='*:60~68', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                  'calG192.opacity'], \
        gaintype='G', refant='ea05', calmode='p', \
        solint='int', minsnr=3)
</source>
 
* <tt>refant='ea05'</tt> : try to use ea05 as the reference antenna
* <tt>solint='int'</tt> : do a per-integration solve (every 6 seconds, since we've time-averaged the data)
* <tt>minsnr=3</tt> : apply a minimum signal-to-noise cutoff.  Solutions with less than this value will be flagged
* <tt>gaintable=['calG192.gaincurve', 'calG192.requantizer', 'calG192.opacity']</tt> : pre-apply the gaincurve, opacity, and requantizer caltables
 
Plot the phase solutions (using full phase range, -180 to 180, instead of autorange):
 
<source lang="python">
# In CASA
plotcal(caltable='calG192.G0', xaxis='time', yaxis='phase', \
        iteration='antenna', plotrange=[-1,-1,-180,180])
</source>
 
Step through the antenna-based solutions.  They look good (and fairly flat over the scans).
 
NOTE: When you are done plotting and want to use the caltable in another task, use the Quit button on the GUI to dismiss the plotter and free up the lock on the caltable. You should see a message in your terminal window saying "Resetting plotcal" which means you are good to go!
 
If you want to make single-page multipanel plots (like those shown to the right), particularly for a hardcopy (where it only shows the first page), you can do:
<source lang="python">
# In CASA
plotcal(caltable='calG192.G0', xaxis='time', yaxis='phase', \
        antenna='0~10,12~15', subplot=531, iteration='antenna', \
        plotrange=[-1,-1,-180,180], fontsize=8.0, \
        markersize=3.0, figfile='plotG192_plotcal_G0p1.png')
plotcal(caltable='calG192.G0', xaxis='time', yaxis='phase', \
        antenna='16~26', subplot=531, iteration='antenna', \
        plotrange=[-1,-1,-180,180], fontsize=8.0, \
        markersize=3.0, figfile='plotG192_plotcal_G0p2.png')
</source>
 
We can now solve for the residual antenna-based delays that we saw in phase vs. frequency. This uses the new gaintype='K' option in gaincal. Note that this currently does not do a "global fringe-fitting" solution for delays, but instead does a baseline-based delay solution to all baselines to the refant, treating these as antenna-based delays.  In most cases with high-enough S/N to get baseline-based delay solutions this will suffice. We avoid the edge channels, beginning of spw 0 due to the extreme roll-off (with loss of S/N) at the starting edge. -->
 
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.K0', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                  'calG192.G0', 'calG192.opacity'], \
        field='3', spw='*:5~122', gaintype='K', \
        refant='ea05', solint='inf', minsnr=3)
</source>
We pre-apply our initial phase table, and produce a new K-type caltable for input to bandpass calibration.
We can plot the delays, in nanoseconds, as a function of antenna index (you will get one for each subband and polarization):
 
<source lang="python">
# In CASA
plotcal(caltable='calG192.K0', xaxis='antenna', yaxis='delay')
</source>
 
The delays range from around -5 to 4 nanoseconds.
 
Now solve for the bandpass using the previous tables:
<source lang="python">
# In CASA
bandpass(vis='G192_flagged_6s.ms', caltable='calG192.B0', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                    'calG192.G0', 'calG192.K0', 'calG192.opacity'], \
        field='3', refant='ea05', solnorm=False, \
        bandtype='B', solint='inf', gaincurve=False)
</source>
'''WARNING''': You must set <tt>solnorm=False</tt> here or later on you will find some offsets
between spw due to how amplitude scaling adjusts weights internally during solving.
 
You will see in the terminal some reports of solutions failing due to "Insufficient unflagged antennas" -- note that these are for the channels we flagged earlier.
 
This is the first amplitude-scaling calibration that we do, so it is important to have used the <tt>calG192.gaincurve</tt> caltable (or set <tt>gaincurve=True</tt>) as well as the <tt>calG192.opacity</tt> caltable (or set <tt>opacity</tt>).
 
Now plot this, in amplitude then phase:
<source lang="python">
# In CASA
plotcal(caltable='calG192.B0', xaxis='freq', yaxis='amp', \
        spw='0~31', iteration='antenna')
#
plotcal(caltable='calG192.B0', xaxis='freq', yaxis='amp', \
        spw='32~63', iteration='antenna')
#
plotcal(caltable='calG192.B0', xaxis='freq', yaxis='phase', \
        iteration='antenna', spw='0~31', \
        plotrange=[-1,-1,-180,180])
#
plotcal(caltable='calG192.B0', xaxis='freq', yaxis='phase', \
        iteration='antenna', spw='32~63', \
        plotrange=[-1,-1,-180,180])
</source>
 
In the bandpass phase you no longer see the residual antenna delays (just residual spw phase offsets from the delay solution registration) but there are some band edge effects.
 
=== Bootstrapping the bandpass calibrator spectrum ===
 
Unfortunately, our flux density calibrator was not bright enough to use as the bandpass calibrator.  Since there is no <i>a priori</i> spectral information for 3C84, in order to avoid including the intrinsic spectral shape of this source in our calibration, we need to bootstrap to find its spectral index, then recalibrate with this information filled in the MODEL column of the MS.
 
First, we use the initial round of bandpass calibration to create gain solutions for the flux and bandpass calibrators:
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1', field='0,3', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                  'calG192.opacity', 'calG192.K0', \
                  'calG192.B0'], \
        gaintype='G', refant='ea05', calmode='ap', solint='30s', minsnr=3)
</source>
 
Have a look at the phase and amplitude solutions, stepping through antenna.  We look at the sources individually since they're fairly widely separated in time:
<source lang="python">
# In CASA
plotcal(caltable='calG192.G1', xaxis='time', yaxis='amp', \
        field='0', iteration='antenna')
#
plotcal(caltable='calG192.G1', xaxis='time', yaxis='amp', \
        field='3', iteration='antenna')
#
plotcal(caltable='calG192.G1', xaxis='time', yaxis='phase', \
        iteration='antenna', plotrange=[-1,-1,-180,180], \
        field='0')
#
plotcal(caltable='calG192.G1', xaxis='time', yaxis='phase', \
        iteration='antenna', plotrange=[-1,-1,-180,180], \
        field='3')
</source>
 
The solutions all look reasonable and relatively constant with time. 
 
[[Image:screenshotPlotG192_setjy_bp_4.1.png|200px|thumb|right|plotms of model amp vs freq for 3C84]]
 
[[Image:plotG192_3C84_fluxspec_4.1.png|200px|thumb|right|3C84 flux values returned by fluxscale]]
 
Now that we have gain solutions for the flux and bandpass calibrators, we can use {{fluxscale}} to scale the gain amplitudes of the bandpass calibrator:
<source lang="python">
# In CASA
flux1 = fluxscale(vis='G192_flagged_6s.ms', caltable='calG192.G1', \
                  fluxtable='calG192.F1', reference='0', transfer='3', \
                  listfile='3C84.fluxinfo', fitorder=1)
</source>
 
* <tt>flux1 = ...</tt>: by providing a variable <tt>flux1</tt>, we allow {{fluxscale}} to use this for the output dictionary it returns with lots of information about the flux scaling.
* <tt>fluxtable='calG192.F1'</tt>: this is the output scaled gain table.  Since we are only using this to find the spectral index of 3C84, we won't be using this table.
* <tt>listfile='3C84.fluxinfo'</tt>: an output file that contains the derived flux values and fit information.
* <tt>fitorder=1</tt>: only find a spectral index, ignoring curvature in the spectrum.
 
The last line in the file (and displayed in the logger) show:
<pre style="background-color: #fffacd;">
# Fitted spectrum for 3c84-J0319+413 with fitorder=1: Flux density = 29.8756 +/- 0.0381046 (freq=32.4488 GHz) spidx=-0.598929 +/- 0.0105201
</pre>
 
Using the information in the returned <tt>flux</tt> dictionary, we can plot the derived spectrum:
<source lang="python">
# In CASA
freq = flux1['freq'] / 1e9
srcFlux = flux1['3']['fluxd']
srcErr = flux1['3']['fluxdErr']
pl.clf()
pl.plot(freq, srcFlux, 'bo')
</source>
 
Note the bump around 37 GHz -- what is this?  We will not be able to account for it with the simple spectral index model, but still, it's better than not modeling the spectrum at all.
 
We can use the model from {{fluxscale}} to fill the MODEL column with 3C84's spectral information using {{}}:
<source lang="python">
# In CASA
setjy(vis='G192_flagged_6s.ms', field='3', scalebychan=True, \
      fluxdensity=[29.8756, 0, 0, 0], spix=-0.598929, \
      reffreq='32.4488GHz')
</source>
 
Checking with plotms that the data have been appropriately filled:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='3', antenna='ea05&ea02', \
      xaxis='freq', yaxis='amp', ydatacolumn='model')
</source>
 
[[Image:plotG192_plotcal_B0a1.b_4.1.png|200px|thumb|right|plotcal B0 bootstrapped bandpass amp ant ea06 spw 0-31]]
[[Image:plotG192_plotcal_B0a2.b_4.1.png|200px|thumb|right|plotcal B0 bootstrapped bandpass amp ant ea06 spw 32-63]]
[[Image:plotG192_plotcal_B0p1.b_4.1.png|200px|thumb|right|plotcal B0 bootstrapped bandpass phase ant ea06 spw 0-31]]
[[Image:plotG192_plotcal_B0p2.b_4.1.png|200px|thumb|right|plotcal B0 bootstrapped bandpass phase ant ea06 spw 32-63]]
 
Finally, we redo the previous calibration using this new model information:
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G0.b', field='3', \
        spw='*:60~68', gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                                  'calG192.opacity'], \
        gaintype='G', refant='ea05', calmode='p', solint='int', minsnr=3)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.K0.b', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                  'calG192.G0.b', 'calG192.opacity'], \
        field='3', spw='*:5~122', gaintype='K', \
        refant='ea05', solint='inf', minsnr=3)
#
bandpass(vis='G192_flagged_6s.ms', caltable='calG192.B0.b', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                    'calG192.G0.b', 'calG192.K0.b', 'calG192.opacity'], \
        field='3', refant='ea05', solnorm=False, \
        bandtype='B', solint='inf')
</source>
 
It's a good idea to inspect these solutions as well:
<source lang="python">
# In CASA
plotcal(caltable='calG192.B0.b', xaxis='freq', yaxis='amp', \
        spw='0~31', iteration='antenna')
#
plotcal(caltable='calG192.B0.b', xaxis='freq', yaxis='amp', \
        spw='32~63', iteration='antenna')
#
plotcal(caltable='calG192.B0.b', xaxis='freq', yaxis='phase', \
        iteration='antenna', spw='0~31', \
        plotrange=[-1,-1,-180,180])
#
plotcal(caltable='calG192.B0.b', xaxis='freq', yaxis='phase', \
        iteration='antenna', spw='32~63', \
        plotrange=[-1,-1,-180,180])
</source>
 
They look virtually unchanged from the previous solutions, with the exception that the amplitude scaling is corrected for the spectrum of 3C84.  Now that we have the final version of our bandpass calibration, we can proceed to the full calibration of the dataset.
 
=== Final phase and amplitude calibration ===
 
[[Image:plotG192_plotcal_G1.int_4.1.png|200px|thumb|right|plotcal G1.int per-int phase ea06]]
 
[[Image:plotG192_plotcal_G1.inf_4.1.png|200px|thumb|right|plotcal G1.inf per-scan phase ea06]]
 
Now we will compute calibrators' gain phases using the full bandwidth.  We will do the calibrators one at a time and append subsequent solutions, since we will use different solution intervals.  For 3C147 and 3C84, we obtain one solution per integration (these are bright enough); for J0603+174, we will use 12 s solution intervals:
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.int', \
        gaintable=['calG192.requantizer','calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b','calG192.B0.b'], \
        field='0', refant='ea05', solnorm=F, \
        solint='int', gaintype='G', calmode='p')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.int', \
        gaintable=['calG192.requantizer','calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b','calG192.B0.b'], \
        field='1', refant='ea05', solnorm=F, \
        solint='12s', gaintype='G', calmode='p', \
        append=True)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.int', \
        gaintable=['calG192.requantizer','calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b','calG192.B0.b'], \
        field='3', refant='ea05', solnorm=F, \
        solint='int', gaintype='G', calmode='p', \
        append=True)
</source>
These will get applied when solving for amplitudes, and when calibrating the calibrators themselves.
 
The phases track nicely with time:
<source lang="python">
# In CASA
plotcal(caltable='calG192.G1.int', xaxis='time', yaxis='phase', \
        iteration='antenna', plotrange=[-1,-1,-180,180])
</source>
 
To apply phase calibration to the target, we make a second table for the gain calibrator (J0603+174) with one solution per scan:
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.inf', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b', 'calG192.B0.b'], \
        field='1', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='p')
</source>
 
These scan phases will get interpolated by {{applycal}} onto our target. These look good as well:
<source lang="python">
# In CASA
plotcal(caltable='calG192.G1.inf', xaxis='time', yaxis='phase', \
        iteration='antenna', plotrange=[-1,-1,-180,180])
</source>
 
Now solve for amplitudes on a per scan interval, after applying the per-integration phases. Do these separately using <tt>gainfield</tt> so phases don't get transferred  across fields.  For field 2 (3C286) we use <tt>combine='scan'</tt> as there are two scans
on this source, with the first one having much less data (and will thus give a noisy solution on its own).
Note that {{gaincal}} uses linear interpolation of the previously determined phases by default, so
set this to "nearest" if you want to override this.
<source lang="python">
# In CASA
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', 'calG192.K0.b', \
                  'calG192.B0.b', 'calG192.G1.int'], \
        gainfield=['', '', '', '3', '3', '0'], \
        interp=['', '', '', 'nearest', 'nearest', 'nearest'], \
        field='0', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='a')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', 'calG192.K0.b', \
                  'calG192.B0.b', 'calG192.G1.int'], \
        gainfield=['', '', '', '3', '3', '1'], \
        interp=['', '', '', 'nearest', 'nearest', 'nearest'], \
        field='1', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='a', append=True)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', 'calG192.K0.b', \
                  'calG192.B0.b', 'calG192.G1.int'], \
        gainfield=['', '', '', '3', '3', '3'], \
        interp=['', '', '', 'nearest', 'nearest', 'nearest'], \
        field='3', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='a', append=True)
#
</source>
 
Have a look at the amplitudes:
<source lang="python">
# In CASA
plotcal(caltable='calG192.G2', xaxis='time', yaxis='amp', \
        iteration='antenna')
</source>
 
This is the table we will apply to the data.
 
[[Image:plotG192_plotcal_G2.inf_4.1.png|200px|thumb|right|plotcal G2 per-scan amp ant ea06]]
 
Now, we need to use {{fluxscale}} to transfer the amplitude gains from 3C147:
<source lang="python">
# In CASA
flux2 = fluxscale(vis='G192_flagged_6s.ms', caltable='calG192.G2', \
                  fluxtable='calG192.F2', reference='0')
</source>
where we have now captured the returned dictionary in the Python variable <tt>flux2</tt>.
 
The logger output gives:
<pre>
Found reference field(s): 3C147
Found transfer field(s):  gcal-J0603+174 3c84-J0319+413
Flux density for gcal-J0603+174 in SpW=0 is: 0.252043 +/- 0.00779693 (SNR = 32.3259, N = 44)
Flux density for gcal-J0603+174 in SpW=1 is: 0.250608 +/- 0.00785259 (SNR = 31.9141, N = 44)
Flux density for gcal-J0603+174 in SpW=2 is: 0.250149 +/- 0.00783195 (SNR = 31.9395, N = 44)
Flux density for gcal-J0603+174 in SpW=3 is: 0.249326 +/- 0.00870076 (SNR = 28.6556, N = 44)
Flux density for gcal-J0603+174 in SpW=4 is: 0.24779 +/- 0.00860759 (SNR = 28.7873, N = 44)
<snip>
Flux density for gcal-J0603+174 in SpW=60 is: 0.280642 +/- 0.00884987 (SNR = 31.7115, N = 44)
Flux density for gcal-J0603+174 in SpW=61 is: 0.279742 +/- 0.00874457 (SNR = 31.9904, N = 44)
Flux density for gcal-J0603+174 in SpW=62 is: 0.278071 +/- 0.00910153 (SNR = 30.5521, N = 44)
Flux density for gcal-J0603+174 in SpW=63 is: 0.277588 +/- 0.00955455 (SNR = 29.0529, N = 44)
Flux density for 3c84-J0319+413 in SpW=0 is: 1.01141 +/- 0.0316725 (SNR = 31.9333, N = 44)
Flux density for 3c84-J0319+413 in SpW=1 is: 0.994812 +/- 0.0326974 (SNR = 30.4248, N = 44)
Flux density for 3c84-J0319+413 in SpW=2 is: 1.00473 +/- 0.0314246 (SNR = 31.9729, N = 44)
Flux density for 3c84-J0319+413 in SpW=3 is: 1.0042 +/- 0.0325531 (SNR = 30.8479, N = 44)
<snip>
Flux density for 3c84-J0319+413 in SpW=60 is: 1.00232 +/- 0.0243617 (SNR = 41.1434, N = 44)
Flux density for 3c84-J0319+413 in SpW=61 is: 1.00589 +/- 0.0248197 (SNR = 40.5277, N = 44)
Flux density for 3c84-J0319+413 in SpW=62 is: 1.01762 +/- 0.0240088 (SNR = 42.3855, N = 44)
Flux density for 3c84-J0319+413 in SpW=63 is: 1.01145 +/- 0.0249814 (SNR = 40.488, N = 44)
Fitted spectrum for gcal-J0603+174 with fitorder=1: Flux density = 0.264382 +/- 0.000149793 (freq=32.4488 GHz) spidx=-0.834342 +/- 0.00458913
Fitted spectrum for 3c84-J0319+413 with fitorder=1: Flux density = 1.00101 +/- 0.00121263 (freq=32.4488 GHz) spidx=0.00866148 +/- 0.0100409
Storing result in calG192.F2
Writing solutions to table: calG192.F2
</pre>
You may see slightly different numbers on your machine.  Note that "N" here is the number of antennas x the number of polarizations used for the calculations; in this case, there are 22 unflagged antennas and 2 polarizations.
 
Also, note that the flux-scaled amplitudes for 3C84 are all almost exactly 1 Jy.  This is not because the actual flux of 3C84 is 1 Jy, of course.  Rather, remember that the spectrum and flux information is now included in the bandpass table.  When we apply the calibration, in the next section, you will see that 3C84's flux does indeed come out as expected.
 
== Applying the Calibration and Final Editing ==
 
Next we apply all our accumulated calibration tables to the flagged MS.  We apply these to the calibration fields individually, using the appropriate gainfields and interpolation for each:
* For 3C147 (field 0) we did per-integration phase solutions and a single scan amplitude, so use "linear" and "nearest" interpolation, respectively;
* for the nearby gain calibrator (field 1) we did 12-s phase and per-scan amplitude solutions, for which we will use "linear" and "nearest" interpolation, respectively;
* for G192 (field 2), we will calibrate with field 1, using the per-scan solutions and "linear" interpolation; and finally,
* for the bandpass calibrator 3C84 (field 3), we did per-integration phase solutions and a single scan amplitude, so use "linear" and "nearest" interpolation respectively.
 
[[Image:plotG192_plotms_applied_fld0.png|200px|thumb|right|3C147 with calibration applied]]
[[Image:plotG192_plotms_fld0_bybaseline.png|200px|thumb|right|3C147 with calibration applied, amp vs. baseline]]
<source lang="python">
# In CASA
applycal(vis='G192_flagged_6s.ms', field='0', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b', \
                    'calG192.B0.b', 'calG192.G1.int', \
                    'calG192.G2'], \
        gainfield=['', '', '', '', '', '0', '0'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'nearest'], calwt=False)
#
applycal(vis='G192_flagged_6s.ms', field='1', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b', \
                    'calG192.B0.b', 'calG192.G1.int', \
                    'calG192.G2'], \
        gainfield=['', '', '', '', '', '1', '1'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'nearest'], calwt=False)
#
applycal(vis='G192_flagged_6s.ms', field='2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b', \
                    'calG192.B0.b', 'calG192.G1.inf', \
                    'calG192.G2'], \
        gainfield=['', '', '', '', '', '1', '1'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'linear'], calwt=False)
#
applycal(vis='G192_flagged_6s.ms', field='3', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b', \
                    'calG192.B0.b', 'calG192.G1.int', \
                    'calG192.G2'], \
        gainfield=['', '', '', '', '', '3', '3'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'nearest'], calwt=False)
</source>
Because we used <tt>usesratch=False</tt> in {{setjy}}, the <tt>CORRECTED_DATA</tt> scratch column will be created the first time you run {{applycal}}. This will take a few minutes to write, increasing the size of the MS to 30 GB, and will store the calibrated data. 
 
We can examine the corrected data for 3C147, avoiding SPW edges, and binning the data in time and frequency:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='0', \
      xaxis='frequency', yaxis='amp', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='8', \
      avgtime='1000s', coloraxis='baseline')
</source>
 
See figure above right.  There is some suspicious data in the frequency range 38.15-38.26 GHz (SPW 29).  We can plot around this frequency range with respect to time, to see if it's isolated RFI or something we should flag from the whole dataset:
 
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='0', \
      xaxis='time', yaxis='amp', \
      ydatacolumn='corrected', spw='29:5~122', \
      averagedata=True, avgchannel='16', \
      avgtime='', coloraxis='baseline')
</source>
 
Indeed, something looks wrong for the time interval 6:35:00-6:36:40 for this SPW.  Flag this data:
 
<source lang="python">
# In CASA
flagdata(vis='G192_flagged_6s.ms', field='0', \
        spw='29', timerange='6:35:00~6:36:40')
</source>
 
It's also instructive to plot the corrected amplitude as a function of baseline:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='0', \
      xaxis='baseline', yaxis='amp', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='8', \
      avgtime='1000s', coloraxis='antenna1')
</source>
Looks good now!
 
Next, we examine the corrected data for the gain calibrator, J0603+174, again avoiding SPW edges.  This time, we will bin the data even more in frequency, since it's a fainter source:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='1', \
      xaxis='frequency', yaxis='amp', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='32', \
      avgtime='6000s', coloraxis='baseline')
</source>
 
This generally looks quite good.  Plot with respect to baseline as well:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='1', \
      xaxis='baseline', yaxis='amp', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='32', \
      avgtime='6000s', coloraxis='antenna1')
</source>
A few antennas look a little noisier, but nothing bad enough to flag for now.
 
Finally, we examine the corrected data for 3C84:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='3', \
      xaxis='frequency', yaxis='amp', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='8', \
      avgtime='1000s', coloraxis='baseline')
</source>
In general, it looks good, though there is one rather suspicious baseline dropping below the rest of the data.  Box a few data points and use the "Locate" button to find that this is ea03&ea07.  Plotting the same baseline for 3C147, we see that it doesn't look the best there either -- so we will flag this baseline:
 
<source lang="python">
# In CASA
flagdata(vis='G192_flagged_6s.ms', antenna='ea03&ea07')
</source>
 
Now, let's plot amplitude vs. baseline:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='3', \
      xaxis='baseline', yaxis='amp', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='8', \
      avgtime='1000s', coloraxis='antenna1')
</source>
Looks good!
 
Finally, let's plot amplitude vs. phase:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms', field='3', \
      xaxis='phase', yaxis='amp', \
      xdatacolumn='corrected', \
      ydatacolumn='corrected', spw='*:5~122', \
      averagedata=True, avgchannel='8', \
      avgtime='1000s', coloraxis='baseline')
</source>
There is less than 2 degrees of phase scatter, and a plot vs. frequency shows that this is mostly in the highest frequencies.  We will keep all these data.
 
== A Quick Recalibration ==
 
Since we flagged additional data, we will now go back and recalibrate:
 
<source lang="python">
# In CASA
# Clear the corrected data and model from header
clearcal('G192_flagged_6s.ms', addmodel=False)
#
setjy(vis='G192_flagged_6s.ms', field='0', scalebychan=True, \
      modimage='3C147_A.im')
#
setjy(vis='G192_flagged_6s.ms', field='3', scalebychan=True, \
      fluxdensity=[29.8756, 0, 0, 0], spix=-0.598929, \
      reffreq='32.4488GHz')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G0.b.2', field='3', \
        spw='*:60~68', gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                                  'calG192.opacity'], \
        gaintype='G', refant='ea05', calmode='p', solint='int', minsnr=3)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.K0.b.2', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                  'calG192.G0.b.2', 'calG192.opacity'], \
        field='3', spw='*:5~122', gaintype='K', \
        refant='ea05', solint='inf', minsnr=3)
#
bandpass(vis='G192_flagged_6s.ms', caltable='calG192.B0.b.2', \
        gaintable=['calG192.gaincurve', 'calG192.requantizer', \
                    'calG192.G0.b.2', 'calG192.K0.b.2', 'calG192.opacity'], \
        field='3', refant='ea05', solnorm=False, \
        bandtype='B', solint='inf')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.int.2', \
        gaintable=['calG192.requantizer','calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b.2','calG192.B0.b.2'], \
        field='0', refant='ea05', solnorm=F, \
        solint='int', gaintype='G', calmode='p')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.int.2', \
        gaintable=['calG192.requantizer','calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b.2','calG192.B0.b.2'], \
        field='1', refant='ea05', solnorm=F, \
        solint='12s', gaintype='G', calmode='p', \
        append=True)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.int.2', \
        gaintable=['calG192.requantizer','calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b.2','calG192.B0.b.2'], \
        field='3', refant='ea05', solnorm=F, \
        solint='int', gaintype='G', calmode='p', \
        append=True)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G1.inf.2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', \
                  'calG192.K0.b.2', 'calG192.B0.b.2'], \
        field='1', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='p')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G2.2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', 'calG192.K0.b.2', \
                  'calG192.B0.b.2', 'calG192.G1.int.2'], \
        gainfield=['', '', '', '3', '3', '0'], \
        interp=['', '', '', 'nearest', 'nearest', 'nearest'], \
        field='0', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='a')
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G2.2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', 'calG192.K0.b.2', \
                  'calG192.B0.b.2', 'calG192.G1.int.2'], \
        gainfield=['', '', '', '3', '3', '1'], \
        interp=['', '', '', 'nearest', 'nearest', 'nearest'], \
        field='1', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='a', append=True)
#
gaincal(vis='G192_flagged_6s.ms', caltable='calG192.G2.2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                  'calG192.opacity', 'calG192.K0.b.2', \
                  'calG192.B0.b.2', 'calG192.G1.int.2'], \
        gainfield=['', '', '', '3', '3', '3'], \
        interp=['', '', '', 'nearest', 'nearest', 'nearest'], \
        field='3', refant='ea05', solnorm=F, \
        solint='inf', gaintype='G', calmode='a', append=True)
#
flux3 = fluxscale(vis='G192_flagged_6s.ms', caltable='calG192.G2.2', \
                  fluxtable='calG192.F2.2', reference='0')
#
applycal(vis='G192_flagged_6s.ms', field='0', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b.2', \
                    'calG192.B0.b.2', 'calG192.G1.int.2', \
                    'calG192.G2.2'], \
        gainfield=['', '', '', '', '', '0', '0'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'nearest'], calwt=False)
#
applycal(vis='G192_flagged_6s.ms', field='1', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b.2', \
                    'calG192.B0.b.2', 'calG192.G1.int.2', \
                    'calG192.G2.2'], \
        gainfield=['', '', '', '', '', '1', '1'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'nearest'], calwt=False)
#
applycal(vis='G192_flagged_6s.ms', field='2', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b.2', \
                    'calG192.B0.b.2', 'calG192.G1.inf.2', \
                    'calG192.G2.2'], \
        gainfield=['', '', '', '', '', '1', '1'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'linear'], calwt=False)
#
applycal(vis='G192_flagged_6s.ms', field='3', \
        gaintable=['calG192.requantizer', 'calG192.gaincurve', \
                    'calG192.opacity', 'calG192.K0.b.2', \
                    'calG192.B0.b.2', 'calG192.G1.int.2', \
                    'calG192.G2.2'], \
        gainfield=['', '', '', '', '', '3', '3'],
        interp=['', '', '', 'nearest', 'nearest', 'linear', \
                'nearest'], calwt=False)
</source>
 
# Started recal at 10 am
 
 
 
 
The {{fluxscale}} output this time around is slightly different to the last:
<pre>
</pre>
The inability of this run to get a spectral index and curvature is due to the flagged/missing solutions for spw 12 and 13. The code will be fixed in an upcoming release to not give this error.
 
The source spectrum plot now looks somewhat better:
 
[[Image:plotG192_plotms_reproc_fld0_ampavg_4.0.png|200px|thumb|right|plotms recalibrated applied flagged fld0 amp averaged]]
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms',field='0', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      correlation='RR,LL',avgbaseline=True,avgtime='60000s',
      xaxis='frequency',yaxis='amp',ydatacolumn='corrected',
      customsymbol=True,symbolshape='circle',symbolsize=2)
</source>
As you see in the figure to the right, there are still spectral window to window variations that deviate from a smooth spectrum. This is due to noise in the {{fluxscale}} median filter now used in CASA 4.0 (in this well-calibrated case, the old weighted means used by {{fluxscale}} in CASA3.4 behaved better). If we use {{plotcal}} to plot the solutions versus antenna
<source lang="python">
# In CASA
plotcal(caltable='calG192.G2.3',xaxis='antenna',yaxis='amp',field='0',
        subplot=211,plotrange=[-1,-1,0.9,1.1])
plotcal(caltable='calG192.G2.3',xaxis='antenna',yaxis='amp',field='2',
        subplot=212,plotrange=[-1,-1,0.9,1.1],figfile='plotG192_plotcal_G2.3_ampant.png')
</source>
we see that there are variations that will enter into the medians. Some antennas are better behaved than others, for example ea12 (index 10) seems better than most.
 
[[Image:plotG192_plotcal_G2.3_ampant.png|200px|thumb|right|plotcal of G2.3 table, showing variation of solutions per antenna]]
[[Image:screenshotPlotG192_plotcal_fluxedit3_ea12.png|200px|thumb|right|plotcal of G2.3.ea12 table, marking all solutions but those for ea12 for flagging]]
[[Image:screenshotPlotG192_plotms_recalibrated3_EA12_fld0_amp_4.0.png|200px|thumb|right|plotms for fld 0 after application of F2.3.ea12 table]]
Because we are applying an incremental correction for the flux scale, we have the latitude to change the caltable that goes into {{fluxscale}} to get a better result. For example, we can restrict the antennas that are used to derive the scale. Although there is not yet antenna selection in {{fluxscale}} itself, we can edit the caltable using {{plotcal}}. For example, make a copy of the G2.3 caltable and select only a single antenna:
<source lang="python">
# In CASA
os.system('cp -rf calG192.G2.3 calG192.G2.3.ea12')
plotcal(caltable='calG192.G2.3.ea12',xaxis='antenna',yaxis='amp')
</source>
In the plot to the right we show the GUI where we have boxed all but antenna ea12.
Now we carry on with the {{fluxscale}} and {{applycal}}:
<source lang="python">
# In CASA
myfluxEdit3 = fluxscale(vis='G192_flagged_6s.ms',caltable='calG192.G2.3.ea12',
                        fluxtable='calG192.F2.3.ea12',reference='2',transfer='0',
                        incremental=True)
#
applycal(vis='G192_flagged_6s.ms',field='0',spw='0~11',
        gaintable=['calG192.antpos','calG192.gaincurve','calG192.K0.2',
                    'calG192.B0.2','calG192.G1.2int','calG192.G2.2',
                    'calG192.F2.3.ea12'],
        gainfield=['','','','','0','0','0'],
        interp=['','','nearest','nearest','nearest','nearest',''],
        parang=False,calwt=False,gaincurve=False)
#
applycal(vis='G192_flagged_6s.ms',field='1',spw='0~11',
        gaintable=['calG192.antpos','calG192.gaincurve','calG192.K0.2',
                    'calG192.B0.2','calG192.G1.2inf','calG192.G2.2',
                    'calG192.F2.3.ea12'],
        gainfield=['','','','','0','0','0'],
        interp=['','','nearest','nearest','linear','linear',''],
        parang=False,calwt=False,gaincurve=False)
</source>
The results appear better:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms',field='0', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      correlation='RR,LL',avgbaseline=True,avgtime='60000s',
      xaxis='frequency',yaxis='amp',ydatacolumn='corrected',
      customsymbol=True,symbolshape='circle',symbolsize=2)
</source>
Note that if you choose a different antenna than ea12 to use for this, you will get
different results, usually worse. But this procedure illustrates how to use the
incremental solutions from {{fluxscale}} to your possible advantage.
 
We now return to examining our calibration.
 
We can also plot the corrected phase - looks good:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms',field='0', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      correlation='RR,LL',xaxis='frequency',yaxis='phase',ydatacolumn='corrected')
</source>
 
We can average over baseline and each scan:
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms',field='0', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      correlation='RR,LL',avgbaseline=True,avgtime='600s',
      xaxis='frequency',yaxis='phase',ydatacolumn='corrected')
</source>
[[Image:plotG192_plotms_appliedflags_fld0_phaseavg.png|200px|thumb|right|plotms cal applied flagged fld0 phase averaged]]
 
In this case, we can see the residual effect of the EVLA "delay clunking" described above, but it is reduced due to the averaging that we applied, but it is still there.
 
You can look at the target source field='1', but there are lots of data so you will need to do a lot of averaging.
For example:
 
<source lang="python">
# In CASA
plotms(vis='G192_flagged_6s.ms',field='1',avgtime='300s', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      correlation='RR,LL',xaxis='frequency',yaxis='amp',ydatacolumn='corrected')
</source>
 
Alas, the upper baseband still has lots of low level RFI.
 
Now split off the data for calibrators and target, to avoid later issues that can corrupt the MSs.  We don't keep spw 12-15, since they weren't included in the last round of calibration, and we don't plan to image them.
 
<source lang="python">
# In CASA
# Remove any existing split data, otherwise split will not happen
os.system('rm -rf G192_split10s.ms')
split(vis='G192_flagged_6s.ms',outputvis='G192_split10s.ms', \
      datacolumn='corrected',field='1',spw='0~11')
#
# Remove any existing split data, otherwise split will not happen
os.system('rm -rf G192_3c28610s.ms')
split(vis='G192_flagged_6s.ms',outputvis='G192_3c28610s.ms', \
      datacolumn='corrected',field='2',spw='0~11')
#
# Remove any existing split data, otherwise split will not happen
os.system('rm -rf G192_J092510s.ms')
split(vis='G192_flagged_6s.ms',outputvis='G192_J092510s.ms', \
      datacolumn='corrected',field='0',spw='0~11')
</source>
 
== Imaging ==
 
This is EVLA D-configuration data at C-band.  To determine the best parameters for imaging, it helps to start with the relevant information in the [http://evlaguides.nrao.edu/index.php?title=Observational_Status_Summary_-_Current Observational Status Summary]:
 
* Synthesized beam should be 12" at 6 GHz with primary beam field of view of 7.5 arcmin (450")
 
Our data spans 4.5-7.5 GHz: this is a relatively large fractional bandwidth, resulting in substantial variation of the field of view over the entire frequency range.  FOV = 45 arcmin / Frequency (GHz), giving 10 arcmin at 4.5 GHz, and 6 arcmin at 7.5 GHz.  Likewise, the synthesized beam ranges from 16" at 4.5 GHz to 9.6" at 7.5 GHz.  We want to subsample the synthesized beam by a factor of 3-4, so will use a cellsize of 3".  To cover the full FOV (keeping it at the inner part of the image) at the lowest frequencies, we will want an image size of >400 pixels, or >20 arcmin.
 
We will also use the Briggs robust (with <tt>robust=0.5</tt>) weighting, which is a compromise between uniform and natural weighting,
and will give reasonable resolution but will allow us to still see larger scale structure.
 
Due to the numerology of [http://www.fftw.org/ FFTW's] (which {{clean}} uses under the hood for FFTs) optimal sizes,
<tt>imsize</tt> should be composite number with two and only two prime factors chosen from
2, 3, and 5.  Taking into account the x1.2 padding that clean uses internally to the imsize
you give it (and 1.2 = 2*3/5), we choose 640 or 1280 as our imsize (640 = 2^7*5). Other
reasonable sets would be 405, 1215, etc. (405 = 3^4*5) or 432, 648, 1296 (these are 2^n*3^m*5).
In practice, if you give it non-optimal values for imsize, you may find that the transforms
take a bit longer, which is noticeable if you are doing interactive clean.
 
WARNING: By default, a single-field nterms=1 clean does NOT use Cotton-Schwab (CS) clean to break
into major cycles going back to data residuals, it just does cleaning in a bunch of minor
cycles in the image plane.  This can give much poorer imaging quality in cases with poor
uv coverage (snapshots) or in the case of complex emission structure (like ours) -- clean tends to
diverge in this case.  You should explicitly set <tt>imagermode='csclean'</tt> in your
call to clean.  Also, in our case the psf is very good using mfs, so by default it will not
take many major cycle breaks.  We use the <tt>cyclefactor</tt> parameter to control this, which
sets the break threshold to be cyclefactor times the max psf sidelobe level (outside the main
peak).  We start at <tt>cyclefactor=1.5</tt> in a single spw, and ratchet it up to 4.5 when we
clean all the spw.  This seems to work ok.  Rule of thumb is if it is gobbling up many hundreds of
clean iterations in the minor cycles early on, increase cyclefactor.  Conversely, if your psf is poor
but you source structure is simple, you can reduce cyclefactor (e.g. below 1) to stop it from taking
lots of extra major cycles.
 
For more information on using {{clean}}, in particular on using the interactive GUI, see
[[EVLA_Continuum_Tutorial_3C391#Imaging]]. WARNING: In CASA 4.0 the GUI interface for clean
and the viewer has changed slightly. Some of the screenshots shown below may differ slightly
from what you see.
 
NOTE: If you are pressed for time, then you might want to jump ahead to
[[EVLA_6-cm_Wideband_Tutorial_G192_(Caltech)#Cleaning_the_lower_baseband_using_two_MFS_Taylor_terms]]
and while it is cleaning you can read the other Imaging descriptions.
 
=== Cleaning a single spectral window ===
 
Let us start by interactively cleaning one of the lower baseband spw (spw 5 in this example).
NOTE: this first time will take a few minutes at start to create scratch columns
in the MS in case we want to do self-calibration later.
 
'''Note that interrupting {{clean}} by Ctrl+C may corrupt your visibilities -- you may be better off choosing to let {{clean}} finish.  We are currently implementing a command that will nicely exit to prevent this from happening, but for the moment try to avoid Ctrl+C.'''
 
[[Image:viewG192_spw5_clean640_4.0.png|200px|thumb|right|interactive clean spw5 640x640 after around 1000 iterations]]
[[Image:viewG192_spw5_clean1280.png|200px|thumb|right|2nd interactive clean spw5 1280x1280 before cleaning]]
[[Image:viewG192_spw5_clean1280final_4.0.png|200px|thumb|right|viewer showing clean spw5 1280x1280 restored image]]
 
<source lang="python">
# In CASA
# Removing any previous cleaning information
# This assumes you want to start this clean from scratch
# If you want to continue this from a previous clean run,
# the rm -rf system command should be be skipped
os.system ('rm -rf imgG192_6s_spw5_clean640*')
clean(vis='G192_split10s.ms',spw='5:4~59', \
      imagename='imgG192_6s_spw5_clean640', \
      mode='mfs',nterms=1,niter=10000,gain=0.1,threshold='0.0mJy', \
      psfmode='clark',imsize=[640,640],cell=['3.0arcsec'],stokes='I', \
      imagermode='csclean', cyclefactor=1.5, \
      weighting='briggs',robust=0.5,interactive=True)
</source>
 
* Start carefully by boxing the bright source and setting iterations to 10 at first
* Gradually add more boxes and increase the number of iterations
* Since this is not much more than a snapshot you see the six-fold sidelobe pattern
of the extended emission in the center of the map. This decreases as you clean
out this emission.
* Stop cleaning when the residuals look like noise (and you cannot clearly see sources).
* To stop, click the red [[File:clean-stop.png]] button.
 
The top figure to the right shows a zoom in on the end state of the clean, where
we have marked a number of boxes and cleaned them out.
 
Note that there are some strange sidelobe patterns in lower left, possibly
from a source outside the image area.  We can make a bigger image starting from
our current model:
 
<source lang="python">
# In CASA
# Removing any previous cleaning information
# This assumes you want to start this clean from scratch
# If you want to continue this from a previous clean run,
# the rm -rf system command should be skipped
os.system ('rm -rf imgG192_6s_spw5_clean1280*')
clean(vis='G192_split10s.ms',spw='5:4~59', \
      imagename='imgG192_6s_spw5_clean1280', \
      mode='mfs',nterms=1,niter=10000,gain=0.1,threshold='0.0mJy', \
      psfmode='clark',imsize=[1280,1280],cell=['3.0arcsec'],stokes='I', \
      imagermode='csclean', cyclefactor=1.5, \
      modelimage='imgG192_6s_spw5_clean640.model', \
      weighting='briggs',robust=0.5,interactive=True)
</source>
 
Sure enough, there is a bright source near the lower left (see middle panel at right).
Box it, clean it a bit, and look again.  There is a second source in the mid-left (track
it down by its sidelobes). Box this one, clean it a bit, and when satisfied stop.
 
You can use the CASA {{viewer}} to display the images that {{clean}} creates.  If you need more guidance
on using the viewer, see the [http://casa.nrao.edu/CasaViewerDemo/casaViewerDemo.html CASA Viewer Demo] video
(note that this is for a much earlier version of the viewer, and the interface has changed since then).
 
Bring up your restored image directly:
<source lang="python">
# In CASA
viewer('imgG192_6s_spw5_clean1280.image')
</source>
 
The restored image is shown in the bottom panel to the right.  I have chosen the Grayscale1 instead of default color
map as I prefer "Grayscale" to false color "Rainbow" for assessing image quality.  Also, you can change the scaling of the image using the "scaling power cycles" slider under "basic settings".
 
Check the rms of the residuals using the {{imstat}} task:
<source lang="python">
# In CASA
mystat = imstat('imgG192_6s_spw5_clean1280.residual')
print 'Residual standard deviation = '+str(mystat['sigma'][0])
</source>
In this particular case, it's 31.8 uJy; yours will likely be slightly different.
 
=== Cleaning the lower baseband ===
 
[[Image:viewG192_spw0to7_clean1280final.png|200px|thumb|right|clean spw0-7 restored image center]]
Now, image the entire lower baseband (spw 0-7).
Follow same iterative procedure as before, and get the best
residuals you can without "cleaning the noise". 
 
* Because of the bandwidth and frequency synthesis, the sidelobe pattern is different than before and it is much easier to see fainter emission.
* Be careful cleaning sources that lie near or on sidelobe splotches.
* Clean the central emission region way down first to reduce the sidelobe level before adding components in the sidelobe areas.
 
<source lang="python">
# In CASA
# Removing any previous cleaning information
# This assumes you want to start this clean from scratch
# If you want to continue this from a previous clean run,
# the rm -rf system command should be be skipped
os.system ('rm -rf imgG192_6s_spw0to7_clean1280*')
clean(vis='G192_split10s.ms',spw='0:16~59,1~6:4~59,7:4~54', \
      imagename='imgG192_6s_spw0to7_clean1280', \
      mode='mfs',nterms=1,niter=10000,gain=0.1,threshold='0.0mJy', \
      psfmode='clark',imsize=[1280,1280],cell=['3.0arcsec'],stokes='I', \
      imagermode='csclean', cyclefactor=1.5, \
      weighting='briggs',robust=0.5,interactive=True)
#
mystat = imstat('imgG192_6s_spw0to7_clean1280.residual')
print 'Residual standard deviation = '+str(mystat['sigma'][0])
</source>
 
For this run, the rms is 11.3 uJy (and there is clearly some structure left in the residual). To the right is a zoom-in on the center of the restored image.
 
==== Cleaning the lower baseband using two MFS Taylor terms ====
 
The mfs nterms=2 option creates two "Taylor Term" images - an average intensity image (with suffix <tt>.image.tt0</tt>)
and a spectral slope image (with suffix <tt>.image.tt1</tt>) which is intensity x alpha (where alpha is spectral index).
For convenience there is a spectral index image (with suffix <tt>.image.alpha</tt>).  These Taylor expansions are with respect to the "Reference Frequency" of the image (by default the center frequency of the spw selected, but can be specified using the <tt>reffreq</tt> parameter in {{clean}}). The convention for spectral index alpha is that
 
<math>
S \propto \nu^\alpha
</math>
 
so negative spectral indexes indicate a "steep" spectrum (falling with frequency).
 
[[Image:viewG192_spw0to7_mfs2clean.png|200px|thumb|right|clean spw0-7 mfs nterms=2 in progress]]
Let's try using multi-frequency synthesis with nterms=2 on the lower baseband.
The dirty beam will have lower sidelobes so we turn up <tt>cyclefactor</tt> for <tt>csclean</tt> a bit.  Note: if you're feeling a bit lazy, and trust your previous set of clean boxes, you can also set <tt>mask='imgG192_6s_spw0to7_clean1280.mask'</tt> to use these as a starting point:
 
<source lang="python">
# In CASA
# Removing any previous cleaning information
# This assumes you want to start this clean from scratch
# If you want to continue this from a previous clean run,
# the rm -rf system command should be be skipped
os.system ('rm -rf imgG192_6s_spw0to7_mfs2_clean1280*')
clean(vis='G192_split10s.ms',spw='0:16~59,1~6:4~59,7:4~54', \
      imagename='imgG192_6s_spw0to7_mfs2_clean1280', \
      mode='mfs',nterms=2,niter=10000,gain=0.1,threshold='0.0mJy', \
      psfmode='clark',imsize=[1280,1280],cell=['3.0arcsec'],stokes='I', \
      imagermode='csclean', cyclefactor=4.5, \
      weighting='briggs',robust=0.5,interactive=True,mask=[])
#
mystat = imstat('imgG192_6s_spw0to7_mfs2_clean1280.residual.tt0')
print 'Residual standard deviation = '+str(mystat['sigma'][0])
</source>
 
For this run, the rms is 10.5 uJy (somewhat better-looking than the nterms=1).
The top screenshot to the right shows an intermediate but early stage of cleaning where we are looking at
the central emission and cleaning it out slowly.
 
You can use the {{viewer}} to load the average intensity image:
 
<source lang="python">
# In CASA
viewer('imgG192_6s_spw0to7_mfs2_clean1280.image.tt0')
</source>
 
and then use the Open Data panel to load the spectral index image <tt>imgG192_6s_spw0to7_mfs2_clean1280.image.alpha</tt>
which can then be blinked (optionally plotted side-by-side using the Panel Display Options panel to set 2 panels in the x direction). 
 
[[Image:viewG192_spw0to7_mfs2loadalpha_4.0.png|200px|thumb|right|clean spw0-7 mfs nterms=2 load alpha with LEL]]
[[Image:viewG192_spw0to7_mfs2panelalpha_4.0.png|200px|thumb|right|clean spw0-7 mfs nterms=2 tt0 and alpha (filtered at 0.1mJy in tt0)]]
 
Note there is a lot of noise in alpha in the low-intensity regions, and thus filtering the alpha image based on the values in the tt0 image is desirable. You can use the {{immath}} task to make this filtered alpha image explicitly, using a
Lattice Expression Language (LEL) expression:
 
<source lang="python">
# In CASA
immath(imagename=['imgG192_6s_spw0to7_mfs2_clean1280.image.alpha',
                  'imgG192_6s_spw0to7_mfs2_clean1280.image.tt0'],
      mode='evalexpr',
      expr='IM0[IM1>1.0E-4]',
      outfile='imgG192_6s_spw0to7_mfs2_clean1280.image.alpha.filtered')
</source>
 
This will use 0.1 mJy (or 10 x the sigma we found) as the cutoff.
You can then view or manipulate the filtered alpha image as normal.
 
We can also use LEL to filter the alpha image on the intensity on-the-fly when we load this raster in the Open Data panel
by specifying a LEL string in the LEL box instead of selecting the image from the directory
listing.  The LEL string:
 
<pre>
'imgG192_6s_spw0to7_mfs2_clean1280.image.alpha'['imgG192_6s_spw0to7_mfs2_clean1280.image.tt0'>1.0E-04]
</pre>
 
will replicate what we did above. The middle figure to the right shows the Open Data panel
with our LEL string in it.  Just click the Raster button to load this.
 
The lower panel to the right shows the intensity and LEL-filtered alpha images side-by-side in the viewer, zoomed
in on the galaxy emission.  Mousing over the alpha shows spectral indexes ranging from -1 to +1 in the center, with
the brightest emission with alpha -0.7 in the knots in the disk.
 
=== Cleaning using both basebands combined ===
 
For the ultimate image, use the "clean" part of the upper baseband in addition
to the lower (use spw 0-11). We will use mfs with nterms=2 (if you try nterms=1
on this wide bandwidth you will get much poorer residuals). Because of the added
work and extra data involved, this will take much longer than our other runs of
clean.  Therefore, we will get a head start by doing a non-interactive clean using
the mask left from the previous clean (spw 0-7). We will insert a clean threshold
to limit runaway cleaning too far beneath the noise level.
 
This will take a while, especially if there are other processes running on your machine (with nothing else running, expect ~30-40 minutes).
 
<source lang="python">
# In CASA
# Removing any previous cleaning information
# This assumes you want to start this clean from scratch
# If you want to continue this from a previous clean run,
# the rm -rf system command should be be skipped
os.system ('rm -rf imgG192_6s_spw0to11_mfs2_clean1280*')
clean(vis='G192_split10s.ms', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      imagename='imgG192_6s_spw0to11_mfs2_clean1280', \
      mode='mfs',nterms=2,niter=3000,gain=0.1,threshold='0.002mJy', \
      psfmode='clark',imsize=[1280,1280],cell=['3.0arcsec'],stokes='I', \
      imagermode='csclean', cyclefactor=4.5, \
      mask=['imgG192_6s_spw0to7_mfs2_clean1280.mask'], \
      weighting='briggs',robust=0.5,interactive=False)
#
mystat = imstat('imgG192_6s_spw0to11_mfs2_clean1280.residual.tt0')
print 'Residual standard deviation = '+str(mystat['sigma'][0])
</source>
 
For this particular run, the rms was 8.9 uJy (noticeably better than the lower baseband only results).
 
[[Image:viewG192 spw0to11_mfs2resid.png|200px|thumb|right|final residual and mask]]
 
Let us see if there is more to clean.  Bring this up in interactive mode:
 
<source lang="python">
# In CASA
clean(vis='G192_split10s.ms', \
      spw='0:16~59,1~6:4~59,7:4~54,8:30~59,9~10:4~59,11:4~19;21~59', \
      imagename='imgG192_6s_spw0to11_mfs2_clean1280', \
      mode='mfs',nterms=2,niter=3000,gain=0.1,threshold='0.001mJy', \
      psfmode='clark',imsize=[1280,1280],cell=['3.0arcsec'],stokes='I', \
      imagermode='csclean', cyclefactor=4.5, \
      weighting='briggs',robust=0.5,interactive=True)
</source>
 
You might find a few more sources revealed in the outer parts of the image, and also more
emission around the galaxy disk in the center.  Try drawing new boxes, perhaps extend the box
in the center, and do ~100-1000 more iterations.  At the end, what is left should be dominated
by the error patterns from mis-calibration.  Only self-calibration will get rid of
these. Stop cleaning for now. See the figure to the right for the interactive display panel
showing final residuals and mask (changing the colormap to <tt>Greyscale 1</tt>).
 
Check the residual levels:
<source lang="python">
# In CASA
mystat = imstat('imgG192_6s_spw0to11_mfs2_clean1280.residual.tt0')
sigma = mystat['sigma'][0]
print 'Residual standard deviation = '+str(mystat['sigma'][0])
</source>
 
The final rms achieved here is 8.6 uJy; slightly better.
 
== Analyzing the image ==
 
Let's see how close we got to expected noise and dynamic range:
 
<source lang="python">
# In CASA
mystat = imstat('imgG192_6s_spw0to11_mfs2_clean1280.image.tt0')
peak = mystat['max'][0]
print 'Image max flux = '+str(mystat['max'][0])
#
mystat = imstat('imgG192_6s_spw0to11_mfs2_clean1280.model.tt0')
total = mystat['sum'][0]
print 'Model total flux = '+str(mystat['sum'][0])
#
snr = peak/sigma
print 'G192 peak S/N = '+str(snr)
#
snr = total/sigma
print 'G192 total S/N = '+str(snr)
</source>
The output gives:
<pre>
Residual standard deviation = 8.60710739215e-06
Image max flux = 0.00995589420199
Model total flux = 0.0371581438531
G192 peak S/N = 1156.70616717
G192 total S/N = 4317.14653485
</pre>
 
What do we expect? If we do {{listobs}} on this MS we see the scans:
<pre>
  Date        Timerange (UTC)          Scan  FldId FieldName          nRows  Int(s) 
  11-Jul-2010/21:38:44.0 - 21:39:51.0    9      0 G192            33696  9.16   
              21:40:01.0 - 21:41:20.5    10      0 G192            37908  9.89   
              21:41:30.0 - 21:42:50.0    11      0 G192            37908  10     
              21:43:00.0 - 21:44:20.0    12      0 G192            37908  10     
              21:44:30.0 - 21:45:50.0    13      0 G192            37908  10     
              21:46:00.0 - 21:47:19.5    14      0 G192            37908  9.89   
              21:47:29.0 - 21:47:49.0    15      0 G192            12636  9.67   
              21:49:42.0 - 21:50:49.0    17      0 G192            33696  9.17   
              21:50:59.0 - 21:52:19.0    18      0 G192            37908  10     
              21:52:29.0 - 21:53:48.5    19      0 G192            37908  9.89   
              21:53:58.0 - 21:55:18.0    20      0 G192            37908  10     
              21:55:28.0 - 21:56:48.0    21      0 G192            37908  10     
              21:56:58.0 - 21:58:18.0    22      0 G192            37908  10     
              21:58:28.0 - 21:58:47.5    23      0 G192            12636  9.67   
              22:00:39.5 - 22:01:47.0    25      0 G192            33696  9.18   
              22:01:57.0 - 22:03:17.0    26      0 G192            37908  10     
              22:03:27.0 - 22:04:47.0    27      0 G192            37908  10     
              22:04:57.0 - 22:06:16.5    28      0 G192            37908  9.89   
              22:06:26.0 - 22:07:46.0    29      0 G192            37908  10     
              22:07:56.0 - 22:09:16.0    30      0 G192            37908  10     
              22:09:26.0 - 22:09:45.5    31      0 G192            12636  9.67   
              22:11:38.0 - 22:12:45.5    33      0 G192            33696  9.19   
              22:12:55.0 - 22:14:15.0    34      0 G192            37908  10     
              22:14:25.0 - 22:15:45.0    35      0 G192            37908  10     
              22:15:55.0 - 22:17:15.0    36      0 G192            37908  10     
              22:17:25.0 - 22:18:44.5    37      0 G192            37908  9.89   
              22:18:54.0 - 22:20:14.0    38      0 G192            37908  10     
              22:20:24.0 - 22:20:43.5    39      0 G192            12636  9.67   
          (nVis = Total number of time/baseline visibilities per scan)
</pre>
(listing columns truncated) and we estimate about 37 minutes on target. We had about 25 antennas on average, and our spw selection picked out 610 channels (2 MHz each) for a total of 1220 MHz bandwidth.  If we plug this
into the
[https://science.nrao.edu/facilities/evla/calibration-and-tools/exposure EVLA exposure calculator], at 5 GHz, we find that we expect a rms thermal noise level of 8.7 uJy, and at 7 GHz, 7.0 uJy.  So, our values are within the expected range (a bit higher than theoretical, but that's expected). 
 
[[Image:plotG192_viewerfinal.png|200px|thumb|right|final image]]
Look at this in the viewer:
<source lang="python">
# In CASA
viewer('imgG192_6s_spw0to11_mfs2_clean1280.image.tt0')
</source>
Zoom in on the center (see figure to the right).
 
[[Image:viewG192_spw0to11_mfs2tt1.png|200px|thumb|right|final tt1 image with box]]
In the previous section we demonstrated how to process and display the spectral index image. You can do
the same for this final image.  Here, we will do some rough analysis on the spectral index to determine
an intensity-weighted mean spectral index over the core region.
The <tt>.image.tt1</tt> from our mfs is an intensity times alpha image.  See the figure to the right.
Let's gate the Taylor-term images on intensity:
<source lang="python">
# In CASA
# Removing any file output from previous runs, so immath will proceed
os.system('rm -rf imgG192_6s_spw0to11_mfs2_clean1280.image.tt1.filtered')
immath(imagename=['imgG192_6s_spw0to11_mfs2_clean1280.image.tt1',
                  'imgG192_6s_spw0to11_mfs2_clean1280.image.tt0'],
      mode='evalexpr',
      expr='IM0[IM1>5.0E-5]',
      outfile='imgG192_6s_spw0to11_mfs2_clean1280.image.tt1.filtered')
#
# Removing any file output from previous runs, so immath will proceed
os.system('rm -rf imgG192_6s_spw0to11_mfs2_clean1280.image.tt0.filtered')
immath(imagename=['imgG192_6s_spw0to11_mfs2_clean1280.image.tt0'],
      mode='evalexpr',
      expr='IM0[IM0>5.0E-5]',
      outfile='imgG192_6s_spw0to11_mfs2_clean1280.image.tt0.filtered')
</source>
 
We can identify a box containing the central emission (see figure of tt1 in viewer) and note the corners.
(We could also use the region tools from the viewer, but that is for another exercise.)
Let us compute the intensity-weighted spectral index over this box by averaging
these masked images using {{imstat}} and computing the ratio:
<source lang="python">
# In CASA
mystat = imstat('imgG192_6s_spw0to11_mfs2_clean1280.image.tt1.filtered',
                box='503,533,756,762')
avgtt0alpha = mystat['mean'][0]
#
mystat = imstat('imgG192_6s_spw0to11_mfs2_clean1280.image.tt0.filtered',
                box='503,533,756,762')
avgtt0 = mystat['mean'][0]
avgalpha = avgtt0alpha/avgtt0
print 'G192 I-weighted Alpha = '+str(avgalpha)
</source>
We get
<pre>
G192 I-weighted Alpha = -1.38157453384
</pre>
 
The emission in this source is on the steep side. At this point we do not know how reliable this is or
what we expect (though our calibrators come out with correct spectral indexes if we image them the
same way). But this illustrates a way to extract spectral information from our wideband mfs images.
 
== Comparing with the Optical/Infrared ==
 
As a final comparison, we turn to the Sloan Digital Sky Survey (SDSS) and a cutout image of our galaxy:
[[Image:NGC_2967_UGC_5180_IRAS_09394+0033_irg.jpg|400px|thumb|center|]]
from their [http://cosmo.nyu.edu/hogg/rc3/NGC_2967_UGC_5180_IRAS_09394+0033_irg.jpg RC3]
album (courtesy D.Hogg, M.Blanton, SDSS collaboration - see [[#Credits]]). This looks like a nice nearby
face-on spiral galaxy. How does our 6cm continuum emission line up with the optical?
 
Here is the EVLA 6cm image side by side with a i-band image from the Sloan Digital Sky Survey (SDSS) registered to our image:
 
[[Image:plotG192 viewerfinalandSDSS.png|600px|thumb|center|final and sdss image]]
 
You can also find this image, named <tt>NGC_2967_UGC_5180_IRAS_09394+0033-i.fits</tt>, on the web at <tt>http://casa.nrao.edu/Data/EVLA/G192/NGC_2967_UGC_5180_IRAS_09394+0033-i.fits</tt> (at the CASA workshop, it's in <tt>/data/casa/evla/</tt> or a similar location that will be given to you in the instructions). Load it into your viewer, and blink against our 6cm image.
 
We can also plot one as a raster and the other overlaid as contours. You can load the SDSS image
from the viewer Load Data panel and fiddle with contours. Once you know contour levels, you can
also use the imview task to load a raster and contour image:
 
<source lang="python">
# In CASA
imview(raster={ 'file' : 'imgG192_6s_spw0to11_mfs2_clean1280.image.tt0'},
      contour = { 'file' : 'NGC_2967_UGC_5180_IRAS_09394+0033-i.fits',
                  'levels' : [0.2, 0.5, 1, 1.5, 3],
                  'base' : 0.0,
                  'unit' : 1.0 } )
</source>
 
The figure below shows the SDSS contours overlaid on our 6cm image (after fiddling with the
colormap shift/slope for the EVLA raster image).
 
[[Image:viewG192_spw0to11_mfs2tt0plusSDSS.png|400px|thumb|center|6cm EVLA raster plus SDSS i-band contours]]
 
Likewise, we can plot the SDSS image as a raster and overlay EVLA 6cm contours:
 
<source lang="python">
# In CASA
imview(raster={ 'file' : 'NGC_2967_UGC_5180_IRAS_09394+0033-i.fits',
                'scaling' : -2.0,
                'range' : [0,10] },
      contour = { 'file' : 'imgG192_6s_spw0to11_mfs2_clean1280.image.tt0',
                  'levels' : [0.04, 0.08, 0.16, 0.32, 0.64, 1.28, 2.56],
                  'base' : 0.0,
                  'unit' : 0.001 },
      zoom = { 'blc' : [397,300],
                'trc' : [1567,1231] } )
</source>
 
This is shown in the figure below.  Is the compact 6cm emission in upper left associated with a
spiral arm?
 
[[Image:viewG192_spw0to11_SDSSiplusEVLA6cm.png|400px|thumb|center|SDSS i-band raster plus EVLA 6cm contours]]
 
== What to do next: some exercises for the user ==
 
Here are a number of things you can try after completing this tutorial:
 
# Use self-calibration to improve the data and re-clean to make a better image.  See [http://casaguides.nrao.edu/index.php?title=WorkshopSelfcal_(Caltech) this tutorial] for more information on self-calibration.
# Use multi-scale clean by adding non-zero scales to the <tt>multiscale</tt> parameter.
# Image the calibrators.  What sort of dynamic range can you get on them?  Is self-calibration needed (and if so what dynamic range do you get when you use it)?
# Try the <tt>testautoflag</tt> task (in 3.3.0 and later) to automatically flag RFI from the upper sideband.  There is more information on running <tt>testautoflag</tt> in [http://casaguides.nrao.edu/index.php?title=EVLA_Wide-Band_Wide-Field_Imaging:_G55.7_3.4_(Caltech) this tutorial].
 
== Credits ==
 
The EVLA data was taken by A. Soderberg et al. as part of project AS1015. See
[https://science.nrao.edu/enews/3.8/index.shtml#evlanoise NRAO eNews 3.8] (1-Sep-2010) for more on this result.
 
<blockquote><i>
The Expanded Very Large Array (EVLA) is a partnership of the United States, Canada, and Mexico. The EVLA is funded in the United States by the National Science Foundation, in Canada by the National Research Council, and in Mexico by the Comisión Nacional de Investigación Científica y Tecnológica (CONICyT).
</i></blockquote>
 
<blockquote><i>
The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc.
</i></blockquote>
 
SDSS image courtesy David Hogg & Michael Blanton, private communication.  Data comes from
SDSS DR7, see [http://adsabs.harvard.edu/abs/2009ApJS..182..543A Abazajian et. al 2009].
 
<blockquote><i>
Funding for the SDSS and SDSS-II has been provided by the Alfred P. Sloan Foundation, the Participating Institutions, the National Science Foundation, the U.S. Department of Energy, the National Aeronautics and Space Administration, the Japanese Monbukagakusho, the Max Planck Society, and the Higher Education Funding Council for England. The SDSS Web Site is [http://www.sdss.org/].
</i></blockquote>
 
<blockquote><i>
The SDSS is managed by the Astrophysical Research Consortium for the Participating Institutions. The Participating Institutions are the American Museum of Natural History, Astrophysical Institute Potsdam, University of Basel, University of Cambridge, Case Western Reserve University, University of Chicago, Drexel University, Fermilab, the Institute for Advanced Study, the Japan Participation Group, Johns Hopkins University, the Joint Institute for Nuclear Astrophysics, the Kavli Institute for Particle Astrophysics and Cosmology, the Korean Scientist Group, the Chinese Academy of Sciences (LAMOST), Los Alamos National Laboratory, the Max-Planck-Institute for Astronomy (MPIA), the Max-Planck-Institute for Astrophysics (MPA), New Mexico State University, Ohio State University, University of Pittsburgh, University of Portsmouth, Princeton University, the United States Naval Observatory, and the University of Washington.
</i></blockquote>
 
{{Checked 4.1.0}}

Latest revision as of 13:56, 12 November 2015