21 | 07 | 2019
 
 
VLBI calibration PDF Print E-mail

Authors

Marc Ribo, largely based on the 2009 ERIS example, originally from Bourke (with Baan, Beswick, Venturi), with comments from Javier Moldon. Here with Katherine Blundell, Elmar Koerding, James Miller-Jones, Anita M.S. Richards.

Assumptions

1. Katherine Blundell: imaging and self-calibration.
2. Katherine Blundell: how to do bandpass calibration.
3. Anita Richards: how to do polarisation calibration.

General scheme

Prepared data: N09L2, an EVN Network Monitoring experiment.
Reference document: EVN Data Analysis Guide.
Main steps:

  • 1. Load the data into AIPS (FITLD, MSORT, INDXR, LISTR, PRTAN).
  • 2. Calibrate amplitude (UVFLG, ANTAB, SNEDT, APCAL, CLCAL, SNPLT).
  • 3. Fringe-fitting (VLBAPANG, FRING, CLCAL, FRING, SNPLT, CLCAL).
  • 4. *Polarization calibrations (not covered).
  • 5. Bandpass calibration (BPASS/CPASS).
  • 6. Split the data (SPLIT, FITTP).
  • 7. *Imaging and self-calibration (marginally covered, see the earlier tutorial by K. Blundell).

Overview

 

This tutorial concentrates on the analysis of an EVN (European VLBI Network) observation. For more information see www.evlbi.org. The observation consists of about a 2-hour phase referenced portion switching between 4C39.25 (the calibrator) and J0916+3854 (the target source). In the second half of the observation, five bright sources are observed. These data were taken at 1.6 GHz using 10 antennas with very different sensitivities. We will see more details as we proceed.

You can also access the JIVE (Joint Institute for VLBI in Europe) archive web page of these observations at http://archive.jive.nl/scripts/arch.php?exp=N09L2_090602.

The data are available here n09l2_1_1.IDI. Ancilliary files are n09l2.antab.gz and n09l2.uvflg.

This tutorial is in AIPS.

This script is designed to be used by copying or typing the input to one task at a time, based on the text with a cyan background like this.
Further information on any task, e.g., FITLD is obtained from the AIPS cookbook or by typing
help fitld
or
explain fitld
within AIPS. For VLBI data reduction look at Chapter 9 of the AIPS cookbook.

Review the inputs to each task using inp before running it.

Loading the data

Go to the directory where you placed the files n09l2_1_1.IDI, n09l2.antab.gz, and n09l2.uvflg. Uncompress what is needed (gunzip n09l2.antab.gz). Start aips by typing:

 

aips tv=local

Select a new user ID number, like 200:

 

200

Three new windows should have been opened: AIPSTV, AIPS-MSGSRV and AIPS-TEKSRV.

To start from default values type:

 

restore 0

Use the task FITLD to load the data. To see the current inputs you can type 'inp'. To see more details about the task and inputs you can type 'help fitld'. To read all details about the task and inputs just type 'explain fitld'. This applies to all tasks.

 

default fitld
inp

You see something like this in the window where you are typing (you have to press RETURN a few times):

