User talk:Preshanthj: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Preshanthj (talk | contribs)
 
Preshanthj (talk | contribs)
No edit summary
Line 1: Line 1:
== CASA Guide G55.7+3.4 ==
Back to [[Main Page | '''CASA guides''']]


* '''This CASA Guide is designed for CASA v4.3.1 the current casa-release.'''
By [https://safe.nrao.edu/wiki/bin/view/Main/HuibIntemaWebHome Huib Intema]    & Preshanth Jagannathan
 
{{Checked 4.3.1}}


[[EVLA Wide-Band Wide-Field Imaging: G55.7 - CASA4.2]]


== Overview ==
== Overview ==


This CASA Guide describes the imaging of the supernova remnant [http://simbad.u-strasbg.fr/simbad/sim-id?Ident=SNR+G055.7%2B03.4&NbIdent=1&Radius=2&Radius.unit=arcmin&submit=submit+id G55.7+3.4.]. The data were taken on August 23, 2010, in the first D-configuration for which the new wide-band capabilities of the WIDAR correlator were available.  The 8-hour-long observation includes all available 1 GHz of bandwidth in L-band, from 1-2 GHz in frequency.
This webpage provides a basic description on how to use CASA to reduce data from the upper part of the new VLA low-band system, also known as P-band, covering roughly 220-480 MHz. The goal is to make a wide-field continuum stokes I image of a typical blank field using the full effective bandwidth.
 
== Obtaining the raw data ==


== Obtaining the data ==
For this guide we'll use some test data that was taken in B-configuration. To get a copy of the raw data, go to the [https://archive.nrao.edu/archive/advquery.jsp NRAO archive query page], and enter the following search parameters (leave the rest on default):


A copy of the data can be downloaded here: [http://casa.nrao.edu/Data/EVLA/G55/G55.7+3.4_10s.ms.tar.gz http://casa.nrao.edu/Data/EVLA/G55/G55.7+3.4_10s.ms.tar.gz]
<pre style="background-color: #fffacd;">
Telescopes: Jansky VLA (tickbox)
Project Code: TSUB0001
Telescope Config: B (tickbox)
Observing Bands: P (tickbox)
</pre>


<font color=red>Note that this dataset is rather large: ~15GB </font>
The search should return (at least) 19 rows of results. Enter your valid e-mail address, set the download format to SDM-BDF, check the box on the 17th row (data from Dec. 21, 2013, or "13-Dec-21 03:11:18") at the bottom of the page, and click Get My Data. On the next page, click Retrieve over internet. The next page should report that the data staging is in progress. Wait until you receive an e-mail reporting that your archive data is copied, which should take a few minutes. Download the data onto your computer running CASA.


As a start, unzip and untar the data:
== Starting CASA ==


<source lang="bash">
Start CASA by typing
tar -xzvf G55.7+3.4_10s.ms.tar.gz
<source lang='bash'>
casa
</source>
</source>
on the (linux) command line. This should start a CASA interactive python (iPython) session, and open a separate log window. The CASA version is reported at startup, both in the python session and the log window:


This will take a minute, but once it's complete, you will have a directory called <tt>G55.7+3.4_10s.ms</tt> which is the data. Online flags have been applied (which delete known bad data), some uninteresting scans removed, and the data time-averaged to 10 seconds.  (The data were taken in D-configuration, where maximum baselines are 1 km, so one can safely average to 3s or even 10s to reduce data set size.)  This is equivalent to what you would download from the archive if you requested time-averaging, scans 16~313, and application of the online flags.
<i> CASA Version 4.3.1-REL (r32491) </i>


You can also find the dataset [https://archive.nrao.edu/archive/ArchiveQuery?PASSWD=&QUERYTYPE=ARCHIVE&PROTOCOL=HTML&SORT_PARM=Starttime&SORT_ORDER=Asc&MAX_ROWS=NO+LIMIT&SORT_PARM2=Starttime&SORT_ORDER2=Asc&QUERY_ID=9999&QUERY_MODE=Prepare+Download&LOCKMODE=PROJECT&SITE_CODE=AOC&DBHOST=CHEWBACCA&WRITELOG=0&PROJECT_CODE=&SEGMENT=&OBSERVER=&ARCHIVE_VOLUME=AB1345_sb1800808_1.55431.004049953706&TIMERANGE1=&TIMERANGE2=&SOURCE_ID=&SRC_SEARCH_TYPE=SIMBAD+or+NED+Resolver&CALIB_TYPE=ALL+Srcs&CENTER_RA=&LONG_RANGE=&FRAME=Equatorial&CENTER_DEC=&LAT_RANGE=&EQUINOX=J2000&SRAD=10.0%27&MIN_EXPOSURE=&OBS_BANDS=ALL&TELESCOPE=EVLA&OBS_MODE=ALL&CORR_MODE=ALL&TELESCOPE_CONFIG=ALL&OBS_POLAR=ALL&SUBARRAY=ALL&OBSFREQ1=&DATATYPE=ALL&OBSBW1=&ARCHFORMAT=ALL&SUBMIT=Submit+Query| in the NRAO archive].  ''Note that it is 170 GB in raw form.'' 
Note that this guide has been written for CASA release 4.3.1, which is the current stable release at NRAO. Due to ongoing development of CASA, this tutorial may or may not work with other versions. You may want to confirm your version before proceeding.


Averaging to 10 seconds and the removal of some scans which are not used in this tutorial reduces the size of the data set to around 15 GB; the addition of columns for model and corrected data (known as "scratch columns") during calibration will ultimately inflate the MS by a factor of a few in size (to around 45 GB).
== Importing the raw data into CASA ==


== Start and confirm your version of CASA ==
We can use the python environment to make our lives easier. First, we define some paths that point to data structures on disk. The box below contain the commands that need to be copied into CASA (either retype or copy-paste):


Start CASA by typing <tt>casapy</tt> on the command line.  If you have not used CASA before, some helpful tips are available on the [[Getting Started in CASA]] page.
<source lang='python'>
sdm_path = 'TSUB0001.sb28588128.eb28590840.56647.13284232639'
project_name = 'TSUB0001_20131221'
ms_path = project_name + '.ms'
online_flags_file = project_name + '.flags'
</source>


This guide has been written for CASA release 4.2.0.  Please confirm your version before proceeding.
If some of these already exist, you can use the following commands to remove them:
<source lang="python">
<source lang='python'>
# In CASA
if os.path.isdir( ms_path ):
version = casalog.version()
  rmtables( ms_path )
print "You are using " + version
 
if (int(version.split()[3][1:-1]) < 32490):
if os.path.isfile( online_flags_file ):
    print "\033[91m YOUR VERSION OF CASA IS TOO OLD FOR THIS GUIDE."
  os.remove( online_flags_file )
    print "\033[91m PLEASE UPDATE IT BEFORE PROCEEDING."
 
else:
if os.path.isdir( ms_path + '.flagversions' ):
    print "Your version of CASA is appropriate for this guide."
  shutil.rmtree( ms_path + '.flagversions', ignore_errors = True )
</source>
</source>


== Preliminary data evaluation ==  
Now we use the <i>importevla()</i> task to convert the SDM-BDF data to a CASA measurement set (ms). This may take a few minutes:
<source lang='python'>
importevla( asdm = sdm_path, vis = ms_path, savecmds = True, outfile = online_flags_file )
</source>


As a first step, use {{listobs}} to have a look at the MS:
This task calls the external tool <i>asdm2MS</i> to perform the conversion. Together with the visibility data, also the flag commands from the VLA online system are imported. These flags are not directly applied, but stored in the <i>TSUB0001_20131221.flags</i> file and applied later.


<source lang="python">
== Preliminary data inspection ==
# In CASA
 
listobs('G55.7+3.4_10s.ms')
<source lang='python'>
listobs_file = project_name + '.listobs'
if os.path.isfile( listobs_file ):
  os.remove( listobs_file )
 
listobs( vis = ms_path, verbose = True, listfile = listobs_file )
</source>
</source>


Note that throughout this tutorial, we will run tasks using the <i>task</i>(<i>parameter=value</i>) syntax. When called in this manner, all parameters not explicitly set will use their default values.  
You can inspect the output text file <i>TSUB0001_20131221.listobs</i> in your favorite text editor (e.g., <i>gedit</i>). When taking some time to familiarize yourself with the output format, you will see that:
* The observation consists of 4 scans, namely [1] 3C48D (hardware setup), [2] 3C48 (primary calibrator), [3] 0313-192 (target), and [4] again 3C48 (primary calibrator).
* The frequency coverage is 224 - 480 MHz, divided into 16 x 16 MHz spectral windows, each having 128 x 0.125 MHz channels
* Visibilities are recorded every 2 seconds in full polarization (4 polarization products, (wrongly!) labelled RR,RL,LR,LL).
* Of the 28 VLA antennas labelled ea01 - ea028, antennas ea06 and ea17 are not participating in this observation.
* Source, antenna and spectral window IDs start at zero, but scan IDs start at one.
The array configuration can be inspected using:
 
<source lang='python'>
plotants_file = project_name + '.plotants.pdf'
if os.path.isfile( plotants_file ):
  os.remove( plotants_file )
 
plotants( vis = ms_path, figfile = plotants_file )
</source>


The logger output will look like this:
The figure in the plot window is also available as a PDF file named <i>TSUB0001_20131221.plotants.pdf</i>


As noted above, the polarizations of P-band in this data set are wrongly labelled as circular rather than linear. This may seem mostly harmless, but does make a difference for polarization calibration (which we will do later). The following (non-standard) task will check and fix this (and another related problem; see appendix on P-band data issues):


<pre>
<source lang='python'>
execfile( '/lustre/hintema/cspam/mytasks.py' )


================================================================================
fixlowband( vis = ms_path )
          MeasurementSet Name: /lustre/pjaganna/evla/casa_guide_g55/G55.7+3.4_10s.ms      MS Version 2
</source>
================================================================================
 
  Observer: Dr. Sanjay Sanjay Bhatnagar    Project: T.B.D.
If desired, you can re-run the <i>listobs()</i> task to check if the fix was correctly applied.
Observation: EVLA
 
Data records: 7343848      Total elapsed time = 26697 seconds
Addendum: If you're not working on the NRAO DSOC network, you won't have access to the lustre file system. In that case, download [ftp://ftp.aoc.nrao.edu/NRAO-staff/hintema/casa/casa_vla_lowband.tar.gz this tarball] in your CASA working directory, open a shell there, and type the following commands:
  Observed from  23-Aug-2010/01:00:24.to   23-Aug-2010/08:25:21.0 (UTC)
 
<source lang='bash'>
tar xzvf casa_vla_lowband.tar.gz
 
buildmytasks
</source>
 
Now go back to your CASA session and type:
 
<source lang='python'>
execfile( 'mytasks.py' )
 
fixlowband( vis = ms_path )
</source>
 
== Initial processing steps ==
 
When importing the data, we saved the flags from the online system to an ASCII text file. This gives us the opportunity to review the flag commands before applying them. For our data set, the flag file is called <i>TSUB0001_20131221.flags</i>. Please load this file into your favorite text editor. The bulk of the flag commands refer to times when the VLA is slewing (<i>ANTENNA_NOT_ON_SOURCE</i>) or when the movable secondary reflector of the VLA's Cassegrain system is not in place (<i>SUBREFLECTOR_ERROR</i>). The latter can cause antenna gain variations (amplitude and phase), so it is safest to apply all the flags. The final two rows in the flag file will remove visibilities that are pure zero, and flag antennas that are partly blocked by other antennas (shadowing; this occurs mostly in compact configurations when observing along a VLA arm).
<source lang='python'>
flagdata( vis = ms_path, mode = 'list', inpfile = online_flags_file, action = 'apply', reason = 'any', flagbackup = False )
</source>


  ObservationID = 0        ArrayID = 0
The next step will correct the visibility amplitudes for the signal leveling that occurs at the inputs of the WIDAR correlator, the so-called requantizer gains. These levels (per antenna, per polarization, per spectral window) are stored with the measurement set (in the <i>SYSPOWER</i> sub-table). Currently, this step is not essential, since the levels get set only once at the start of an observation, and bandpass calibration will correct for this. But it will make your bandpass plots look better if you have multiple spectral windows. And, more importantly, in the future it may be that the levels will become time-variable during an observation, so we'd better be prepared.
  Date        Timerange (UTC)          Scan  FldId FieldName            nRows    SpwIds  Average Interval(s)    ScanIntent
  23-Aug-2010/01:00:24.0 - 01:01:05.0    16      1 J1925+2106                8008  [0,1,2,3,4,5,6,7]  [9.64, 9.64, 9.64, 9.64, 9.64, 9.64, 9.64, 9.64] [CALIBRATE_PHASE.UNSPECIFIED]
              01:01:05.0 - 01:02:35.0    17      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              01:02:35.0 - 01:04:05.0    18      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              01:04:05.0 - 01:05:34.0    19      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              01:05:34.0 - 01:07:04.0    20      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              01:07:10.0 - 01:08:34.0    21      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [OBSERVE_TARGET.UNSPECIFIED]
              01:08:34.0 - 01:10:04.0    22      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:10:04.0 - 01:11:34.0    23      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:11:34.0 - 01:13:03.0    24      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:13:03.0 - 01:14:33.0    25      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:14:33.0 - 01:16:03.0    26      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:16:03.0 - 01:17:33.0    27      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:17:33.0 - 01:19:02.0    28      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:19:02.0 - 01:20:32.0    29      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:20:32.0 - 01:22:02.0    30      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:22:02.0 - 01:23:32.0    31      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:23:32.0 - 01:25:01.0    32      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:25:01.0 - 01:26:31.0    33      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:26:31.0 - 01:28:01.0    34      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:28:01.0 - 01:29:31.0    35      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:29:31.0 - 01:31:00.0    36      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:31:00.0 - 01:32:30.0    37      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:32:30.0 - 01:34:00.0    38      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:34:00.0 - 01:35:30.0    39      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:35:30.0 - 01:36:59.0    40      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:37:05.0 - 01:38:29.0    41      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [CALIBRATE_PHASE.UNSPECIFIED]
              01:38:29.0 - 01:39:59.0    42      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              01:39:59.0 - 01:41:28.0    43      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              01:41:34.0 - 01:42:58.0    44      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.37, 9.37, 9.37, 9.37, 9.37, 9.37, 9.37, 9.37] [OBSERVE_TARGET.UNSPECIFIED]
              01:42:58.0 - 01:44:28.0    45      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:44:28.0 - 01:45:58.0    46      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:45:58.0 - 01:47:28.0    47      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:47:28.0 - 01:48:57.0    48      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:48:57.0 - 01:50:27.0    49      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:50:27.0 - 01:51:57.0    50      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:51:57.0 - 01:53:27.0    51      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:53:27.0 - 01:54:56.0    52      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              01:54:56.0 - 01:56:26.0    53      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:56:26.0 - 01:57:56.0    54      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:57:56.0 - 01:59:26.0    55      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              01:59:26.0 - 02:00:55.0    56      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:00:55.0 - 02:02:25.0    57      2 G55.7+3.4                23608  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:02:25.0 - 02:03:55.0    58      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:03:55.0 - 02:05:25.0    59      2 G55.7+3.4                24648  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:05:25.0 - 02:06:54.0    60      2 G55.7+3.4                24440  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:06:54.0 - 02:08:24.0    61      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:08:24.0 - 02:09:54.0    62      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:09:54.0 - 02:11:23.0    63      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:11:30.0 - 02:12:53.0    64      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.27, 9.27, 9.27, 9.27, 9.27, 9.27, 9.27, 9.27] [CALIBRATE_PHASE.UNSPECIFIED]
              02:12:53.0 - 02:14:23.0    65      1 J1925+2106              24024  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              02:14:23.0 - 02:15:52.0    66      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              02:15:59.0 - 02:17:23.0    67      2 G55.7+3.4                23200  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [OBSERVE_TARGET.UNSPECIFIED]
              02:17:23.0 - 02:18:52.0    68      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:18:52.0 - 02:20:22.0    69      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:20:22.0 - 02:21:52.0    70      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:21:52.0 - 02:23:22.0    71      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:23:22.0 - 02:24:52.0    72      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:24:52.0 - 02:26:21.0    73      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:26:21.0 - 02:27:51.0    74      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:27:51.0 - 02:29:21.0    75      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:29:21.0 - 02:30:51.0    76      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:30:51.0 - 02:32:20.0    77      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:32:20.0 - 02:33:50.0    78      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:33:50.0 - 02:35:20.0    79      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:35:20.0 - 02:36:50.0    80      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:36:50.0 - 02:38:19.0    81      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:38:19.0 - 02:39:49.0    82      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:39:49.0 - 02:41:19.0    83      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:41:19.0 - 02:42:49.0    84      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:42:49.0 - 02:44:18.0    85      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:44:18.0 - 02:45:47.0    86      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:45:54.0 - 02:47:18.0    87      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [CALIBRATE_PHASE.UNSPECIFIED]
              02:47:18.0 - 02:48:48.0    88      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              02:48:48.0 - 02:50:17.0    89      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              02:50:23.0 - 02:51:47.0    90      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [OBSERVE_TARGET.UNSPECIFIED]
              02:51:47.0 - 02:53:17.0    91      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:53:17.0 - 02:54:47.0    92      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:54:47.0 - 02:56:16.0    93      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              02:56:16.0 - 02:57:46.0    94      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:57:46.0 - 02:59:16.0    95      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              02:59:16.0 - 03:00:46.0    96      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:00:46.0 - 03:02:15.0    97      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:02:15.0 - 03:03:45.0    98      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:03:45.0 - 03:05:15.0    99      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:05:15.0 - 03:06:45.0  100      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:06:45.0 - 03:08:14.0  101      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:08:14.0 - 03:09:44.0  102      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:09:44.0 - 03:11:14.0  103      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:11:14.0 - 03:12:44.0  104      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:12:44.0 - 03:14:13.0  105      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:14:13.0 - 03:15:43.0  106      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:15:43.0 - 03:17:13.0  107      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:17:13.0 - 03:18:43.0  108      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:18:43.0 - 03:20:12.0  109      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:20:18.0 - 03:21:42.0  110      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [CALIBRATE_PHASE.UNSPECIFIED]
              03:21:42.0 - 03:23:12.0  111      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              03:23:12.0 - 03:24:41.0  112      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              03:24:47.0 - 03:26:11.0  113      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.37, 9.37, 9.37, 9.37, 9.37, 9.37, 9.37, 9.37] [OBSERVE_TARGET.UNSPECIFIED]
              03:26:11.0 - 03:27:41.0  114      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:27:41.0 - 03:29:11.0  115      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:29:11.0 - 03:30:41.0  116      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:30:41.0 - 03:32:10.0  117      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:32:10.0 - 03:33:40.0  118      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:33:40.0 - 03:35:10.0  119      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:35:10.0 - 03:36:40.0  120      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:36:40.0 - 03:38:09.0  121      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:38:09.0 - 03:39:39.0  122      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:39:39.0 - 03:41:09.0  123      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:41:09.0 - 03:42:39.0  124      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:42:39.0 - 03:44:08.0  125      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:44:08.0 - 03:45:38.0  126      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:45:38.0 - 03:47:08.0  127      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:47:08.0 - 03:48:38.0  128      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:48:38.0 - 03:50:07.0  129      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:50:07.0 - 03:51:37.0  130      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:51:37.0 - 03:53:07.0  131      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              03:53:07.0 - 03:54:36.0  132      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              03:54:43.0 - 03:56:07.0  133      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [CALIBRATE_PHASE.UNSPECIFIED]
              03:56:07.0 - 03:57:36.0  134      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              03:57:36.0 - 03:59:05.0  135      1 J1925+2106              24440  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              03:59:12.0 - 04:00:36.0  136      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [OBSERVE_TARGET.UNSPECIFIED]
              04:00:36.0 - 04:02:06.0  137      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:02:06.0 - 04:03:35.0  138      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:03:35.0 - 04:05:05.0  139      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:05:05.0 - 04:06:35.0  140      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:06:35.0 - 04:08:05.0  141      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:08:05.0 - 04:09:34.0  142      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:09:34.0 - 04:11:04.0  143      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:11:04.0 - 04:12:34.0  144      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:12:34.0 - 04:14:04.0  145      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:14:04.0 - 04:15:33.0  146      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:15:33.0 - 04:17:03.0  147      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:17:03.0 - 04:18:33.0  148      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:18:33.0 - 04:20:03.0  149      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:20:03.0 - 04:21:32.0  150      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:21:32.0 - 04:23:02.0  151      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:23:02.0 - 04:24:32.0  152      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:24:32.0 - 04:26:02.0  153      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:26:02.0 - 04:27:31.0  154      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:27:31.0 - 04:29:00.0  155      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:29:10.0 - 04:30:31.0  156      1 J1925+2106              22512  [0,1,2,3,4,5,6,7]  [9.98, 9.98, 9.98, 9.98, 9.98, 9.98, 9.98, 9.98] [CALIBRATE_PHASE.UNSPECIFIED]
              04:30:31.0 - 04:32:01.0  157      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              04:32:01.0 - 04:33:30.0  158      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              04:33:40.0 - 04:35:00.0  159      2 G55.7+3.4                22464  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:35:00.0 - 04:36:30.0  160      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:36:30.0 - 04:38:00.0  161      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:38:00.0 - 04:39:29.0  162      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:39:29.0 - 04:40:59.0  163      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:40:59.0 - 04:42:29.0  164      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:42:29.0 - 04:43:59.0  165      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:43:59.0 - 04:45:28.0  166      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:45:28.0 - 04:46:58.0  167      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:46:58.0 - 04:48:28.0  168      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:48:28.0 - 04:49:58.0  169      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:49:58.0 - 04:51:27.0  170      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:51:27.0 - 04:52:57.0  171      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:52:57.0 - 04:54:27.0  172      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:54:27.0 - 04:55:57.0  173      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:55:57.0 - 04:57:26.0  174      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              04:57:26.0 - 04:58:56.0  175      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              04:58:56.0 - 05:00:26.0  176      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:00:26.0 - 05:01:56.0  177      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:01:56.0 - 05:03:25.0  178      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:03:35.0 - 05:04:55.0  179      1 J1925+2106              22464  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              05:04:55.0 - 05:06:25.0  180      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              05:06:25.0 - 05:07:54.0  181      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              05:08:04.0 - 05:09:24.0  182      2 G55.7+3.4                22752  [0,1,2,3,4,5,6,7]  [9.76, 9.76, 9.76, 9.76, 9.76, 9.76, 9.76, 9.76] [OBSERVE_TARGET.UNSPECIFIED]
              05:09:24.0 - 05:10:54.0  183      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:10:54.0 - 05:12:24.0  184      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:12:24.0 - 05:13:54.0  185      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:13:54.0 - 05:15:23.0  186      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:15:23.0 - 05:16:53.0  187      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:16:53.0 - 05:18:23.0  188      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:18:23.0 - 05:19:53.0  189      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:19:53.0 - 05:21:22.0  190      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:21:22.0 - 05:22:52.0  191      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:22:52.0 - 05:24:22.0  192      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:24:22.0 - 05:25:52.0  193      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:25:52.0 - 05:27:22.0  194      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:27:22.0 - 05:28:51.0  195      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:28:51.0 - 05:30:21.0  196      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:30:21.0 - 05:31:51.0  197      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:31:51.0 - 05:33:21.0  198      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:33:21.0 - 05:34:50.0  199      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:34:50.0 - 05:36:20.0  200      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:36:20.0 - 05:37:49.0  201      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:37:58.0 - 05:39:20.0  202      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.11, 9.11, 9.11, 9.11, 9.11, 9.11, 9.11, 9.11] [CALIBRATE_PHASE.UNSPECIFIED]
              05:39:20.0 - 05:40:49.0  203      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              05:40:49.0 - 05:42:18.0  204      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              05:42:27.0 - 05:43:49.0  205      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.11, 9.11, 9.11, 9.11, 9.11, 9.11, 9.11, 9.11] [OBSERVE_TARGET.UNSPECIFIED]
              05:43:49.0 - 05:45:19.0  206      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:45:19.0 - 05:46:48.0  207      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:46:48.0 - 05:48:18.0  208      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:48:18.0 - 05:49:48.0  209      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:49:48.0 - 05:51:18.0  210      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:51:18.0 - 05:52:47.0  211      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:52:47.0 - 05:54:17.0  212      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:54:17.0 - 05:55:47.0  213      2 G55.7+3.4                23608  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:55:47.0 - 05:57:17.0  214      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              05:57:17.0 - 05:58:46.0  215      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              05:58:46.0 - 06:00:16.0  216      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:00:16.0 - 06:01:46.0  217      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:01:46.0 - 06:03:16.0  218      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:03:16.0 - 06:04:45.0  219      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:04:45.0 - 06:06:15.0  220      2 G55.7+3.4                23608  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:06:15.0 - 06:07:45.0  221      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:07:45.0 - 06:09:15.0  222      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:09:15.0 - 06:10:44.0  223      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:10:44.0 - 06:12:13.0  224      2 G55.7+3.4                23608  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:12:21.0 - 06:13:44.0  225      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.22, 9.22, 9.22, 9.22, 9.22, 9.22, 9.22, 9.22] [CALIBRATE_PHASE.UNSPECIFIED]
              06:13:44.0 - 06:15:14.0  226      1 J1925+2106              24856  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              06:15:14.0 - 06:16:43.0  227      1 J1925+2106              23608  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              06:16:50.0 - 06:18:13.0  228      2 G55.7+3.4                23200  [0,1,2,3,4,5,6,7]  [9.28, 9.28, 9.28, 9.28, 9.28, 9.28, 9.28, 9.28] [OBSERVE_TARGET.UNSPECIFIED]
              06:18:13.0 - 06:19:43.0  229      2 G55.7+3.4                24640  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:19:43.0 - 06:21:13.0  230      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:21:13.0 - 06:22:42.0  231      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:22:42.0 - 06:24:12.0  232      2 G55.7+3.4                23608  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:24:12.0 - 06:25:42.0  233      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:25:42.0 - 06:27:12.0  234      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:27:12.0 - 06:28:41.0  235      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:28:41.0 - 06:30:11.0  236      2 G55.7+3.4                23600  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:30:11.0 - 06:31:41.0  237      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:31:41.0 - 06:33:11.0  238      2 G55.7+3.4                23600  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:33:11.0 - 06:34:40.0  239      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:34:40.0 - 06:36:10.0  240      2 G55.7+3.4                23608  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:36:10.0 - 06:37:40.0  241      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:37:40.0 - 06:39:10.0  242      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:39:10.0 - 06:40:39.0  243      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:40:39.0 - 06:42:09.0  244      2 G55.7+3.4                22008  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:42:09.0 - 06:43:39.0  245      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:43:39.0 - 06:45:09.0  246      2 G55.7+3.4                21800  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:45:09.0 - 06:46:38.0  247      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              06:46:45.0 - 06:48:08.0  248      1 J1925+2106              23632  [0,1,2,3,4,5,6,7]  [9.27, 9.27, 9.27, 9.27, 9.27, 9.27, 9.27, 9.27] [CALIBRATE_PHASE.UNSPECIFIED]
              06:48:08.0 - 06:49:38.0  249      1 J1925+2106              24232  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              06:49:38.0 - 06:51:07.0  250      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              06:51:14.0 - 06:52:37.0  251      2 G55.7+3.4                24856  [0,1,2,3,4,5,6,7]  [9.26, 9.26, 9.26, 9.26, 9.26, 9.26, 9.26, 9.26] [OBSERVE_TARGET.UNSPECIFIED]
              06:52:37.0 - 06:54:07.0  252      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:54:07.0 - 06:55:37.0  253      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:55:37.0 - 06:57:07.0  254      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:57:07.0 - 06:58:37.0  255      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              06:58:37.0 - 07:00:06.0  256      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:00:06.0 - 07:01:36.0  257      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:01:36.0 - 07:03:06.0  258      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:03:06.0 - 07:04:36.0  259      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:04:36.0 - 07:06:05.0  260      2 G55.7+3.4                23400  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:06:05.0 - 07:07:35.0  261      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:07:35.0 - 07:09:05.0  262      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:09:05.0 - 07:10:35.0  263      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:10:35.0 - 07:12:04.0  264      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:12:04.0 - 07:13:34.0  265      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:13:34.0 - 07:15:04.0  266      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:15:04.0 - 07:16:34.0  267      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:16:34.0 - 07:18:03.0  268      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:18:03.0 - 07:19:33.0  269      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:19:33.0 - 07:21:02.0  270      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:21:09.0 - 07:22:33.0  271      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [CALIBRATE_PHASE.UNSPECIFIED]
              07:22:33.0 - 07:24:02.0  272      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              07:24:02.0 - 07:25:31.0  273      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              07:25:38.0 - 07:27:02.0  274      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [OBSERVE_TARGET.UNSPECIFIED]
              07:27:02.0 - 07:28:32.0  275      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:28:32.0 - 07:30:01.0  276      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:30:01.0 - 07:31:31.0  277      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:31:31.0 - 07:33:01.0  278      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:33:01.0 - 07:34:31.0  279      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:34:31.0 - 07:36:00.0  280      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:36:00.0 - 07:37:30.0  281      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:37:30.0 - 07:39:00.0  282      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:39:00.0 - 07:40:30.0  283      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:40:30.0 - 07:41:59.0  284      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:41:59.0 - 07:43:29.0  285      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:43:29.0 - 07:44:59.0  286      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:44:59.0 - 07:46:29.0  287      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:46:29.0 - 07:47:58.0  288      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:47:58.0 - 07:49:28.0  289      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:49:28.0 - 07:50:58.0  290      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:50:58.0 - 07:52:28.0  291      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              07:52:28.0 - 07:53:57.0  292      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:53:57.0 - 07:55:26.0  293      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              07:55:33.0 - 07:56:57.0  294      1 J1925+2106              25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [CALIBRATE_PHASE.UNSPECIFIED]
              07:56:57.0 - 07:58:27.0  295      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_PHASE.UNSPECIFIED]
              07:58:27.0 - 07:59:56.0  296      1 J1925+2106              25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_PHASE.UNSPECIFIED]
              08:00:02.0 - 08:01:26.0  297      2 G55.7+3.4                25064  [0,1,2,3,4,5,6,7]  [9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38, 9.38] [OBSERVE_TARGET.UNSPECIFIED]
              08:01:26.0 - 08:02:56.0  298      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              08:02:56.0 - 08:04:26.0  299      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              08:04:26.0 - 08:05:55.0  300      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              08:05:55.0 - 08:07:25.0  301      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              08:07:25.0 - 08:08:55.0  302      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              08:08:55.0 - 08:10:25.0  303      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              08:10:25.0 - 08:11:54.0  304      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              08:11:54.0 - 08:13:24.0  305      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [OBSERVE_TARGET.UNSPECIFIED]
              08:13:24.0 - 08:14:53.0  306      2 G55.7+3.4                25272  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [OBSERVE_TARGET.UNSPECIFIED]
              08:17:47.0 - 08:17:54.0  308      3 0542+498=3C147              80  [0,1,2,3,4,5,6,7]  [7, 7, 7, 7, 7, 7, 7, 7] [CALIBRATE_AMPLI.UNSPECIFIED,CALIBRATE_BANDPASS.UNSPECIFIED,UNSPECIFIED.UNSPECIFIED]
              08:17:54.0 - 08:19:23.0  309      3 0542+498=3C147          17152  [0,1,2,3,4,5,6,7]  [9.88, 9.88, 9.88, 9.88, 9.88, 9.88, 9.88, 9.88] [CALIBRATE_AMPLI.UNSPECIFIED,CALIBRATE_BANDPASS.UNSPECIFIED,UNSPECIFIED.UNSPECIFIED]
              08:19:23.0 - 08:20:53.0  310      3 0542+498=3C147          18216  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_AMPLI.UNSPECIFIED,CALIBRATE_BANDPASS.UNSPECIFIED,UNSPECIFIED.UNSPECIFIED]
              08:20:53.0 - 08:22:23.0  311      3 0542+498=3C147          18216  [0,1,2,3,4,5,6,7]  [10, 10, 10, 10, 10, 10, 10, 10] [CALIBRATE_AMPLI.UNSPECIFIED,CALIBRATE_BANDPASS.UNSPECIFIED,UNSPECIFIED.UNSPECIFIED]
              08:22:23.0 - 08:23:52.0  312      3 0542+498=3C147          18216  [0,1,2,3,4,5,6,7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_AMPLI.UNSPECIFIED,CALIBRATE_BANDPASS.UNSPECIFIED,UNSPECIFIED.UNSPECIFIED]
              08:23:52.0 - 08:25:21.0  313      3 0542+498=3C147          18216  [0, 1, 2, 3, 4, 5, 6, 7]  [9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89, 9.89] [CALIBRATE_AMPLI.UNSPECIFIED,CALIBRATE_BANDPASS.UNSPECIFIED,UNSPECIFIED.UNSPECIFIED]
          (nRows = Total number of rows per scan)
