4.3 Beginning the calibration

After loading the data to disk, it has been traditional to begin with a substantial session of data checking and editing. With data from the VLA, this is always time consuming and often not necessary. Nonetheless, it is probably a good idea to check for two specific kinds of problems before beginning the actual calibration. These are corrupted data in the first record of most scans and totally dead antennas. Many other problems in the data are quickly and easily diagnosed by carefully inspecting the solution tables produced from the calibrators on un-edited data. Missing antennas and erratic amplitudes due to sampling problems and RF interference can be spotted from the SN tables and the closure-error messages produced by CALIB. If you can’t spot errors from these, you may not need to edit the calibrator data. If the SN tables have well-behaved phases for most antennas and rapidly rotating phases for one or two, then you may need to apply baseline corrections rather than editing. See §4.4.4 for details of how to make antenna-position corrections.

The next section tells how to detect simple problems in the data and eliminate them to reduce the warnings from the calibration tasks. The following sections tell you how to enter fluxes for the primary calibrator sources and do a preliminary calibration for all calibrators. In so doing, you should generate one or more solution (SN) tables containing the complex gains at the times of the calibration observations. These tables may be examined for problems with the observations. If you find problems, then you need to edit the data or apply baseline corrections and should consult §4.4. If you do not find problems, you may proceed directly to §4.5. (Of course, you may decide to edit the data from your program sources at a later stage of the data reduction and have to return to §4.4 then.)

4.3.1 Initial editing

The warning messages from the calibrations described in the next sections may be reduced by flagging those antennas which were not actually working, but which were not flagged by the on-line system. Another problem that has plagued the VLA (and other interferometers) persistently is that the first record in scans can be corrupted; usually its amplitudes are lower than they should be. These data can be flagged using TVFLG or UVFLG, but this can be time consuming. The task EDITA described in §4.4.2 is now likely to be the best initial (and perhaps only) editing tool which you need. For a more traditional approach, we recommend that you do the following before beginning your regular data editing. Use the task LISTR on your terminal (to save time and paper) to see if you have the problem:

> TASK LISTR  C R

to set the data listing task

> INDI n ; GETN m  C R

to select the data set, n = 3 and m = 1 above.

> OPTYPE LIST  C R

to select column listing format

> ANTEN a1 , 0  C R

to select one reliable antenna to display.

> BASEL 0  C R

to select all baselines to this antenna.

> SOURCES ’ ’ ; CALCODE ’*’  C R

to select all calibrator sources only.

> TIMER 0  C R

to select all times.

> STOKES ’RR’  C R

to examine only one Stokes at a time.

> BIF 1 ; EIF BIF C R

to specify the “AC” IFs only; it is quicker to look at only 1 IF at a time although more than one can be listed in sequence.

> FREQID 1  C R

to select FQ number 1 (note that FQ numbers must also be done separately).

> DOCRT 132  C R

to see full width display on the terminal. Use your window manager to stretch the window to 132 characters width.

> DOCALIB -1  C R

to turn off calibration.

> DPARM 0  C R

to select amplitudes with no averaging.

> INP  C R

to re-check all the inputs parameters.

> GO  C R

to start the task.

The task will prompt you for a  C R after each “page full” of output. When you have seen enough, enter Q. This display will let you determine whether the start-of-scan problem infects your data and, if so, how badly. If it is rare, forget it for now and use manual flagging methods later if needed. If it is widespread, use the AIPS task QUACK:

> TASK QUACK  C R

> SOURCES ’ ’  C R

to select all sources.

> TIMER 0  C R

to select all times.

> ANTENNAS 0  C R

to select all antennas.

> FLAGVER 1  C R

to insert flagging information in FG table 1.

> OPCODE ’BEG’  C R

flag first APARM(2) min of each scan.

> REASON ’BAD START OF SCAN  C R

reason for the flagging.

> APARM 0 , 1/6 , 0  C R

flag first 10 seconds of each scan.

> GO  C R

The display generated above will also allow you to determine quickly which antennas are absent, which antennas are present but dead, and, with more careful examination, which antennas are flaky and may need special consideration. “Dead” antennas are visible in this display as columns with small numbers — columns that differ by factors of two or so from the others are generally fine. To be thorough, it is probably best to check the other IF:

> BIF 2 ; EIF 2 C R

to specify the “BD” IFs.

> GO  C R

to run the program again.

as well as STOKES = ’LL’.

To remove the dead antennas, run UVFLG. For example, if antennas 6, 9, and 22 were bad for the full run in both IFs and Stokes, they could be deleted with