>inp
AIPS 1: FITLD: Task to store an image or UV data from a FITS tape
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INTAPE 1 Input tape drive # (0 => 1)
AIPS 1: NFILES 0 # of files to advance on tape
AIPS 1: DATAIN *all ' ' Disk file name
AIPS 1: OUTNAME ' ' File name (name)
AIPS 1: OUTCLASS ' ' File name (class)
AIPS 1: OUTSEQ 0 File name (seq. #)
AIPS 1: 0 => highest unique number
AIPS 1: => matching (on VLBA)
AIPS 1: -1 => FITS tape value
AIPS 1: OUTDISK 1 Disk drive # (0 => any)
AIPS 1: OPTYPE ' ' Type of data to load,
AIPS 1: ' ' => all types
AIPS 1: 'UV' => UV data
AIPS 1: 'IM' => images
AIPS 1: NCOUNT 0 Number of files to load.
AIPS 1: DOTABLE 1 True (1.0) means load tables
AIPS 1: for images.
AIPS 1: DOUVCOMP -1 >0 => compressed data (FITS)
AIPS 1: ** press RETURN for more, enter Q or next line to quit print **
#
AIPS 1: DOCONCAT -1 >0 -> if VLBA correlator data
AIPS 1: append data to existing
AIPS 1: files, or if no appropriate
AIPS 1: files exist create a new file
AIPS 1: and append all data to that
AIPS 1: file.
AIPS 1: *****************************
AIPS 1: Following adverbs are useful
AIPS 1: only when reading VLBA
AIPS 1: distribution tapes.
AIPS 1: *****************************
AIPS 1: CLINT 0 CL entry interval (min)
AIPS 1: 0 => 1 minute.
AIPS 1: SOURCES *all ' ' Source list to accept.
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: TIMERANG *all 0 Timerange selected
AIPS 1: BCHAN 1 Lowest spectral channel
AIPS 1: number to select in each IF.
AIPS 1: 0=>1
AIPS 1: ECHAN 0 Highest spectral channel
AIPS 1: number to select in each IF.
AIPS 1: ** press RETURN for more, enter Q or next line to quit print **
#
AIPS 1: 0=>highest
AIPS 1: BIF 0 Lowest IF number 0=>1
AIPS 1: EIF 0 Highest IF number 0=>all
AIPS 1: DIGICOR 1 Controls the application of
AIPS 1: the VLBA correlator's digital
AIPS 1: correction.
AIPS 1: 0 or 1 => perform corrections
AIPS 1: 2 => perform cross-power
AIPS 1: corrections, do total-power
AIPS 1: only if zero padding used.
AIPS 1: -1 => do NOT perform
AIPS 1: corrections.
AIPS 1: SEE HELP for more details
AIPS 1: SELBAND -1 Bandwidth to select (kHz)
AIPS 1: SELFREQ -1 Frequency to select (MHz).
AIPS 1: See HELP.
AIPS 1: FQTOL -1 Frequency tolerance assigned
AIPS 1: to SELFREQ, FITLD will select
AIPS 1: data with freq. of SELFREQ
AIPS 1: +/- FQTOL.
AIPS 1: The unit of FQTOL is kHz.
AIPS 1: ** press RETURN for more, enter Q or next line to quit print **
#
AIPS 1: <=0 => 10 kHz
AIPS 1: WTTHRESH 0 Flagging threshold based on
AIPS 1: weights. See HELP.
AIPS 1: 0 => no flagging
AIPS 1: 1 => will flag ALL data
AIPS 1: OPCODE ' ' Specify if wish to keep VT
AIPS 1: (VLBA Tape Statistics) table
AIPS 1: and other tables. See HELP.
AIPS 1: ' ' => do not save tables
AIPS 1: NPIECE 0 Maximum uv table piece to
AIPS 1: load (ignored for tape unless
AIPS 1: NCOUNT = 1)
AIPS 1: ERROR -1 >= 2 -> do not use AIPS
AIPS 1: history in the FITS file
AIPS 1: ANTNAME *all ' ' List antenna station names in
AIPS 1: desired order (IDI data only)

And now you can type the parameters:

 

datain 'PWD:n09l2_1_1.IDI
outname='N0912'
clint 1/3
douvcomp 1
go

Note that there is no closing quote ' after the file name. This means AIPS will keep the case in the string (normally it converts to upper case). We also give an outname to make it more clear that the data refer to the experiment N0912. The CLINT parameter defines the time interval between entries in the calibration tables. Setting this to a lower value (default is 1 minute) will allow us to calibrate on lower time scales later in the process (assuming we have good enough signal to noise). We'll set it to to 1/3 (20 seconds). VLBI datasets are often quite large (many GBs), setting DOUVCOMP = 1 saves disk space.

In The AIPS_MSGSRV_1 window a text like this will appear:

LOCALH> FITLD1: Task FITLD  (release of 31DEC10) begins
LOCALH> FITLD1: UV data will be written in compressed format
LOCALH> FITLD1: Create N0912 .UVDATA. 1 (UV) on disk 1 cno 2
LOCALH> FITLD1: FRINI: 'BB_CHAN' COLUMN NOT FOUND
LOCALH> FITLD1: Sky frequencies (MHz) before re-ordering occurs:
LOCALH> FITLD1: Incoming FREQID # 1
LOCALH> FITLD1: 1638.49 1646.49 1654.49 1662.49
LOCALH> FITLD1: ATINI: 'POLCALA' COLUMN NOT FOUND
LOCALH> FITLD1: ATINI: 'POLCALB' COLUMN NOT FOUND
LOCALH> FITLD1: TABHDR: COLUMN 10 TYPE FLUX NOT VISIBILI
LOCALH> FITLD1: CL table interval set at 0.33 minutes
LOCALH> FITLD1: Current file has 390445 visibilities
LOCALH> FITLD1: File ref. freq: 1638.49 MHz
LOCALH> FITLD1: Found 4C39.25 at 0/12:30:01 src # 3
LOCALH> FITLD1: fqid # 1
LOCALH> FITLD1: 10000 vis. written
LOCALH> FITLD1: 20000 vis. written
LOCALH> FITLD1: 30000 vis. written
LOCALH> FITLD1: 40000 vis. written
...
...
...
LOCALH> FITLD1: UV table spanned time: 0/12:30:01 - 0/17:29:27
LOCALH> FITLD1: Rejected 6107 records based on weights
LOCALH> FITLD1: 384338 vis. written
LOCALH> FITLD1: FRINI: 'BB_CHAN' COLUMN NOT FOUND
LOCALH> FITLD1: ATINI: 'POLCALA' COLUMN NOT FOUND
LOCALH> FITLD1: ATINI: 'POLCALB' COLUMN NOT FOUND
LOCALH> FITLD1: Image=MULTI (UV) Filename=N0912 .UVDATA. 1
LOCALH> FITLD1: Telescope=EVN Receiver=VLBA
LOCALH> FITLD1: Observer=N09L2 User #= 2234
LOCALH> FITLD1: Observ. date=02-JUN-2009 Map date=28-JUN-2010
LOCALH> FITLD1: # visibilities 384338 Sort order TB
LOCALH> FITLD1: Rand axes: UU-L-SIN VV-L-SIN WW-L-SIN TIME1 BASELINE
LOCALH> FITLD1: FREQSEL SOURCE INTTIM CORR-ID WEIGHT SCALE
LOCALH> FITLD1: ----------------------------------------------------------------
LOCALH> FITLD1: Type Pixels Coord value at Pixel Coord incr Rotat
LOCALH> FITLD1: COMPLEX 1 0.0000000E+00 1.00 1.0000000E+00 0.00
LOCALH> FITLD1: STOKES 4 -1.0000000E+00 1.00 -1.0000000E+00 0.00
LOCALH> FITLD1: FREQ 16 1.6384900E+09 1.00 5.0000000E+05 0.00
LOCALH> FITLD1: IF 4 1.0000000E+00 1.00 1.0000000E+00 0.00
LOCALH> FITLD1: RA 1 03 19 48.160 1.00 3600.000 0.00
LOCALH> FITLD1: DEC 1 41 30 42.105 1.00 3600.000 0.00
LOCALH> FITLD1: ----------------------------------------------------------------
LOCALH> FITLD1: Coordinate equinox 2000.00
LOCALH> FITLD1: Maximum version number of extension files of type HI is 1
LOCALH> FITLD1: Maximum version number of extension files of type AT is 1
LOCALH> FITLD1: Maximum version number of extension files of type NX is 1
LOCALH> FITLD1: Maximum version number of extension files of type CL is 1
LOCALH> FITLD1: Maximum version number of extension files of type CT is 1
LOCALH> FITLD1: Maximum version number of extension files of type FQ is 1
LOCALH> FITLD1: Maximum version number of extension files of type AN is 1
LOCALH> FITLD1: Maximum version number of extension files of type SU is 1
LOCALH> FITLD1: Appears to have ended successfully
LOCALH> FITLD1: localhos 31DEC10 TST: Cpu= 24.5 Real= 39 IO= 403

Now type pcat to check that the file is there:

 

pcat

and you should see:

>pcat
AIPS 1: Catalog on disk 1
AIPS 1: Cat Usid Mapname Class Seq Pt Last access Stat
AIPS 1: 2 2234 N0912 .UVDATA. 1 UV 28-JUN-2010 19:35:55
The assigned catalog number is 2. This means that any file that we create now will be 1, and then 3, and so on. To avoid this mess, we just type:

 

recat

Now we can type again:

 

pcat

and see that now it reads:

>pcat
AIPS 1: Catalog on disk 1
AIPS 1: Cat Usid Mapname Class Seq Pt Last access Stat
AIPS 1: 1 2234 N0912 .UVDATA. 1 UV 28-JUN-2010 19:50:03
Now we pick up the file and look at the fits header (or "image header"):

 

getn 1
imh

getn 1 sets INNAME, INCLASS, INSEQ to the values of dataset 1 in the catalog (as seen when you 'pcat').

You should see something like this:

>imh
AIPS 1: Image=MULTI (UV) Filename=N0912 .UVDATA. 1
AIPS 1: Telescope=EVN Receiver=VLBA
AIPS 1: Observer=N09L2 User #= 2234
AIPS 1: Observ. date=02-JUN-2009 Map date=28-JUN-2010
AIPS 1: # visibilities 384338 Sort order TB
AIPS 1: Rand axes: UU-L-SIN VV-L-SIN WW-L-SIN TIME1 BASELINE
AIPS 1: FREQSEL SOURCE INTTIM CORR-ID WEIGHT SCALE
AIPS 1: ----------------------------------------------------------------
AIPS 1: Type Pixels Coord value at Pixel Coord incr Rotat
AIPS 1: COMPLEX 1 0.0000000E+00 1.00 1.0000000E+00 0.00
AIPS 1: STOKES 4 -1.0000000E+00 1.00 -1.0000000E+00 0.00
AIPS 1: FREQ 16 1.6384900E+09 1.00 5.0000000E+05 0.00
AIPS 1: IF 4 1.0000000E+00 1.00 1.0000000E+00 0.00
AIPS 1: RA 1 03 19 48.160 1.00 3600.000 0.00
AIPS 1: DEC 1 41 30 42.105 1.00 3600.000 0.00
AIPS 1: ----------------------------------------------------------------
AIPS 1: Coordinate equinox 2000.00
AIPS 1: Maximum version number of extension files of type HI is 1
AIPS 1: Maximum version number of extension files of type AT is 1
AIPS 1: Maximum version number of extension files of type NX is 1
AIPS 1: Maximum version number of extension files of type CL is 1
AIPS 1: Maximum version number of extension files of type CT is 1
AIPS 1: Maximum version number of extension files of type FQ is 1
AIPS 1: Maximum version number of extension files of type AN is 1
AIPS 1: Maximum version number of extension files of type SU is 1
AIPS 1: Keyword = 'OLDRFQ ' value = 1.63849000D+09

First realize that this was already shown at the end of the AIPS_MSGSRV_1 after FITLD. We can see it has 4 stokes parameters, 4 sub bands (AIPS calls these IFs) and 16 channels per sub band. As the data contains many sources the RA and DEC will either contain the coordinates of one of the sources in the data or may be 00.

Note that since we have and NX table, we don't need to use INDXR. The data is in Sort order TB (Time Baseline), so everything should work without applying any additional initial tasks.

The tasks LISTR and PRTAN can be used to generate a scan listing, and an antenna listing respectively.

 

default listr
getn 1
optype 'scan'
docrt -3
outprint 'PWD:scans.txt
go

The default value of 'docrt' is 132. This will cause the listing to be displayed in your terminal. Using docrt -1 allows you to send it to the printer or to a file. Using docrt -3 avoids anoying carriage returns and page limits.

Then you can inspect the scans available in this fits file by going to the corresponding directory and typing 'more scans.txt'. There you will find the scans numbered, with initial and final observation times, together with a list of sources with corresponding positions and the frequencies used. It looks like this:

File = N0912       .UVDATA.   1 Vol = 1  Userid = 2234
Freq = 1.638490000 GHz Ncor = 4 No. vis = 384338
Scan Source Qual Calcode Sub Timerange FrqID START VIS END VIS
1 4C39.25 : 0001 1 0/12:30:01 - 0/12:39:59 1 1 16285
2 4C39.25 : 0001 1 0/12:41:01 - 0/12:50:59 1 16286 32333
3 4C39.25 : 0001 1 0/12:52:01 - 0/13:01:59 1 32334 48550
4 4C39.25 : 0001 1 0/13:03:01 - 0/13:07:59 1 48551 56736
5 4C39.25 : 0001 1 0/13:09:01 - 0/13:11:01 1 56737 60007
6 J0916+3854 : 0001 1 0/13:11:03 - 0/13:14:59 1 60008 66552
7 4C39.25 : 0001 1 0/13:15:01 - 0/13:17:01 1 66553 69307
8 J0916+3854 : 0001 1 0/13:17:03 - 0/13:20:59 1 69308 75852
9 4C39.25 : 0001 1 0/13:22:01 - 0/13:23:59 1 75853 79088
10 J0916+3854 : 0001 1 0/13:24:01 - 0/13:27:59 1 79089 85688
11 4C39.25 : 0001 1 0/13:28:01 - 0/13:30:01 1 85689 88442
12 J0916+3854 : 0001 1 0/13:30:03 - 0/13:33:59 1 88443 94874
13 4C39.25 : 0001 1 0/13:35:01 - 0/13:36:59 1 94875 98110
14 J0916+3854 : 0001 1 0/13:37:01 - 0/13:40:59 1 98111 104691
15 4C39.25 : 0001 1 0/13:41:01 - 0/13:43:01 1 104692 107386
16 J0916+3854 : 0001 1 0/13:43:03 - 0/13:46:59 1 107387 113931
17 4C39.25 : 0001 1 0/13:48:01 - 0/13:49:59 1 113932 117159
18 J0916+3854 : 0001 1 0/13:50:01 - 0/13:53:59 1 117160 123645
19 4C39.25 : 0001 1 0/13:54:01 - 0/13:56:01 1 123646 126400
20 J0916+3854 : 0001 1 0/13:56:03 - 0/13:59:59 1 126401 132883
21 4C39.25 : 0001 1 0/14:00:01 - 0/14:01:59 1 132884 136123
22 4C39.25 : 0001 1 0/14:03:01 - 0/14:12:59 1 136124 152460
23 4C39.25 : 0001 1 0/14:14:01 - 0/14:23:59 1 152461 168811
24 4C39.25 : 0001 1 0/14:25:01 - 0/14:29:59 1 168812 176987
25 3C84 : 0001 1 0/14:38:01 - 0/14:47:59 1 176988 186652
26 3C84 : 0001 1 0/14:49:01 - 0/14:58:59 1 186653 197407
27 3C84 : 0001 1 0/15:00:01 - 0/15:09:59 1 197408 208162
28 3C273B : 0001 1 0/15:18:01 - 0/15:27:59 1 208163 223376
29 3C273B : 0001 1 0/15:29:01 - 0/15:38:57 1 223377 239639
30 3C273B : 0001 1 0/15:40:01 - 0/15:44:59 1 239640 247825
31 3C273B : 0001 1 0/15:46:01 - 0/15:50:59 1 247826 255759
32 3C286 : 0001 1 0/15:54:01 - 0/16:05:59 1 255760 275360
33 3C286 : 0001 1 0/16:07:01 - 0/16:18:59 1 275361 295096
34 OQ208 : 0001 1 0/16:20:31 - 0/16:30:29 1 295097 311524
35 OQ208 : 0001 1 0/16:31:31 - 0/16:41:29 1 311525 327842
36 OQ208 : 0001 1 0/16:42:31 - 0/16:52:27 1 327843 344205
37 3C345 : 0001 1 0/16:57:31 - 0/17:07:29 1 344206 357571
38 3C345 : 0001 1 0/17:08:31 - 0/17:18:29 1 357572 371012
39 3C345 : 0001 1 0/17:19:31 - 0/17:29:27 1 371013 384338
Velocity type = ' ' Definition = ' '
ID Source Qual Calcode RA(2000.0) Dec(2000.0) IFlux QFlux UFlux VFlux No. vis
1 3C84 : 0001 03:19:48.1601 41:30:42.105 0.000 0.000 0.000 0.000 31175
2 J0916+3854 : 0001 09:16:48.9046 38:54:28.146 0.000 0.000 0.000 0.000 52217
3 4C39.25 : 0001 09:27:03.0139 39:02:20.852 0.000 0.000 0.000 0.000 124770
4 3C273B : 0001 12:29:06.6997 02:03:08.598 0.000 0.000 0.000 0.000 47597
5 3C286 : 0001 13:31:08.2881 30:30:32.959 0.000 0.000 0.000 0.000 39337
6 OQ208 : 0001 14:07:00.3944 28:27:14.690 0.000 0.000 0.000 0.000 49109
7 3C345 : 0001 16:42:58.8100 39:48:36.994 0.000 0.000 0.000 0.000 40133
ID Source Freq(GHz) Velocity(Km/s) Rest freq (GHz)
1 All Sources 1.6385 0.0000 0.0000
IF( 2) 1.6465 0.0000 0.0000
IF( 3) 1.6545 0.0000 0.0000
IF( 4) 1.6625 0.0000 0.0000
FQID IF# Freq(GHz) BW(kHz) Ch.Sep(kHz) Sideband
1 1 1.63849000 8000.0005 500.0000 1
2 1.64649000 8000.0005 500.0000 1
3 1.65449000 8000.0005 500.0000 1
4 1.66249000 8000.0005 500.0000 1
You can see that there are 7 sources observed from 12:30 to 17:30, including 4C39.25 (the calibrator) and J0916+3854 (the target), together with five other sources: 3C84, 3C273B, 3C286, OQ208, and 3C345. You can also see the frequencies of the 4 IFs, which have a bandwidth of 8000 kHz, or 8 MHz, each (32 MHz in total). Since we have 16 channels per IF, the separation between channels is 500 kHz.

And now the antenna listing:

 

default prtan
getn 1
docrt -3
outprint 'PWD:ants.txt
go
You can see that 10 antennas were used (so we will have 10*(10-1)/2=45 baselines). You can copy what appears at the end, to know the antenna number corresponding to each antenna:
Ant   1 = CM       BX=   979610.5344 BY= -1423711.9857 BZ=   375158.5618
Ant 2 = EF BX= 1093201.8355 BY= -939263.4996 BZ= 261304.9477
Ant 3 = WB BX= 887700.0247 BY= -981030.4087 BZ= 425795.7016
Ant 4 = JB BX= 881880.4284 BY= -1580359.6587 BZ= 447360.1808
Ant 5 = ON BX= 430220.4826 BY= -714788.0823 BZ= 710538.1493
Ant 6 = MC BX= 1520624.2924 BY= -506657.1668 BZ= -189566.6611
Ant 7 = NT BX= 1993817.4361 BY= -105052.7439 BZ= -832641.3204
Ant 8 = TR BX= 697812.8449 BY= -204284.2960 BZ= 437910.8786
Ant 9 = UR BX= -2712435.1324 BY= 3205668.5315 BZ= -272061.9727
Ant 10 = SH BX= -5772432.7463 BY= 3249479.3099 BZ= -1363798.4652
An issue is the possibility to include the ionospheric corrections. This has to be done at the beginning for the VLBA, and can also be done for the EVN in phase referencing experiments at low elevations. However, the improvement for the EVN has not yet been tested, so we will not apply these corrections here.

Interlude: plots

To get a feeling for interferometry, plotting the data, and calibration tables is important. Any plot will create a plot table (PL) by default unless you specify dotv 1, in which case the plot will be shown in the AIPSTV window. PL files are useful when you want to export a plot as a postscript file. The task LWPLA exports postscript.

Useful plots:

- UVPLT can display your visibilities. You can specify what the axes represent. Default is amplitude vs uv-distance. Type 'explain uvplt' (after setting docrt 132) and look at the bparm value to see what can be on the axes.

- POSSM will plot your amplitudes for each baseline as a function of frequency.

- VPLOT can plot each baseline, amplitude or phase, etc., as a function of time, optionally averaging channels. SNPLT can plot your solution (SN) and calibration (CL) tables. It is important to look at the calibration tables after a calibration task. Look out for large (suspicious) jumps in amplitude and phase.

When plotting uv data, if the datasets are large, plotting can take a long time. The 'xinc' parameter can be set to skip data, e.g., xinc 10 will plot every tenth point. timerang specifies a limited time range to plot. The format is startday, starthour, startminute, startsecond, endday, endhour, endminute, endsecond. "timerang 0 13 0 0 0 13 5 0" would select five minutes of data from 13:00 to 13:05 on the first day.

Type this:

 

tvin
default vplot
getn 1
bchan 1
echan 16
avgchan 1
dotv 1
docalib 1
nplots 8
go

The AIPSTV window should display this after a while (plot #1):

Here you see the amplitudes as a function of time for each IF in each baseline. Hit TV button A to pause indefinitely. Hit button B or C to continue sooner, button D to stop plotting.

Now let us look at the spectrum of the calibrator 4C39.25 with POSSM. We will do it for the baselines with Effelsberg only, and for polarizations RR and LL only (stokes 'half'), solint -1 to make and plot scan averages:

 

tvin
default possm
getn 1
sources '4C39.25' ''
stokes 'half'
antenna 2
docal 1
gainuse 1
aparm(2)=1
aparm(5)=-180
aparm(6)=180
aparm(9)=1
solint -1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #2):

Here you see the phases and amplitudes as a function of frequency channel for each IF in each baseline. Note that CM has a limited bandwidth of about 16 MHz. Note calibration issues at the border channels in each IF, in particular the drops in the amplitude. It is clear that there are "phase jumps" between IFs, and that there are phase drifts within each IF. We will correct for those.

Let us look at the uv coverage of the 4C39.25 data by typing:

 

tvin
default uvplt
getn 1
sources '4C39.25' ''
bparm 6 7 2 0
xinc 100
dotv 1
go

The AIPSTV window should display this (plot #3):

We only plot one point every hundred points, and this already takes about 30 seconds... If you did not specify xinc you should stop the execution. To do this just type "abort" and afterwards "clrstat" (to clean the reading status of the file). As you can see, there are baselines up to 45 Mlambda, meaning that the beam size will be of around 2.2e-08 radians, or 4.6 mas. When imaging, we will select a cellsize of 1 mas.

Applying external flag tables

Flag tables are provided with the data. These are generated by the scheduling program at the observatory, and by the observation stations during the observation. Flag tables are useful to flag the times when each dish is not on target due to slewing, source set, etc. These can be attached to the dataset with the task UVFLG.

 

default uvflg
getn 1
intext 'PWD:n09l2.uvflg
go

If you type "imh" you will see that now there is a flag table FG.

You can further inspect the data for the calibrators and flag what you think is 'strange', particularly for the compact sources. We will not do this here.

Amplitude calibration

Now we will modify the original visibility amplitudes to convert them into real flux densities of the sources. This correction involves a scaling factor for each IF in each antenna.

To use an astronomical source for amplitude calibration it must meet certain criteria; it must be relatively near to the target in the sky, have quite high flux, be reasonably compact and have a well known source model at the resolution of the instrument. Such sources are rare at VLBI resolutions and so another means of amplitude calibration is required. To accomplish this the antennas have an electronic noise source incorporated into them which is briefly triggered many times throughout the observation to allow the measurement of the system temperature of the antenna. This is done at the observatories and the results are provided to the astronomer as an 'antab' file. This is attached to the data with the task ANTAB. Also present in the file are the Gain Curves for each antenna. These relate the gain of the antenna as a function of elevation angle. AIPS can then use this information to determine amplitude calibration values for the observation.

 

default antab
getn 1
calin 'PWD:n09l2.antab
go

If you type "imh" you will see that now there is a Gain Curve table GC and a Tsys table TY.

The task APCAL is used to generate a solution table SN of amplitude corrections from the Tsys (TY) and Gain Curve (GC) tables.

 

default apcal
getn 1
go

If you type "imh" you will see that now there is a solution table SN.

We can inspect the content of this table by typing:

 

tvin
default snplt
getn 1
ine 'sn'
inv 1
dotv 1
nplots 8
opty 'amp'
go

The AIPSTV window should display this after you type B once (plot #4):

Here you see the amplitude solutions that should be applied to Effelsberg. Some editing to delete bad points could be done.

We can then create a new calibration with these amplitude solutions using the task CLCAL:

 

default clcal
getn 1
interpol 'self'
go

This creates a new calibration table CL 2 (check by typing "imh"), which contains the values from CL 1 (which had constant values, amp 1, phase 0, created by FITLD while loading the data) and the solutions from SN 1. By default CLCAL will use the highest CL table, and all SN tables. This is ok now, as we have only 1 SN table, however we should be careful in future to specify which SN tables to use as we don't want to re-apply a SN table that has already been applied. SNVER = 1 would mean only SN 1 would be applied.

Parallactic Angle correction

We can use the utility vlbapang to correct for parallactic angle effects. It is provided with aips in the vlbautil script. To use it do:

 

run vlbautil
default vlbapang
getn 1
go vlbapang
This creates table CL 3 (check by typing "imh").

Phase calibration

Phase calibration is slightly more complicated at VLBI scales than at EVLA scales, as the positions of the antennas can be slightly different than what the correlator thought they were. Also, each antenna uses its own clock, so the times can be slightly different at each station, and the times can drift relative to each other. These errors are very small but cause the phases to vary with frequency.

The task FRING is similar to CALIB but will solve for the delays (phase slopes with frequency) and rates (phase slopes with time), as well as the phases. A strong point-like calibrator is needed to solve these parameters. It can be useful to first solve for delays only with a short piece of timerange on a bright calibrator, and then solve for all parameters with all calibrators using the delay-corrected data (which also corrects for the phase jumps between IFs).

To see the effects of FRING we will look at 2 minutes of the strong calibrator 4C39.25 first by typing:

 

tvin
default possm
getn 1
sources '4C39.25' ''
timerang 0 13 5 0 0 13 7 0
stokes 'half'
antenna 2
docal 1
gainuse 3
aparm(2)=1
aparm(5)=-180
aparm(6)=180
aparm(9)=1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #5):

In general, there is a phase slope across each IF, as well as a phase offset between IFs. These instrumental offsets between IFs can be corrected with the delay calibration for a short period (2 minutes or less) of a bright calibrator. We will do this now.

Now we apply fring:

 

default fring
getn 1
calsour '4C39.25', ''
timerang 0 13 5 0 0 13 7 0
docalib 1
refant 2
solint 0
dparm(1) 1
dparm(8) 1
go

We chose 2 minutes of the strong calibrator 4C39.25. For the reference antenna it is better to chose a big one that is always observing: Effelsberg. The default solution interval is 10 minutes, but we specified only 2 minutes with timerange, so it is ok. DPARMs include gory details... This creates SN table 2.

We will apply these delay corrections with CLCAL:

 

default clcal
getn 1
interpol '2pt'
refant 2
snver 2
go

This creates table CL 4 after applying SN 2 solutions to table CL 3.

And now we look with POSSM again:

 

tvin
default possm
getn 1
sources '4C39.25' ''
timerang 0 13 5 0 0 13 7 0
stokes 'half'
antenna 2
docal 1
gainuse 4
aparm(2)=1
aparm(5)=-180
aparm(6)=180
aparm(9)=1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #6):

It is clear that we have corrected for the delays, since all phases look flat for this scan.

However, if we look at other scans from the same source, we will see that there are deviations (we don't use timerange, and we use solint -1 to plot averages of scans, and we plot only the baselines to Effelsberg to make it more clear):

 

tvin
default possm
getn 1
sources '4C39.25' ''
stokes 'half'
antenna 2
docal 1
gainuse 4
aparm(2)=1
aparm(5)=-180
aparm(6)=180
aparm(9)=1
solint -1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #7):

As it can be seen, the phases are flat, but different from zero except for the scan that we used to do the initial fring. This is because we have not still corrected for the rates.

Now we will solve for phase, delay and rate using all calibrators (this usually takes a while, or a few minutes, or sometimes a few hours...):

 

default fring
getn 1
calsour '4C39.25' '3C84' '3C273B' '3C286' 'OQ208' '3C345' ''
docalib 1
refant 2
solint 2
go
At the end of the AIPS-MSGSRV window we can now read:
LOCALH> FRING1: Found     7930 good solutions
LOCALH> FRING1: Failed on 654 solutions
LOCALH> FRING1: Appears to have ended successfully
LOCALH> FRING1: localhos 31DEC10 TST: Cpu= 119.4 Real= 127 IO= 1120
Failing at 10% of the solutions is not critical. Everything went ok. FRING has created table SN 3.

We apply these calibrations to create a new CL table, based on the calibrator sources and applied to all sources:

 

default clcal
getn 1
calsour '4C39.25' '3C84' '3C273B' '3C286' 'OQ208' '3C345' ''
sources 'J0916+3854' '4C39.25' '3C84' '3C273B' '3C286' 'OQ208' '3C345' ''
interpol 'ambg'
snver 3
refant 2
go

This creates table CL 5 after applying SN 3 solutions to table CL 4.

CLCAL interpolates the solutions which were calculated by CALIB or FRING. It will interpolate the calibration solutions for the calibrator source to the target source. When we last ran CALIB/FRING we requested solutions every 2 minutes (solint 2) now these will be interpolated to the CL interval (20 seconds - set when we did FITLD). Here we have requested that all sources be calibrated. The interpolation mode 'ambg' is useful with FRING calibration.

And now we look with POSSM again starting from the first scan:

 

tvin
default possm
getn 1
sources '4C39.25' ''
stokes 'half'
antenna 2
docal 1
gainuse 5
aparm(2)=1
aparm(5)=-180
aparm(6)=180
aparm(9)=1
solint -1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #8):

As it can be seen, the phases are flat and zero for all scans (keep typing B on the AIPSTV screen). We can check if this is also the case for the target source:

 

tvin
default possm
getn 1
sources 'J0916+3854' ''
stokes 'half'
antenna 2
docal 1
gainuse 5
aparm(2)=1
aparm(5)=-180
aparm(6)=180
aparm(9)=1
solint -1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #9):

The phases are flat in all cases, and also zero in most cases. However, for long baselines (EF-SH) this is not the case. This probably means that the source has intrinsic structure. (Moreover, if the source position was not properly known, and hence not located at the correlated phase center, now the phases would not be zero even for a point-like source).

Bandpass calibration

We will calibrate the gain response across our bands (for amplitude and phase) using the task BPASS with the source 4C39.25:

 

default bpass
getn 1
docalib 1
sources '4C39.25' ''
timerang 0 13 4 0 0 13 8 0
refant 2
go

This creates a bandpass table BP 1. To see the effects of this we should use now the following parameters when appropriate "doband 1" and "bpver 1".

And now we look with POSSM again at the 2 minutes of 4C39.25 originally used to solve for the delays:

 

tvin
default possm
getn 1
sources '4C39.25' ''
timerang 0 13 5 0 0 13 7 0
stokes 'half'
antenna 2
docal 1
gainuse 5
doband 1
bpver 1
aparm(2)=1
aparm(3)=0
aparm(4)=6
aparm(5)=-180
aparm(6)=180
aparm(9)=1
nplots 9
dotv 1
go

The AIPSTV window should display this (plot #10):

Phases and amplitudes are nearly flat within each IF. Apart from CM, phases are nearly flat along all the spectrum. Amplitudes vary slightly from IF to IF, but this is normal. We can now apply all calibrations and start mapping.

Splitting the data

We will now create separate datasets for each source with all the flags, and calibrations applied:

 

default split
getn 1
docalib 1
doband 1
bpver 1
aparm(1)=1
nchav 0
go

Setting aparm(1)=1 and nchav causes the channels to be averaged together - this is ok only after you have fring fitted the data. We now have many single source datasets. Type pcat and you should see:

>pcat
AIPS 1: Catalog on disk 1
AIPS 1: Cat Usid Mapname Class Seq Pt Last access Stat
AIPS 1: 1 2234 N0912 .UVDATA. 1 UV 29-JUN-2010 02:15:07
AIPS 1: 2 2234 3C84 .SPLIT . 1 UV 29-JUN-2010 02:14:54
AIPS 1: 3 2234 J0916+3854 .SPLIT . 1 UV 29-JUN-2010 02:14:56
AIPS 1: 4 2234 4C39.25 .SPLIT . 1 UV 29-JUN-2010 02:15:00
AIPS 1: 5 2234 3C273B .SPLIT . 1 UV 29-JUN-2010 02:15:02
AIPS 1: 6 2234 3C286 .SPLIT . 1 UV 29-JUN-2010 02:15:04
AIPS 1: 7 2234 OQ208 .SPLIT . 1 UV 29-JUN-2010 02:15:05
AIPS 1: 8 2234 3C345 .SPLIT . 1 UV 29-JUN-2010 02:15:07
We can image these as in the other tutorials, e.g., for the target source:

 

default imagr
getn 3
cellsize 0.001
imsize 512
niter 1000
dotv 1
go
Use TVPS (press B), put TVBOX (press B) continue clean (press B), etc...

Afterwards you have to do recat:

 

recat
Now we can look at the noise of the image:

 

default imstat
getn 10
tvini
tvlod
tvps
tvwin
imstat
The rms is rms= 1-2 E-02 JY/BEAM.

To do self calibration you should use CALIB, for example with the original data and the clean components of the image you have just obtained:

 

default calib
getn 3
get2n 10
refant 2
solmode 'p'
solint 1
aparm 3,0
go
In AIPS_MSGSRV_1 you see now somewhere:
LOCALH> CALIB1: Writing SN table    1
LOCALH> CALIB1: Found 2298 good solutions
LOCALH> CALIB1: Failed on 107 solutions
It is ok (my rule of thumb, if failed on less than 10% solutions it is ok).

Now you should do the image of the new file obtained with CALIB:

 

tget imagr
getn 11
go
Afterwards remember to type:

 

recat
You can now check the image noise:

 

default imstat
getn 13
tvini
tvlod
tvps
tvwin
imstat
The rms after this step is rms= 0.5-1 E-02 JY/BEAM.

The source is point-like at this stage. We stop here in this tutorial.

Further issues

In general, VLBI arrays contain a few antennas, and the UV-coverage is sparse. Having less baselines makes the self-calibration more difficult, as we have less redundancy. Usually, the source model obtained with the first self-calibration is not perfect, and can be improved. A common procedure is to make several self-calibrations using better models each time, for example doing two phase calibrations (to get an initial good model) and then solve for amplitude and phase (solmode='A&P'). Depending on the quality of the calibrator, it could be needed to use long solution interval for the first amplitude self-calibration (even the full observation). In that case, you can repeat the three P, P, A&P calibrations again with a shorter solution interval for the A&P step, for example one third of the initial one. Proceed iteratively until you reach a phase and amplitude calibration of a few minutes. Stop if the number of bad solutions increases too much. A good point to stop is when the noise of your image is not reducing anymore. It is better to end up with a phase-only self-calibration. You can also plot and edit the clean components (CC) after each imaging step with CCNTR and CCEDT, to apply only those CC that are coming from the source. During this process you have to keep checking the phases and amplitudes as a function of uv distance.

For precise astrometry, it can be useful to set an input model when doing FRING, including a good self-calibrated image of your calibrator.

Still room for improvement, but this is the general idea. All sorts of schemes for imaging are possible at this stage: you are entering the black belt (and obscure) VLBI area...

Marc Ribo, 30 June 2010