Fields: 3
  ID  Code Name                RA              Decl          Epoch  SrcId      nRows
  1    D    J1925+2106          19:25:59.605371 +21.06.26.16218 J2000  1        1004816
  2    NONE G55.7+3.4          19:21:40.000000 +21.45.00.00000 J2000  2        6248936
  3    N    0542+498=3C147      05:42:36.137916 +49.51.07.23356 J2000  3          90096
Spectral Windows:  (8 unique spectral windows and 1 unique polarization setups)
  SpwID  Name      #Chans  Frame  Ch0(MHz)  ChanWid(kHz)  TotBW(kHz) CtrFreq(MHz)  Corrs         
  0      Subband:3    64  TOPO    1000.000      2000.000    128000.0  1063.0000  RR  RL  LR  LL
  1      Subband:1    64  TOPO    1128.000      2000.000    128000.0  1191.0000  RR  RL  LR  LL
  2      Subband:0    64  TOPO    1256.000      2000.000    128000.0  1319.0000  RR  RL  LR  LL
  3      Subband:2    64  TOPO    1384.000      2000.000    128000.0  1447.0000  RR  RL  LR  LL
  4      Subband:3    64  TOPO    1520.000      2000.000    128000.0  1583.0000  RR  RL  LR  LL
  5      Subband:1    64  TOPO    1648.000      2000.000    128000.0  1711.0000  RR  RL  LR  LL
  6      Subband:0    64  TOPO    1776.000      2000.000    128000.0  1839.0000  RR  RL  LR  LL
  7      Subband:2    64  TOPO    1904.000      2000.000    128000.0  1967.0000  RR  RL  LR  LL