> TASK UVFLG’ ; INP  C R

to select the editor and check its inputs.

> TIMER 0  C R

to select all times.

> BIF 1 ; EIF 2  C R

to specify the “AC” and “BD” IFs.

> BCHAN 0 ; ECHAN 0  C R

to flag all channels.

> FREQID 1  C R

to flag only the present FQ number.

> ANTEN 6 , 9, 22  C R

to select the antennas.

> BASEL 0  C R

to select all baselines to these antennas.

> STOKES ’ ’  C R

to select all Stokes.

> REASON = ’ZOMBIE ANTENNA  C R

to set a reason.

> OUTFGVER 1  C R

to select the first (only) flag table.

> INP  C R

be careful with the inputs here!

> GO  C R

to run the task when ready.

4.3.2 Primary flux density calibrators

The flux densities of 3C286 (1328+307) and 3C48 (0134+329) on the scale of Baars et al. (Astr. & Ap., 61, 99 (1977)) are given in the 1990 VLA Calibrator Manual as:

3C286:

                                  2
logS = 1.480 +0.292logν - 0.124(logν)

3C48:

logS = 2.345 +0.071logν - 0.138(logν)2

where S = flux density in Jy and ν is Frequency in MHz. These values are, at a few selected frequencies:

Frequency (MHz)   S 3C286 (Jy)    S 3C48 (Jy)  
---------------   ------------    ------------  
     1465            14.51           15.37  
     1680            13.55           13.76  
     4885             7.41            5.36  
     8415             5.20            3.15  
    14765             3.48            1.75  
    15035             3.44            1.71  
    22485             2.53            1.09

Careful measurements made with the D array of the VLA have shown that the Baars et al. (1977) coefficients are in error slightly, based on the assumption that the Baars’ expression for 3C295 is correct; see the VLA Calibrator Manual. Revised values of the coefficients have been derived by Rick Perley. Task SETJY has these formulae built into it, giving you the option (OPTYPE CALC) of letting it calculate the fluxes for primary calibrator sources 3C295, 3C48, 3C286, 3C147, 3C138, and 1934-638. The default setting of APARM(2) = 0) will calculate the flux densities of 3C48, 3C147, and 3C286 according to the 1999.2 Perley coefficients, while APARM(2) = 1 will calculate the flux densities using the original Baars et al. coefficients. Earlier (1990, 1995) Perley coefficients may also be selected with higher values of APARM(2). SETJY will recognize both the 3C and IAU designations (B1950 and J2000) for these sources. You may insert your own favorite values for these sources instead (OPTYPE = ’ ’) and you will have to insert values for any other gain calibrators you intend to use.

Unfortunately, all the primary flux calibrators are resolved by the VLA in most configurations and at most frequencies, they cannot be used directly to determine the amplitude calibration of the antennas without a detailed model of the source structure, see Figure 4.1 as an example. Beginning in April 2004, model images for the calibrators at some frequencies are included with AIPS. Models of 3C286, 3C48, and 3C138 are available for all bands except 90 cm. As of December 2007, models for 3C147 are available at the three highest frequency bands and 20 cm. Type CALDIR  C R to see a list of the currently available calibrator models. Sources which are small enough to be substantially unresolved by the VLA have variable flux densities which must be determined in each observing session. A common method used to determine the flux densities of the secondary calibrators from the primary calibrator(s) is to compare the amplitudes of the gain solutions from the procedure described below.

Use SETJY to enter/calculate the flux density of each primary flux density calibrator. The ultimate reference for the VLA is 3C295, but 3C286 (1328+307), which is slightly resolved in most configurations at most frequencies, is the most useful primary calibrator. CALIB has an option that will allow you to make use of Clean component models for calibrator sources. You are strongly encouraged to use the existing models. If you follow past practice at the VLA, you may have to restrict the uv range over which you compute antenna gain solutions for 3C286, and may therefore insert a “phony” flux density appropriate only for that uv range at this point. In both cases, the following step should be done. CALIB will scale the total flux of the model to match the total flux of the source recorded by SETJY in the source table. This corrects for the model being taken at a somewhat different frequency than your observations and for the model containing most, but not all, of the total flux. An example of the inputs for SETJY, where you let it calculate the flux, would be:

> TASK SETJY’ ; INP  C R

> SOURCES ’3C286’ , ’ ’  C R

if you used 3C286 as the source name.

> BIF 1 ; EIF 2  C R

will calculate for both “AC” and “BD” IFs.

