E.4 Basic calibration

For data taken with the new low-band receivers (frequencies rather less than 1 GHz), spectral windows may cover a frequency range so wide that the sources vary quite a bit across the individual window. Such wide windows may be convenient for taking the data, but later data reduction will be more reliable with narrower spectral windows. The task MORIF in 31DEC12 may be used to increase the number of spectral windows by a user-specified factor. To avoid having to use NOIFS ahead of MORIF, task REIFS was written. It is more flexible in placing the new IFs, including allowing them to include data from more than one input IF.

For both continuum and line observations, we must begin by determining which spectral channels are reliable and which are affected by the inevitable loss of signal-to-noise at band edges or are degraded by radio-frequency interference (RFI). Use POSSM to display spectra from the shorter baselines on the TV:


to set the task name and clear the adverbs.

> INDI n; GETN m  C R

to select the data set on disk n and catalog number m.

> SOURCE bandpass_cal  C R

to select the strong bandpass calibrator.

> DOTV 1 ; NPLOTS 1  C R

to plot only on the TV, one baseline at a time.

> ANTEN n1 , n2 , n3 , n4  C R

to select the antennas nearest the center of the array or the maintenance areas.


and only them.

> DOCAL 1 ; APARM 0  C R

to apply the FRING solutions and display vector averaged spectra. Scalar averaged spectra will turn up at the edges reflecting the decreased signal to noise in the outer channels.

> APARM(9)=1  C R

to plot all IFs in a single plot.

> GO  C R

to run the task. Make notes of the desirable channels IF by IF.

If there is no RFI, then you may be able to use the same channel range for all IFs. If the RFI is particularly pernicious, you may have to edit it out of your data before continuing; see E.5. The first time through this section, you should accept but perhaps try to avoid the worst of the RFI. After the detailed editing, that RFI should be gone.

POSSM may reveal extensive ringing in your spectra due to narrow RFI signals. Try SMOOTH=1,0 to apply Hanning smoothing. If this proves beneficial, you should apply this SMOOTH, plus the initial flag table and calibration to the data once and for all with SPLAT. Using SMOOTH in all operations can produce errors in bandpass functions (if you forget it once in a while) and will produce especially strange results when you use the channel-dependent auto-flagging routines such as RFLAG..

For polarization calibration, it is assumed that the phase difference between the right and left polarizations of your calibration is stable with time. Thus, if polarization is important, it is critical to find a reference antenna with a stable right minus left phase. Use CALIB with SOLMODE ’P’ and as short a time interval as possible on your strongest calibration sources. Use SNPLT with STOKES ’DIFF’ and OPTYPE PHASto look at the right minus left phases in the SN table produced by CALIB. Find the one that is the most stable and use that as REFANT henceforth. To avoid later confusion, delete the SN used for this determination with EXTDEST.

The basic EVLA calibration is much like that described in detail in Chapter 4 except that bandpass calibration is now required rather than merely recommended. Having chosen those channels which may be reliably used to normalize the bandpass functions,


to reset all adverbs and choose the task.

> INDI n; GETN m  C R

to select the data set on disk n and catalog number m.

> DOCAL 1  C R

to apply the delay calibration — very important.

> CALSOUR bandpass_cal  C R

to select the strong bandpass calibrator.


to find a bandpass solution for each scan on the BP calibrator.

> ICHANSEL c11,c12, 1,if1,c21,c22, 1,if2,c31,c32, 1,if3,  C R


to select the range(s) of channels which are reliable for averaging in each IF. Use the central 30% of the channels if your calibrators are all very strong or more like 90% if they are not. Remember these values — you will use them again.

> BPASSPRM(5) 1 ; BPASSPRM(10) 3  C R

to normalize the results only after the solution is found using the channels selected by ICHANSEL. Use BPASSP(5)=-1 if your phases are not stable within each scan.

> GO  C R

to make a bandpass (BP) table.

Do not use spectral smoothing at this point unless you want to use the same smoothing forever after. Apply the flag table. A model for the calibrator may be used; see

BPASS now contains the adverbs SPECINDX and SPECURVE through which the spectral index and its curvature (to higher order than is known for any source) may be entered. For the standard amplitude calibrators 3C286, 3C48, 3C147, and 3C138, these parameters are known and will be provided for you by BPASS. For other sources, you may provide these parameters, but BPASS will fit the fluxes in the SU table for a spectral index (including curvature optionally) if you do not. Note that, if no spectral index correction is applied, the spectral index of the calibration source will be frozen into the target source. Bandwidths on the EVLA are wide enough that this is a serious problem. If you do not know the spectral index of your calibration source, BPASS itself or the new task SOUSP may be used to determine the spectral indices from the SU table. Of course, that means that GETJY must already have been run. Since BPASS must usually be run before CALIB and hence GETJY, this suggests that one may have to iterate this whole process at least once. SOUSP now offers the option of correcting one or more SN tables after it adjusts the source fluxes for the spectral index it determined. This may reduce the need for further iterations.