Sources: 24
  ID  Name                SpwId RestFreq(MHz)  SysVel(km/s)
  1    J1925+2106          0    -              -           
  1    J1925+2106          1    -              -           
  1    J1925+2106          2    -              -           
  1    J1925+2106          3    -              -           
  1    J1925+2106          4    -              -           
  1    J1925+2106          5    -              -           
  1    J1925+2106          6    -              -           
  1    J1925+2106          7    -              -           
  2    G55.7+3.4          0    -              -           
  2    G55.7+3.4          1    -              -           
  2    G55.7+3.4          2    -              -           
  2    G55.7+3.4          3    -              -           
  2    G55.7+3.4          4    -              -           
  2    G55.7+3.4          5    -              -           
  2    G55.7+3.4          6    -              -           
  2    G55.7+3.4          7    -              -           
  3    0542+498=3C147      0    -              -           
  3    0542+498=3C147      1    -              -           
  3    0542+498=3C147      2    -              -           
  3    0542+498=3C147      3    -              -           
  3    0542+498=3C147      4    -              -           
  3    0542+498=3C147      5    -              -           
  3    0542+498=3C147      6    -              -           
  3    0542+498=3C147      7    -              -           
Antennas: 27:
  ID  Name  Station  Diam.    Long.        Lat.                Offset from array center (m)                ITRF Geocentric coordinates (m)       
                                                                    East        North    Elevation              x              y              z
  0    ea01  W09      25.0 m  -107.37.25.2  +33.53.51.0      -521.9416    -332.7766      -1.2001 -1601710.017000 -5042006.925200  3554602.355600
  1    ea02  E02      25.0 m  -107.37.04.4  +33.54.01.1          9.8240      -20.4293      -2.7806 -1601150.060300 -5042000.619800  3554860.729400
  2    ea03  E09      25.0 m  -107.36.45.1  +33.53.53.6        506.0564    -251.8670      -3.5825 -1600715.950800 -5042273.187000  3554668.184500
  3    ea04  W01      25.0 m  -107.37.05.9  +33.54.00.5        -27.3562      -41.3030      -2.7418 -1601189.030140 -5042000.493300  3554843.425700
  4    ea05  W08      25.0 m  -107.37.21.6  +33.53.53.0      -432.1167    -272.1478      -1.5054 -1601614.091000 -5042001.652900  3554652.509300
  5    ea06  N06      25.0 m  -107.37.06.9  +33.54.10.3        -54.0649      263.8778      -4.2273 -1601162.591000 -5041828.999000  3555095.896400
  6    ea07  E05      25.0 m  -107.36.58.4  +33.53.58.8        164.9788      -92.8032      -2.5268 -1601014.462000 -5042086.252000  3554800.799800
  7    ea08  N01      25.0 m  -107.37.06.0  +33.54.01.8        -30.8810      -1.4664      -2.8597 -1601185.634945 -5041978.156586  3554876.424700
  8    ea09  E06      25.0 m  -107.36.55.6  +33.53.57.7        236.9058    -126.3369      -2.4443 -1600951.588000 -5042125.911000  3554773.012300
  9    ea10  N03      25.0 m  -107.37.06.3  +33.54.04.8        -39.0773      93.0192      -3.3330 -1601177.376760 -5041925.073200  3554954.584100
  10  ea11  E04      25.0 m  -107.37.00.8  +33.53.59.7        102.8054      -63.7682      -2.6414 -1601068.790300 -5042051.910200  3554824.835300
  11  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
  12  ea13  N07      25.0 m  -107.37.07.2  +33.54.12.9        -61.1037      344.2331      -4.6138 -1601155.635800 -5041783.843800  3555162.374100
  13  ea15  W06      25.0 m  -107.37.15.6  +33.53.56.4      -275.8288    -166.7451      -2.0590 -1601447.198000 -5041992.502500  3554739.687600
  14  ea16  W02      25.0 m  -107.37.07.5  +33.54.00.9        -67.9687      -26.5614      -2.7175 -1601225.255200 -5041980.383590  3554855.675000
  15  ea17  W07      25.0 m  -107.37.18.4  +33.53.54.8      -349.9877    -216.7509      -1.7975 -1601526.387300 -5041996.840100  3554698.327400
  16  ea18  N09      25.0 m  -107.37.07.8  +33.54.19.0        -77.4346      530.6273      -5.5859 -1601139.485100 -5041679.036800  3555316.533200
  17  ea19  W04      25.0 m  -107.37.10.8  +33.53.59.1      -152.8599      -83.8054      -2.4614 -1601315.893000 -5041985.320170  3554808.304600
  18  ea20  N05      25.0 m  -107.37.06.7  +33.54.08.0        -47.8454      192.6015      -3.8723 -1601168.786100 -5041869.054000  3555036.936000
  19  ea21  E01      25.0 m  -107.37.05.7  +33.53.59.2        -23.8638      -81.1510      -2.5851 -1601192.467800 -5042022.856800  3554810.438800
  20  ea22  N04      25.0 m  -107.37.06.5  +33.54.06.1        -42.6239      132.8436      -3.5494 -1601173.979400 -5041902.657700  3554987.517500
  21  ea23  E07      25.0 m  -107.36.52.4  +33.53.56.5        318.0509    -164.1850      -2.6957 -1600880.571400 -5042170.388000  3554741.457400
  22  ea24  W05      25.0 m  -107.37.13.0  +33.53.57.8      -210.0959    -122.3887      -2.2577 -1601377.009500 -5041988.665500  3554776.393400
  23  ea25  N02      25.0 m  -107.37.06.2  +33.54.03.5        -35.6245      53.1806      -3.1345 -1601180.861480 -5041947.453400  3554921.628700
  24  ea26  W03      25.0 m  -107.37.08.9  +33.54.00.1      -105.3447      -51.7177      -2.6037 -1601265.153600 -5041982.533050  3554834.858400
  25  ea27  E03      25.0 m  -107.37.02.8  +33.54.00.5        50.6641      -39.4835      -2.7273 -1601114.365500 -5042023.151800  3554844.944000
  26  ea28  N08      25.0 m  -107.37.07.5  +33.54.15.8        -68.9057      433.1889      -5.0602 -1601147.940400 -5041733.837000  3555235.956000


##### End Task: listobs              #####
The correction is done in two steps. First, the information in the <i>SYSPOWER</i> sub-table gets translated into a gain table. Second, the visibility data in the <i>DATA</i> column of the measurement set gets copied into a new <i>CORRECTED_DATA</i> column, and is corrected with the gain table. Note that this operation roughly doubles the size of the measurement set with respect to the original. This may take a while.
##########################################
<source lang='python'>
</pre>
rq_gain_table = ms_path + '.Grq'


We can see that there are three sources in this observation:
if os.path.isdir( rq_gain_table ):
  rmtables( rq_gain_table )


* J1925+2106, field ID 1: the phase calibrator;
gencal( vis = ms_path, caltable = rq_gain_table, caltype = 'rq' )
* G55.7+3.4, field ID 2: the supernova remnant;
* 0542+498=3C147, field ID 3: the flux and bandpass calibrator.


We can also see that these sources have associated "scan intents", which indicate their function in the observation.  Note that you can select sources based on their intents in certain CASA tasks.  The various scan intents in this dataset are:
applycal( vis = ms_path, field = '*', gaintable = [ rq_gain_table ], interp = [ 'nearest,nearestflag' ], applymode = 'calflagstrict', flagbackup = False )
</source>


* CALIBRATE_PHASE indicates that this is a scan to be used for gain calibration;
If your observation is part of a multi-band observation, this is the time to isolate the P-band part. Although these data contain only P-band, this step is still useful because it will make the requantizer gain corrections permanent, and drop time ranges that are completely flagged (like the slew periods). The following call to <i>split()</i> will create a new measurement set with just P-band data. P-band data is selected by its spectral window range, which can be retrieved from the <i>listobs()</i> output:
* OBSERVE_TARGET indicates that this is the science target;
<source lang='python'>
* CALIBRATE_AMPLI indicates that this is to be used for flux calibration; and  
pband_spws = '0~15'
* CALIBRATE_BANDPASS indicates that these scans are to be used for bandpass calibration.
pband_ms_path = project_name + '_PBAND.ms'


Note that 3C147 is to be used for both flux and bandpass calibration.
if os.path.isdir( pband_ms_path ):
  rmtables( pband_ms_path )


We can see the antenna configuration for this observation using {{plotants}}:
if os.path.isdir( pband_ms_path + '.flagversions' ):
  shutil.rmtree( pband_ms_path + '.flagversions', ignore_errors = True )


<source lang="python">
split( vis = ms_path, outputvis = pband_ms_path, field = '*', spw = pband_spws, datacolumn = 'corrected', keepflags = False )
# In CASA
plotants('G55.7+3.4_10s.ms')
</source>
</source>


[[Image:plotAnts.png|200px|thumb|right|plotants image]]
Next, we will apply Hanning smoothing to suppress Gibbs ringing around bright RFI lines. Visibilities are overwritten; no new measurement set is created.
<source lang='python'>
hanningsmooth( vis = pband_ms_path, datacolumn = 'data' )
</source>


This shows that antennas ea01, ea18, and ea03 were on the extreme ends of the west, north, and east arms, respectively.  The antenna position diagram is particularly useful as a guide to help determine which antenna to use as the reference antenna later during calibration.
NOTE: The experimental task <i>mstransform()</i> combines <i>split()</i> and <i>hanningsmooth()</i> and several other data manipulation operations, but its output is not yet to be trusted for all operations.


We may also inspect the raw data using {{plotms}}.  To start with, let's look at a subset of scans on the supernova remnant:
== Dead and swapped antennas ==


<source lang="python">
Now it is time to have a first visual look at the uncalibrated visibility data. It is important to identify dead antennas / polarizations early on, so we can exclude them from further data processing (which is the most efficient data 'reduction' :-) ). A convenient way of doing this is through the <i>flagdata()</i> task on bright calibrator(s) (again, see the <i>listobs()</i> output), in our case 3C48.
# In CASA
<source lang='python'>
plotms(vis='G55.7+3.4_10s.ms', scan='30,75,120,165,190,235,303',
bcal_field = '3C48'
      antenna='ea24', xaxis='freq', yaxis='amp', coloraxis='spw',
flagdata( vis = pband_ms_path, field = bcal_field, mode = 'tfcrop', datacolumn = 'data', timecutoff = 4., freqcutoff = 4., maxnpieces = 5,
      iteraxis='scan', correlation='RR,LL', symbolshape='circle')
  action = 'calculate', display = 'both', flagbackup = False )
</source>
</source>


The <tt>coloraxis</tt> parameter indicates that a different color will be assigned to each spectral window, and the <tt>iteraxis</tt> parameter tells plotms to display a new plot for each scan.  We have chosen only one antenna (ea24) and just the right and left circular polarizations (without the cross-hand terms) to reduce the amount of data in the selection. One can flip through these plots using the green arrows located at the bottom of the plotting GUI: the double-left arrow will display the very first plot in the set, the single left arrow will go back one plot, and the right arrows have similar behavior for moving forward in the set.
This will bring forward a data inspection window, with (per scan, per baseline, per spectral window) the top row a set of intensity plots of the visibility amplitudes in all polarization products (XX, YY, XY, and YX) before flagging, and the bottom row the same data after applying some outlier flagging (marked in blue). The intensity plots do scale automatically to min-max, so any bright RFI pixel will skew the intensity range (hence the difference between the top and bottom row).


[[Image:PlotMS1.png|200px|thumb|right|plotms image]]
In the case of 16 x 16 MHz spectral windows, we want to initially inspect a more central spectral window (spw 5 through 7) than the default one at the low edge of the band (spw = 0). Notice when clicking <i>Next SPW</i> a few times that several spectral windows are heavily affected by RFI, for instance spw 2 and 3, and 8 and 9. Also notice that not all RFI is captured; this is mainly because within a spectral window there is too little contrast between healthy and affected data. We will resolve that later.


Flipping through the scans, it's clear that there is significant time- and frequency-variable RFI present in this observation. Since this is L-band data taken in the most compact EVLA configuration ("D"), this comes as no surprise.  However, it also poses one of the greatest challenges for obtaining a good image.
A healthy spectral window will have little flagged data, and show a clear difference between the parallel-hand polarizations XX,YY (bottom row left two panels) and the cross-hand polarizations XY,YX (bottom row right two panels), where the former shows a time-constant, smooth spectral behaviour, while the latter shows a noise-like behaviour. Cycling through the baselines (<i>Previous Baseline</i> / <i>Next Baseline</i> buttons) please note the following:
* Baselines containing antenna ea07 have a ripple in XX.
* Baselines containing antennas ea10 or ea13 contain only noise in all polarization products.
* Baselines containing antennas ea25 contain noise in XX and YY, signal in XY, and noise in YX
* Baselines containing antenna ea28 have a ripple in YY
What this means is that antennas ea10 and ea13 are dead and need to be flagged. We will also take this opportunity to flag the dummy scan 1 on '3C48D'. Antenna ea25 has swapped polarizations and a dead Y-polarization; for demonstration purposes we will unswap this antenna, but it becomes useless later on since CASA cannot form proper stokes I visibilities (which is different behaviour than in some other reduction software, e.g,. AIPS). The ripples in antennas ea07 (X-polarization) and ea28 (Y-polarization) will show up, and calibrate out, in the bandpass calibration performed below.


In particular, we can see that two spectral windows (SPWs) are quite badly affected.  To determine which these are, click in the "Mark Regions" tool at the bottom of the {{plotms}} GUI (the open box with a green "plus" sign), and use the mouse to select a few of the highest-amplitude points in each of these SPWs. Click on the "Locate" button (magnifying glass sign), and information associated with the selected points will be displayed in the logger window:
If we're done inspecting the data in <i>flagdata()</i>, press the <i>Quit</i> button (and not <i>Stop Display</i>). The next commands will perform the necessary flag operations, and unswap antenna ea25.


<pre>
<source lang='python'>
Frequency in [1.22177 1.27139] or [1.5762 1.65063], Amp in [23.1713 24.3056] or [59.6296 63.6806]:
dead_antennas = 'ea10,ea13'
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:20:57.0 BL=ea12@E08 & ea24@W05[11&22] Spw=1 Chan=59 Freq=1.246 Corr=RR X=1.246 Y=23.5243  (38134/11/1526)
flagdata( vis = pband_ms_path, mode = 'manual', antenna = dead_antennas, flagbackup = False )
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:21:07.0 BL=ea03@E09 & ea24@W05[2&22] Spw=1 Chan=59 Freq=1.246 Corr=RR X=1.246 Y=23.6116  (40310/12/374)
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:21:07.0 BL=ea12@E08 & ea24@W05[11&22] Spw=1 Chan=59 Freq=1.246 Corr=RR X=1.246 Y=23.4432  (41462/12/1526)
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:21:57.0 BL=ea03@E09 & ea24@W05[2&22] Spw=1 Chan=59 Freq=1.246 Corr=RR X=1.246 Y=23.7536  (56950/17/374)
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:21:07.0 BL=ea12@E08 & ea24@W05[11&22] Spw=4 Chan=41 Freq=1.602 Corr=RR X=1.602 Y=61.9097  (131282/39/1490)
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:21:17.0 BL=ea12@E08 & ea24@W05[11&22] Spw=4 Chan=41 Freq=1.602 Corr=RR X=1.602 Y=61.1769  (134610/40/1490)
Scan=30 Field=G55.7+3.4[2] Time=2010/08/23/01:21:27.0 BL=ea12@E08 & ea24@W05[11&22] Spw=4 Chan=41 Freq=1.602 Corr=RR X=1.602 Y=60.1834  (137938/41/1490)
Found 7 points (7 unflagged) among 239616 in 0.02s.
</pre>