> OPTYPE CALC  C R

perform the calculation.

> APARM(2) = 0  C R

to use the VLA “1990” coefficients.

> INP  C R

to review inputs.

> GO  C R

when inputs okay.

Or you can set the flux manually as shown below:

> TASK SETJY’ ; INP  C R

> SOURCES ’3C286’ , ’ ’  C R

if you used 3C286 as the source name.

> ZEROSP 7.41 , 0  C R

I flux 7.41 Jy, Q, U, V fluxes 0.

> BIF 1 ; EIF 1  C R

selects “AC” IF.

> INP  C R

to review inputs.

> OPTYPE  ’

use values given in ZEROSP.

> GO  C R

when inputs okay.

> BIF 2 ; EIF 2  C R

selects “BD” IF.

> ZEROSP 7.46, 0  C R

I flux 7.46 Jy at the 2nd IF, Q, U, V fluxes 0.

> GO  C R

Note that, although SOURCES can accept a source list, ZEROSP has room for only one set of I, Q, U, V flux densities. To set the flux densities for several different sources or IFs, you must therefore rerun SETJY for each source and each IF, changing the SOURCES, BIF, EIF, and ZEROSP inputs each time.

CALIB will use the V polarization flux in the source table if one has been entered. The RR polarization will be calibrated to I+V and the LL to I-V. While this has little practical use with circular polarizations because V is almost always negligible, it can be used for linearly polarized data from the WSRT. That telescope has equatorially mounted dishes, so the XX polarization is I-Q and the YY is I+Q independent of parallactic angle. For WSRT data, you should relabel the polarizations to RR/LL and enter I, 0, 0, -Q for ZEROSP, since Q is not negligible in standard calibrators.

4.3.3 First pass of the gain calibration

4.3.3.1 Using calibrator models

It is now considered standard practice to use flux calibrator models and you are strongly encouraged to do so. As mentioned above, all the primary flux calibrators are resolved at most frequencies and configurations. Figure 4.1 shows the visibilities and image of the commonly used calibrator 3C48 at X-band, it is obvious this source is far from being point like. Since April 2004, source models have been shipped with AIPS as FITS files. Currently, models for 3C48, 3C286 and 3C137 are available for all bands except 90 cm and 3C147 at all bands except, X, C and 90 cm. Additional models are in the works, so you should always check to see what is available:

> CALDIR  C R

to list the available models by source name and band code.

The primary calibration task in AIPS is CALIB. Most of the complexity of CALIB can be hidden using the procedure VLACALIB. Before attempting to use this procedure, you must first load it by typing:

> RUN VLAPROCS  C R

to compile the procedures.

Type HELP VLAPROCS for a full list of the procedures available in VLAPROCS.

The procedure VLACALIB automatically downloads and uses calibrator models, if one is available and the inputs are set correctly. After you have loaded VLACALIB you may invoke the calibrator model usage by setting:

> INDI n ; GETN m  C R

to select the data set, n = 3 and m = 1 above.

> CALSOUR = ’Cala  C R

to name one primary flux calibrator to invoke automatic calibrator model usage.

> UVRANGE 0  C R

set to zero to invoke automatic calibrator model usage.

> ANTENNAS 0  C R

set to zero to invoke automatic calibrator model usage.

> REFANT n  C R

reference antenna number — use a reliable antenna located near the center of the array.

> MINAMPER 10  C R

display warning if baseline disagrees in amplitude by more than 10% from the model.

> MINPHSER 10  C R

display warning if baseline disagrees by more than 10 of phase from the model.

> DOPRINT 1 ; OUTPRINT    C R

to generate significant printed output on the line printer.

> FREQID 1  C R

use FQ number 1.

> INP VLACALIB  C R

to review inputs.

> VLACALIB  C R

to make the solution and print results.

This procedure load the will load the calibrator model (using CALRD) and use it when it runs CALIB, then print any messages from CALIB about closure errors on the line printer, and finally run LISTR to print the amplitudes and phases of the derived solutions. Plots of these values may be obtained using task SNPLT.

Alternatively, you can load the model in manually using CALRD :

> TASK CALRD  C R

to select the calibrator source reading task.

> OBJECT ’3C286’  C R

to load a model of 3C286.

> BAND ’K’  C R

to select the available model at K band.

> OUTDISK n  C R

to write the model image and Clean components to disk n.

> GO  C R

to run the task and load the model.

Then you may select the model image with GET2N for use in CALIB. Example inputs for CALIB are:

> TASK CALIB’; INP  C R

to select task and review inputs.

