Sunspot Band6 Calibration for CASA 4.7: Difference between revisions

From CASA Guides
Jump to navigationJump to search
No edit summary
Line 256: Line 256:
</source>
</source>
You can use {{plotms}} to plot channel-averaged amplitudes as a function of time, comparing the DATA and CORRECTED columns after applying the Tsys correction. This way you can check that calibration has done what was expected, which is put the data onto the Kelvin temperature scale.
You can use {{plotms}} to plot channel-averaged amplitudes as a function of time, comparing the DATA and CORRECTED columns after applying the Tsys correction. This way you can check that calibration has done what was expected, which is put the data onto the Kelvin temperature scale.
===Tsys+Tant calibration of the visibilities of the Sun===

Revision as of 10:46, 11 January 2018


Overview

The portion of the Sunspot_Band6 CASA Guide will cover the calibration of the raw visibility data. To follow this guide you must have downloaded the file Sunspot_Band6_UncalibratedData.tgz from Sunspot_Band6#Obtaining the Data.

Detail of the ALMA observations are provided at Sunspot_Band6

To skip to the image synthesis portion of the guide, see Sunspot_Band6_Imaging_for_CASA_4.7.

This guide is designed for CASA 4.7.

From next, we will show all commands for the calibration. If you do not want to cut-&-paste the commands, you can use the script as described in #Alternative way of the Calibration.

Before Starting the Calibration of Visibility Data

The “Analysis Utilities” package must be used for the calibration of solar raw visibility data. Therefore, before starting the tutorial, you need to install the package to your data-analysis environment. The documents and software of the package can be obtained from the Analysis Utilities page[1].

Unpack the Data

Once the file Sunspot_Band6_UncalibratedData.tgz had been download, unpack it as follows:

 # In a terminal outside CASA
tar -xvzf Sunspot_Band6_UncalibratedData.tgz

cd Sunspot_Band6_UncalibratedData


#Start CASA
casa

Confirm your version of CASA

This guide has been written for CASA release 4.7. Please confirm your version before proceeding.

# In Casa
version = casadef.casa_version 
print "You are using " + version 
if (version < '4.7.0'):
  print "YOUR VERSION OF CASA IS TOO OLD FOR THIS GUIDE."
  print "PLEASE UPDATE IT BEFORE PROCEEDING." 
else:
  print "Your version of CASA is appropriate for this guide."

We need to import some scripts we will use during the calibration.

import analysisUtils as aU
es = aU.stuffForScienceDataReduction() 
execfile(SunRedUtil.py)

“SunRedUtil.py” is included in the file Sunspot_Band6_UncalibratedData.tgz

Initial Inspection, A priori calibration

We start by defining the directory name of the ASDM and some directory names of the Measurement Sets (MS) for the calibration.

 #In Casa
asdm ='uid___A002_Xae00c5_X2a8d' mso = asdm + '.ms'
mss = asdm + '_split.ms'
msc = mss + '.cal'

The raw data have been provided to you in the ASDM format. It is the native format of the data produced by the ALMA observatory.

Before we can proceed to the calibration, we will need to convert those data to the CASA MS format. This is done simply with the task importasdm.