Note that the bandpass parameters shown above assume that the phases are essentially constant through each scan of the bandpass calibrator. This may not be true, particularly at higher frequencies. In this case, you have two choices. One is to set BPASSPRM(5) to 0 which will determine the vector average of the channels selected by ICHANSEL at every integration and divide that into the data of that integration. This will remove all continuum phase fluctuations, but runs a risk of introducing a bias in the amplitudes since they do not have Gaussian statistics. BPASSPRM(5) = -1 now applies a phase-only correction on a record-by-record basis. A better procedure, which is rather more complicated, is as follows. Use SPLIT to separate the bandpass calibrator scans into a separate single-source file applying any flags and delay calibration and the like. Then run CALIB on this data set with a short SOLINT to determine and apply a phase-only self-calibration. On the uv data set written out by CALIB, run BPASS using the parameters described in the previous paragraph. Finally, use TACOP to copy the BP table back to the initial data set.

In 31DEC16, there is a new TV graphical editing task called BPEDT. It looks a lot like EDITA, displaying multiple antennas at a time, but the horizontal axis is spectral channel rather than time and the data displayed are the solutions from the BP table. This task is particularly suited to identifying and flagging residual RFI in the bandpass calibrator scans after the first pass(es) of RFLAG. Repeat BPASS if you generate any flags with BPEDT.

You now need to run SETJY with OPTYPE ’CALCand SOURCES set to point at your primary flux calibration sources. You should load the models for these sources that apply to your data with CALRD; see Then run CALIB with the model once for each primary flux calibrator:


to reset all adverbs and choose the task.

> INDI n; GETN m  C R

to select the data set on disk n and catalog number m.

> IN2DI n2; GET2N m2  C R

to select the model image on disk n2 and catalog number m2.


to apply the delay and bandpass calibration — very important.


to compute a solution for each calibration scan and use the source model.

> CALSOUR flux_cal  C R

to select the primary flux calibrator by whatever form of its name appears in your LISTR output.

> ICHANSEL c11,c12, 1,if1,c21,c22, 1,if2,c31,c32, 1,if3,  C R


to select the range(s) of channels which are reliable for averaging in each IF. These must be the same values that you used in BPASS.

> SNVER 2  C R

to put all CALIB solutions in solution table 2.

> GO  C R

to find the complex gains for the flux calibrator.

Read the output closely. If solutions fail, examine your data closely for bad things. The primary flux calibrator should work without failure. After you have done each primary flux calibrator for which you have models, run CALIB on the remaining calibration sources:

> CALSOUR other_cal1’, ’other_cal2  C R

to select the secondary calibrators by whatever names appear in your LISTR output.


to do no models.

> GO  C R

to find the remaining complex gains.

Again, examine the output messages closely. There may be a few failures but there should not be many in a good data set. The RUN file procedure VLACALIB (see may be used but it does not offer the ICHANSEL option which may be required by your data. It also does a scalar averaging for the amplitudes. This averaging is now a vector average of the spectral channels followed by a scalar average over time. Scalar averaging suffers from Ricean bias in the amplitudes and so should be used only when the calibration source is very strong or when the atmospheric phases are very unstable.

At this point it is necessary to calibrate the fluxes of the secondary calibration sources using your SN table:


to set the task name without changing other adverbs.


to select the secondary sources by the list of name you just used.

> CALSOUR flux_cal  C R

to select the primary flux calibrator by whatever form of its name appears in your LISTR output.

> INP  C R

to check the inputs closely; remember to do all times, IFs, etc. with SNVER 2.

> GO  C R

to adjust the gains in the SN table and the fluxes in the SU (source) table.

Look at the messages with care — the fluxes in the various IFs should be consistent and the error bars should be reasonably small (< 10% at high frequencies, smaller at low frequencies). If not, look at your SN table with SNPLT to see if there are bad solutions. If there are, delete SN table 2, do more flagging with TVFLG or SPFLG, and repeat the process.

Use the interactive TV task EDITA to examine the values in your SN table. There may be bad solutions which will require additional flagging of your calibration data. If there is a significant amount of flagging, you should repeat the calibration process to avoid the influence of bad data on the gains and GETJY results. Rather than edit each antenna/IF tediously, use EDITA or SNPLT to determine allowed ranges of amplitude and phase gains and then use SNFLG with OPTYPE ’A&P’ to do the flagging.

Although it may be better to wait until after detailed flagging, you may wish to iterate at this point, determining the spectral indices of your bandpass calibrators with SOUSP and re-doing BPASS, CALIB, and GETJY. If the result is a seriously changed spectral index for your secondary sources you may have to iterate further.

If your calibration source consists of a single spectral line, you may use CALIB to determine the gains in that IF, limited to the appropriate channels. The new task SNP2D will convert this SN table from a valid phase in only one IF into delays and phases in all IFs on the assumption that the observed phase is in fact a delay.

Finally, apply the gain solutions to your calibration table:


to clear the adverbs.

> INDI n; GETN m  C R

to select the data set on disk n and catalog number m.

> CALCODE ’*’  C R

to select all calibration sources.


to select your solution table from CALIB. Do not include the SN table from FRING a second time!

> GO  C R

to apply SN table 2 to CL table 3, creating CL table 4.

Check the result using POSSM and/or VPLOT.