> INDI n ; GETN m  C R

to select the data set, n = 3 and m = 1 above.

> CALSOUR = ’Cala’ , ’   C R

flux calibrator for which you have a model.

> UVRANGE 0  C R

no uv limits needed.

> ANTENNAS 0  C R

antenna selection not needed.

> REFANT n  C R

reference antenna number — use a reliable antenna located near the center of the array.

> WEIGHTIT 1  C R

select 1∕σ weights, may be more stable.

> IN2DI o ; GET2N p  C R

to select the model.

> NCOMP 0  C R

use all components.

> SOLMODE ’A&P’  C R

do amplitude and phase solutions.

> APARM(6) 2  C R

print closure failures.

> MINAMPER 10  C R

display warning if baseline disagrees in amplitude by more than 10% from the model.

> MINPHSER 10  C R

display warning if baseline disagrees by more than 10 of phase from the model.

> CPARM(5) 1  C R

scalar average amplitudes before determining solution.

> FREQID 1  C R

use FQ number 1.

> INP CALIB  C R

to review inputs.

> GO  C R

to make the solution.

CALIB will use the clean components table attached to the model to find antenna gain solutions. It will sum the clean components within a certain radius of the center of the map (so that confusing sources that are part of the model do not influence the gain) and scale them to the flux in the SU table. Therefore, you must still run SETJY before running CALIB.

After running CALIB check the solutions for all antennas with SNPLT or LISTR (OPTYPE=’GAIN’). If you have multiple primary or secondary calibrators you will have to run CALIB separately for each, using models where they are available and restricting the UVRANGE and ANTENNAS where they are not. You can either write into the same SN table by setting SNVER to a table number or to different SN tables by setting SNVER = 0. Then you you can proceed as normal flagging and editing your data and proceed to final calibration as described in §4.5.


PIC   PIC

Figure 4.1: Displays of the visibilities (left) and image (right) for the fundamental calibration source 3C48. The plots were made using UVPLT, KNTR, and LWPLA; see §6.3.1 and §6.3.2.1. Data from all VLA configurations including the VLBA antenna in Pie Town were used. A point source would have visibilities that have a constant amplitude at all baselines and an image matching the beam plotted in the lower-left corner.


4.3.3.2 Flux calibration without calibrator models

We strongly encourage you to use the available models. If words alone do not convince you, we encourage you to look at Figure 4.1 which shows you the visibilities and image of 3C48 at X-band. It is rather far from a point source. At lower frequencies there are other sources in the field which have an effect on phases as well. If you must do it the old-fashioned way, then you have to limit the uv ranges and antennas to where the calibrator is a point source. The range of baseline length used can be controlled by the adverb UVRANGE. If there are too few baselines to a given antenna, accurate solutions may not be possible; therefore, it is frequently necessary to limit the antennas used to the inner antennas on each arm. (The antenna pad numbers which include the order number from the array center on each arm can be determined by running PRTAN; see §4.2.2.) CALIB may fail to produce any valid solutions if antennas with no data are included in the solution. The VLA Calibrator Manual suggests the following sets of UVRANGE (in kiloλ) and inner number of antennas.

Both 3C286 and 3C48 are resolved by the VLA in some configurations and frequencies. Good models for these sources are available most frequencies; see CALRD above. Point models for these sources are only accurate over a limited range of baseline length. The range of baseline length used can be controlled by the adverb UVRANGE. Better models are now available for some sources and bands; see below. If there are too few baselines to a given antenna, accurate solutions may not be possible; therefore, it is frequently necessary to limit the antennas used to the inner antennas on each arm. (The antenna pad numbers which include the order number from the array center on each arm can be determined by running PRTAN; see §4.2.2.) CALIB may fail to produce any valid solutions if antennas with no data are included in the solution. The VLA Calibrator Manual suggests the following sets of UVRANGE (in kiloλ) and inner number of antennas.

 
3C48, 3C147, 3C138:  
Band     UVRANGE   Array   No. ant. per arm   Notes  
----  -----------  -----   ----------------  -----------------  
90cm      0- 40     All          All  
 
20cm      0- 40      A            7  
           "       B,C,D         All  
 
6cm       0- 40      A            3  
           "       B,C,D         All  
 
3.6cm     0- 40      A            2  
           "         B            6  
           "        C,D          All  
 
2cm       0- 40      A            1           Not recommended  
           "         B            4  
           "        C,D          All  
 
1.3cm     0- 40      A            1           Not recommended  
           "         B            3  
           "        C,D