#In Casa
importasdm(asdm = asdm, vis = mso, asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary CalDevice ')

The usual first step is then to get some basic information about the data. We do this using the task listobs, which will output a detailed summary of each dataset supplied.

#In Casa
listobs(mso, listfile = asdm + '_listobs.txt')

The output will be sent to the CASA Template:Logger, or saved in a text file. Here is a snippet extracted from the listobs output:

================================================================================
  Date        Timerange (UTC)          Scan  FldId FieldName             nRows     SpwIds   Average Interval(s)    ScanIntent
  18-Dec-2015/19:15:42.3 - 19:16:47.5     1      0 Sun                     236530  [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.016, 0.016, 0.016, 0.016, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_ATMOSPHERE#AMBIENT,CALIBRATE_ATMOSPHERE#HOT,CALIBRATE_ATMOSPHERE#OFF_SOURCE,CALIBRATE_ATMOSPHERE#REFERENCE,CALIBRATE_WVR#AMBIENT,CALIBRATE_WVR#HOT,CALIBRATE_WVR#OFF_SOURCE,CALIBRATE_WVR#REFERENCE]
              19:17:31.8 - 19:19:26.4     2      1 J1924-2914             1081497  [4,25,26,27,28,29,30,31,32,33,34,35,36]  [1.15, 0.016, 0.016, 0.016, 0.016, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_POINTING#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              19:20:14.2 - 19:21:17.7     3      1 J1924-2914              895435  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_SIDEBAND_RATIO#IMAGE,CALIBRATE_SIDEBAND_RATIO#SIGNAL,CALIBRATE_WVR#IMAGE,CALIBRATE_WVR#SIGNAL]
              19:22:06.0 - 19:22:23.1     4      1 J1924-2914              177382  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_ATMOSPHERE#AMBIENT,CALIBRATE_ATMOSPHERE#HOT,CALIBRATE_ATMOSPHERE#OFF_SOURCE,CALIBRATE_WVR#AMBIENT,CALIBRATE_WVR#HOT,CALIBRATE_WVR#OFF_SOURCE]
              19:23:11.6 - 19:28:27.9     5      1 J1924-2914             3244522  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_BANDPASS#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              19:29:14.5 - 19:31:09.2     6      2 nrao530                1081528  [4,25,26,27,28,29,30,31,32,33,34,35,36]  [1.15, 0.016, 0.016, 0.016, 0.016, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_POINTING#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              19:31:54.6 - 19:32:11.4     7      2 nrao530                 177413  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_ATMOSPHERE#AMBIENT,CALIBRATE_ATMOSPHERE#HOT,CALIBRATE_ATMOSPHERE#OFF_SOURCE,CALIBRATE_WVR#AMBIENT,CALIBRATE_WVR#HOT,CALIBRATE_WVR#OFF_SOURCE]
              19:32:59.1 - 19:35:36.6     8      2 nrao530                1622261  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_FLUX#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              19:36:21.9 - 19:36:52.1     9      2 nrao530                 324446  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_PHASE#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              19:37:41.4 - 19:37:57.8    10      0 Sun                     177413  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_ATMOSPHERE#AMBIENT,CALIBRATE_ATMOSPHERE#HOT,CALIBRATE_ATMOSPHERE#OFF_SOURCE,CALIBRATE_WVR#AMBIENT,CALIBRATE_WVR#HOT,CALIBRATE_WVR#OFF_SOURCE]
              19:39:23.9 - 19:49:36.0    11      0 Sun                    3760610  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#OFF_SOURCE,CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#OFF_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              19:39:23.9 - 19:49:36.0    11      3 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              19:39:23.9 - 19:49:36.0    11      4 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
[...]
              19:39:23.9 - 19:49:36.0    11     79 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              19:50:21.7 - 19:50:52.0    12      2 nrao530                 324446  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_PHASE#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              19:51:41.2 - 19:51:58.0    13      0 Sun                     177413  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_ATMOSPHERE#AMBIENT,CALIBRATE_ATMOSPHERE#HOT,CALIBRATE_ATMOSPHERE#OFF_SOURCE,CALIBRATE_WVR#AMBIENT,CALIBRATE_WVR#HOT,CALIBRATE_WVR#OFF_SOURCE]
              19:53:26.0 - 20:03:37.0    14      0 Sun                    3742537  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#OFF_SOURCE,CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#OFF_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              19:53:26.0 - 20:03:37.0    14      3 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              19:53:26.0 - 20:03:37.0    14      4 Sun                      18042  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
            18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
[...]
19:53:26.0 - 20:03:37.0    14    150 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              20:04:22.7 - 20:04:53.7    15      2 nrao530                 324446  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_PHASE#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
              20:05:43.3 - 20:06:00.2    16      0 Sun                     177413  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576, 0.576] [CALIBRATE_ATMOSPHERE#AMBIENT,CALIBRATE_ATMOSPHERE#HOT,CALIBRATE_ATMOSPHERE#OFF_SOURCE,CALIBRATE_WVR#AMBIENT,CALIBRATE_WVR#HOT,CALIBRATE_WVR#OFF_SOURCE]
              20:06:47.8 - 20:07:30.5    17      0 Sun                     227168  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#OFF_SOURCE,CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#OFF_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              20:06:47.8 - 20:07:30.5    17     10 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              20:06:47.8 - 20:07:30.5    17     11 Sun                      18042  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              20:06:47.8 - 20:07:30.5    17     12 Sun                      18011  [4,5,6,7,8,9,10,11,12]  [1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_WVR#ON_SOURCE,OBSERVE_TARGET#ON_SOURCE]
              20:08:16.5 - 20:08:47.1    18      2 nrao530                 324446  [0,1,2,3,4,5,6,7,8,9,10,11,12]  [0.016, 0.016, 0.016, 0.016, 1.15, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01, 2.02, 1.01] [CALIBRATE_PHASE#ON_SOURCE,CALIBRATE_WVR#ON_SOURCE]
           (nRows = Total number of rows per scan) 
Fields: 151
  ID   Code Name                RA               Decl           Epoch   SrcId      nRows
  0    none Sun                 17:44:06.944771 -23.19.30.42665 ICRS    0        8499084
  1    none J1924-2914          19:24:51.055957 -29.14.30.12103 ICRS    1        5398836
  2    none nrao530             17:33:02.705760 -13.04.49.54800 ICRS    2        4178986
  3    none Sun                 17:44:06.379967 -23.20.38.51230 ICRS    0          36022
  4    none Sun                 17:44:07.341071 -23.20.38.51849 ICRS    0          36053
  5    none Sun                 17:44:08.302174 -23.20.38.52434 ICRS    0          36053
  6    none Sun                 17:44:09.263278 -23.20.38.52983 ICRS    0          36053
  7    none Sun                 17:44:10.224382 -23.20.38.53498 ICRS    0          36053
[...]
  149  none Sun                 17:44:18.760424 -23.18.24.86295 ICRS    0          18011
  150  none Sun                 17:44:19.721223 -23.18.24.86558 ICRS    0          18011
Spectral Windows:  (37 unique spectral windows and 2 unique polarization setups)
  SpwID  Name                                       #Chans   Frame   Ch0(MHz)  ChanWid(kHz)  TotBW(kHz) CtrFreq(MHz) BBC Num  Corrs  
  0      BB_1#SQLD                                       1   TOPO  230000.000   2000000.000   2000000.0 230000.0000        1  XX  YY
  1      BB_2#SQLD                                       1   TOPO  232000.000   2000000.000   2000000.0 232000.0000        2  XX  YY
  2      BB_3#SQLD                                       1   TOPO  246000.000   2000000.000   2000000.0 246000.0000        3  XX  YY
  3      BB_4#SQLD                                       1   TOPO  248000.000   2000000.000   2000000.0 248000.0000        4  XX  YY
  4      WVR#NOMINAL                                     4   TOPO  184550.000   1500000.000   7500000.0 187550.0000        0  XX
  5      X241538345#ALMA_RB_06#BB_1#SW-01#FULL_RES     128   TOPO  230992.188    -15625.000   2000000.0 230000.0000        1  XX  YY
  6      X241538345#ALMA_RB_06#BB_1#SW-01#CH_AVG         1   TOPO  229984.375   1796875.000   1796875.0 229984.3750        1  XX  YY
  7      X241538345#ALMA_RB_06#BB_2#SW-01#FULL_RES     128   TOPO  232992.188    -15625.000   2000000.0 232000.0000        2  XX  YY
  8      X241538345#ALMA_RB_06#BB_2#SW-01#CH_AVG         1   TOPO  231984.375   1796875.000   1796875.0 231984.3750        2  XX  YY
  9      X241538345#ALMA_RB_06#BB_3#SW-01#FULL_RES     128   TOPO  245007.813     15625.000   2000000.0 246000.0000        3  XX  YY
  10     X241538345#ALMA_RB_06#BB_3#SW-01#CH_AVG         1   TOPO  245984.375   1796875.000   1796875.0 245984.3750        3  XX  YY
  11     X241538345#ALMA_RB_06#BB_4#SW-01#FULL_RES     128   TOPO  247007.813     15625.000   2000000.0 248000.0000        4  XX  YY
  12     X241538345#ALMA_RB_06#BB_4#SW-01#CH_AVG         1   TOPO  247984.375   1796875.000   1796875.0 247984.3750        4  XX  YY
  13     BB_1#SQLD                                       1   TOPO  219559.000   2000000.000   2000000.0 219559.0000        1  XX  YY
  14     BB_2#SQLD                                       1   TOPO  219559.000   2000000.000   2000000.0 219559.0000        2  XX  YY
  15     BB_3#SQLD                                       1   TOPO  219559.000   2000000.000   2000000.0 219559.0000        3  XX  YY
  16     BB_4#SQLD                                       1   TOPO  219559.000   2000000.000   2000000.0 219559.0000        4  XX  YY
  17     X241538345#ALMA_RB_06#BB_1#SW-01#FULL_RES     128   TOPO  220551.188    -15625.000   2000000.0 219559.0000        1  XX  YY
  18     X241538345#ALMA_RB_06#BB_1#SW-01#CH_AVG         1   TOPO  219543.375   1796875.000   1796875.0 219543.3750        1  XX  YY
  19     X241538345#ALMA_RB_06#BB_2#SW-01#FULL_RES     128   TOPO  220551.188    -15625.000   2000000.0 219559.0000        2  XX  YY
  20     X241538345#ALMA_RB_06#BB_2#SW-01#CH_AVG         1   TOPO  219543.375   1796875.000   1796875.0 219543.3750        2  XX  YY
  21     X241538345#ALMA_RB_06#BB_3#SW-01#FULL_RES     128   TOPO  220551.188    -15625.000   2000000.0 219559.0000        3  XX  YY
  22     X241538345#ALMA_RB_06#BB_3#SW-01#CH_AVG         1   TOPO  219543.375   1796875.000   1796875.0 219543.3750        3  XX  YY
  23     X241538345#ALMA_RB_06#BB_4#SW-01#FULL_RES     128   TOPO  220551.188    -15625.000   2000000.0 219559.0000        4  XX  YY
  24     X241538345#ALMA_RB_06#BB_4#SW-01#CH_AVG         1   TOPO  219543.375   1796875.000   1796875.0 219543.3750        4  XX  YY
  25     BB_1#SQLD                                       1   TOPO  221538.000   2000000.000   2000000.0 221538.0000        1  XX  YY
  26     BB_2#SQLD                                       1   TOPO  223538.000   2000000.000   2000000.0 223538.0000        2  XX  YY
  27     BB_3#SQLD                                       1   TOPO  237538.000   2000000.000   2000000.0 237538.0000        3  XX  YY
  28     BB_4#SQLD                                       1   TOPO  239538.000   2000000.000   2000000.0 239538.0000        4  XX  YY
  29     X0000000000#ALMA_RB_06#BB_1#SW-01#FULL_RES    128   TOPO  222530.188    -15625.000   2000000.0 221538.0000        1  XX  YY
  30     X0000000000#ALMA_RB_06#BB_1#SW-01#CH_AVG        1   TOPO  221514.562   1781250.000   1781250.0 221514.5625        1  XX  YY
  31     X0000000000#ALMA_RB_06#BB_2#SW-01#FULL_RES    128   TOPO  224530.188    -15625.000   2000000.0 223538.0000        2  XX  YY
  32     X0000000000#ALMA_RB_06#BB_2#SW-01#CH_AVG        1   TOPO  223514.562   1781250.000   1781250.0 223514.5625        2  XX  YY
  33     X0000000000#ALMA_RB_06#BB_3#SW-01#FULL_RES    128   TOPO  236545.813     15625.000   2000000.0 237538.0000        3  XX  YY
  34     X0000000000#ALMA_RB_06#BB_3#SW-01#CH_AVG        1   TOPO  237514.563   1781250.000   1781250.0 237514.5625        3  XX  YY
  35     X0000000000#ALMA_RB_06#BB_4#SW-01#FULL_RES    128   TOPO  238545.813     15625.000   2000000.0 239538.0000        4  XX  YY
  36     X0000000000#ALMA_RB_06#BB_4#SW-01#CH_AVG        1   TOPO  239514.563   1781250.000   1781250.0 239514.5625        4  XX  YY
Antennas: 31:
  ID   Name  Station   Diam.    Long.         Lat.                Offset from array center (m)                ITRF Geocentric coordinates (m)        
                                                                     East         North     Elevation               x               y               z
  0    CM01  N602      7.0  m   -067.45.17.4  -22.53.22.3          8.8042     -527.8587       22.2034  2225080.354846 -5440132.955920 -2481524.789784
  1    CM02  J502      7.0  m   -067.45.17.7  -22.53.23.0          2.1073     -549.4461       22.1460  2225070.957857 -5440127.670516 -2481544.655003
  2    CM03  J503      7.0  m   -067.45.17.4  -22.53.23.2          9.2482     -555.0637       22.1304  2225076.734430 -5440122.931505 -2481549.824201
  3    CM06  N606      7.0  m   -067.45.17.1  -22.53.23.6         19.1995     -566.5684       22.1011  2225084.240492 -5440114.997537 -2481560.411621
  4    CM07  N601      7.0  m   -067.45.17.0  -22.53.22.5         21.0633     -532.5817       22.1865  2225090.999805 -5440126.600430 -2481529.134327
  5    CM08  J505      7.0  m   -067.45.18.0  -22.53.22.8         -7.2123     -541.3466       22.1685  2225063.532652 -5440134.133528 -2481537.202006
  6    CM09  N603      7.0  m   -067.45.17.7  -22.53.22.3         -0.0497     -527.8657       22.1913  2225072.154896 -5440136.294753 -2481524.791487
  7    CM10  J501      7.0  m   -067.45.17.4  -22.53.22.9         10.0863     -545.4959       22.1606  2225078.929507 -5440126.084513 -2481541.021572
  8    CM11  N604      7.0  m   -067.45.17.8  -22.53.23.7         -0.2657     -571.8966       22.0829  2225065.433709 -5440120.432522 -2481565.313207
  9    DA41  A004      12.0 m   -067.45.15.9  -22.53.28.0         52.6609     -704.4171       21.7726  2225094.796703 -5440052.421785 -2481687.277348
  10   DA49  A002      12.0 m   -067.45.16.3  -22.53.27.6         40.6333     -690.2503       21.8023  2225085.761255 -5440062.100754 -2481674.237730
  11   DA50  A038      12.0 m   -067.45.18.5  -22.53.29.4        -22.4285     -745.7518       22.0606  2225019.312629 -5440066.210860 -2481725.468896
  12   DA52  A018      12.0 m   -067.45.17.2  -22.53.28.1         16.8264     -706.6065       21.7531  2225061.301483 -5440065.182346 -2481689.286759
  13   DA54  A005      12.0 m   -067.45.14.8  -22.53.28.7         83.3315     -725.0764       21.7237  2225120.123751 -5440033.331382 -2481706.290680
  14   DA55  A047      12.0 m   -067.45.16.4  -22.53.30.3         38.4542     -775.2187       21.5966  2225071.160250 -5440032.158745 -2481752.434689
  15   DA57  A025      12.0 m   -067.45.18.7  -22.53.27.4        -26.4296     -685.5228       22.2053  2225024.528985 -5440089.533369 -2481670.039352
  16   DA59  A001      12.0 m   -067.45.16.9  -22.53.27.7         24.1880     -693.3966       21.7925  2225070.073933 -5440067.185105 -2481677.132442
  17   DA61  A006      12.0 m   -067.45.15.0  -22.53.28.0         79.0341     -702.0939       21.7778  2225119.549746 -5440043.278703 -2481685.139167
  18   DA62  A035      12.0 m   -067.45.16.6  -22.53.28.1         32.0366     -706.8051       21.7640  2225075.353584 -5440059.362225 -2481689.473934
  19   DA63  A039      12.0 m   -067.45.18.0  -22.53.29.6         -6.1070     -751.7850       22.0696  2225033.533416 -5440057.867935 -2481731.030436
  20   DA65  A030      12.0 m   -067.45.18.1  -22.53.27.2        -10.3876     -679.1070       21.8267  2225040.189208 -5440085.447750 -2481663.981462
  21   DV02  A007      12.0 m   -067.45.15.1  -22.53.27.3         74.0140     -681.2928       21.3255  2225117.808983 -5440052.282474 -2481665.800190
  22   DV07  A027      12.0 m   -067.45.19.0  -22.53.28.7        -35.0460     -726.6032       21.5989  2225010.293430 -5440077.487712 -2481707.648731
  23   DV11  A049      12.0 m   -067.45.14.6  -22.53.29.6         88.4465     -754.5446       20.1464  2225119.968124 -5440019.440510 -2481732.824666
  24   DV12  A017      12.0 m   -067.45.15.9  -22.53.26.8         51.3634     -665.5893       21.3604  2225099.169786 -5440066.540560 -2481651.346952
  25   DV13  A064      12.0 m   -067.45.14.7  -22.53.31.4         85.6567     -808.0278       21.0176  2225109.813656 -5440001.983403 -2481782.434609
  26   DV17  A031      12.0 m   -067.45.19.1  -22.53.27.1        -37.8149     -675.5186       21.7325  2225015.299768 -5440097.041914 -2481660.638998
  27   DV18  A009      12.0 m   -067.45.16.1  -22.53.26.1         48.2542     -644.4621       21.0152  2225099.282791 -5440075.029589 -2481631.749120
  28   DV20  A033      12.0 m   -067.45.19.4  -22.53.29.0        -47.3621     -735.6360       21.8836  2224997.663712 -5440079.140555 -2481716.080921
  29   DV22  A014      12.0 m   -067.45.15.1  -22.53.26.4         74.5090     -654.2102       20.9880  2225122.137554 -5440061.557701 -2481640.719077
  30   DV23  A003      12.0 m   -067.45.16.5  -22.53.27.0         35.5295     -672.6352       21.3390  2225083.469962 -5440069.979758 -2481657.829615


The first section of the output describes the detail of each scan, and the second section (from line 34) shows the information of the observing targets. This second section shows that three targets with 151 fields were observed: The Sun, J1924-2914, nrao350(J1733-1304). From the section, the J1924-2914 was observed for the calibrations of pointing [2]4, sideband ratio [3], atmosphere [4], and bandpass [5]. nrao350 was observed for the calibration of pointing [6], atmosphere [7], flux [8], and phase [9,12,15,18]. The Sun was observed for scientific observations [11,14,17], the calibration of atmosphere [10,16] and the measurement of zero-signal level [1]. After a prior calibration, we never use the data of the scans for the calibration of pointing, atmosphere, sideband ratio, and the measurement of zero-signal level. To reduce the size of the dataset for bandpass and gain calibrations, we will extract only the data for the calibrations from the raw dataset. For the extraction, we define the scanIDs for the bandpass/gain calibrations and scientific observations, now.

<figure id="antplots">

<xr id="antplots" nolink/>. “plotants” output for the dataset uid___A002_Xae00c5_X2a8d

</figure>

#In Casa
sel_scans ='5,8,9,11,12,14,15,17,18'

The third section of the listobs output (from line 47) shows the information of the spectrum windows (Spw) in the dataset. From first and this sections, the scientific observations are done with the Spw 0~12, and the IDs of the Spw with 128 channels, which are used for image synthesis, are 5, 7, 9, and 11. Therefore, we will calibrate the data of SpwID 5, 7, 9, and 11 only. The data of spwID 0,1,2,3 are the data from the square-law detectors of the basebands. The data will be used for creating Tsys+Tant tables, and are archived as the auto-correlation data in the dataset. Thirty-one antennas were used for the dataset. Note that numbering in python always begins with "0", so the antennas have IDs 0-30. To see what the antenna configuration looked like at the time of this observation, we use the task plotants (<xr id="antplots" />) .

Flagging before creating Tsys and Tsys+Tant tables

Some scans in the data were used by the online system for pointing and sideband ratio calibration. These scans are no longer needed, and we can flag them easily with flagdata by selecting on 'intent'.

#In Casa
flagdata(vis = mso, mode = 'manual', intent = '*POINTING*,*SIDEBAND_RATIO*', flagbackup = False)

The averaged data of each spectrum window is not used, so we flagged the averaged data as a follow.

#In Casa
flagdata(vis = mso, mode = 'manual', spw = '6,8,10,12', flagbackup = False)

We will then store the current flagging state for each dataset using the flagmanager:

#In Casa
flagmanager(vis = mso, mode = 'save', versionname = 'priori1')

Tsys calibration of the visibilities of the calibrators

<figure id="tsys">

<xr id="tsys" nolink/>. “plotants” output for the dataset uid___A002_Xae00c5_X2a8d

</figure> The Tsys calibration gives a first-order correction for the atmospheric opacity as a function of time and frequency, and associates weights with each visibility that persist through imaging. The MS dataset contains Tsys measurements; the task gencal is used to generate a calibration table.

#In Casa
gencal(vis = mso, caltable = mso + '.tsys', caltype = 'tsys')
flagdata(vis = mso + '.tsys', mode = 'manual', spw = '5:0~9;116~127,7:0~9;116~127,9:0~9;116~127,11:0~9;116~127', flagbackup = False)
es.checkCalTable(mso+'.tsys', msName=mso, interactive=False)

Since the dataset obtained with TDM, the data in the channels near the both edges of the spectrum window (~10 channels) are flagged. Then, the plots for checking are created by the subroutine of Analysis Utilities package (<xr id="tsys" />). The Tsys of DA54 antennas are significant large, from the plot. In the later part, we will flag the data of the antenna.

We will apply the Tsys calibration table to the data of the calibrators with the task applycal, which reads the specified gain calibration tables, applies them to the (raw) data column, and writes the calibrated results into the corrected column. For non-solar observations, we also apply the WVR (Water Vapor Radiometer) calibration table to data. However, we must NOT apply the WVR table to the solar data, because the WVR receivers at the Sun occur the saturation. We apply the Tsys calibration table to the data of the bandpass calibrator:

#In Casa
applycal(vis = mso, field = '1', spw = '5,7,9,11', gaintable = mso + '.tsys', gainfield = '1', interp = 'linear,linear', calwt = T, flagbackup = False)

In the observations, we do not the atmospheric calibration of the phase calibrator between the scientific scans, because a long suspension of scientific observations has a bad influence on science. Therefore, we apply the Tsys calibration table, which is created from the data of the atmosphere calibration at the flux calibrator or the Sun, to the phase calibrator, as follows.

#In Casa
applycal(vis = mso, field = '2', spw = '5,7,9,11', gaintable = mso + '.tsys', gainfield = '2', interp = 'linear,linear', calwt = T, flagbackup = False)

You can use plotms to plot channel-averaged amplitudes as a function of time, comparing the DATA and CORRECTED columns after applying the Tsys correction. This way you can check that calibration has done what was expected, which is put the data onto the Kelvin temperature scale.

Tsys+Tant calibration of the visibilities of the Sun