We can see that SPWs 1 and 4 are among the worst affected by RFI.  (As an aside, note that the syntax for reporting a selected point's baseline is {antenna 1 name}@{pad 1 name} &{antenna 2 name}@{pad 2 name}[{antenna 1 index}&{antenna 2 index}].)  At this point, feel free to play around a bit more with {{plotms}}; you might try experimenting with different axes for iteration (under the "Iter" left-hand tab), different data selection parameters (under "Data"), different axes ("Axes"), different averaging techniques (under "Data"), or different selections for the coloraxis (the "colorize" option under "Display").
dummy_scan = '1'
flagdata( vis = pband_ms_path, mode = 'manual', scan = dummy_scan, flagbackup = False )


== A priori calibration and flagging ==
swapped_antennas = 'ea25'
swappol( vis = pband_ms_path, antenna = swapped_antennas )
</source>


Before we proceed with further processing, we should check the observation log to see if there were any issues noted during the run that need to be addressed. The observing log file is linked to the [https://archive.nrao.edu/archive/ArchiveQuery?PASSWD=&QUERYTYPE=ARCHIVE&PROTOCOL=HTML&SORT_PARM=Starttime&SORT_ORDER=Asc&MAX_ROWS=NO+LIMIT&SORT_PARM2=Starttime&SORT_ORDER2=Asc&QUERY_ID=9999&QUERY_MODE=Prepare+Download&LOCKMODE=PROJECT&SITE_CODE=AOC&DBHOST=CHEWBACCA&WRITELOG=0&PROJECT_CODE=&SEGMENT=&OBSERVER=&ARCHIVE_VOLUME=AB1345_sb1800808_1.55431.004049953706&TIMERANGE1=&TIMERANGE2=&SOURCE_ID=&SRC_SEARCH_TYPE=SIMBAD+or+NED+Resolver&CALIB_TYPE=ALL+Srcs&CENTER_RA=&LONG_RANGE=&FRAME=Equatorial&CENTER_DEC=&LAT_RANGE=&EQUINOX=J2000&SRAD=10.0%27&MIN_EXPOSURE=&OBS_BANDS=ALL&TELESCOPE=EVLA&OBS_MODE=ALL&CORR_MODE=ALL&TELESCOPE_CONFIG=ALL&OBS_POLAR=ALL&SUBARRAY=ALL&OBSFREQ1=&DATATYPE=ALL&OBSBW1=&ARCHFORMAT=ALL&SUBMIT=Submit+Query archive web page] for this observation (at far right; under "logs etc.").  Looking at the log, we can see that antenna ea07 may need a position correction, and antennas ea06, ea17, ea20, and ea26 did not have L-band receivers installed at the time and should be flagged.
NOTE: <i>swappol()</i> is not part of the default CASA release, but was imported together with <i>fixlowband()</i>. It is a pure python implementation operating on visibilities, therefore it may take a while to finish. The way in which we run <i>swappol()</i> we overwrite the previous visibilities, so no new measurement set is created.


=== Antenna position correction ===
You can run <i>flagdata()</i> again in <i>calculate</i> mode to inspect the results.


Correcting a known position error for an antenna is done with the task {{gencal}}.  This is important, because the observed visibilities are a function of <math>u</math> and <math>v</math>.  If an antenna's position is incorrect, then <math>u</math> and <math>v</math> will be calculated incorrectly, and there will be errors in any image derived from the data.  Of course, the a priori position corrections may not completely account for all errors. 
== Automatic flagging ==


The {{gencal}} task will query the VLA Baseline Corrections database to determine what baseline corrections to apply to the dataset. If you wish to double-check this by hand, refer to the [http://www.vla.nrao.edu/astro/archive/baselines/ EVLA/VLA Baseline Corrections] page.
Before throwing away bad spectral windows by hand, we'll let the automated flaggers in CASA have a go at it. The main task for this is <i>flagdata()</i>. While working on your data, <i>flagdata()</i> produces an abundance of output, not all of which I find easy to understand. To help with this, we can get the flag status of our data before and after auto-flagging by running <i>flagdata()</i> in the <i>summary</i> mode. This first call provides the flag statistics of the flagging up to now, before any auto-flagging:
<source lang='python'>
summary_1 = flagdata( vis = pband_ms_path, mode = 'summary' )
</source>


<source lang="python">
This returns a python dictionary with flagged versus total visibilities along various axes (antenna, scan, spw, field, correlation, etc.). For example, if we want to know the percentage flagged per scan, run the following (note that the scans may not appear in sorted order):
# In CASA
<source lang='python'>
gencal(vis='G55.7+3.4_10s.ms', caltable='G55.7+3.4_10s.pos',
axis = 'scan'
      caltype='antpos')
for id, stats in summary_1[ axis ].iteritems():
  print '%s %s: %5.1f percent flagged' % ( axis, id, 100. * stats[ 'flagged' ] / stats[ 'total' ] )
</source>
</source>


As reported by the CASA logger, {{gencal}} found a position correction for antenna ea07 of (x, y, z) = (0.0087, 0.0137, 0.000) and recorded this in our specified calibration table.
For this example, you will notice that scan 1 (the dummy scan on 3C48D) is 100 percent flagged, which is what we did during the initial flagging.


=== Gain curve and opacity correction ===
We will run <i>flagdata()</i> in the <i>tfcrop</i> mode, which will (per scan, per baseline, per spectral window, per polarization) look for visibility amplitude outliers. It uses a 5-piece polynomial in an attempt to remove any intrinsic bandpass (amplitude) structure (we did not calibrate for bandpass yet). We run the task twice to allow for slightly deeper flagging. For the first run, we tell CASA to make a backup of our visibility flag status up to here, giving us an option to restore them if we choose over-aggresive flagging parameters and consequently over-flag our data. The flag backup file name is reported in the log window, and can be found in the <i>TSUB0001_20131221_PBAND.ms.flagversions</i> directory.


A decision has been made here to ignore both the corrections for atmospheric opacity and for the elevation-dependent telescope gain throughout this tutorial. These effects are very small (less than or about 1%) across the frequency range of this observation (1-2 GHz). At higher frequencies, these corrections may be important and the appropriate calibration tables can be computed using the task {{gencal}}. For an example of a tutorial which corrects for atmospheric opacity and the elevation-dependent gain see this [[http://casaguides.nrao.edu/index.php?title=EVLA_3-bit_Tutorial_G192 this tutorial.]]
<source lang='python'>
flagdata( vis = pband_ms_path, field = '*', mode = 'tfcrop', datacolumn = 'data', timecutoff = 5., freqcutoff = 5., maxnpieces = 5,
  action = 'apply', display = 'report', flagbackup = True )
flagdata( vis = pband_ms_path, field = '*', mode = 'tfcrop', datacolumn = 'data', timecutoff = 5., freqcutoff = 5., maxnpieces = 5,
  action = 'apply', display = 'report', flagbackup = False )
</source>


=== Flagging non-operational antennas ===
Let's get another flag summary to see how much extra data got flagged:
<source lang='python'>
summary_2 = flagdata( vis = pband_ms_path, mode = 'summary' )


In addition to updating the position for antenna ea07, we have to flag antennas ea06, ea17, ea20, and ea26, since these did not have working L-band receivers at the time of observation. We do this with the task {{flagdata}}:
axis = 'scan'
for value, stats in summary_2[ axis ].iteritems():
  old_stats = summary_1[ axis ][ value ]
  print '%s %s: %5.1f percent flagged additionally' % ( axis, value, 100. * ( stats[ 'flagged' ] - old_stats[ 'flagged' ] ) / stats[ 'total' ] )
</source>
 
There is quite a bit of RFI that gets missed in RFI-rich spectral windows. The solution to this is to provide the flagging routines with more contrast between healthy and affected data. For this, we will combine the 16 spectral windows into one, and perform a preliminary bandpass calibration to take out the bandpass edge effects between spectral windows, and other intrinsic bandpass structure. Combining spectral windows can only be done with the experimental task <i>mstransform()</i>, which seems to work ok for this type of operation. A new measurement set will be created.
<source lang='python'>
onespw_ms_path = project_name + '_PBAND_1SPW.ms'
if os.path.isdir( pband_ms_path ):
  rmtables( onespw_ms_path )
 
mstransform( vis = pband_ms_path, outputvis = onespw_ms_path, datacolumn = 'data', combinespws = True )
</source>


<source lang="python">
Before we do more flagging, we will approximately remove the frequency structure across the observing band that is induced by our instrument (the VLA). This bandpass calibration, one per antenna and polarization, is derived using the primary calibrator 3C48. In the measurement set, all (uncalibrated) visibility data is located in a column named <i>DATA</i>. To perform any kind of calibration, we need to create and fill a <i>MODEL_DATA</i> column that matches the dimensions of the <i>DATA</i> column. Logically, the <i>MODEL_DATA</i> column contains the visibilities corresponding to whatever radio source model we choose to calibrate against. For our bandpass calibration against 3C48, we assume an unpolarized point source model with a frequency-dependent flux density as described by the Scaife & Heald (2012) low-frequency flux scale. Note that this operation roughly doubles the size of the measurement set.
# In CASA
<source lang='python'>
flagdata(vis='G55.7+3.4_10s.ms', mode='manual',
fluxscale = setjy( vis = onespw_ms_path, field = bcal_field, scalebychan = True, standard = 'Scaife-Heald 2012', usescratch = True )
        antenna='ea06,ea17,ea20,ea26')
</source>
</source>


Note that the first thing {{flagdata}} does is create a backup flag file, in this case named "flagdata_1". This flag file contains a copy of the flags present in the MS prior to the requested flagging operation, and can be found inside the <tt><MS_name>.flagversions</tt> directory, along with any other backed up flag files.  Since these flag files take up a fair amount of space (in this particular case, 230 MB), we won't me making them every time we run flagdata -- the automatic flag backup can be turned off by setting flagbackup=False. However, it's good to keep a record of the names of the backup files and the associated processing step, in case you wish to restore a previous version of the flags using the {{flagmanager}} task.
There will probably be some warnings about a time-dependent feed table in this and subsequent CASA task output logs. This is caused by a problem in the <i>FEED</i> sub-table created by <i>mstransform()</i>, but can be ignored. The logger reports the stokes I flux of 3C48, which should be in the range of 50-60 Jy. For P-band you really need calibrators of this magnitude. Any calibrator will be competing with typically 40-50 Jy of total apparent flux of other sources within the same wide field-of-view. Experience shows that observing a 20-30 Jy source like 3C286 for a few minutes is insufficient to derive good-quality bandpass calibrations. Better options are 3C48 and 3C147.


=== Flagging shadowed antennas and zero-amplitude data ===
We set the minimum signal-to-noise (SNR) requirement to 0.1 to allow for as many solutions as possible, even for channels that have much RFI. Our aim here is not to create a clean bandpass calibration, but to have a first-order correction to perform more flagging.
<source lang='python'>
bcal_field = '3C48'
bcal_scan = '4'
reference_antenna = 'ea01'
bandpass_table_v0 = onespw_ms_path + '.B0'


Since this is the most compact EVLA configuration, there may be instances where one antenna blocks, or "shadows" another. Therefore, we will run {{flagdata}} to remove these data:
if os.path.isdir( bandpass_table_v0 ):
  rmtables( bandpass_table_v0 )


<source lang="python">
bandpass( vis = onespw_ms_path, caltable = bandpass_table_v0, field = bcal_field, selectdata = True, refant = reference_antenna,
# In CASA
  solint = 'inf', combine = 'scan,field', minsnr = 0.1, solnorm = False, parang = True )
flagdata(vis='G55.7+3.4_10s.ms', mode='shadow',
        flagbackup=False)
</source>
</source>


In this particular observation, there does not appear to be any data affected by shadowing, as can be seen in the logger report.
The task <i>bandpass()</i> will report failed solutions for several channels, which is due to our previous flagging and because of heavily RFI-affected channels. The resulting bandpass calibration table can be inspected using <i>plotcal()</i>. It may be necessary to adjust the <i>plotrange</i> parameters ( <i>min_freq_MHz</i>, <i>max_freq_MHz</i>, <i>min_amp</i>, <i>max_amp</i> ) to get an optimal view for all antennas.
<source lang='python'>
plotcal( caltable = bandpass_table_v0, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,0.,0.1 ], markersize = 2.0 )
</source>


In addition, there may be times during which the correlator writes out pure zero-valued data. In order to remove this bad data, we run {{flagdata}} to remove any pure zeroes:
Each plot shows the bandpass amplitudes for both polarizations X and Y. The Mark Region and Locate buttons can be used to identify the polarization, pol = 0 being X and pol = 1 being Y. You will notice that each antenna and polarization has a different overall gain level. Spectral windows are recognizable by the depressions in the bandpass plots, where spw = 2,9,13 are particularly affected by RFI. Several antennas / polarizations show significant ripples across frequency, which are mostly caused by cable connector problems (e.g., see antenna ea07). More information is provided in the Appendix below. As expected, antenna ea25 has one polarization that has a very low-amplitude bandpass plot.


<source lang="python">
<source lang='python'>
# In CASA
summary_3 = flagdata( vis = onespw_ms_path, mode = 'summary' )
flagdata(vis='G55.7+3.4_10s.ms', mode='clip',
 
        clipzeros=True, flagbackup=False)  
axis = 'scan'
for id, stats in summary_3[ axis ].iteritems():
  print '%s %s: %5.1f percent flagged' % ( axis, id, 100. * stats[ 'flagged' ] / stats[ 'total' ] )
</source>
</source>


Inspecting the logger output which is generated by {{flagdata}} shows that there is a very small quantity of zero-valued data (0.02%) present in this MS.
Although we could, we are not going to flag any bad bandpass calibration solutions in =plotcal()= (we'll do that later). The bandpass table, with all its obvious problems, is temporarily applied to the data to facilitate more flagging. This means that the visibility data (of all sources) in the <i>DATA</i> column gets corrected with the bandpass calibration table and copied into the <i>CORRECTED_DATA</i> column. Channels for which no solution was found will be flagged. Note that this operation, together with the <i>MODEL_DATA</i> column created by <i>setjy()</i>, roughly triples the size of the measurement set with respect to the original. This may take a while.


''Note that the archive will automatically flag shadowed antennas as well as zero-valued data, if you request that online flags are applied.''
<source lang='python'>
applycal( vis = onespw_ms_path, field = '*', gaintable = [ bandpass_table_v0 ], interp = [ 'nearest,nearestflag' ],
  applymode = 'calflagstrict', flagbackup = True )
</source>
 
For convenience, we have made a backup of the flagged data status. Now that we have flattened out most of the bandpass structure, we run <i>flagdata()</i> in the <i>rflag</i> mode on the corrected data, which performs a more rigorous outlier detection. First we check the results before applying them. Remember that the data now only has one spectral window.
<source lang='python'>
flagdata( vis = onespw_ms_path, field = '*', mode = 'rflag', datacolumn = 'corrected', winsize = 5,
  action = 'calculate', display = 'both', flagbackup = False )
</source>


== Automatic RFI excision ==
You can see that most of antenna ea25 gets flagged. This is likely because much of the dead polarization data gets flagged, and these flags get extended to the other polarization products. The task =flagdata()= in =rflag= mode does a good job in catching most of the obvious RFI without over-flagging, so we'll now run it twice to apply the flags.


Now, we move on to one of the most difficult parts of L-band, D-configuration data processing: excising the RFI.  For the original reduction of this MS, flagging was done by hand and took several weeks.  The resulting data are offered as an option for the imaging stage of this tutorial (because careful by-hand flagging does yield a better image); however, it's not always practical to undertake this endeavor, and often the "automatic" flagging provides a reasonable (and much less time-consuming) solution.  Therefore, we will demonstrate the use of the automatic RFI excision tools currently available in CASA.
<source lang='python'>
flagdata( vis = onespw_ms_path, field = '*', mode = 'rflag', datacolumn = 'corrected', winsize = 5,
  action = 'apply', display = 'report', flagbackup = False )
flagdata( vis = onespw_ms_path, field = '*', mode = 'rflag', datacolumn = 'corrected', winsize = 5,
  action = 'apply', display = 'report', flagbackup = False )
</source>


=== Hanning-smoothing data ===
By getting the new flagging statistics, we can indeed confirm that ea25 is now also completely flagged.


Prior to flagging any data which is affect by strong RFI, one should Hanning-smooth the data to remove Gibbs ringing.  This is done with the task {{hanningsmooth}}, which can either write a new, Hanning-smoothed MS or directly operate on the requested column of the input MS.  To conserve space, we will request the latter.  Note that if you wish to make your own "before" and "after" plots, you should make the first <i>prior</i> to running {{hanningsmooth}}, since you <i>will</i> be overwriting the non-Hanning-smoothed data in the process -- and this is not reversible. 
<source lang='python'>
summary_4 = flagdata( vis = onespw_ms_path, mode = 'summary' )


<source lang="python">
axis = 'antenna'
# In CASA
for value, stats in summary_4[ axis ].iteritems():
plotms(vis='G55.7+3.4_10s.ms', scan='30', antenna='ea24', spw='0~2',
  old_stats = summary_3[ axis ][ value ]
    xaxis='freq', yaxis='amp', coloraxis='spw', symbolshape = 'circle',
  print '%s %s: %5.1f percent flagged' % ( axis, value, 100. * ( stats[ 'flagged' ] ) / stats[ 'total' ] )
    correlation='RR,LL', plotrange=[1.0,1.27,-0.3,2.5],
    plotfile='amp_v_freq.beforeHanning.png')


hanningsmooth(vis='G55.7+3.4_10s.ms', datacolumn='data')
axis = 'scan'
for value, stats in summary_4[ axis ].iteritems():
  old_stats = summary_3[ axis ][ value ]
  print '%s %s: %5.1f percent flagged additionally' % ( axis, value, 100. * ( stats[ 'flagged' ] - old_stats[ 'flagged' ] ) / stats[ 'total' ] )
</source>


plotms(vis='G55.7+3.4_10s.ms', scan='30', antenna='ea24', spw='0~3',
Now we have removed most of the RFI, we will start the actual calibration of the data. We go back to our original data in the <i>DATA</i> column by removing the the <i>CORRECTED_DATA</i> column. For this, we use the table toolkit.
    xaxis='freq', yaxis='amp', coloraxis='spw', symbolshape = 'circle',
<source lang='python'>
    correlation='RR,LL', plotrange=[1.0,1.27,-0.3,2.5],
tb.open( onespw_ms_path, nomodify = False )
    plotfile='amp_v_freq.afterHanning.png')
tb.removecols( 'CORRECTED_DATA' )
tb.close()
</source>
</source>


[[Image:PlotMS2.png|200px|thumb|left|before Hanning smoothing]]
[...]
[[Image:PlotMS3.png|200px|thumb|right|after Hanning smoothing]]
 
== Delay and bandpass calibration ==
 
The initial flagging has cleaned the data of most of the RFI. This allows us to proceed with deriving the necessary calibrations. First we use the full bandwidth on a single scan on the primary calibrator to determine a single delay per antenna per polarization. This will determine a single (approximate) phase slope across frequency, mainly caused by propagation effects in the (time-variable) ionosphere, cable length differences and electronics in the signal paths from antenna feeds to correlator. Note that for a short (5-10 minutes), single scan on the calibrator we can get away with solving for a time-invariant delay per antenna per polarization. We will again use scan 4, which is the longest scan on 3C48.
 
<source lang='python'>
bcal_field = '3C48'
bcal_scan = '4'
reference_antenna = 'ea01'
delay_table_v1 = onespw_ms_path + '.K1'
 
if os.path.isdir( delay_table_v1 ):
  rmtables( delay_table_v1 )


Task {{hanningsmooth}} will take a few minutes to run.  Note that the 2nd {{plotms}} command above contains a trivial change in the spw selection (trivial because the 4th spw is outside of the specified plotrange).  This forces {{plotms}} to reload the plot since by default, {{plotms}} will not redraw a plot if the input parameters are unchanged.  In this case, since the data column was changed between calls to {{plotms}}, a redraw is necessary. When using the GUI, you can simply check "force reload" in the bottom left corner of the side bar before clicking "Plot."
gaincal( vis = onespw_ms_path, caltable = delay_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, gaintype = 'K', parang = True )


We can compare the Hanning-smoothed data with the raw data by plotting a subset of data to show the result of Hanning-smoothing (see plots to the left and right). As you can see, the smoothing has spread the single-channel RFI into three channels, but has also removed the effects of some of the worst RFI from a number of channels.  Overall, this will improve our ability to flag RFI from the data and retain as much good data as possible.
plotcal( caltable = delay_table_v1, xaxis = 'antenna', yaxis = 'delay', markersize = 2.0 )
</source>


=== Using the phase calibration source for preliminary bandpass calibration ===
Since we picked ea01 as our reference antenna, the delays for this antenna ID (=0) are arbitrarily set to zero. All other delays should be within 100 nanosec or so (which they should be for this data set). Larger values should be treated with suspicion, probably indicating a problem with the antenna / polarization. We will use the bandpass calibration (next) to verify this.


In order to get the best possible result from the automatic RFI excision, we will first apply bandpass calibration to the MS. Since the RFI is time-variable, using the phase calibration source to make an average bandpass over the entire observation will mitigate the amount of RFI present in the calculated bandpass. (For the final calibration, we will use the designated bandpass source 3C147; however, since this object was only observed in the last set of scans, it doesn't sample the time variability and would not provide a good average bandpass.)
Next is to determine the bandpass calibration. We use the same source and scan, and apply the delay calibration before solving for the bandpass. Note that we request a minimum SNR of 3, which will make the solve fail for the worst channels, but not all.
<source lang='python'>
bandpass_table_v1 = onespw_ms_path + '.B1'


Since there are likely to be gain variations over the course of the observation, we will run {{gaincal}} to solve for an initial set of antenna-based phases over a narrow range of channels. These will be used to create the bandpass solutions.  While amplitude variations will have little effect on the bandpass solutions, it is important to solve for these phase variations with sufficient time resolution to prevent decorrelation when vector averaging the data in computing the bandpass solutions.
if os.path.isdir( bandpass_table_v1 ):
  rmtables( bandpass_table_v1 )


In order to choose a narrow range of channels for each spectral window which are relatively RFI-free over the course of the observation, we can look at the data with {{plotms}}.  Note that it's important to only solve for phase using a narrow channel range, since an antenna-specific delay will cause the phase to vary with respect to frequency over the spectral window, perhaps by a substantial amount.
bandpass( vis = onespw_ms_path, caltable = bandpass_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, solnorm = False, parang = True,
  gaintable = [ delay_table_v1 ], interp = [ 'nearest,nearestflag' ] )
</source>


<source lang="python">
After solving, we inspect the bandpass calibration amplitudes and phases, and flag any obvious residual outliers. Outliers may be found above or below the average bandpass curves, and tend to arise in the same channel (frequency) ranges for all antennas. Don't spend more than 1 minute per antenna. And don't worry about missing some bad points; these bad channels will likely get flagged in a later stage anyway. Note that the bandpass amplitudes and phases may differ between polarizations of the same antenna. Also note that the bandpass phases across frequency should not have an overall gradient (this was removed by the delay calibration). Also also note that bandpass phases may wrap around from +/-180 to -/+180 degrees. If that is problematic, re-run the phase <i>plotcal()</i> with <i>plotrange = [ 200.,500.,0.,360. ]</i>. Also note that there are no bandpass solutions for antennas ea10, ea13 and ea25.
# In CASA
<source lang='python'>
plotms(vis='G55.7+3.4_10s.ms', scan='30,75,120,165,190,235,303',
plotcal( caltable = bandpass_table_v1, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', markersize = 2.0 )
      antenna='ea24', xaxis='channel', yaxis='amp', iteraxis='spw',
 
      yselfscale=True, correlation='RR,LL', symbolshape='circle')
plotcal( caltable = bandpass_table_v1, xaxis = 'freq', yaxis = 'phase', iteration = 'antenna', plotrange = [ 200.,500.,-180.,180. ], markersize = 2.0 )
</source>
</source>


* yselfscale=True: sets the y-scaling to be for the currently displayed spectral window, since some spectral windows have much worse RFI and will skew the scale for others.
Flagging is made easier by maximizing the plotcal() window. We don't set the scale for plotting the bandpass amplitudes, which is convenient when flagging outliers as it will auto-rescale. While plotting the bandpass phases we do fix the scale, as it provides a better feeling for the relevant magnitude of phase outliers. Flagging of outliers is done using the <i>Mark Region</i> and <i>Flag</i> buttons. We are using this mechanism to efficiently flag data manually, since it is done per antenna rather than per baseline. These 'flags' will not be permanent until we call <i>applycal()</i> later on, but are effective while applying the calibration on the fly, as we will do in subsequent calibration steps.


Looking at these plots, we can choose appropriate channel ranges for each SPW:
== Gain calibration ==


<pre>
With the delay and bandpass calibration in place, we will now look more closely at the time-variable behaviour of the VLA. We use the same scan on our primary calibrator 3C48 over the full effective bandwidth to determine gain calibrations: one complex value per antenna per polarization per integration time. The delay and bandpass tables are applied on the fly.
SPW 0: 10-13
 
SPW 1: 30-33
<source lang='python'>
SPW 2: 32-35
gain_table_v1 = onespw_ms_path + '.G1'
SPW 3: 30-33
 
SPW 4: 35-38
if os.path.isdir( gain_table_v1 ):
SPW 5: 30-33
  rmtables( gain_table_v1 )
SPW 6: 30-33
 
SPW 7: 46-49
gaincal( vis = onespw_ms_path, caltable = gain_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
</pre>
  solint = 'int', refant = reference_antenna, minsnr = 3.0, gaintype = 'G', calmode = 'ap',
  gaintable = [ delay_table_v1, bandpass_table_v1 ], interp = [ 'nearest,nearestflag', 'nearest,nearestflag' ], parang = True )
</source>
 
Similar to the bandpass flagging, we will flag outlier gain solutions in both amplitude and phase. The regular dips in the gain amplitudes every 4 minutes is caused by a very strong RFI signal from the local VLA site radio; this issue is being addressed. For the amplitudes, the final scatter around an average close to one should be a few percent. Note that antenna ea12 has quite a large bump in the gain amplitudes on one polarization. For this and other cases, remember that the gain solutions for both polarizations can be flagged together, as we will loose the equivalent data of the surviving polarization anyway.


Using these channel ranges, we run {{gaincal}} to calculate phase-only solutions that will be used as input during our initial bandpass calibration.  Remember - the calibration tables we are creating now are so that we can use automatic RFI flagging algorithms.  Our final calibration tables will be generated later, after automated flagging. Here are the inputs for our initial pre-bandpass phase calibration:
<source lang='python'>
plotcal( caltable = gain_table_v1, xaxis = 'time', yaxis = 'amp', iteration = 'antenna', markersize = 2.0 )


<source lang="python">
plotcal( caltable = gain_table_v1, xaxis = 'time', yaxis = 'phase', iteration = 'antenna', plotrange = [ None,None,-180.,180. ], markersize = 2.0 )
# In CASA
gaincal(vis='G55.7+3.4_10s.ms', caltable='G55.7+3.4_10s.initPh',
        intent='CALIBRATE_PHASE*', solint='int',
        spw='0:10~13,1;3;5~6:30~33,2:32~35,4:35~38,7:46~49',
        refant='ea24', minblperant=3,
        minsnr=3.0, calmode='p', gaintable='G55.7+3.4_10s.pos')
</source>
</source>


* caltable='G55.7+3.4_10s.initPh': this is the output calibration table that will be written.
Note that when plotting gains against time, it is convenient to use auto-scaling of the time axis by putting <i>None</i> in the first two fields of <i>plotrange</i>.
* intent='CALIBRATE_PHASE*': this is the way we have chosen to select data.  Alternatively, we could have used "field='J1925+2106'", since this is the only source with the CALIBRATE_PHASE* scan intent.  Note the use of the wildcard character "*" at the end of the string; this accounts for the fact that all the intents end with ".UNSPECIFIED". We could just as well have used "*PHASE*".
* solint='int': we request a solution for each 10-second integration.
* spw='0:10~13,1;3;5~6:30~33,2:32~35,4:35~38,7:46~49': note the syntax of this selection: a ":" is used to separate the SPW from channel selection, ";" is used to separate <i>within</i> this selection, and "~" is used to indicate an inclusive range. 
* refant='ea24': we have chosen ea24 as the reference antenna after inspecting the antenna position diagram (see above).  It is relatively close to, but not directly in, the center of the array, which could be important in D-configuration, since you don't want the reference antenna to have a high probability of being shadowed by nearby antennas.
* minblperant=3: the minimum number of baselines which must be present to attempt a phase solution.
* minsnr=3.0: the minimum signal-to-noise a solution must have to be considered acceptable.  Note that solutions which fail this test will cause these data to be flagged downstream of this calibration step.
* calmode='p': perform phase-only solutions.
* gaintable='G55.7+3.4_10s.pos': use the antenna position correction for ea07 that we created earlier.


Note that a number of solutions do not pass the requirements of the minimum 3 baselines (generating the terminal message "Insufficient unflagged antennas to proceed with this solve.") or minimum signal-to-noise ratio (outputting "n of x solutions rejected due to SNR < 3 ...").  A particularly large number of solutions are rejected in SPW 4, where the RFI is most severe.
Next, we will prepare a smoothed and interpolated version of the gain calibration table, which will be applied later on to the target field data. This prevents flagging of target field data when one of the edges of a calibrator scan is flagged for one or more antennas. The result can be inspected with <i>plotcal</i>.
<source lang='python'>
smooth_gain_table_v1 = onespw_ms_path + '.Gs1'


[[Image:plotcal1.png|200px|thumb|right|Phases for antenna ea09]]
if os.path.isdir( smooth_gain_table_v1 ):
[[Image:plotcal2.png|200px|thumb|right|Phases in SPW 4]]
  rmtables( smooth_gain_table_v1 )


We can inspect the resulting calibration table with {{plotcal}}:
smoothcal( vis = onespw_ms_path, tablein = gain_table_v1, caltable = smooth_gain_table_v1, smoothtype = 'median', smoothtime = 60. * 60. )


<source lang="python">
plotcal( caltable = smooth_gain_table_v1, xaxis = 'time', yaxis = 'amp', iteration = 'antenna', plotrange = [ None,None,0.8,1.2 ], markersize = 2.0 )
# In CASA
 
plotcal(caltable='G55.7+3.4_10s.initPh', xaxis='time', yaxis='phase',
plotcal( caltable = smooth_gain_table_v1, xaxis = 'time', yaxis = 'phase', iteration = 'antenna', plotrange = [ None,None,-10.,10. ], markersize = 2.0 )
        iteration='antenna', spw='0', plotrange=[-1,-1,-180,180])
</source>
</source>


This iterates over antenna for a single spectral window; we can see that the phase does not change much over the course of the observation for SPW 0.  We may also iterate over spectral window for a subset of antennas:
== Instrumental polarization calibration ==


<source lang="python">
The VLA at P-band measures the incoming radio waves using dual-dipole feeds mounted near the primary focus of the dishes. While much effort is put into mechanically making these dual-dipoles orthogonal, and to strongly suppress any cross-talk between the electronic signal paths of both dipoles, there is some (frequency-dependent) polarization leakage between them. Furthermore, the P-band feeds are mounted and aligned on each antenna by hand, allowing for 5-10 degrees difference in the orientation of the dipoles between antennas. For both intensity and polarization imaging, it is important to calibrate the polarization products in our data to optimize the (i) orthogonality between X and Y for each antenna and (ii) the alignment between Xs and Ys of different antennas. Note that this does not (yet) include calibration of the absolute polarization angle, for which we need a linearly polarized source with known polarization angle.
# In CASA
 
plotcal(caltable='G55.7+3.4_10s.initPh', xaxis='time', yaxis='phase',
First we calibrate the cross delay, which is the difference in delay between the two polarizations of the reference antenna, in our case ea01. Remember that the regular delay calibration arbitrarily set the delays for both polarizations of the reference antenna to zero. In reality, there will be a small but noticeable physical path length difference between these two polarizations, for which we try to correct. This calibration uses the same scan on 3C48, assuming that 3C48 is unpolarized at P-band (which is a good approximation).
        iteration='spw', antenna='ea01,ea05,ea24', plotrange=[-1,-1,-180,180])
<source lang='python'>
cross_delay_table_v1 = onespw_ms_path + '.Kc1'
 
if os.path.isdir( cross_delay_table_v1 ):
  rmtables( cross_delay_table_v1 )
 
gaincal( vis = onespw_ms_path, caltable = cross_delay_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, gaintype = 'KCROSS', parang = True,
  gaintable = [ delay_table_v1, bandpass_table_v1, gain_table_v1 ], interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )
 
plotcal( caltable = cross_delay_table_v1, xaxis = 'antenna', yaxis = 'delay', markersize = 2.0 )
</source>
</source>


Clearly, the phases are affected by RFI in some places, especially in SPW 4.
The plot shows a small ~2 nanosec delay between X and Y of the reference antenna. Note that the table is generated in such a way that this correction gets applied to all antennas.


Using this phase information, we create time-averaged bandpass solutions for the phase calibration source:
Next, we determine the leakage of the X signal into Y, and Y into X. For a well-behaved instrument, the magnitude of the leakage (the so-called D-terms) should be much less than one. Since the leakage is frequency dependent, we solve for leakage for each frequency channel, somewhat similar to bandpass calibration. The way to do this in CASA is through the <i>polcal()</i> task with the option <i>poltype = 'Df'</i>. Again, we can inspect (and edit) the leakage calibration table with <i>plotcal()</i>


<source lang="python">
<source lang='python'>
# In CASA
leakage_table_v1 = onespw_ms_path + '.Df1'
bandpass(vis='G55.7+3.4_10s.ms', caltable='G55.7+3.4_10s.initBP',
 
        intent='CALIBRATE_PHASE*', solint='inf',
if os.path.isdir( leakage_table_v1 ):
        combine='scan', refant='ea24', minblperant=3, minsnr=10.0,
  rmtables( leakage_table_v1 )
        gaintable=['G55.7+3.4_10s.pos', 'G55.7+3.4_10s.initPh'],
 
        interp=['', 'nearest'], solnorm=False)
polcal( vis = onespw_ms_path, caltable = leakage_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', preavg = 1., refant = reference_antenna, minsnr = 3.0, poltype = 'Df',
  gaintable = [ delay_table_v1, bandpass_table_v1, gain_table_v1, cross_delay_table_v1 ],
  interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )
 
plotcal( caltable = leakage_table_v1, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,0.,1. ], markersize = 2.0 )
</source>
 
Before starting any flagging, it is best to first cycle past all antennas to get a feel for the magnitude of the leakage terms. For most antennas, both leakage terms are roughly equal in amplitude across the band, with values between 0 and 0.15. Few have higher leakages (up to 0.3). The most likely explanation is a larger misalignment of the P-band feed of these antennas relative to the others. Examples are ea05, ea11, and ea24. These antennas do not need to be flagged, but are merely expected to benefit most from this polarization calibration. Some examples of suspicious data that is probably best to flag: antenna ea03 has a peculiar bump in one of the leakage terms, ea12 has an upturn at the low-frequency end of the band, ea14 has a peak near the low-frequency end of the band.
 
It is better not to flag based on phases, because the closer the amplitude of the leakage terms get to zero, the more erratic the phase behaviour will be.
An alternative is to flag based on the real and imaginary parts, which you may or may not want to do.
<source lang='python'>
plotcal( caltable = leakage_table_v1, xaxis = 'freq', yaxis = 'real', iteration = 'antenna', plotrange = [ 200.,500.,-0.5,0.5 ], markersize = 2.0 )
 
plotcal( caltable = leakage_table_v1, xaxis = 'freq', yaxis = 'imag', iteration = 'antenna', plotrange = [ 200.,500.,-0.5,0.5 ], markersize = 2.0 )
</source>
</source>


* solint='inf', combine='scan': the solution interval of 'inf' will automatically break by scans; this requests that the solution intervals be combined over scans, so that we will get one solution per antenna.
== Re-iterate bandpass and leakage calibration ==
* gaintable=['G55.7+3.4_10s.pos', 'G55.7+3.4_10s.initPh']: we will pre-apply both the antenna position corrections as well as the initial phase solutions.
 
* interp=[<nowiki>''</nowiki>, 'nearest']: by default, {{gaincal}} will use linear interpolation for pre-applied calibration.  However, we want the <i>nearest</i> phase solution to be used for a given time.
The largest instrumental effects on our data are now captured in several relevant calibration tables. But since we have used uncalibrated / partially calibrated data to determine these calibration tables, there are improvements to be obtained when re-determining some calibration tables. In this guide we re-calibrate the bandpass and polarization leakage since these are expected to have changed most. Our re-calibrations will be relative to the existing bandpass and leakage calibrations, so that we can more easily see deviations from the ideal case.
 
First we update the bandpass calibration by determining a new, relative bandpass table while applying all previous calibrations. In the ideal case that our data and previous calibrations were perfect, the new bandpass table would contain gain amplitudes and phases of one and zero, respectively, for all (unflagged) antennas, polarizations and channels.


Again, we can see that a number of solutions have been rejected by our choices of <tt>minblperant</tt> and <tt>minsnr</tt>.
<source lang='python'>
bandpass_table_v1a = onespw_ms_path + '.B1a'


[[Image:plotcal3.png|200px|thumb|right|Bandpasses for antennas ea10 - ea19]]
if os.path.isdir( bandpass_table_v1a ):
  rmtables( bandpass_table_v1a )


We may plot the bandpasses with plotcal; first looking at the amplitudes:
bandpass( vis = onespw_ms_path, caltable = bandpass_table_v1a, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, solnorm = False, parang = True,
  gaintable = [ delay_table_v1, bandpass_table_v1, gain_table_v1, cross_delay_table_v1, leakage_table_v1 ],
  interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )


<source lang="python">
plotcal( caltable = bandpass_table_v1a, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,0.,2. ], markersize = 2.0 )
# In CASA
 
plotcal(caltable='G55.7+3.4_10s.initBP', xaxis='freq', yaxis='amp',
plotcal( caltable = bandpass_table_v1a, xaxis = 'freq', yaxis = 'phase', iteration = 'antenna', plotrange = [ 200.,500.,-180.,180. ], markersize = 2.0 )
        iteration='antenna', subplot=331)
</source>
</source>


* subplot=331: displays 3x3 plots per screen
In the <i>plotcal()</i> calls above, the vertical axis scales have been chosen to indicate the relevance of the ideal case of unity amplitudes and zero phases. For most antennas, the bandpass solutions are close to ideal. Some antennas show some noticeable structure across frequency. A general guideline for flagging (or not) is that we expect the relative bandpass to be close to one in amplitude and vary smoothly in frequency.
 
<source lang='python'>
leakage_table_v1a = onespw_ms_path + '.Df1a'
 
if os.path.isdir( leakage_table_v1a ):
  rmtables( leakage_table_v1a )


Also, we can look at the phase solutions:
polcal( vis = onespw_ms_path, caltable = leakage_table_v1a, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', preavg = 1., refant = reference_antenna, minsnr = 3.0, poltype = 'Df',
  gaintable = [ delay_table_v1, bandpass_table_v1, bandpass_table_v1a, gain_table_v1, cross_delay_table_v1, leakage_table_v1 ],
  interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )


<source lang="python">
plotcal( caltable = leakage_table_v1a, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,None,None ], markersize = 2.0 )
# In CASA
plotcal(caltable='G55.7+3.4_10s.initBP', xaxis='freq', yaxis='phase',
        iteration='antenna', subplot=331)
</source>
</source>


We can see that SPW 4 is virtually wiped-out by RFI; furthermore, there are channels in SPW 1 that are consistently badly affected.  Prior to running any automatic flagging, we will flag these manually.  In addition, we will flag the first 9 channels of SPW 0, since this is affected by an issue which causes the noise to be substantially higher:
== Transfer of calibrations to the target field ==


<source lang="python">
So far, we have used one scan on the primary calibrator 3C48 to derive various calibration tables. These calibrations will now be applied to all scans of all sources in our measurement set, which includes 3C48 itself and our target field 0313-192. As described above, the task <i>applycal()</i> creates a <i>CORRECTED_DATA</i> column in which the calibrated visibilities get stored. This may take a while.
# In CASA
 
flagdata(vis='G55.7+3.4_10s.ms', spw='0:0~8,1:41~63,4')
<source lang='python'>
applycal( vis = onespw_ms_path, field = '*', selectdata = True, parang = True, applymode = 'calflagstrict', flagbackup = True,
    gaintable = [ delay_table_v1, bandpass_table_v1, bandpass_table_v1a, smoothed_gain_table_v1, cross_delay_table_v1, leak_table_v1, leak_table_v1a ],
    interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag',
    'nearest,nearestflag', 'nearest,nearestflag' ] )
</source>
</source>


Note that this has created a backup flag file called "flagdata_2".  Now we apply the antenna position corrections and the bandpass calibration table to the data:
Now we split off the calibrated target field data, meaning that the visibilities of source 0313-192 get copied from the <i>CORRECTED_DATA</i> column to the <i>DATA</i> column of a new measurement set. This is convenient for further processing.


<source lang="python">
<source lang='python'>
# In CASA
target_name = '0313-192'
applycal(vis='G55.7+3.4_10s.ms',
target_ms_path = target_name + '_PBAND_1SPW.ms'
        gaintable=['G55.7+3.4_10s.pos', 'G55.7+3.4_10s.initBP'],
 
        calwt=False)
if os.path.isdir( target_ms_path ):
  rmtables( target_ms_path )
 
split( vis = onespw_ms_path, outputvis = target_ms_path, datacolumn = 'corrected', field = target_name, keepflags = False )
</source>
 
== Cross-polarization flagging ==
 
All flagging up to this point was done on the calibrator 3C48, and some of these flags got propagated to the target field data. we will now extend the flagging of the target field data by flagging based on the cross-polarization visibilities XY and YX. Most RFI is strongly polarized, and will stand out clearly against the typically very weakly polarized target field.  
 
<source lang='python'>
flagdata( vis = pband_ms_path_1spw, mode = 'rflag', field = '*', correlation = 'XY,YX', datacolumn = 'corrected', winsize = 5,
  action = 'apply', display = 'report', flagbackup = False )
</source>
</source>
At this point, we're ready to make a first image of our target field, after which we will self-calibrate and re-image.
[...]
== Appendix: Some P-band data issues you may want to know about ==
Unfortunately, there are a few known issues with JVLA P-band observing. Most problems were discovered during the P-band commissioning period and have been fixed for newer data sets, but the archive keeps part of this history alive. Here we will go over some of those issues, and (if possible) provide ways of fixing them.
=== Polarization labeling ===
For a long period (until recent), P-band feeds have been labelled as being circular (R and L), while they are linear (X and Y). A contributed task =fixlowband()= is available to recognize and fix this problem.
=== Swapped polarizations ===
Throughout the whole history of the new VLA low-band system, even up to this day, there have been mistakes in the cabling of the full signal chain. This results in that some antennas have the X-polarization signal come in as Y and vice versa. The way to notice this in visibility data is that for baselines with one swapped antenna most power will be in the cross-hand correlations (XY and YX) rather than the parallel-hand correlations (XX and YY). Once antennas with this feature are identified (manually), a contributed task <i>swappol()</i> is available to fix this problem.
=== Double data descriptor entries ===
The data description table is part of the measurement set, and provides a link between the recorded visibilities, the spectral window information and the polarization information. For some data sets, the data description table contains two entries for each P-band spectral window, one pointing towards a circular (RL) polarization definition, and one pointing towards a linear (XY) polarization definition. A contributed task <i>fixlowband()</i> is available to recognize and fix this problem.
=== Continuous Radio Frequency Interference (RFI) ===
The wide bandwidth of the low-band receiver is (unfortunately) guaranteed to contain significant amounts of RFI. There are a few RFI sources that are active all the time, and are visible in all array configurations. The default P-band observing setup of 16 x 16 MHz tries to capture as much of the continuous RFI in as few spectral windows as possible, allowing for a simple RFI mitigation strategy in which these spectral windows (spws 1,2 and 9,10, but possibly more) can be immediately flagged.
=== Two spectral window setup ===
In the early commissioning period, the default setup for P-band observing was to use 2 spectral windows of 1024 channels each to cover 256 MHz of bandwidth from 230 - 486 MHz. However, it was noticed that strong, narrow-band RFI events were causing data to be lost for the whole spectral window in which they occured. To make the system more robust against data loss from these events, the frequency range was divided into 16 x 16 MHz, and shifted downwards by 6 MHz to capture ever-present RFI into as few spectral windows as possible. If your data has only two P-band spectral windows, please be aware that a higher data loss due to RFI is possible. There is no way to repair this.
=== Bandpass ripples ===
Due to signal reflections in cables and within the VLA dish, sinusoidal amplitude (and phase) modulations are always present in P-band data. This is most easily seen in bandpass calibration plots of amplitude versus frequency. In some cases, mostly due to cable & connector problems, these modulations can be very strong (~up to 50 percent of the average amplitude level). These modulations tend not vary over the duration of an observation and can therefore be removed through bandpass (and polarization) calibration. If they are found to be variable (e.g., by inspecting bandpass solutions for separate calibrator scans), the offending antenna / polarization should be flagged.
=== High cross-polarization ===
On each antenna, the P-band feed (dipole) is visually aligned with respect to the primary focus support legs. This is normally done within 5-10 degrees accuracy. On rare occasions the dipole on one antenna has accidentally rotated to much larger angles because the locking bolt on the back of the feed was not completely tightened. The result is a high cross-polarization in the baseline visibilities that include this antenna. If this is the case, it is safest to flag this data, since there is a possibility that the dipole has rotated during the observations.
== Useful links ==
* [http://www.aoc.nrao.edu/lbr The EVLA Low-Band Receiver System Status & User Pages]
* [https://science.nrao.edu/facilities/vla/docs/manuals/obsguide/modes/vlofreq VLA Very Low Frequency Observing]
* [https://science.nrao.edu/facilities/vla/commissioning NRAO VLA Low-Band commissioning webpage]

Revision as of 16:29, 15 June 2015

Back to CASA guides

By Huib Intema & Preshanth Jagannathan

Last checked on CASA Version 4.3.1.


Overview

This webpage provides a basic description on how to use CASA to reduce data from the upper part of the new VLA low-band system, also known as P-band, covering roughly 220-480 MHz. The goal is to make a wide-field continuum stokes I image of a typical blank field using the full effective bandwidth.

Obtaining the raw data

For this guide we'll use some test data that was taken in B-configuration. To get a copy of the raw data, go to the NRAO archive query page, and enter the following search parameters (leave the rest on default):

Telescopes: Jansky VLA (tickbox)
Project Code: TSUB0001
Telescope Config: B (tickbox)
Observing Bands: P (tickbox)

The search should return (at least) 19 rows of results. Enter your valid e-mail address, set the download format to SDM-BDF, check the box on the 17th row (data from Dec. 21, 2013, or "13-Dec-21 03:11:18") at the bottom of the page, and click Get My Data. On the next page, click Retrieve over internet. The next page should report that the data staging is in progress. Wait until you receive an e-mail reporting that your archive data is copied, which should take a few minutes. Download the data onto your computer running CASA.

Starting CASA

Start CASA by typing

casa

on the (linux) command line. This should start a CASA interactive python (iPython) session, and open a separate log window. The CASA version is reported at startup, both in the python session and the log window:

CASA Version 4.3.1-REL (r32491)

Note that this guide has been written for CASA release 4.3.1, which is the current stable release at NRAO. Due to ongoing development of CASA, this tutorial may or may not work with other versions. You may want to confirm your version before proceeding.

Importing the raw data into CASA

We can use the python environment to make our lives easier. First, we define some paths that point to data structures on disk. The box below contain the commands that need to be copied into CASA (either retype or copy-paste):

sdm_path = 'TSUB0001.sb28588128.eb28590840.56647.13284232639'
project_name = 'TSUB0001_20131221'
ms_path = project_name + '.ms'
online_flags_file = project_name + '.flags'

If some of these already exist, you can use the following commands to remove them:

if os.path.isdir( ms_path ):
  rmtables( ms_path )

if os.path.isfile( online_flags_file ):
  os.remove( online_flags_file )

if os.path.isdir( ms_path + '.flagversions' ):
  shutil.rmtree( ms_path + '.flagversions', ignore_errors = True )

Now we use the importevla() task to convert the SDM-BDF data to a CASA measurement set (ms). This may take a few minutes:

importevla( asdm = sdm_path, vis = ms_path, savecmds = True, outfile = online_flags_file )

This task calls the external tool asdm2MS to perform the conversion. Together with the visibility data, also the flag commands from the VLA online system are imported. These flags are not directly applied, but stored in the TSUB0001_20131221.flags file and applied later.

Preliminary data inspection

listobs_file = project_name + '.listobs'
if os.path.isfile( listobs_file ):
  os.remove( listobs_file )

listobs( vis = ms_path, verbose = True, listfile = listobs_file )

You can inspect the output text file TSUB0001_20131221.listobs in your favorite text editor (e.g., gedit). When taking some time to familiarize yourself with the output format, you will see that:

  • The observation consists of 4 scans, namely [1] 3C48D (hardware setup), [2] 3C48 (primary calibrator), [3] 0313-192 (target), and [4] again 3C48 (primary calibrator).
  • The frequency coverage is 224 - 480 MHz, divided into 16 x 16 MHz spectral windows, each having 128 x 0.125 MHz channels
  • Visibilities are recorded every 2 seconds in full polarization (4 polarization products, (wrongly!) labelled RR,RL,LR,LL).
  • Of the 28 VLA antennas labelled ea01 - ea028, antennas ea06 and ea17 are not participating in this observation.
  • Source, antenna and spectral window IDs start at zero, but scan IDs start at one.

The array configuration can be inspected using:

plotants_file = project_name + '.plotants.pdf'
if os.path.isfile( plotants_file ):
  os.remove( plotants_file )

plotants( vis = ms_path, figfile = plotants_file )

The figure in the plot window is also available as a PDF file named TSUB0001_20131221.plotants.pdf

As noted above, the polarizations of P-band in this data set are wrongly labelled as circular rather than linear. This may seem mostly harmless, but does make a difference for polarization calibration (which we will do later). The following (non-standard) task will check and fix this (and another related problem; see appendix on P-band data issues):

execfile( '/lustre/hintema/cspam/mytasks.py' )

fixlowband( vis = ms_path )

If desired, you can re-run the listobs() task to check if the fix was correctly applied.

Addendum: If you're not working on the NRAO DSOC network, you won't have access to the lustre file system. In that case, download this tarball in your CASA working directory, open a shell there, and type the following commands:

tar xzvf casa_vla_lowband.tar.gz

buildmytasks

Now go back to your CASA session and type:

execfile( 'mytasks.py' )

fixlowband( vis = ms_path )

Initial processing steps

When importing the data, we saved the flags from the online system to an ASCII text file. This gives us the opportunity to review the flag commands before applying them. For our data set, the flag file is called TSUB0001_20131221.flags. Please load this file into your favorite text editor. The bulk of the flag commands refer to times when the VLA is slewing (ANTENNA_NOT_ON_SOURCE) or when the movable secondary reflector of the VLA's Cassegrain system is not in place (SUBREFLECTOR_ERROR). The latter can cause antenna gain variations (amplitude and phase), so it is safest to apply all the flags. The final two rows in the flag file will remove visibilities that are pure zero, and flag antennas that are partly blocked by other antennas (shadowing; this occurs mostly in compact configurations when observing along a VLA arm).

flagdata( vis = ms_path, mode = 'list', inpfile = online_flags_file, action = 'apply', reason = 'any', flagbackup = False )

The next step will correct the visibility amplitudes for the signal leveling that occurs at the inputs of the WIDAR correlator, the so-called requantizer gains. These levels (per antenna, per polarization, per spectral window) are stored with the measurement set (in the SYSPOWER sub-table). Currently, this step is not essential, since the levels get set only once at the start of an observation, and bandpass calibration will correct for this. But it will make your bandpass plots look better if you have multiple spectral windows. And, more importantly, in the future it may be that the levels will become time-variable during an observation, so we'd better be prepared.

The correction is done in two steps. First, the information in the SYSPOWER sub-table gets translated into a gain table. Second, the visibility data in the DATA column of the measurement set gets copied into a new CORRECTED_DATA column, and is corrected with the gain table. Note that this operation roughly doubles the size of the measurement set with respect to the original. This may take a while.

rq_gain_table = ms_path + '.Grq'

if os.path.isdir( rq_gain_table ):
  rmtables( rq_gain_table )

gencal( vis = ms_path, caltable = rq_gain_table, caltype = 'rq' )

applycal( vis = ms_path, field = '*', gaintable = [ rq_gain_table ], interp = [ 'nearest,nearestflag' ], applymode = 'calflagstrict', flagbackup = False )

If your observation is part of a multi-band observation, this is the time to isolate the P-band part. Although these data contain only P-band, this step is still useful because it will make the requantizer gain corrections permanent, and drop time ranges that are completely flagged (like the slew periods). The following call to split() will create a new measurement set with just P-band data. P-band data is selected by its spectral window range, which can be retrieved from the listobs() output:

pband_spws = '0~15'
pband_ms_path = project_name + '_PBAND.ms'

if os.path.isdir( pband_ms_path ):
  rmtables( pband_ms_path )

if os.path.isdir( pband_ms_path + '.flagversions' ):
  shutil.rmtree( pband_ms_path + '.flagversions', ignore_errors = True )

split( vis = ms_path, outputvis = pband_ms_path, field = '*', spw = pband_spws, datacolumn = 'corrected', keepflags = False )

Next, we will apply Hanning smoothing to suppress Gibbs ringing around bright RFI lines. Visibilities are overwritten; no new measurement set is created.

hanningsmooth( vis = pband_ms_path, datacolumn = 'data' )

NOTE: The experimental task mstransform() combines split() and hanningsmooth() and several other data manipulation operations, but its output is not yet to be trusted for all operations.

Dead and swapped antennas

Now it is time to have a first visual look at the uncalibrated visibility data. It is important to identify dead antennas / polarizations early on, so we can exclude them from further data processing (which is the most efficient data 'reduction' :-) ). A convenient way of doing this is through the flagdata() task on bright calibrator(s) (again, see the listobs() output), in our case 3C48.

bcal_field = '3C48'
flagdata( vis = pband_ms_path, field = bcal_field, mode = 'tfcrop', datacolumn = 'data', timecutoff = 4., freqcutoff = 4., maxnpieces = 5,
  action = 'calculate', display = 'both', flagbackup = False )

This will bring forward a data inspection window, with (per scan, per baseline, per spectral window) the top row a set of intensity plots of the visibility amplitudes in all polarization products (XX, YY, XY, and YX) before flagging, and the bottom row the same data after applying some outlier flagging (marked in blue). The intensity plots do scale automatically to min-max, so any bright RFI pixel will skew the intensity range (hence the difference between the top and bottom row).

In the case of 16 x 16 MHz spectral windows, we want to initially inspect a more central spectral window (spw 5 through 7) than the default one at the low edge of the band (spw = 0). Notice when clicking Next SPW a few times that several spectral windows are heavily affected by RFI, for instance spw 2 and 3, and 8 and 9. Also notice that not all RFI is captured; this is mainly because within a spectral window there is too little contrast between healthy and affected data. We will resolve that later.

A healthy spectral window will have little flagged data, and show a clear difference between the parallel-hand polarizations XX,YY (bottom row left two panels) and the cross-hand polarizations XY,YX (bottom row right two panels), where the former shows a time-constant, smooth spectral behaviour, while the latter shows a noise-like behaviour. Cycling through the baselines (Previous Baseline / Next Baseline buttons) please note the following:

  • Baselines containing antenna ea07 have a ripple in XX.
  • Baselines containing antennas ea10 or ea13 contain only noise in all polarization products.
  • Baselines containing antennas ea25 contain noise in XX and YY, signal in XY, and noise in YX
  • Baselines containing antenna ea28 have a ripple in YY

What this means is that antennas ea10 and ea13 are dead and need to be flagged. We will also take this opportunity to flag the dummy scan 1 on '3C48D'. Antenna ea25 has swapped polarizations and a dead Y-polarization; for demonstration purposes we will unswap this antenna, but it becomes useless later on since CASA cannot form proper stokes I visibilities (which is different behaviour than in some other reduction software, e.g,. AIPS). The ripples in antennas ea07 (X-polarization) and ea28 (Y-polarization) will show up, and calibrate out, in the bandpass calibration performed below.

If we're done inspecting the data in flagdata(), press the Quit button (and not Stop Display). The next commands will perform the necessary flag operations, and unswap antenna ea25.

dead_antennas = 'ea10,ea13'
flagdata( vis = pband_ms_path, mode = 'manual', antenna = dead_antennas, flagbackup = False )

dummy_scan = '1'
flagdata( vis = pband_ms_path, mode = 'manual', scan = dummy_scan, flagbackup = False )

swapped_antennas = 'ea25'
swappol( vis = pband_ms_path, antenna = swapped_antennas )

NOTE: swappol() is not part of the default CASA release, but was imported together with fixlowband(). It is a pure python implementation operating on visibilities, therefore it may take a while to finish. The way in which we run swappol() we overwrite the previous visibilities, so no new measurement set is created.

You can run flagdata() again in calculate mode to inspect the results.

Automatic flagging

Before throwing away bad spectral windows by hand, we'll let the automated flaggers in CASA have a go at it. The main task for this is flagdata(). While working on your data, flagdata() produces an abundance of output, not all of which I find easy to understand. To help with this, we can get the flag status of our data before and after auto-flagging by running flagdata() in the summary mode. This first call provides the flag statistics of the flagging up to now, before any auto-flagging:

summary_1 = flagdata( vis = pband_ms_path, mode = 'summary' )

This returns a python dictionary with flagged versus total visibilities along various axes (antenna, scan, spw, field, correlation, etc.). For example, if we want to know the percentage flagged per scan, run the following (note that the scans may not appear in sorted order):

axis = 'scan'
for id, stats in summary_1[ axis ].iteritems():
  print '%s %s: %5.1f percent flagged' % ( axis, id, 100. * stats[ 'flagged' ] / stats[ 'total' ] )

For this example, you will notice that scan 1 (the dummy scan on 3C48D) is 100 percent flagged, which is what we did during the initial flagging.

We will run flagdata() in the tfcrop mode, which will (per scan, per baseline, per spectral window, per polarization) look for visibility amplitude outliers. It uses a 5-piece polynomial in an attempt to remove any intrinsic bandpass (amplitude) structure (we did not calibrate for bandpass yet). We run the task twice to allow for slightly deeper flagging. For the first run, we tell CASA to make a backup of our visibility flag status up to here, giving us an option to restore them if we choose over-aggresive flagging parameters and consequently over-flag our data. The flag backup file name is reported in the log window, and can be found in the TSUB0001_20131221_PBAND.ms.flagversions directory.

flagdata( vis = pband_ms_path, field = '*', mode = 'tfcrop', datacolumn = 'data', timecutoff = 5., freqcutoff = 5., maxnpieces = 5,
  action = 'apply', display = 'report', flagbackup = True )
flagdata( vis = pband_ms_path, field = '*', mode = 'tfcrop', datacolumn = 'data', timecutoff = 5., freqcutoff = 5., maxnpieces = 5,
  action = 'apply', display = 'report', flagbackup = False )

Let's get another flag summary to see how much extra data got flagged:

summary_2 = flagdata( vis = pband_ms_path, mode = 'summary' )

axis = 'scan'
for value, stats in summary_2[ axis ].iteritems():
  old_stats = summary_1[ axis ][ value ]
  print '%s %s: %5.1f percent flagged additionally' % ( axis, value, 100. * ( stats[ 'flagged' ] - old_stats[ 'flagged' ] ) / stats[ 'total' ] )

There is quite a bit of RFI that gets missed in RFI-rich spectral windows. The solution to this is to provide the flagging routines with more contrast between healthy and affected data. For this, we will combine the 16 spectral windows into one, and perform a preliminary bandpass calibration to take out the bandpass edge effects between spectral windows, and other intrinsic bandpass structure. Combining spectral windows can only be done with the experimental task mstransform(), which seems to work ok for this type of operation. A new measurement set will be created.

onespw_ms_path = project_name + '_PBAND_1SPW.ms'
if os.path.isdir( pband_ms_path ):
  rmtables( onespw_ms_path )

mstransform( vis = pband_ms_path, outputvis = onespw_ms_path, datacolumn = 'data', combinespws = True )

Before we do more flagging, we will approximately remove the frequency structure across the observing band that is induced by our instrument (the VLA). This bandpass calibration, one per antenna and polarization, is derived using the primary calibrator 3C48. In the measurement set, all (uncalibrated) visibility data is located in a column named DATA. To perform any kind of calibration, we need to create and fill a MODEL_DATA column that matches the dimensions of the DATA column. Logically, the MODEL_DATA column contains the visibilities corresponding to whatever radio source model we choose to calibrate against. For our bandpass calibration against 3C48, we assume an unpolarized point source model with a frequency-dependent flux density as described by the Scaife & Heald (2012) low-frequency flux scale. Note that this operation roughly doubles the size of the measurement set.

fluxscale = setjy( vis = onespw_ms_path, field = bcal_field, scalebychan = True, standard = 'Scaife-Heald 2012', usescratch = True )

There will probably be some warnings about a time-dependent feed table in this and subsequent CASA task output logs. This is caused by a problem in the FEED sub-table created by mstransform(), but can be ignored. The logger reports the stokes I flux of 3C48, which should be in the range of 50-60 Jy. For P-band you really need calibrators of this magnitude. Any calibrator will be competing with typically 40-50 Jy of total apparent flux of other sources within the same wide field-of-view. Experience shows that observing a 20-30 Jy source like 3C286 for a few minutes is insufficient to derive good-quality bandpass calibrations. Better options are 3C48 and 3C147.

We set the minimum signal-to-noise (SNR) requirement to 0.1 to allow for as many solutions as possible, even for channels that have much RFI. Our aim here is not to create a clean bandpass calibration, but to have a first-order correction to perform more flagging.

bcal_field = '3C48'
bcal_scan = '4'
reference_antenna = 'ea01'
bandpass_table_v0 = onespw_ms_path + '.B0'

if os.path.isdir( bandpass_table_v0 ):
  rmtables( bandpass_table_v0 )

bandpass( vis = onespw_ms_path, caltable = bandpass_table_v0, field = bcal_field, selectdata = True, refant = reference_antenna,
  solint = 'inf', combine = 'scan,field', minsnr = 0.1, solnorm = False, parang = True )

The task bandpass() will report failed solutions for several channels, which is due to our previous flagging and because of heavily RFI-affected channels. The resulting bandpass calibration table can be inspected using plotcal(). It may be necessary to adjust the plotrange parameters ( min_freq_MHz, max_freq_MHz, min_amp, max_amp ) to get an optimal view for all antennas.

plotcal( caltable = bandpass_table_v0, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,0.,0.1 ], markersize = 2.0 )

Each plot shows the bandpass amplitudes for both polarizations X and Y. The Mark Region and Locate buttons can be used to identify the polarization, pol = 0 being X and pol = 1 being Y. You will notice that each antenna and polarization has a different overall gain level. Spectral windows are recognizable by the depressions in the bandpass plots, where spw = 2,9,13 are particularly affected by RFI. Several antennas / polarizations show significant ripples across frequency, which are mostly caused by cable connector problems (e.g., see antenna ea07). More information is provided in the Appendix below. As expected, antenna ea25 has one polarization that has a very low-amplitude bandpass plot.

summary_3 = flagdata( vis = onespw_ms_path, mode = 'summary' )

axis = 'scan'
for id, stats in summary_3[ axis ].iteritems():
  print '%s %s: %5.1f percent flagged' % ( axis, id, 100. * stats[ 'flagged' ] / stats[ 'total' ] )

Although we could, we are not going to flag any bad bandpass calibration solutions in =plotcal()= (we'll do that later). The bandpass table, with all its obvious problems, is temporarily applied to the data to facilitate more flagging. This means that the visibility data (of all sources) in the DATA column gets corrected with the bandpass calibration table and copied into the CORRECTED_DATA column. Channels for which no solution was found will be flagged. Note that this operation, together with the MODEL_DATA column created by setjy(), roughly triples the size of the measurement set with respect to the original. This may take a while.

applycal( vis = onespw_ms_path, field = '*', gaintable = [ bandpass_table_v0 ], interp = [ 'nearest,nearestflag' ],
  applymode = 'calflagstrict', flagbackup = True )

For convenience, we have made a backup of the flagged data status. Now that we have flattened out most of the bandpass structure, we run flagdata() in the rflag mode on the corrected data, which performs a more rigorous outlier detection. First we check the results before applying them. Remember that the data now only has one spectral window.

flagdata( vis = onespw_ms_path, field = '*', mode = 'rflag', datacolumn = 'corrected', winsize = 5,
  action = 'calculate', display = 'both', flagbackup = False )

You can see that most of antenna ea25 gets flagged. This is likely because much of the dead polarization data gets flagged, and these flags get extended to the other polarization products. The task =flagdata()= in =rflag= mode does a good job in catching most of the obvious RFI without over-flagging, so we'll now run it twice to apply the flags.

flagdata( vis = onespw_ms_path, field = '*', mode = 'rflag', datacolumn = 'corrected', winsize = 5,
  action = 'apply', display = 'report', flagbackup = False )
flagdata( vis = onespw_ms_path, field = '*', mode = 'rflag', datacolumn = 'corrected', winsize = 5,
  action = 'apply', display = 'report', flagbackup = False )

By getting the new flagging statistics, we can indeed confirm that ea25 is now also completely flagged.

summary_4 = flagdata( vis = onespw_ms_path, mode = 'summary' )

axis = 'antenna'
for value, stats in summary_4[ axis ].iteritems():
  old_stats = summary_3[ axis ][ value ]
  print '%s %s: %5.1f percent flagged' % ( axis, value, 100. * ( stats[ 'flagged' ] ) / stats[ 'total' ] )

axis = 'scan'
for value, stats in summary_4[ axis ].iteritems():
  old_stats = summary_3[ axis ][ value ]
  print '%s %s: %5.1f percent flagged additionally' % ( axis, value, 100. * ( stats[ 'flagged' ] - old_stats[ 'flagged' ] ) / stats[ 'total' ] )

Now we have removed most of the RFI, we will start the actual calibration of the data. We go back to our original data in the DATA column by removing the the CORRECTED_DATA column. For this, we use the table toolkit.

tb.open( onespw_ms_path, nomodify = False )
tb.removecols( 'CORRECTED_DATA' )
tb.close()

[...]

Delay and bandpass calibration

The initial flagging has cleaned the data of most of the RFI. This allows us to proceed with deriving the necessary calibrations. First we use the full bandwidth on a single scan on the primary calibrator to determine a single delay per antenna per polarization. This will determine a single (approximate) phase slope across frequency, mainly caused by propagation effects in the (time-variable) ionosphere, cable length differences and electronics in the signal paths from antenna feeds to correlator. Note that for a short (5-10 minutes), single scan on the calibrator we can get away with solving for a time-invariant delay per antenna per polarization. We will again use scan 4, which is the longest scan on 3C48.

bcal_field = '3C48'
bcal_scan = '4'
reference_antenna = 'ea01'
delay_table_v1 = onespw_ms_path + '.K1'

if os.path.isdir( delay_table_v1 ):
  rmtables( delay_table_v1 )

gaincal( vis = onespw_ms_path, caltable = delay_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, gaintype = 'K', parang = True )

plotcal( caltable = delay_table_v1, xaxis = 'antenna', yaxis = 'delay', markersize = 2.0 )

Since we picked ea01 as our reference antenna, the delays for this antenna ID (=0) are arbitrarily set to zero. All other delays should be within 100 nanosec or so (which they should be for this data set). Larger values should be treated with suspicion, probably indicating a problem with the antenna / polarization. We will use the bandpass calibration (next) to verify this.

Next is to determine the bandpass calibration. We use the same source and scan, and apply the delay calibration before solving for the bandpass. Note that we request a minimum SNR of 3, which will make the solve fail for the worst channels, but not all.

bandpass_table_v1 = onespw_ms_path + '.B1'

if os.path.isdir( bandpass_table_v1 ):
  rmtables( bandpass_table_v1 )

bandpass( vis = onespw_ms_path, caltable = bandpass_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, solnorm = False, parang = True,
  gaintable = [ delay_table_v1 ], interp = [ 'nearest,nearestflag' ] )

After solving, we inspect the bandpass calibration amplitudes and phases, and flag any obvious residual outliers. Outliers may be found above or below the average bandpass curves, and tend to arise in the same channel (frequency) ranges for all antennas. Don't spend more than 1 minute per antenna. And don't worry about missing some bad points; these bad channels will likely get flagged in a later stage anyway. Note that the bandpass amplitudes and phases may differ between polarizations of the same antenna. Also note that the bandpass phases across frequency should not have an overall gradient (this was removed by the delay calibration). Also also note that bandpass phases may wrap around from +/-180 to -/+180 degrees. If that is problematic, re-run the phase plotcal() with plotrange = [ 200.,500.,0.,360. ]. Also note that there are no bandpass solutions for antennas ea10, ea13 and ea25.

plotcal( caltable = bandpass_table_v1, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', markersize = 2.0 )

plotcal( caltable = bandpass_table_v1, xaxis = 'freq', yaxis = 'phase', iteration = 'antenna', plotrange = [ 200.,500.,-180.,180. ], markersize = 2.0 )

Flagging is made easier by maximizing the plotcal() window. We don't set the scale for plotting the bandpass amplitudes, which is convenient when flagging outliers as it will auto-rescale. While plotting the bandpass phases we do fix the scale, as it provides a better feeling for the relevant magnitude of phase outliers. Flagging of outliers is done using the Mark Region and Flag buttons. We are using this mechanism to efficiently flag data manually, since it is done per antenna rather than per baseline. These 'flags' will not be permanent until we call applycal() later on, but are effective while applying the calibration on the fly, as we will do in subsequent calibration steps.

Gain calibration

With the delay and bandpass calibration in place, we will now look more closely at the time-variable behaviour of the VLA. We use the same scan on our primary calibrator 3C48 over the full effective bandwidth to determine gain calibrations: one complex value per antenna per polarization per integration time. The delay and bandpass tables are applied on the fly.

gain_table_v1 = onespw_ms_path + '.G1'

if os.path.isdir( gain_table_v1 ):
  rmtables( gain_table_v1 )

gaincal( vis = onespw_ms_path, caltable = gain_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'int', refant = reference_antenna, minsnr = 3.0, gaintype = 'G', calmode = 'ap',
  gaintable = [ delay_table_v1, bandpass_table_v1 ], interp = [ 'nearest,nearestflag', 'nearest,nearestflag' ], parang = True )

Similar to the bandpass flagging, we will flag outlier gain solutions in both amplitude and phase. The regular dips in the gain amplitudes every 4 minutes is caused by a very strong RFI signal from the local VLA site radio; this issue is being addressed. For the amplitudes, the final scatter around an average close to one should be a few percent. Note that antenna ea12 has quite a large bump in the gain amplitudes on one polarization. For this and other cases, remember that the gain solutions for both polarizations can be flagged together, as we will loose the equivalent data of the surviving polarization anyway.

plotcal( caltable = gain_table_v1, xaxis = 'time', yaxis = 'amp', iteration = 'antenna', markersize = 2.0 )

plotcal( caltable = gain_table_v1, xaxis = 'time', yaxis = 'phase', iteration = 'antenna', plotrange = [ None,None,-180.,180. ], markersize = 2.0 )

Note that when plotting gains against time, it is convenient to use auto-scaling of the time axis by putting None in the first two fields of plotrange.

Next, we will prepare a smoothed and interpolated version of the gain calibration table, which will be applied later on to the target field data. This prevents flagging of target field data when one of the edges of a calibrator scan is flagged for one or more antennas. The result can be inspected with plotcal.

smooth_gain_table_v1 = onespw_ms_path + '.Gs1'

if os.path.isdir( smooth_gain_table_v1 ):
  rmtables( smooth_gain_table_v1 )

smoothcal( vis = onespw_ms_path, tablein = gain_table_v1, caltable = smooth_gain_table_v1, smoothtype = 'median', smoothtime = 60. * 60. )

plotcal( caltable = smooth_gain_table_v1, xaxis = 'time', yaxis = 'amp', iteration = 'antenna', plotrange = [ None,None,0.8,1.2 ], markersize = 2.0 )

plotcal( caltable = smooth_gain_table_v1, xaxis = 'time', yaxis = 'phase', iteration = 'antenna', plotrange = [ None,None,-10.,10. ], markersize = 2.0 )

Instrumental polarization calibration

The VLA at P-band measures the incoming radio waves using dual-dipole feeds mounted near the primary focus of the dishes. While much effort is put into mechanically making these dual-dipoles orthogonal, and to strongly suppress any cross-talk between the electronic signal paths of both dipoles, there is some (frequency-dependent) polarization leakage between them. Furthermore, the P-band feeds are mounted and aligned on each antenna by hand, allowing for 5-10 degrees difference in the orientation of the dipoles between antennas. For both intensity and polarization imaging, it is important to calibrate the polarization products in our data to optimize the (i) orthogonality between X and Y for each antenna and (ii) the alignment between Xs and Ys of different antennas. Note that this does not (yet) include calibration of the absolute polarization angle, for which we need a linearly polarized source with known polarization angle.

First we calibrate the cross delay, which is the difference in delay between the two polarizations of the reference antenna, in our case ea01. Remember that the regular delay calibration arbitrarily set the delays for both polarizations of the reference antenna to zero. In reality, there will be a small but noticeable physical path length difference between these two polarizations, for which we try to correct. This calibration uses the same scan on 3C48, assuming that 3C48 is unpolarized at P-band (which is a good approximation).

cross_delay_table_v1 = onespw_ms_path + '.Kc1'

if os.path.isdir( cross_delay_table_v1 ):
  rmtables( cross_delay_table_v1 )

gaincal( vis = onespw_ms_path, caltable = cross_delay_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, gaintype = 'KCROSS', parang = True,
  gaintable = [ delay_table_v1, bandpass_table_v1, gain_table_v1 ], interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )

plotcal( caltable = cross_delay_table_v1, xaxis = 'antenna', yaxis = 'delay', markersize = 2.0 )

The plot shows a small ~2 nanosec delay between X and Y of the reference antenna. Note that the table is generated in such a way that this correction gets applied to all antennas.

Next, we determine the leakage of the X signal into Y, and Y into X. For a well-behaved instrument, the magnitude of the leakage (the so-called D-terms) should be much less than one. Since the leakage is frequency dependent, we solve for leakage for each frequency channel, somewhat similar to bandpass calibration. The way to do this in CASA is through the polcal() task with the option poltype = 'Df'. Again, we can inspect (and edit) the leakage calibration table with plotcal()

leakage_table_v1 = onespw_ms_path + '.Df1'

if os.path.isdir( leakage_table_v1 ):
  rmtables( leakage_table_v1 )

polcal( vis = onespw_ms_path, caltable = leakage_table_v1, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', preavg = 1., refant = reference_antenna, minsnr = 3.0, poltype = 'Df',
  gaintable = [ delay_table_v1, bandpass_table_v1, gain_table_v1, cross_delay_table_v1 ],
  interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )

plotcal( caltable = leakage_table_v1, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,0.,1. ], markersize = 2.0 )

Before starting any flagging, it is best to first cycle past all antennas to get a feel for the magnitude of the leakage terms. For most antennas, both leakage terms are roughly equal in amplitude across the band, with values between 0 and 0.15. Few have higher leakages (up to 0.3). The most likely explanation is a larger misalignment of the P-band feed of these antennas relative to the others. Examples are ea05, ea11, and ea24. These antennas do not need to be flagged, but are merely expected to benefit most from this polarization calibration. Some examples of suspicious data that is probably best to flag: antenna ea03 has a peculiar bump in one of the leakage terms, ea12 has an upturn at the low-frequency end of the band, ea14 has a peak near the low-frequency end of the band.

It is better not to flag based on phases, because the closer the amplitude of the leakage terms get to zero, the more erratic the phase behaviour will be. An alternative is to flag based on the real and imaginary parts, which you may or may not want to do.

plotcal( caltable = leakage_table_v1, xaxis = 'freq', yaxis = 'real', iteration = 'antenna', plotrange = [ 200.,500.,-0.5,0.5 ], markersize = 2.0 )

plotcal( caltable = leakage_table_v1, xaxis = 'freq', yaxis = 'imag', iteration = 'antenna', plotrange = [ 200.,500.,-0.5,0.5 ], markersize = 2.0 )

Re-iterate bandpass and leakage calibration

The largest instrumental effects on our data are now captured in several relevant calibration tables. But since we have used uncalibrated / partially calibrated data to determine these calibration tables, there are improvements to be obtained when re-determining some calibration tables. In this guide we re-calibrate the bandpass and polarization leakage since these are expected to have changed most. Our re-calibrations will be relative to the existing bandpass and leakage calibrations, so that we can more easily see deviations from the ideal case.

First we update the bandpass calibration by determining a new, relative bandpass table while applying all previous calibrations. In the ideal case that our data and previous calibrations were perfect, the new bandpass table would contain gain amplitudes and phases of one and zero, respectively, for all (unflagged) antennas, polarizations and channels.

bandpass_table_v1a = onespw_ms_path + '.B1a'

if os.path.isdir( bandpass_table_v1a ):
  rmtables( bandpass_table_v1a )

bandpass( vis = onespw_ms_path, caltable = bandpass_table_v1a, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', refant = reference_antenna, minsnr = 3.0, solnorm = False, parang = True,
  gaintable = [ delay_table_v1, bandpass_table_v1, gain_table_v1, cross_delay_table_v1, leakage_table_v1 ],
  interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )

plotcal( caltable = bandpass_table_v1a, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,0.,2. ], markersize = 2.0 )

plotcal( caltable = bandpass_table_v1a, xaxis = 'freq', yaxis = 'phase', iteration = 'antenna', plotrange = [ 200.,500.,-180.,180. ], markersize = 2.0 )

In the plotcal() calls above, the vertical axis scales have been chosen to indicate the relevance of the ideal case of unity amplitudes and zero phases. For most antennas, the bandpass solutions are close to ideal. Some antennas show some noticeable structure across frequency. A general guideline for flagging (or not) is that we expect the relative bandpass to be close to one in amplitude and vary smoothly in frequency.

leakage_table_v1a = onespw_ms_path + '.Df1a'

if os.path.isdir( leakage_table_v1a ):
  rmtables( leakage_table_v1a )

polcal( vis = onespw_ms_path, caltable = leakage_table_v1a, field = bcal_field, selectdata = True, scan = bcal_scan,
  solint = 'inf', preavg = 1., refant = reference_antenna, minsnr = 3.0, poltype = 'Df',
  gaintable = [ delay_table_v1, bandpass_table_v1, bandpass_table_v1a, gain_table_v1, cross_delay_table_v1, leakage_table_v1 ],
  interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag' ] )

plotcal( caltable = leakage_table_v1a, xaxis = 'freq', yaxis = 'amp', iteration = 'antenna', plotrange = [ 200.,500.,None,None ], markersize = 2.0 )

Transfer of calibrations to the target field

So far, we have used one scan on the primary calibrator 3C48 to derive various calibration tables. These calibrations will now be applied to all scans of all sources in our measurement set, which includes 3C48 itself and our target field 0313-192. As described above, the task applycal() creates a CORRECTED_DATA column in which the calibrated visibilities get stored. This may take a while.

applycal( vis = onespw_ms_path, field = '*', selectdata = True, parang = True, applymode = 'calflagstrict', flagbackup = True,
    gaintable = [ delay_table_v1, bandpass_table_v1, bandpass_table_v1a, smoothed_gain_table_v1, cross_delay_table_v1, leak_table_v1, leak_table_v1a ],
    interp = [ 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag', 'nearest,nearestflag',
    'nearest,nearestflag', 'nearest,nearestflag' ] )

Now we split off the calibrated target field data, meaning that the visibilities of source 0313-192 get copied from the CORRECTED_DATA column to the DATA column of a new measurement set. This is convenient for further processing.

target_name = '0313-192'
target_ms_path = target_name + '_PBAND_1SPW.ms'

if os.path.isdir( target_ms_path ):
  rmtables( target_ms_path )

split( vis = onespw_ms_path, outputvis = target_ms_path, datacolumn = 'corrected', field = target_name, keepflags = False )

Cross-polarization flagging

All flagging up to this point was done on the calibrator 3C48, and some of these flags got propagated to the target field data. we will now extend the flagging of the target field data by flagging based on the cross-polarization visibilities XY and YX. Most RFI is strongly polarized, and will stand out clearly against the typically very weakly polarized target field.

flagdata( vis = pband_ms_path_1spw, mode = 'rflag', field = '*', correlation = 'XY,YX', datacolumn = 'corrected', winsize = 5,
  action = 'apply', display = 'report', flagbackup = False )

At this point, we're ready to make a first image of our target field, after which we will self-calibrate and re-image. [...]

Appendix: Some P-band data issues you may want to know about

Unfortunately, there are a few known issues with JVLA P-band observing. Most problems were discovered during the P-band commissioning period and have been fixed for newer data sets, but the archive keeps part of this history alive. Here we will go over some of those issues, and (if possible) provide ways of fixing them.

Polarization labeling

For a long period (until recent), P-band feeds have been labelled as being circular (R and L), while they are linear (X and Y). A contributed task =fixlowband()= is available to recognize and fix this problem.

Swapped polarizations

Throughout the whole history of the new VLA low-band system, even up to this day, there have been mistakes in the cabling of the full signal chain. This results in that some antennas have the X-polarization signal come in as Y and vice versa. The way to notice this in visibility data is that for baselines with one swapped antenna most power will be in the cross-hand correlations (XY and YX) rather than the parallel-hand correlations (XX and YY). Once antennas with this feature are identified (manually), a contributed task swappol() is available to fix this problem.

Double data descriptor entries

The data description table is part of the measurement set, and provides a link between the recorded visibilities, the spectral window information and the polarization information. For some data sets, the data description table contains two entries for each P-band spectral window, one pointing towards a circular (RL) polarization definition, and one pointing towards a linear (XY) polarization definition. A contributed task fixlowband() is available to recognize and fix this problem.

Continuous Radio Frequency Interference (RFI)

The wide bandwidth of the low-band receiver is (unfortunately) guaranteed to contain significant amounts of RFI. There are a few RFI sources that are active all the time, and are visible in all array configurations. The default P-band observing setup of 16 x 16 MHz tries to capture as much of the continuous RFI in as few spectral windows as possible, allowing for a simple RFI mitigation strategy in which these spectral windows (spws 1,2 and 9,10, but possibly more) can be immediately flagged.

Two spectral window setup

In the early commissioning period, the default setup for P-band observing was to use 2 spectral windows of 1024 channels each to cover 256 MHz of bandwidth from 230 - 486 MHz. However, it was noticed that strong, narrow-band RFI events were causing data to be lost for the whole spectral window in which they occured. To make the system more robust against data loss from these events, the frequency range was divided into 16 x 16 MHz, and shifted downwards by 6 MHz to capture ever-present RFI into as few spectral windows as possible. If your data has only two P-band spectral windows, please be aware that a higher data loss due to RFI is possible. There is no way to repair this.

Bandpass ripples

Due to signal reflections in cables and within the VLA dish, sinusoidal amplitude (and phase) modulations are always present in P-band data. This is most easily seen in bandpass calibration plots of amplitude versus frequency. In some cases, mostly due to cable & connector problems, these modulations can be very strong (~up to 50 percent of the average amplitude level). These modulations tend not vary over the duration of an observation and can therefore be removed through bandpass (and polarization) calibration. If they are found to be variable (e.g., by inspecting bandpass solutions for separate calibrator scans), the offending antenna / polarization should be flagged.

High cross-polarization

On each antenna, the P-band feed (dipole) is visually aligned with respect to the primary focus support legs. This is normally done within 5-10 degrees accuracy. On rare occasions the dipole on one antenna has accidentally rotated to much larger angles because the locking bolt on the back of the feed was not completely tightened. The result is a high cross-polarization in the baseline visibilities that include this antenna. If this is the case, it is safest to flag this data, since there is a possibility that the dipole has rotated during the observations.

Useful links