9.5 Calibration strategy

If you have multiple frequency IDs in your data, you may want to separate the data for different FREQID before performing any calibration. Use UVCOP to do this and take advantage of the opportunity to delete data flagged by the correlator with FLAGVER=1. You no longer need to re-run INDXR on the output files. Again there is a procedure to do this for you:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CLINT t  C R

to set the CL table interval to t minutes (see discussion above in 9.3.1.1).

> INP VLBAFIX  C R

to review the inputs.

> VLBAFIX  C R

to run the procedure.

VLBAFIX will normally be run after loading the data.

We can now begin the process of calibrating VLBI data. As the calibration process proceeds, both amplitude and phase corrections are incorporated into the CL tables. VLBI correlator output is in terms of dimensionless “correlation coefficients.” To convert to Janskys, large amplitude correction factors have to be entered into the CL tables. In addition, phase correction factors must be entered into the CL table to correct for phase offsets and ramps as functions of frequency and time. These corrections must be made so that the data can be averaged over frequency and time without loss of coherence. The process of determining the phase corrections is known as “fringe-fitting” in VLBI; see 9.5.7.

In order to calibrate the absolute phase of their data, VLBI users use either “phase-referencing” or “self-calibration”. If the self-calibration route is chosen, then the phase derivatives with respect to time and frequency are calibrated and the absolute phases are normally left uncalibrated. Then self-calibration methods are then used to generate images (see 9.7). For phase-referencing, an absolute-phase calibration is done using an external calibrator. Phase-referencing in VLBI is similar to, but slightly more complicated than, phase calibration on the VLA. In general terms, phase-referencing VLBI data is accomplished by similar methods as used for VLA data in AIPS; be sure to read 9.5.1.2 and 9.5.7.4 for details on how to calibrate phase-referenced observations.

For astrometric data reduction methods in AIPS the reader is referred to the guide to AIPS astrometric data reduction available from within AIPS by typing HELP ASTROMET.

Optimum fringe-fitting results are obtained if amplitudes are calibrated first, since, in this case, the data will be weighted appropriately (the AIPS task FIXWT may be used to adjust the weights in the data to reflect the scatter of the actual data). We therefore describe the process of amplitude calibration first in 9.5.4.6. Then, in 9.5.7, we describe the calibration of residual phase using “fringe-fitting” techniques. Note however, that for observations of strong sources or observations using only VLBA antennas (where, particularly at centimeter wavelengths, the sensitivities on all baselines are roughly the same), the order of the two calibration steps may be reversed.

9.5.1 Incremental calibration philosophy

The general strategy adopted by AIPS for calibration is, starting with the lowest version of the CL table, to incorporate step-by-step amplitude and phase corrections for a number of different effects. At each stage either an existing CL table is modified or a new version is created from a lower version by a task which applies a certain type of calibration. Note that the actual visibilities are not changed until you are satisfied that you have the best possible calibration file; at this point the task SPLIT can be used to apply the calibration information of the best CL table to the data. However at each point along the way the effect of a particular CL table on the data can be viewed using POSSM or VPLOT by setting DOCAL=1 and GAINUSE equal to the chosen CL table. Since many CL tables may be produced in the course of calibrating a VLBI data set it is important to keep a note of which effects are included in each one. Ideally one should delete CL tables which are judged incorrect and ensure that the accumulated corrections lie in the highest numbered CL table. It is suggested that version 1 of the CL table, as produced by FITLD, be copied to CL version 2 using TACOP before any calibration is begun, and that CL version 2 be used as the starting point in the calibration sequence. An effort is made within AIPS to insure that CL version 1 is not deleted inadvertently. If this does occur however it can be re-generated using task INDXR (described in 9.3.1.6). (Note that INDXR cannot re-generate some types of information, e.g., the phase-cals inserted by the MKIII correlator so that it is important to try to preserve the first CL table.) The task TASAV can be used to back up your tables by copying all of them to a dummy file containing no data. This can be used to save a “snapshot” of the tables at various points in your data processing for insurance purposes. The tables can be copied back into your data file if necessary using TACOP.

You can also use the verb HINOTE to add comments into the history file. This can be very useful for check-pointing progress during calibration.

When you are ready to apply the calibrations, you run either SPLIT or SPLAT. Both tasks can average data in the spectral domain if appropriate. SPLAT can also time-average the data and produces multi-source data sets on output if requested.

9.5.1.1 Smoothing and applying corrections in SN and CL tables

The various stages of calibration described below produce SN tables which are then used to create CL tables using CLCAL. The ancillary tasks SNCOR, SNSMO, SNEDT, and CLCOR can be used to modify the SN and CL tables directly. It is important to choose the proper methods of interpolation in these tasks.

SN tables can be smoothed using tasks SNEDT and SNSMO before being used to update CL tables using CLCAL. SNSMO uses superior smoothing methods to those available in CLCAL and should always be used to do any smoothing of VLBI data, i.e., data with non-zero delays and rates. The adverb DOBLANK now controls which data are actually altered by the smoothing; use it carefully.

Typical inputs for SNSMO would be:

> TASK SNSMO ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> SOURCES ’ ’  C R

to modify the solutions for all sources.

> SELBAND -1; SELFREQ -1; FREQID 0 C R

to do all frequency IDs.

> BIF 0; EIF 0 C R

to include all IFs.

> TIMERANG 0; ANTENNAS 0 C R

to include all times and antennas.

> SUBARRAY 0 C R

to select the first subarray; NB, SNSMO works only on one subarray at a time.

> SAMPTYPE ’MWF’ C R

to use the median window filter method.

> SMOTYPE ’AMPL’ C R

to smooth amplitudes only.

> BPARM 0.5,0  C R

to use a 30-minute filter time for amplitude.

> DOBLANK 1  C R

to replace blanked values with interpolated values only.

> CPARM 0.5, 0, 0, 0, 0, 0.02, 0 C R

to set ranges of allowed values.

> INVER snin ; OUTVER snout C R

to read in the SN table version snin and to write SN table version snout (which should be a new table).

> REFANT 0 ; BADDISK 0  C R

to keep the current reference antenna and to allow all disks to be used for scratch files.

> INP  C R

to check the inputs.

> GO  C R

to run the task.

Typical inputs for CLCAL would be:

> TASK CLCAL’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’ ’  C R

to use all corrections in the SN table.

> SOURCE ’ ’  C R

to apply corrections to all sources.

> OPCODE ’CALP’  C R

to apply SN tables to a CL table.

> INTERPOL  ’ ’  C R

to use linear vector interpolation (’2PT’).

> SAMPTYPE   C R

to do no further smoothing of the merged SN tables..

> SNVER snin ; INVERS 0 C R

to select the one SN table containing solutions to be interpolated.

> GAINVER clin  C R

to select the CL version to which solutions are to be applied.

> GAINUSE clout  C R

to select the output CL version, containing updated calibration information.

> REFANT 0 ; BADDISK 0  C R

to try to use use a single reference antenna if possible during all steps of calibration.

> INP  C R

to check the inputs.

> GO  C R

to run the task.

Note well that SNVER=0 means here to combine the solutions from all SN tables, GAINVER=0 means to apply the solutions to the highest numbered CL table and GAINUSE=0 means to write a new CL table. If two SN tables contain two similar attempts at finding corrections and SNVER=0 then, effectively, CLCAL will be inconsistent in applying the solutions from these two tables. Basically, CLCAL simply concatenates all SN tables and then merges apparently identical records (same time and antenna) to eliminate blanked solutions and to complain about otherwise non-identical solutions.

The parameters INTERPOL and SAMPTYPE allow the user to choose between several different methods of smoothing the SN files followed by interpolation to the times in the CL table. Use EXPLAIN CLCAL  C R to view all the options. The default interpolation option is INTERPOL = ’2PT’, in which the SN table is linearly interpolated between the measurements in the SN table. Using SAMPTYPE = ’BOXcauses the SN table to be smoothed with a boxcar function before being interpolated onto the CL table. The smoothing times for delay, rate etc. are specified in parameter BPARM. DOBLANK controls how both failed and good solutions are handled when smoothing. DOBLANK 0 replaces failed solutions with smoothed ones, while DOBLANK 0 replaces good solutions with smoothed ones. However it is recommended that SN smoothing be done prior to CLCAL using task SNSMO. When smoothing delays, use the new SMOTYPE = ’VLDE’ method whenever the IFs have been grouped to find single solutions (APARM(5)> 0 in FRING) across multiple IFs. Be sure to set NPIECE to indicate how many groups of IFs were used in FRING, e.g., 1 for a multi-band delay, 2 for a delay for IFs 1 — Nif∕2 amd a delay for IFs Nif∕2 + 1 Nif.

With good quality data, the INTERPOL = ’AMBG’ option should work well. Note, however, that this option uses the SN solutions immediately before and after a CL entry to make the interpolation and it uses any SN solution found for any source specified in CALSOUR. Therefore, if CALSOUR is left blank (allowing all sources) and delay and rate solutions were significantly different for different sources, then inappropriate solutions may be applied for a few minutes before or after a source change.

One way of avoiding this problem is to run CLCAL with INTERPOL = ’AMBG’ several times, once for each source, setting both SOURCE and CALSOUR to the name of the desired source with all other inputs remaining unchanged. Another way of avoiding the problem is to use INTERPOL = ’SELF. In this option, only solutions found on a given source are used to calibrate that source and the SN table entries closest in time for that source are used with interpolation. This is not as good as doing multiple runs with the INTERPOL = ’AMBG’ option because there can be jumps in phase at points equidistant from two SN table entries.

If there are bad SN solutions, INTERPOL = ’POLY’ is used to fit a polynomial to the rate solutions and then integrate this polynomial to determine the phase corrections to be entered into the CL table.

A final note on CLCAL. It is sometimes the case that a priori information is not available for all antennas in a single format. For example, you may have system temperature information for VLBA antennas in your SN version 2 table and for non-VLBA antennas in SN version 3. You can merge this information by running CLCAL twice with the same GAINVER and GAINUSE; each time you should explicitly set the SN version number and list the antennas to be processed using the ANTENNAS adverb. If you leave the ANTENNAS adverb blank, the final CL table will contain information only for antennas present in the last SN table processed. Note that you must use OPCODE = ’CALIwhen building up a CL table in pieces.

9.5.1.2 Running CLCAL for phase referencing observations

In particular, this example illustrates how to set the inputs for CLCAL for the specific case when phase corrections determined for the cal source ’J1636-16’ are to be transferred to the target source ’P1643-12’ in a phase referencing experiment:

> TASK CLCAL’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’J1636-16’, ’ ’  C R

to use the corrections determined for the cal source.

> SOURCE ’J1636-16’, ’P1643-12’, ’ ’  C R

to apply corrections to both the cal source and the target source.

> OPCODE ’CALP’  C R

to apply SN tables to a CL table passing all data.

> INTERPOL  ’AMBG’  C R

to use linear vector interpolation with no SN table smoothing and simple phase ambiguity removal. See above for more discussion of INTERPOL.

> SAMPTYPE  ’ ’; BPARM  0  C R

to clear smoothing parameters.

> SNVER snin  C R

to select the SN table containing solutions to be interpolated.

> GAINVER clin  C R

to select the CL version to which solutions are to be applied.

> GAINUSE clout  C R

to select the output CL version, containing updated calibration information.

> REFANT 5 ; BADDISK 0  C R

Use a single reference antenna if at all possible during all steps of calibration.

> INP  C R

to check the inputs.

> GO  C R

to run the task.

It’s a good idea to always apply the calibration information to both the cal and target sources when running CLCAL for phase-referencing observations. This allows you to monitor the cal source data to check the progress of the phase calibration procedure.

9.5.2 Processing observing log and calibration information

As of 1 April 1999, the VLBA correlator provides calibration transfer information, as described in 9.3.1.2 for VLBA antennas. Experiments correlated after November 2003 also have full calibration transfer for the VLA, the GBT, Arecibo and the Bonn 100m. Consequently, you can skip 9.5.2 entirely unless you have data from non-VLBA telescopes (e.g., the VLA before November 2003, Space, other European telescope) or other correlators or you wish to process the log files manually for other reasons.

This section describes the processing of external calibration information, as supplied in ASCII log files. The information that may be used by AIPS includes Tsys or related total power measurements, edit flags as written by the tracking stations or on-line monitor control system, weather information, and pulse-calibration data. These external data can be read into AIPS by tasks ANTAB, UVFLG, APCAL, and PCLOD respectively, as described in 9.5.2.3, 9.5.3, 9.5.4.6 and 9.5.4.3.

You should have received information about where to obtain your calibration data. VLBA calibration log files may be obtained by ftp as described below. Similar calibration files for other participating antennas and VSOP should be obtained from the appropriate sites.

9.5.2.1 Automatic formatting of VLBA and VLBA-like log files

For VLBA antennas, the external calibration file for a given experiment can be downloaded from

http://www.vlba.nrao.edu/astro/VOBS/astronomy/mmmyy/xxxxxcal.vlba.gz

where mmmyy is the month and year (e.g.aug03) and xxxxx is the project code (e.g.bz199). The calibration file is named as above and is in GNU-zipped format. Gain curve information can be obtained from the same web site in the astronomy directory (i.e., two directories up from the project directory). The gain curve should be concatenated to the external calibration file.

The external calibration file, if suitably close to the standard VLBA format, concatenated with the gain curve file, can be automatically subdivided and re-formatted to comply with AIPS requirements using task VLOG. Typical inputs would be:

> TASK VLOG’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the FITLD output file.

> SUBARRAY 1  C R

to select the required subarray.

> CALIN ’FITS:bz199cal.vlba  C R

to specify the input external calibration file.

> OUTFILE ’FITS:BZ199’  C R

to define the directory and prefix for the output files.

> FQTOL 1000  C R

to set the tolerance for frequency match in kHz; one channel width is recommended.

> PRTLEV 0  C R

to limit output; in particular to avoid echoing the calibration file to the screen.

> GO  C R

to run the program.

A sequence of output text files will be created in the specified ($FITS here) directory named BZ199.* with suffixes:

  1. .TSYS: Tsys calibration data, including gain curves, suitable for direct use by ANTAB. An INDEX record is constructed for each frequency ID if possible. If no match can be made to the FQ data, a warning message is printed and the INDEX keyword is omitted; the INDEX keyword must then be inserted by hand (see the HELP file for ANTAB). Gain curve entries for the frequency and time range in the uv data are copied to this output file. It is recommended to insert Tsys values at the end of scans immediately before source changes to avoid interpolation problems for sources of greatly differing flux density or use INTERPOL = ’SELFin CLCAL. Occasionally spurious data from previous observing runs or system startup files will end up in the .TSYS file and must be edited out by hand.
  2. .FLAG: Flag data, suitable for direct use by UVFLG. In the older format “antennas=vlba_xx” the appropriate antenna and day numbers are inserted.
  3. .WX: Weather data, as used by APCAL if performing an opacity solution. This file is altered to conform with APCAL requirements (e.g.WEATHER keyword) and lines with bad entries (*) are commented out.
  4. .PCAL: Pulse-calibration data, for input to PCLOD. No editing is performed.

Files with suffixes .SCAN and .MKIII contain scan summaries and MkIII information and are for information purposes only.

9.5.2.2 Manual formatting of log files

Partitioning of the calibration file can and must be done by hand if the calibration file format is sufficiently distinct from the standard VLBA format or, possibly, if it contains multiple frequency bands. If your observation used non-VLBA antennas, you will need to edit the calibration text file manually to add any log information supplied for these antennas. The necessary steps are as follows:

Extract the flagging and Tsys information from the calibration text file. You will also need to append gain curves to the Tsys file. Try EXPLAIN ANTAB to see an example file in the proper format. The parameter TIMEOFF should be set to zero for each station since both flag information and data are stored with UTC times. The keyword DTIMRANG is also supported which pads each flagged time interval to insure that even very short flag intervals are applied.

While older VLBA format calibration files were supplied with the ANTENNA keyword, newer VLBA format calibration files are supplied with the ANT_NAME keyword. In the former case, the file should be edited to insert the antenna numbers as listed in the AN table (use PRTAN on your AIPS file to find these) and the absolute day numbers must be replaced by relative day numbers with respect to the AIPS reference date. In the latter case, no adjustments to either day numbers or antenna numbers are necessary.

9.5.2.3 Loading calibration log information

The calibration information in the external text files such as Tsys and gain curve measurements are read into TY and GC tables using ANTAB. These tables are then used by APCAL to generate an amplitude solution (SN) table, allowing an optional solution for atmospheric opacity. The user is advised to read the ANTAB help file closely and check the syntax of the text file carefully.

The INDEX keyword is used to assign the tabulated Tsys data to individual AIPS IF channels and polarizations. Up-to-date information on the usage of the INDEX keyword may be found by typing EXPLAIN ANTAB. Be careful to match up the proper polarization labels for the tabulated Tsys information. The frequency and polarization association for each IF channel in the AIPS file can be compared (use LISTR with OPTYPE = ’SCAN) with that at the head of the calibration text file.

The CONTROL group at the head of the calibration file is used only to specify a default index mapping. If the IF channel orders in the calibration file and the uv file are identical it is not required.

Source flux densities are not specified in the ANTAB input file. If source flux densities are required by APCAL, the source (SU) table will be searched. Use SETJY to insert flux densities if necessary.

The parameter TIMEOFF in the input file adds a time offset to the all entries. Non-VLBA stations sometimes measure the system temperature between, rather than during, scans causing ANTAB to be unable to match the measurements with the source and frequency ID. The ANTAB input parameter OFFSET serves the same purpose, but is more successful since the scan times are expanded at both ends.

ANTAB permits specification of IF-dependent and tabulated gains; the format description may be found by typing EXPLAIN ANTAB.

ANTAB can be run multiple times to append to the same TY and GC tables. Also, calibration files from separate antennas (e.g.VLA) which have Tsys data tabulated in a different format can be concatenated and processed in one run. In this case the INDEX keyword must be specified for each antenna to fix the data format.

Note that ANTAB will (usually) ignore calibration data for which there are no corresponding uv data (see the help file for ANTAB). There is one exception however: calibration data for an antenna that does not appear in the AN table will cause ANTAB to fail. If ANTAB quits under such circumstances, you have two choices. You can edit the calibration text file, removing all reference to the missing antennas; or you can use the input adverb SPARM to specify explicitly the names of antennas for which there are calibration data, but which do not appear in the AN table.

*** The use of SPARM is no substitute for careful inspection of the calibration text files. ***

Having created the input text file, typical inputs for ANTAB would be:

> TASK ANTAB’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALIN ’MYVLB:BC25CAL.VLBA’  C R

to specify the text file.

> SUBARRAY 1  C R

to select subarray one.

> TYVER 0 ; GCVER 0  C R

to create new TY and GC tables.

> BLVER 0  C R

to create new BL table for any specified baseline factors.

> PRTLEV 1  C R

to select print level.

> GO  C R

to run the program.

PRTLEV = 2 will echo the calibration file as it is processed, which can be useful in locating format errors.

9.5.2.4 Generating VLA amplitude calibration with VLAMP

Before February 2013, the VLA’s a priori calibration was done with calibration files, named xxxxxcal.y.gz (stored in gzipped format). These were obtained from the same server and disk directory as for VLBA files. This VLA file started with an explanatory preamble, including minor editing instructions. See C.11 for more detailed instructions.

After February 2013 and the advent of the phased-EVLA, either an ANTAB style file was provided to the observer or the calibration information is in the data file. This calibration information is generated using the EVLA switched power (SY table, see E.6), the known gain curve (GC table), and the first CL table using the task VLAMP. Sometimes there are problems with the values in the SY, GC, and/or CL tables and the observer might want to recreate the amplitude calibration of the phased-EVLA after editing one or more of them. To do this the phased-EVLA only data (not the VLBI data) must be loaded into AIPS with BDF2AIPS, see E.1. Then the SY and/or GC tables can be edited. For instructions on how to edit or smooth the SY table see E.6. Then run VLAMP, which will create an output text file that can be loaded into the VLBI data with ANTAB. Typical inputs for VLAMP would be:

> TASK VLAMP’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> FLAGVER 1  C R

to apply flags to the input tables.

> INVER 1  C R

to specify the SY table.

> GAINVER 1  C R

to specify the CL table.

> IN2VERS 1  C R

to specify the GC table.

> OUTTEXT filename  C R

to specify the name of the output text filename.

> GO  C R

to run the program.

The RUN file and procedure named DOVLAMP can be used to run the full process, reading the data into AIPS with BDF2AIPS, smoothing and applying the SY tables with TYSMO and TYAPL, correcting standard calibration source amplitudes with special usage of CALIB and CLCAL, and finally running VLAMP to produce the needed file for ANTAB.

9.5.3 Data editing

Before proceeding to calibrate, you should first flag any obviously bad data. In summary, initial editing is based on the flagging information supplied by the on-line antenna monitor systems, which is applied using UVFLG. This information may be extracted to a .FLAG file as outlined in the previous section or subsequent editing based on the station report logs, or elevation limits can also be performed using UVFLG. Finally, graphical editing tasks such as EDITR and IBLED may be used for interactive baseline-based editing. Until the data are converted into single-source data format, flagging information is stored in the FG table instead of being used to discard data directly. Flag tables may also be used with single-source files (at least with all tasks offering the FLAGVER adverb). One may also undo a flag operation using OPCODEs ’UFLG’, REAS, and ’WILD’ in UVFLG. Note that this operation works only when the operation being undone is in the current flag table. (Note that many tasks delete fully flagged data when copying a data set.)

To edit uv data by reading a text file listing periods of known errors (e.g., the .FLAG text file created by VLOG) run UVFLG with the following inputs:

> TASK UVFLG’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> SOURCES   C R

to flag all sources, which is usually desired.

> SUBARRAY 0  C R

to select the required subarray, all in this case.

> FREQID -1  C R

to flag all frequency IDs.

> OUTFGVER 2  C R

to specify the output flag table; use 2 only if you copied FLAGVER 1 to 2 as suggested in 9.3.1.2.

> INTEXT ’MYVLB:BC25CAL.FLAG  C R

to specify the input text file.

> GO  C R

to run the program.

This will generate a FG table with entries read from $MYVLB:BC25CAL.FLAG.

To edit uv data based on elevation limits, UVFLG can be used with input parameters:

> TASK UVFLG’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> SOURCES ’DA913’ , ’ ’  C R

to select one source.

> SUBARRAY 1  C R

to select subarray one.

> ANTENNAS 3, 4, 5, 8  C R

to flag only certain antennas.

> APARM 0, 0, 0, 0, 10  C R

to flag data between elevations 0 and 10 degrees (APARM(4) to APARM(5)), with no flagging on amplitude or weight.

> OUTFGVER 2  C R

to specify the output flag table.

> GO  C R

to run the program.

This will generate FG table flagging time ranges that fall between the specified elevation limits.

Note that in both of these examples, the flagging information is incorporated into a FG table instead of “irrevocably” deleting your data. In order to apply these flags, you must set FLAGVER to the appropriate FG table version.

Another editing task which may be useful is QUACK, which can edit the selected portion of the scan at its beginning and/or end. This might be needed because (at non-VLBA antennas) the telescopes were still slewing or system temperature measurements were being made. The first 20 seconds or so of a scan, for baselines to the VLA, are often unusable while the VLA correlator phases up at the new source position. The first second or so after a scan may also need to be flagged (OPCODE ’TAIL’) since some antennas may not leave the previous source promptly, leaving bad data marked good. QUACK can be used to flag specific antennas for these and other reasons.

Tasks EDITA and EDITR can be used to inspect and edit the data interactively. IBLED is no longer of much use except for its ability to display the degree of coherence in the data. These tasks are similar in many respects to TVFLG, but are more suited to interferometers with small numbers of baselines. It is also possible to use TVFLG to perform your editing although the TV display is somewhat confusing on sparse arrays of data, especially if there is significant source structure. Read 4.4 through 4.4.2 and 5.5 for more details on the editing of data. Also VPLOT may be used to edit data which deviates excessively from the mean amplitude over a specified averaging interval; see HELP VPLOT  C R for details. Task WIPER is a dangerous but powerful editing tool as well.

The task DEFLG generates a flag table to delete data having coherence less than a user-specified limit. It must be run only on sources that should be strongly coherent although it may be used to flag data from other sources in between the strong-source scans. The task SNFLG is also used to flag data whenever the phase jumps in an SN or CL table are excessive on a baseline-by-baseline basis.

The VLBA correlator may produce a lot of samples which it knows to be bad and which are flagged by the transferred flag table. For this reason alone, or if you also flag a noticeable fraction of the data set, you may wish to run UVCOP to discard the flagged data to conserve disk space and processing time.

9.5.4 Amplitude and instrumental delay calibration

We now advocate a new amplitude calibration strategy base on VLBA Scientific memo #37 (Walker 2015). This strategy interleaves classic a priori calibration with instrumental delay and bandpass calibration to improve the amplitude calibration of data from the new Roach Digital Backend (RDBE) on the VLBA (see the VLBA Observations Status Summary for a description of the RDBE and VLBA Scientific Memo #37 for a discussion of amplitude problems with the RDBE). With data from before the RDBE you can use either the old or new strategy.

9.5.4.1 Parallactic angle correction

The RCP and LCP feeds on each antenna will rotate in position angle with respect to the source during the course of the observation for alt-az antennas (which probably constitute a majority of the antennas in your observation). Since this rotation is a simple geometric effect, it can be corrected by adjusting the phases without looking at the data. This correction must be performed before any phase calibration which actually examines the data is executed. This correction is important for polarization and phase-referencing observations, so it should probably be applied to all cases.. Task CLCOR is used for this purpose; see 9.5.4.1.

There is a procedure which assists you in running CLCOR to correct phases for parallactic angle:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> SUBAR ss  C R

to select the subarray number — only one per execution.

> INP VLBAPANG  C R

to review the inputs.

> VLBAPANG  C R

to run the procedure.

VLBAPANG should be run before applying any other phase corrections.

9.5.4.2 Digital sampler bias corrections for VLBA correlator data

The voltage threshold levels in the digital samplers at the antennas may differ from their optimum theoretical values and this may vary from antenna to antenna and from polarization to polarization. This sampler bias, which is usually significant only in two-bit quantization, introduces an antenna/polarization-based amplitude offset. In full polarization observations this appears as an amplitude offset between RR and LL. The cross-correlation amplitudes may be corrected if the auto-correlation spectra have been measured. See VLBA Scientific Memo No. 9 (1995, “Effect of digitizers errors on the cross and auto correlation response of an FX correlator”, by L. Kogan). Task ACCOR can be used to remove these digital sampler biases from VLBA correlator data, if FITLD was run with DIGICOR = 0, 1, or 2. ACCOR corrects these offsets by examining the autocorrelation spectra. Since ACCOR computes the necessary correction by examining the total-power spectra, it must be run immediately after FITLD in the sense that nothing else should be run that actually modifies the total-power spectra directly. Although ACCOR ignores any SN or CL tables that are present, it is essential to correct for the sampler biases before performing any a posteriori calibration, e.g., fringe-fitting or self-calibration. If the ACCOR gain factors deviate from unity, there may be overall scaling or b-factor errors. For 2-bit quantization, however, the amplitude offsets for the VLBA correlator are typically of order 5 - 10%, but values as high as 20% have been observed.

For one-bit quantization, no significant sampler bias correction is expected. Nonetheless, it is recommended that ACCOR be run on one-bit data as a consistency check. VLBACCOR is a procedure which runs ACCOR, smooths the results with SNSMO, and applies the solutions using CLCAL. Typical inputs would be:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> FREQID ff ; SUBAR ss  C R

to select the frequency ID and subarray numbers — only one of each per execution.

> INP VLBACCOR  C R

to review the inputs.

> VLBACCOR  C R

to run the procedure.

VLBACCOR will normally be run after “fixing” the the data with VLBAFIX (if needed). Use this procedure only on data from the VLBA correlator.

If you do not want to use VLBACCOR, typical inputs to ACCOR for this correction would be:

> TASK ACCOR’ ; INP  C R

to review the inputs.

> INDISK n; GETN ctn  C R

to specify the input file.

> TIMERANG 0 C R

to select data from all times.

> SOLINT  2 C R

to set the solution interval for sampler corrections (min).

> GO  C R

to run the program.

The correction factors were expected to be fairly stable over time, but they have been found to vary over times less than an hour. With a solution interval of a few minutes, such as the two minutes indicated here, it is well to examine the solution (SN) table generated by ACCOR using SNPLT for any bad points or inconsistent values. One approach is to inspect the SN table and then run SNSMO with clipping to get rid of discrepant points. Alternatively, the interactive table editing task SNEDT can be used.

9.5.4.3 Instrumental phase corrections

If you run POSSM on a short (1 minute) section of data on a strong calibrator using the inputs described in 9.4.2 and set DOCAL = -1  C R, you will see that each individual IF channel has its own independent phase offset and its own phase gradient against frequency. These phase offsets and instrumental “single-band delays” are caused by passage of the signal through the electronics of the VLBA baseband converters (or MkIII/MkIV video converter units). The VLBA and MkIII systems can inject narrow band signals (“phase-cals”) into the data recorded at each antenna from which the IF channel phase offsets, and the instrumental single-band delays, can be determined.

For those antennas for which phase-cal measurements are available, task PCCOR can be used to incorporate the phase-cals into an SN table. (see 9.5.4.3). If you have other antennas for which phase-cal measurements are not available, you can run CLCAL using the OPCODE=’CALP’ option to incorporate the incomplete SN table information loaded by PCCOR without throwing away data for the antennas with missing phase-cal information.

For MkIII data from the Bonn correlator, phase-cal measurements are incorporated directly into the first CL table produced by MK3IN — this is another strong reason to protect the first CL table.

If external phase-calibration data (pulse cals) are not available then directly fringe-fitting a short scan of data to measure the phase and single-band delay offsets may be applicable under limited circumstances (see 9.5.4.4). Even when phase-calibration information is available, performing a manual phase-cal can be a good idea to confirm that the IF-dependent delays and phases have been successfully estimated and removed. One good check is to inspect the data using POSSM at times different from the time used to determine the manual phase calibration. Note that time-dependent delays may still be seen because of low elevation and ionospheric effects.

As of 1 April 1999, the VLBA correlator is capable of transferring phase-cal information directly to a PC table for some antennas. For other antennas, the phase-cal information may be read into the PC table using the task PCLOD. Type EXPLAIN PCLOD for further information. If you are unsure whether your VLBI data has phase-cal information, use IMHEAD to list the extension tables and look for a PC extension.

Phase-calibration data in a PC table can be used by task PCCOR to generate an SN table which corrects for the single-band instrumental phase and delay offsets (note that PCCOR uses two phase-cals in each IF). A short calibrator scan must be specified to be used by PCCOR to resolve any 2π phase ambiguities in the phase-calibration data. The specified time range must include at least one PC table entry for each antenna appearing in the PC table. Having resolved the 2π phase ambiguities, PCCOR uses the whole PC table to calculate entries in an SN table for all times (not just the TIMERANG used to resolve the ambiguities). The procedure VLBAPCOR runs PCCOR, FRING (if needed because of missing pulse-cals for some antennas), and CLCAL for you. Inputs are:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> TIMERANGE d1 h1 m1 s1 d2 h2 m2 s2  C R

to specify a short scan on a calibrator. There is no default.

> REFANT m C R

to select a particular reference antenna.

> SUBARRAY 0

to do all subarrays.

> CALSOUR cal1’, ’ 

to specify the calibrator source name.

> GAINUSE CLin  C R

to indicate the CL table with all calibration up to this point.

> OPCODE ’CALP’  C R

to indicate that there are antennas with no usable pulse cals; use OPCODE ’ ’ if all antennas have pulse cals.

> ANTENNAS a1 a2 a3  C R

to solve for antennas a1, a2, a3 “manually” (using FRING).

> VLBAPCOR  C R

to run the procedure.

This should be done after the sampler correction (VLBACCOR) and before the complex bandpass, The CALP option requires the data in the specified TIMERANG to include strong fringes for those antennas lacking phase-cal data.

Running the tasks individually, typical inputs to PCCOR are:

> TASK PCCOR’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> TIMERANG 1 2 15 0 1 2 20 0  C R

to isolate a short scan on a calibrator; no default.

> SNVER 0  C R

to create a new SN table.

> INVER 1  C R

to specify the input PC table version.

> REFANT 5  C R

to specify reference antenna.

> SUBARRAY 1 ; FREQID 1  C R

to set subarray and freqid.

> CALSOUR ’3C345’,’ ’  C R

to set calibrator source name.

> GO  C R

to run the program.

The resulting solution table is applied using CLCAL. If you are missing phase-cal information for some antennas, you must use the ’CALP’ mode of CLCAL; this mode allows calibration information for some antennas to be incorporated into the CL table while passing other antennas through without modification. Examine the corrected data using POSSM to determine if the instrumental phase and delay offsets between the IF channels have been removed correctly.

To check that the applied phase-cals are valid, run POSSM on a short section of data containing a strong source setting DOCAL = 1, GAINUSE to the version number of the CL table containing the phase-cal calibration, and APARM(9) = 1 to place all IFs on the same plot. The phase as a function of frequency on each baseline should be smoothly varying, with no sharp jumps between different IF channels. There may be an overall linear gradient with frequency due to residual delay errors. Unless these conditions hold for all baselines, you should proceed to 9.5.4.4.

In 31DEC16, the DiFX correlator was given the capability of writing a large number (1 per MHz typically) of pulse cals into each IF. AIPS can handle this with new tasks PCFLG (flags PC data with a SPFLG-like TV display), PCEDT (flags PC data with a BPEDT-like TV graphical display), PCPLT (plots PC table data all antennas with one time per page or all times with one antenna per page), PCASS (finds amplitude bandpass), and PCFIT (fits delays and phases to PC data, writing an SN table of the changes in these as a function of time). PCLOD can now read PCAL files written by DiFX. New tasks in 31DEC17 include PCAVG to average pulse-cal tables in time and PCRMS to edit pulse-cal tables automatically from internal statistics. POSSM can also now plot PC table data (APARM(8) = 9. This package of routines remains experimental, but it has been shown do good things with the data. It is now documented in AIPS Memo 123.1

9.5.4.4 “Manual” instrumental phase corrections

If your file does not have phase-cal information, or if these phase-cals do not successfully remove frequency phase offsets, you can use observations of a bright calibrator source and the task FRING to correct for these effects. If you attempted phase-cal calibration, it is best to avoid possible confusion by first deleting any partial or erroneous phase-cal information that already exists. Using CLCOR:

> TASK CLCOR’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> GAINVER clin ; GAINUSE 0  C R

to specify which CL table to modify after copying it to a new table.

> OPCODE PCAL’ ; CLCORPRM 0  C R

to set phase-cals to zero.

> INP  C R

to check the inputs.

> GO  C R

to run the task.

If you have large known delay offsets you may also wish to run CLCOR using OPCODE=’SBDL’ to shift the center of the fringe search window.

If you have a known clock offset, as may be common for an SVLBI data set, you may wish to run CLCOR with OPCODE = ’CLOC’ and CLCORPRM = 0, offset, 0, 0, 0, 0, 1, 0.

Now you can determine the manual phase correction for one or two strong calibrator scans for which all the antennas are present using VLBAMPCL. Task BSCAN may be used to select the scan(s) to be used at this stage. VLBAMPCL runs FRING and CLCAL once or twice, depending on whether one or two scans are used. Choose a scan with strong fringes to all antennas; if none exists, find a second scan that has strong fringes to the antennas missing from the first. Note that if you use 2 scans the REFANT must have good fringes in both scans. Typical inputs are:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> TIMERANGE d1 h1 m1 s1 d2 h2 m2 s2  C R

to specify a short scan on a calibrator. There is no default.

> REFANT m C R

to select a particular reference antenna.

> SUBARRAY 0

to do all subarrays.

> CALSOUR cal1’, ’ 

to specify the calibrator source name.

> GAINUSE CLin  C R

to indicate the CL table with all calibration up to this point.

> OPCODE ’CALP’  C R

to indicate that there are antennas with no fringes for the scan in TIMERANGE; use OPCODE ’ ’ if all antennas will be corrected by the first scan.

> TIME2 d1 h1 m1 s1 d2 h2 m2 s2  C R

to specify a short second scan on a calibrator.

> CALSOUR cal2’, ’ 

to specify the calibrator source name for the second scan.

> ANTENNAS a1 a2 a3  C R

to solve for antennas a1, a2, a3.

> VLBAMPCL  C R

to run the procedure.

If you wish to run FRING separately, you can determine the phase offsets/single band delays by running FRING on a short section of calibrator data where all or most of the antennas are present. Suitable inputs for FRING for this purpose are shown below; for more details of some of the FRING input parameters see 9.5.7.7. Note that it is simplest to choose a single short section of data within a single scan using TIMERANG and to set SOLINT equal to the scan length so that a single solution is achieved. The interval chosen must be less than than an atmospheric coherence time, but long enough that high signal-to-noise is achieved. At centimeter wavelengths with Jansky-level calibrators, solution intervals of a few minutes will work well. For example:

> TASK FRING’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’0954+658 ’ , ’ ’  C R

to select a strong calibrator source.

> TIMERANG 0, 16, 0, 0, 0, 16, 2, 0  C R

to select a single short scan.

> DOCALIB 1 ; GAINUSE 2 C R

to apply the amplitude calibration from CL table 2 to the weights as well as the visibilities.

> FLAGVER 0  C R

to apply the most recent flag table.

> SMODEL 0  C R

to use the null (point-source at the origin) source model.

> REFANT 5  C R

to specify a reference antenna that will give fringes to most other antennas.

> SOLINT 0  C R

to set the solution interval in minutes; do not exceed the atmospheric coherence time.

> APARM 0; DPARM 0 C R

to initialize FRING options to defaults.

> APARM(1)=2 C R

to require at least 2 antennas.

> APARM(6)=1 C R

to solve for the rate, single-band delay and phase of each IF separately.

> DPARM(1)=1 C R

to use only 1 baseline in the initial (coarse) fringe search.

> DPARM(9)=1 C R

to suppress fitting of rates; rates will be 0 in the SN table.

> SNVER 0  C R

to create a new SN table.

> ANTWT 0  C R

to apply no additional weights to the antennas before doing the solutions.

> INP  C R

to check the inputs.

> GO  C R

to do the fit.

If there was no single scan where all the antennas were present, you can run FRING again for another scan setting REFANT to be one of the antennas found in the first run (the same REFANT would be best) and ANTENNAS to this antenna plus all of the antennas not found in the first run. FRING will generate a new SN table each time; be careful to keep track of which SN tables you wish to use.

The phase solutions in the SN table(s) are interpolated onto a calibration or CL table using task CLCAL as described in 9.5.1.1. To apply the calibrator solutions to the other sources in the data file, set CALSOUR to the calibrator source used when running FRING (in the example above, CALSOUR  ’0954+658’) and set SOURCE = ’ ’ for all sources. Also, set REFANT to whatever was used when running FRING. If multiple runs of FRING were required, you can set SNVER=0 so that all SN tables are combined before being applied ; if you do this, you must first be careful to delete all SN tables except those generated by FRING. Or you can run CLCAL multiple times specifying each SN table in turn, with the specific antenna numbers, while keeping the same CL table versions.

To check the output CL table, run POSSM for the scan used for the FRING solution with DOCAL = 1 and GAINUSE = 3 (i.e., the output CL table from the CLCAL above). The phase should be flat as a function of frequency on all baselines, although it may not be centered on zero. Run POSSM on another scan containing a strong calibrator to check that the assumption of constant IF phase offset holds.

9.5.4.5 Bandpass calibration

Full bandpass response calibration should be performed for all observations. It is suggested that integrating over a variable bandpass function is one of the most significant sources of non-closing errors in continuum VLBI data. By calibrating the bandpass before averaging over frequency, these effects can be avoided. In VLBA test observations, a dynamic range of 28,000:1 was achieved on the source DA193 (Briggs et al. 1994, VLBA Memo No 697A, “High Dynamic Range Imaging with the VLBA”) after applying bandpass calibration.

Bandpass calibration is carried out using the task BPASS using either the auto- or cross-correlation data. The output is a BP or bandpass table. For this amplitude calibration scheme the cross-correlation (complex) bandpass must be used. The derived bandpass solutions can be plotted using POSSM by setting APARM(8)=2. The effect of applying these bandpass solutions to your data can also be viewed using POSSM by setting DOBAND=1 and BPVER. An example of the inputs to produce bandpass spectra from the cross-correlation data would be:

> TASK BPASS’ ; INP  C R

to review the inputs.

> INDISK n1 ; GETN ctn1  C R

to select the multi-source visibility data as the input file.

> CALSOUR ’BLLAC’ , ’DA193’  C R

to specify the continuum source(s) which were observed for the purpose of bandpass calibration.

> DOCALIB 1  C R

to apply calibration.

> SOLINT 0  C R

to average data over whole scans before determining the bandpass.

> BPASSPRM 0  C R

to use the cross-spectra.

> BPASSPRM(5) 1 C R

to not divide by “channel 0.”

> BPASSPRM(9) 1  C R

to interpolate over flagged channels.

> BPASSPRM(10) 6  C R

to normalize the amplitude solutions using the power solutions rather than the actual solutions which are voltages.

> ICHANSEL chanbeg, chanend, 1, IFnum, ...  C R

to set channels for entire bandwidth for normalization, if this left 0 then the inner 75% is used and can cause up to 15% error in the amplitude, so unfortunately ICHANSEL must be explicitly set to all the channels in the IF, for every IF.

> GO  C R

to run the program.

Be careful with the adverb SMOOTH. If you smooth, or do not smooth, the data while finding a bandpass solution, then you must apply the same SMOOTH adverb values whenever you apply that bandpass solution to the data. The only exception is that you may smooth the data after applying the bandpass solution with SMOOTH(1) values 5 through 8 when you did no smoothing in BPASS.

This will produce a BP table containing the antenna-based bandpass functions to be applied to the data. determined. You should check your results very carefully. The BP tables can be plotted with POSSM or printed with PRTAB. Note that this task merely creates a BP table. To use this BP table, set BPVER and DOBAND as described in 4.7.4 when running any later AIPS tasks.

Note, if your bandpass calibrator is not stable or strong enough during the observation (your bandpass calibrator data should have a better S/N than the data you’re trying to correct with the bandpass), you could consider using the phase reference source (if there is one) and use SOLINT = -1 (include all scans to make one bandpass solution). If the bandpass calibrator is strong enough, but the average phase varies through the scan, then divide each record by “channel 0” by setting BPASSPRM(5) = -1 to adjust phase only. You should select a range of channels that have similar phases to be averaged as channel 0 using adverb ICHANSEL

The normalization of the bandpass correction can be checked by running ACSCL after BPASS. This task is a version of ACCOR which applies the current calibration tables to the data before forcing the autocorrelations to unity. Be sure to set DOBAND to apply the bandpass by your preferred method. ACSCL will write an SN table with amplitude corrections which should be very close to one. Apply that table with CLCAL. However if you run VLBAAMP, ACSCL and CLCAL will be run for you, see 9.5.4.6.

In 31DEC16, a new data editing task BPEDT appeared to flag visibility data based on bad bandpass solutions. It is a graphical editor much like EDITR and EDITA except that it displays bandpass solutions as a function of spectral channel. It is a quick way to check your bandpass table and, if necessary, to flag bad channels in your calibration source. If you do generate new data flags, you should run BPASS over again to generate a corrected BP table. Set BPASSPRM(9) = 1 to interpolate over any fully flagged channels.

9.5.4.6 Continuum amplitude calibration

After bandpass calibation is determined, the auto-correlations can be slightly offset from unity. To correct this offset ACSCL can be run, applying all the previous amplitude and bandpass calibration. Described below is a procedure that is part of VLBAUTIL called VLBAAMP that runs ACSCL as well as the final amplitude calibration steps.

The TY table can be examined using SNPLT with OPTYPE=’TSYS’ or ’TANT’ or LISTR with OPTYPE=’GAIN; the GC table is examined with PRTAB. SNEDT may also be used to inspect the TY table and even used to delete or smooth some of the measurements. TYSMO can be used to delete discrepant system temperatures and replace the bad and/or good values with time-smoothed values. Note, however, that anomalously high system temperatures may indicate possible bad data (e.g., due to weather) rather than bad measurements of the system temperature. On occasion, RFI is some IFs can render the values for those IFs in the TY table unusable. Task TYCOP will copy TY data between IFs and polarizations in a variety of ways in an attempt to replace the bad data with something reasonable even if not exactly correct for that antenna and IF. Note that flagging bad uv data will not change the appearance of the TY table since no flags are applied in plotting this table. EDITA may also be used to examine the TY data interactively and, if bad system temperatures are found, to flag the associated uv data. (This task does flag displayed Tsys when the data are flagged.) Tasks UVCOP and SPLAT will apply a flag table not only to the uv data, but also to the TY and SN tables. APCAL can then be used to derive an amplitude calibration (SN) table.

Atmospheric opacity becomes significant at high frequencies (15 GHz). APCAL can fit for an opacity correction, if needed, using weather information and system temperature. The weather information can be taken from the WX table by setting INVERS (after October 7, 2003) or loaded from disk by setting CALIN. In order to have APCAL fit for opacity set OPCODE to ’GRID’, ’OPAC’ or ’LESQ’ and DOFIT to 1 (both of these are necessary for an opacity fit). OPCODE ’GRID’ and ’OPAC’ need an initial guess for the receiver temperature (TRECVR and zenith opacity (TAU0). APCAL will estimate the initial guesses from the data if TRECVR and/or TAU0 are 0. If OPCODE is set to ’GRID’, ’OPAC’ or ’LESQ’ and DOFIT 0 then the opacity correction is applied using the provided TRECVR. This is a good option if you have a reliable measurement of the receiver temperature. The fits are fairly robust, but the plots that APCAL makes should be examined. Note: a large number of bad Tsys values can make the fits unreliable. APCAL will warn you if fits appear to be incorrect. The procedure VLBAAMP runs ACSCL, smooths the results with SNSMO, runs APCAL, and applies the solutions using CLCAL.:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> FREQID ff ; SUBAR ss  C R

to select the frequency ID and subarray numbers — only one of each per execution.

> INP VLBAAMP  C R

to review the inputs.

> DOFIT 1  C R

to enable the opacity correction; 0 disables it.

> VLBAAMP  C R

to run the procedure.

VLBAAMP will normally be run after correcting the bandpass and loading any gain curves or system temperature data for non-VLBA antennas using ANTAB.

If you have not used VLBAAMP and do not want to correct for atmospheric opacity, typical inputs to APCAL are:

> TASK APCAL’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> ANTENNAS 0 ; SUBARRAY 0  C R

to select all antennas and subarrays.

> SOURCES ’ ’ ; STOKES ’ ’  C R

to select all sources and Stokes.

> BIF 1 ; EIF 0 ; FREQID 1  C R

to select all IFs of frequency ID 1.

> TIMERANG 0 ; OPCODE ’ ’  C R

to select all times and use no opacity solutions.

> TYVER 0 ; GCVER 0  C R

to use the latest TY and GC tables.

> SNVER 0  C R

to create a new SN table.

> GO  C R

to run the program.

If atmospheric opacity correction is desired, set the following inputs as well as the above:

> OPCODE ’GRID’  C R

do a grid search.

> DOFIT 1  C R

to fit the opacities.

> INVERS 1  C R

to use WX table 1.

> TAU0 0 ; TRECVR 0  C R

to let APCAL estimate initial values.

> GO  C R

to run the program.

The resulting solution (SN) table can be smoothed and clipped using SNSMO and applied using CLCAL as described in 9.5.1.1). Substantial smoothing of the TY table (task TYSMO), especially for VLBA-only observations, is not generally recommended since variations of the system temperature often reflect a real response to the weather. Smoothing can be useful for data from the phased-VLA, when the amplitude calibration information reflects low signal-to-noise. For non-VLBA antennas, it is important to check with SNEDT that the TY information is associated with the correct source and SNEDT can be used to delete occasional bad system temperature measurements before they are applied to the data. When opacities are fit, APCAL generates plots of the receiver temperature versus zenith angle and the opacity versus time. APCAL will warn you about bad fits, but the plots should be checked for problems with the data or the fits.

On occasion, it has been noted that plots of system temperature show unreasonable variation between IFs. This suggests that the Tcal values may have systematic errors as a function of frequency. APCAL has, in 31DEC14, an option to bring the Tsys values into better agreement with either their average or with a user-chosen IF, thought to be probably accurate. APARM(6) > 0 selects this function while APARM(7) may be used to specify a specific IF to calibrate the others. Note that a single value is used for each antenna/IF over all times.

The DiFX correlator in now capable of correlating multiple phase-stopping positions within a single antenna beam (pointing position). In 31DEC13 there is task called CLVLB designed to apply corrections to a CL table (writing a new one) for the offset of phase-stopping and pointing position. The task has internal tables for the beam shape and squint of the VLBA antennas and can take user input for these parameters for other antennas. This is a new task and should be used with caution — early results with it were less than satisfying — although the corrections it applies are certainly in the right direction.

9.5.5 Spectral-line Doppler correction

Normally, when observing, you will have kept the frequency constant throughout the run for ease of observing. Therefore, although your data will have the same frequency, the center velocity of your spectrum will change with time and the spectral-line signals will wander backwards and forwards through the spectrum. To ensure that the velocity is constant throughout the data you should run SETJY and then CVEL. The VLBA correlator compensates for the revolution of the antennas relative to the center of the Earth. In this case, the only movement which CVEL should compensate is the rotation of the antennas together with the Earth around the Sun. This movement should be the same for all antennas and gives a smaller effect than the rotation relative to the center of the Earth. Nonetheless, CVEL is required for the VLBA correlator at least to be able to compare observations made at different times. Without CVEL such comparisons will show the velocity shift of the Earth’s orbit about the Sun.

SETJY will insert the velocity information required in the SU table:

> TASK SETJY’ ; INP  C R

to review the inputs.

> INDISK n1 ; GETN ctn1  C R

to select the data.

> SOURCE ’OH127.8’ , ’   C R

to specify the line source whose velocity is to be specified.

> OPTYPE ’ ’  C R

to switch off flux modification.

> SYSVEL -66.0  C R

to specify the velocity of the “center” of the band in km/s.

> APARM 65, 0  C R

to specify which spectral pixel is the “center” of the band, actually the pixel to which SYSVEL refers.

> RESTFREQ 1612e6, 231.09e3  C R

to give the rest-frequency in Hz, e.g., that of the OH transition. Note that the two single-precision adverb numbers are summed in double precision inside SETJY.

> VELTYP ’LSR’  C R

to select the rest frame of the velocity.

> VELDEF ’OPTICAL’  C R

to define velocities by the optical convention.

> GO  C R

to run the program.

Then run CVEL:

> TASK CVEL’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to select the data.

> OUTDISK 3 ; OUTCLASS CVEL  C R

to specify the output file.

> SOURCE ’OH127.8’ , ’   C R

to select the source(s) to be shifted, all others will be passed un-shifted.

> DOBAND 1  C R

to apply the bandpass correction — important.

> BPVER 1  C R

to specify the version of BP table to use.

> GO  C R

to run the program.

After applying the BP table, CVEL will not copy it to the output file to protect you from applying it twice. Although CVEL allows you to select which sources are to be shifted, the BP table, if DOBAND is set appropriately, will be applied to all sources found.

9.5.6 Spectral-line amplitude calibration

The calibration strategy suggested in AIPS for spectral-line VLBI data utilizes the total-power spectra method described in Lecture 12 of VLBI, Techniques and Applications, eds. Felli and Spencer, published by Kluwer Academic Publisher, 1988. The continuum method using Tsys values (see 9.5.4.6) can also be used. The first step is to generate a so-called template spectrum. This is a high quality spectrum from the most sensitive antenna in the array that has been corrected for the effects of the bandpass filter. For example:

> TASK SPLIT’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> SOURCE ’OH127.8’, ’   C R

to write the program source.

> BCHAN 0 ; ECHAN 0  C R

to write all spectral channels.

> DOCALIB -1  C R

to avoid applying any calibration.

> DOBAND -1  C R

to skip the bandpass correction since the data will have been corrected already in CVEL.

> TIMERANG 0 22 0 0 0 22 30 0  C R

to select the data from a range of times when the antenna elevation was high and the source spectrum of high quality.

> APARM 0, 0, 0, 0, 1  C R

to pass only self-spectra.

> GO  C R

to run the program.

You should then run ACFIT to do a least-squares fit of the template total-power spectrum to the total-power spectra of all other antennas and to write the resulting time-dependent amplitude gain correction factors into an SN table.

> TASK ACFIT’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> IN2DISK n ; GET2N ctn  C R

to specify the template file.

> CALSOUR ’OH127.8 ’  C R

to select the source to use for calibration.

> DOCALIB -1  C R

to avoid applying any previous calibration.

> DOBAND -1  C R

to skip the bandpass correction since it was done when CVEL was run.

> SOLINT n  C R

to average the self-spectra over n minutes (e.g., 10) before doing the least-squares fit.

> REFANT 1  C R

to select the desired reference antenna from the template file.

> BCHAN 50 ; ECHAN 70  C R

to set the range of spectral channels over which the fit is performed.

> BPARM 80, 120  C R

to set up to 5 pairs of start and stop channels to use in determining the baseline polynomial to be removed from the source spectra. The order of the polynomial is specified in APARM(1).

> CPARM 80, 120  C R

to set up to 5 pairs of start and stop channels to use in determining the baseline polynomial to be removed from the template spectra. The order of the polynomial is specified in APARM(2).

> XPARM 45.1, 48.0, 50.1, 49.5  C R

to specify Tsys values in the first polarization for each IF for the template scan of the reference antenna. YPARM provides an equivalent list for the data, if any, from a second polarization.

> APARM 0, 0, 50, 0, 0.72  C R

program control: APARM(1) and APARM(2) specify the orders of the polynomial spectral baseline to remove from the source and template spectra; APARM(3) and APARM(4) specify the sensitivity of the template antenna (in Jy/deg) in the first and second (if needed) polarizations; APARM(5) and APARM(6) specify the minimum and maximum relative antenna gains allowed, with defaults to allow all positive values; APARM(7) specifies the maximum allowed gain error, with 0 meaning all; APARM(8) specifies the print level, with 0 providing minimal information, 1 providing useful information on the gains determined for each antenna and solution interval and 2 giving the gory details for each fit; APARM(9) specifies that the fits are done after subtracting a spectral baseline (0) or without a baseline (1); and APARM(10) controls whether baseline-subtracted spectra are written to an output file.

> SNVER 0  C R

to create a new SN table into which the solutions are to be written.

> GO  C R

to run the program.

ACFIT will generate an SN table, which has to be applied to the CL table. If needed, run SNSMO to smooth the amplitude correction factors determined by ACFIT before running CLCAL. A 30-minute smoothing interval for SNSMO (set using CPARM 0.5,0) should be sufficient.

9.5.7 Phase calibration

After carrying out amplitude calibration, the remaining calibration steps involve correcting the phase between the different integration periods. This will allow averaging of the data over both frequency and time without loss of coherence. The phase offsets may be corrected using a priori ‘phase-cal’ measurements if available and/or by directly fitting to the data.

After removing instrumental phase offsets from each IF, the data will in general still contain frequency and time dependent phase variations. The purpose of “fringe-fitting” is to determine these phase errors and then remove them from the data.

The primary AIPS task for fringe-fitting is FRING. This task estimates time variable station-based delays (phase derivatives wrt frequency) and rates (phase derivatives wrt time) using a self-calibration-like algorithm. Once these delays and rates are determined, the task CLCAL is used to produce the phase correction that should be applied to each integration period and spectral channel to correct for delay and rate effects. This use of FRING and CLCAL is discussed in detail in 9.5.7.7. Two alternatives to FRING are the tasks BLING and BLAPP and the experimental version of FRING named KRING. BLING and BLAPP are discussed briefly in 9.5.7.8. KRING provides a superset of the functionality in FRING with numerous enhancements such as: the use of extremely small scratch files, a parsimonious use of memory, possible solution extrapolation both backwards and forwards in time and a rationalized definition of SNR. For more information about KRING, type HELP KRING from within AIPS. When fringe-fitting to many small scans, KRING can be substantially slower than FRING. When fringe-fitting data sets with large numbers of spectral channels and long solution intervals, KRING can be substantially faster than FRING.

The process of fringe-fitting, and then interpolating the solutions using CLCAL, can be a very time consuming process. Although it depends a lot on the size and structure of the data set, the fringe-fitting time can equal or exceed the observing time for a large data set. For this reason it is probably wise to run through the fringe-fitting procedure described in 9.5.7.7 on a small amount of data first (say 30 minutes’ worth) before attempting to process the whole data set. This is especially true if this is your first time processing multi-IF, multi-channel VLBI data. It is probably simplest to use UVCOP to copy out a short time range of data from your main file and to work only on this initially. Doing so also avoids the possible confusion of having many versions of extension tables.

9.5.7.1 Special considerations: SVLBI

The existing fringe-fitting tasks within AIPS have been enhanced to improve their performance when dealing with SVLBI data. In addition, several new tasks have been written to address problems specific to SVLBI fringe-fitting. The primary SVLBI fringe-fitting tasks in AIPS are BLING and FRING and are discussed in 9.5.7.79.5.7.9. The tasks COHER and FRPLT, described in 9.4.6 and 9.4.7, may be of particular interest when reducing SVLBI data.

There may be delay discontinuities in the recorded data for a variety of reasons such as tracking station handoffs, clock glitches, etc. The recommended method for dealing with such discontinuities is to force scan boundaries at such events. The task INDXR can be used to generate a new NX table with scan boundaries at desired locations using an input text file. In practice, either INDXR will do the right thing by design, or your P.I. information letter should have contained instructions on how to construct a text file in the proper format for INDXR.

A new task, OBEDT, is available which allows selection of specific orbital parameter ranges, through the creation of an output flag (FG) table. This can be used to constrain initial fringe searching.

SVLBI data often contain tracking passes three or four hours in length, for which fringes are mostly (or wholly) not apparent. Typically, the space-ground baselines will have the highest correlation coefficients near perigee, when those baselines are shortest. However, the imperfectly known orbit will cause high fringe rates and short coherence times. Near apogee, the coherence time is longer, and may be limited by the atmosphere above the ground telescopes, but the correlated flux also is much lower. Sometimes, it may be possible to find fringes for only 15 or 20 minutes, but that’s better than nothing.

If no fringes are seen anywhere during a tracking pass, a useful trick is to set APARM(7) = 0.01 to let through the highest SNR for each solution interval, and set DPARM(5) = 1 to turn off the least squares solution. Then run FRING for an entire tracking pass, and use SNPLT with OPTYP = ’DELAand OPTYP = ’RATE’ to look for repeating values (usually easier to see in delay than in rate). Also, make plots with OPTYP = ’SNR’ to see if slightly higher SNRs are found at a time when there seems to be some consistency in delay values. It may be necessary to try this process with several values of SOLINT in order to arrive at a guess for the fringe location. Use VPLOT to plot uv distance versus time for the space-ground baselines, then search using the TIMERANG and REFANT that provide the shortest projected baselines. Another possibility is to set REFANT = ANTNUM(’MK’), since the atmospheric coherence time should be longest at Mauna Kea, and increase SOLINT to a fairly large value in hopes something will show up. (Note, however, that a large SOLINT with a wide-open search window in delay and rate may require a large-memory computer or great inefficiency due to page faulting.)

If fringes are found somewhere, use CLCOR to center the fringes (see 9.5.4.4), then run FRING again with small delay and rate windows (e.g.DPARM(2) = 200 to 400 and DPARM(3) = 40 to 80 at 1.6 GHz, or ~ 200 at 5 GHz). Set low SNR thresholds with APARM(7) = 3.5, and turn the least-squares solutions back on with DPARM(5)=0. Usually, it’s best to turn on the exhaustive antenna search with APARM(9) = 1, since only a few space-ground baselines may show fringes. It can be helpful to use SEARCH to order the search from shortest to longest space-ground baselines.

It generally doesn’t work well to use one tracking station to predict the results of another, because clock initialization offsets are typically relatively large and have unrelated errors, and fringe-rate errors also may be unrelated.

9.5.7.2 Special considerations: spectral-line

Delay and fringe-rate calibration of spectral-line VLBI data must be handled differently. The residual delay cannot be estimated from the source itself because, due to the very nature of the source, the delay is a rapidly varying function of frequency. The continuum calibrator, observed for this purpose, is first used to determine residual delays and fringe-rates which are then applied to the spectral-line source. A suitable channel or range of spectral-line channels “on-source” is then used to determine the residual fringe-rates. It is very important to note that in some situations, the residual fringe-rates determined from the calibrator may not be applicable to the line source because the fringe-rate residuals towards the two sources may be quite distinct. In such situations, the residual fringe-rates determined from the continuum source should not be applied to the line source. See 9.5.7.10 for more details.

9.5.7.3 Special considerations: polarization

In addition to phase calibrating the LL and RR data separately, for polarization data the R-L phase and delay offsets must also be determined. This is outlined in 9.5.7.11. After fringe-fitting, all parallel-hand fringe solutions need to be re-referenced to the same antenna.

9.5.7.4 Special considerations: phase-referencing

The process of phase referencing for VLBI data is conceptually very simple. Unfortunately, the technical difficulties in conducting a successful phase-referencing observation are primarily in setting up the schedule. So by the time you get around to reading this section, your project is either guaranteed to succeed or guaranteed to fail, depending upon how well your observations were designed. See the lecture by A. Beasley and J. Conway in “VLBI and the VLBA”, 1995, (ASP), and VLBA Scientific Memo No. 24 (2000, by J. Wrobel, C. Walker, J. Benson, and A. Beasley) for more details on how to design phase-referencing observations.

In “phase referencing,” the phase calibration for your target source is derived from a calibrator, or phase referencing, source observed for that purpose. First, you apply any available a priori phase-cals to both the target and cal source. Next, you fringe-fit, self-calibrate, and/or hybrid-map the cal source — whatever is needed to complete the phase calibration for that source. Finally, you apply the phase corrections so determined to the target source. In practice this is done by specifying the target as well as the cal source in the SOURCES adverb list whenever an SN table containing phase corrections for the cal source is applied using CLCAL. See 9.5.1.2 for a specific example of how to run CLCAL to transfer phase corrections determined using a cal source to a target source.

Certain “instrumental” corrections such as those for unmodeled zenith delay may have subtle but significant effects on phase referencing. See 9.5.7.5 for a discussion.

You can perform a “hybrid” form of phase referencing in some instances. It may be that your target source is too weak for initial fringe-fitting. In this case, you can fringe-fit the cal source data to determine the phase corrections to be applied to the target source data. Then, after averaging in frequency, the target source data may have adequate signal-to-noise to allow rate corrections to be determined for it by fringe-fitting. In this mode, you may or may not wish to zero the rate corrections determined on the cal source. If the cal source is “far” from the target source, the rate corrections may do more harm than good for the target source and should be zero’ed. On the other hand, your target source may be entirely too weak to fringe-fit on at all. In this case, you must rely on determining the phase corrections solely using your cal source.

If you are attempting phase-referenced astrometry, you may have a target source that is brighter than your cal source(s). In this case, you simply fringe-fit on the target source and transfer the solutions to the cal source(s). Be careful, if your goal is to extract absolute positional information, not to independently self-calibrate the cal and target sources.

9.5.7.5 Correcting for atmospheric delays

VLBI correlators remove some estimate of the non-dispersive atmospheric delay at the elevation and frequency of the observation from the data. These a priori models are usually fairly good, but careful observations can improve upon them. AIPS offers a number of options to deal with this problem. DELZN uses multi-band delay (see 9.5.7.6) in an SN table to fit for the zenith tropospheric delay and the clocks as a function of time. It works best if the observations include data on a variety of calibrators well distributed around the sky. DELZN applies a correction to a CL table or writes a file to disk with zenith atmospheric delays and possibly clock offsets that can be used by CLCOR, OPCODE=’ATMO’ to correct a CL table. The second option is for the situation where the data used by DELZN is in a different file from the data that needs to be corrected.

To correct an attached CL table, the typical inputs for DELZN would be:

> TASK DELZN’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> SNVER snin  C R

to select the SN table containing multi-band delays.

> GAINVER clin  C R

to select the CL version to which solutions are to be applied.

> APARM(4) 1  C R

to create a new CL table.

> APARM(5) 1  C R

to solve for atmosphere and clocks

> SOURCES ’DA913’ , ’ ’  C R

to specify the sources to be corrected.

> CALSOUR ’0103+337’, ’0140+412’, ’0150-334’, ’0159+418’, ’0202+319’, ’0244-297’, ’0358+210’, ’0425+174’, ’0641+392’  C R

to specify the calibrator sources observed at a large variety of elevations

> OPTYPE ’MDEL’  C R

to use multi-band delay

> DOTV -1  C R

to make PL files

> GO  C R

to run the program.

This will generate a CL table and several PL files that show the data and the fitted model. You are strongly encouraged to examine these.

To create an output file rather than correct a CL table use the same inputs as above except:

> APARM(4) 0  C R

to create no CL table.

> SOURCES ’ ’  C R

to correct no sources

> CALSOUR ’*’  C R

to use all calibrator sources.

> OUTFILE ’MYVLB:BZ199.DELZN  C R

output file name

Again, you are advised to examine the resulting plot files which show both the data and the fitted model. The output file can be read in with CLCOR (OPCODE=’ATMO’; INFILE=’MYVLB:BZ199.DELZN’) to correct a CL table.

There is another task designed to deal with the effects of zenith delay in phase-referencing observations. Phases for the target source in phase referencing are corrected by the phases at the calibrator which usually is at a different elevation. Task DFCOR is a special version of CLCOR which applies the ’ATMO’ operation to correct the CL table for the difference in elevation between the target source and adjacent calibration sources without applying the full atmospheric delay correction.

If the SN table contains dispersions as well as multi-band delays, DELZN may also be run to fit a zenith angle model to the dispersions (OPTYPE = ’DISP’). Like the ’MDEL’ operation, the zenith and time function found by DELZN can be applied to a CL table or written to a text file for later application by CLCOR with OPCODE = ’DISP’.

9.5.7.6 Finding multi-band delays

For astrometric and geodetic experiments and to use DELZN (see 9.5.7.5), the multi-band delay must be determined. The multi-band delay is the delay caused by errors in the station positions and the difference between the correlator model and reality for clocks and the troposphere. The multi-band delay is best determined over IFs which are widely spaced in the frequency band. After the instrumental phases have been corrected (9.5.4.39.5.4.4), the multi-band delay can be determined in one of two ways. For strong sources do a global fringe fit as described in 9.5.7.7 setting APARM(5)=0, and then run MBDLY on the resulting SN table.

Typical inputs for MBDLY would be:

> TASK MBDLY’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> INVERS SN table from FRING

to select input SN table

> OUTVERS 0 C R

make new SN table

> BIF 0; EIF 0 C R

to select all IFs.

> SUBARRAY 0 C R

to select all subarrays.

> APARM 0 C R

the defaults are generally O.K.

> GO  C R

to run the program.

This will produce a new SN table with the MBDELAY columns filled in.

For weak sources, use APARM= 2 0 0 1 1 in FRING. This averages each IF and fits a multi-band delay across them. Note that this does not solve for single-band delays, unlike the previous method. This will also produce a new SN table with the MBDELAY columns filled in.

Note that MBDLY can fit the single-band delays for a multi-band delay plus a dispersion (phase varies with wavelength rather than frequency) with OPTYPE = ’DISP’. FRING can do a very similar fit, after finding the single-band delays, if you set APARM(10) = 1. Wide bandwidth observations at low frequencies may benefit from this.

9.5.7.7 Antenna-based fringe-fitting

To see an example of the residual phase errors in your data, use POSSM to view the phase on a short calibrator scan (at some time other than that used to solve for the phase-offsets in 9.5.4.4). In general, there will be a gradient in phase between the IFs (due to the “multi-band” delay) and also small gradients within each IF (caused by small residual “single-band” delays). These time-variable phase gradients are mainly due to inaccuracies in the geometrical time delays that the correlator assumed for the time of arrival of the wavefront at each antenna. These inaccuracies arise from propagation effects through the troposphere and ionosphere, inaccurate Earth geometry, etc. and give phase errors which are proportional to frequency. Such phase errors prevent integration of the data over frequency (or cause a loss of coherence if you do). Similarly, VPLOT will show, on any single IF and spectral channel, phases which change rapidly with time. Again, these are due to unavoidable inaccuracies in the correlator model; such large “phase rates” prevent integration over time. Both of these points are illustrated in Figure 9.1.

You will want to run FRING to correct for these residual rates. You can help these tasks by making sure that the reference pixel in frequency is in the center of the band (Nchan/2+1 is best). Use task CENTR or any of the tasks with the FQCENTER adverb to fix data sets for which this is not true.

FRING and KRING use a global fringe-fitting algorithm described by Schwab and Cotton, 1983, Astron. J., 88, 688. Unfortunately, these are large and complicated tasks. The procedure VLBAFRNG is available to simplify access to FRING and VLBAKRNG access to KRING. Versions of these procedures for phase-referencing experiments are called VLBAFRGP and VLBAKRGP. For all these procedures, if the SOURCES adverb is set, then CLCAL is run once to apply the results of FRING (or KRING) for each source in SOURCES. For the phase-referencing procedures (VLBAFRGP and VLBAKRGP), any source that is in the SOURCES list that is not in the CALSOUR list will be phase referenced to the first source in the CALSOUR list. Note that, if every source in the SOURCES list occurs in the CALSOUR list, VLBAFRNG and VLBAKRNG will run identically to VLBAFRGP and VLBAKRGP, respectively. If the SOURCES list is empty, VLBAFRNG and VLBAKRNG will run CLCAL once over all sources, while VLBAFRGP and VLBAKRGP will run CLCAL once referencing all the sources to the first source in CALSOUR. These procedures will produce new (highest numbered) SN and CL tables.

Sample inputs for procedure VLBAKRNG are:

> RUN VLBAUTIL  C R

to acquire the procedures; this should be done only once since they will be remembered.

> INDISK n ; GETN ctn  C R

to specify the input file.

> TIMERANGE 0

to include all times.

> BCHAN 0 ; ECHAN 0  C R

to use all frequency channels.

> GAINUSE CLin  C R

to use the CL table with all the calibration up to this point.

> REFANT n  C R

to specify an antenna that is present most of the time as the reference antenna.

> SUBARRAY 0  C R

to use all subarrays.

> SEARCH 0  C R

to try all antennas as a reference antenna if fringes cannot be found using REFANT. This is different from FRING; in FRING this must be set to try other reference antennas.

> OPCODE    C R

to leave all solutions in the output SN table.

> CPARM 0  C R

to use defaults for KRING steering parameters; this is okay for strong sources.

> CPARM(1) x  C R

to specify the minimum integration time in seconds.

> CPARM(8) 1  C R

to avoid re-referencing solutions; do this only for polarization experiments.

> CALSOUR src1’, ’src2  C R

to specify the sources to fringe fit using KRING.

> SOURCES src1’, ’src2  C R

to have CLCAL run for each source using the interpolation method given below.

> INTERPOL ’AMBG’  C R

to use the “AMBG” interpolation method (linear phase connection using rates to resolve phase ambiguities).

> BADDISK 0  C R

to use all disks for scratch files.

> VLBAKRNG  C R

to run the procedure.

Procedure VLBAKRGP sets the same adverbs as VLBAKRNG except

> SOURCES src1’, ’src2’, ’src3  C R

to have CLCAL run for each source using the interpolation method given by INTERPOL. Any source here that is not in the CALSOUR list will be phase referenced to the first source in the CALSOUR list. In this example, src3 is phase referenced to src1.

> VLBAKRGP  C R

to run the procedure.

VLBAFRNG and VLBAFRGP are identical except there is no OPCODE (it is equivalent to DPARM(8)) and DPARM(4) and DPARM(7) in FRING are the same as CPARM(1) and CPARM(8) in KRING, respectively. Also note the different use of SEARCH in FRING and KRING.

Suitable inputs for the fringe-fitting task FRING are, in detail:

> TASK FRING’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’ ’  C R

to find solutions for all sources.

> TIMER 0  C R

to find solutions for all times.


PIC    PIC

Figure 9.1: left: A POSSM plot of the 43-GHz spectrum of the quasar NRAO150 on the Los Alamos to Kitt Peak baseline. The plot shows that the observation was performed with 4 IFs, with 256 spectral channels within each IF. The upper frame shows the phase variation with frequency; within each IF, the small phase slope is caused by a residual delay error. The phase offsets between the IFs can be clearly seen as well. Both the residual delay error and the phase offsets must be determined and removed before the data can be spectrally averaged (see 9.5.7). right: A VPLOT plot of the uncalibrated amplitude (upper frame) and phase (lower frame) as a function of time for the source NRAO150 at 43 GHz on the baseline Kitt Peak to Mauna Kea. Note how the phase varies as a function of time; this variation is equivalent to a residual fringe rate of 8.3 mHz. Unless the fringe rate is determined and removed (see 9.5.7), the data cannot be averaged in time.


> DOCALIB 1  C R

to apply the most complete calibration file including amplitude calibration and IF and channel phase offsets to both the visibilities and the weights.

> GAINUSE 3  C R

to use CL table 3.

> SNVER 2  C R

to write solutions into SN table 2.

> BCHAN 0; ECHAN 0 ; CHINC 1 C R

to use all spectral channels within each IF channel.

> FLAGVER 0  C R

to apply the most recent flag table.

> SMODEL 0 ; CLR2NAME C R

to use a point-source at the origin model for the sources, rather than a Clean-component model.

> SOLINT 3  C R

to set the solution interval in minutes; do not exceed the atmospheric coherence time (see below). Setting SOLINT to 0 sets solution intervals equal to scan lengths.

> REFANT 5  C R

to choose an antenna that will give fringes for most of the scans. This is important: FRING will search for fringes to this antenna first. If it fails for some reason, it will select another reference antenna, based on the ANTWT data, and, if it still fails, give up (see however the discussion of the new SEARCH adverb above). In this case, you should look for scans with no fringes or a bad reference antenna may be causing the problem. A big, sensitive antenna is often used as REFANT (e.g., Effelsberg). Occasionally, it may be helpful to split your data set up into 2 or 3 sections, which are fringe-fitted with different REFANT (e.g., a “European” and a “US” part of the observations). Changes in reference antenna should, in general, not cause problems.

> SEARCH ref2, ref3, ... C R

to specify the order over which antennas are searched for fringes when the exhaustive search is requested. If APARM(9) is set, all antennas will be searched for fringes with SEARCH controlling the order of the search. Note, REFANT should be SEARCH(1). The use of APARM(9) and SEARCH makes FRING much more likely to find fringes to weak antennas and is highly recommended.

> ANTWT 0  C R

to apply no additional weights to the antennas before doing the solutions. If the amplitude calibration was incorrect, you can use this option to force antenna weights up or down to control the weight FRING gives to data to each station when making the global solutions. Unless the SEARCH option described above is chosen, ANTWT also controls the order in which antennas are tried as secondary reference antennas after failing to find fringes on the REFANT. Give higher weight to antennas you want to see used as secondary references.

> APARM(1) 2  C R

to accept solutions when only 2 antennas are present; default is 6.

> APARM(2) 0  C R

to have the data divided by the model before fitting fringes; APARM(2) > 0 tells FRING that the data have already been divided by a model.

> APARM(3) 0  C R

to treat polarizations separately; APARM(3) > 0 averages RR and LL.

> APARM(4) 0  C R

to use the frequencies individually within each IF; APARM(4) > 0 causes the frequencies within each IF to be averaged before the solution.

> APARM(6) 1  C R

to get some useful, but limited, messages, including the SNR.

> APARM(7) 9  C R

to avoid false detections by setting a moderately high minimum for the SNR accepted. You may wish to use a lower threshold (especially for SVLBI) although APARM(7) less than about 3 is probably not useful.

> APARM(8) 0  C R

to set the maximum number of antennas (if no AN table).

> APARM(9) 1  C R

to enable the exhaustive search mode.

> APARM(5) 0  C R

to do least-squares fits in each IF. APARM(5) 0 means to solve separately for the rate, single band delay and phase of each IF. 1.5 > APARM(5) > 0 means to solve for one single rate and multi-band delay affecting all IFs. If 2.5 > APARM(5) > 1.5, the task additionally solves for the difference between the multi-band delay and single-band delay, i.e., it allows for a different gradient of phase versus frequency within an IF than between IFs. Note, however, that unlike APARM(5)=0, this option assumes that the single-band delay is the same in each IF; it therefore solves for a single value for the difference between multi-band and single-band delay affecting all IFs. Normally users should use APARM(5)=0 for multi-IF data. Primarily for the VLA, a fourth option, APARM(5) = M has been added, with M > 2. It divides the IFs into M - 1 groups and solves for one delay per group.

> ANTENNAS 0; DOFIT 0 C R

to allow all antennas to be fit. Only baselines between antennas listed in the ANTENNAS adverb are used in the fringe search. If any antennas are specified in DOFIT however, a solution is made only for those antennas; all other selected antennas are assumed to be already calibrated and are passed through with no additional corrections. See the HELP file for FRING under DOFIT. DOFIT is only active if APARM(9) is set.

> DPARM(1) 1  C R

to use one baseline combination in the initial coarse (FFT) fringe search. This provides a starting guess for the least-squares solution. If you are searching for weak fringes you should consider using two and three baseline combinations in the search; this can improve sensitivity in the initial fringe search. See Lecture 19 in Synthesis Imaging in Radio Astronomy, edited by R. Perley, F. Schwab, and A. Bridle, for an explanation of how this global multi-baseline searching works. Note that if your source structure is complex and you have not divided the data by an accurate source model, then setting this parameter to one is safest. DPARM(1)>1 works even when the integration times are not equal.

> DPARM(2) 0  C R

to set the full width of the delay window in nsec, centered around 0, to search; the default, chosen here, is to use the full Nyquist range defined by the frequency spacing. A smaller search window can permit a lower SNR threshold to be set, but can also result in lost data due to failed fringe searches. For the VLBA, a DPARM(2) = 1000 window is usually adequate.

> DPARM(3) 0  C R

to set the full width of the fringe-rate window in mHz, centered around 0; the default, chosen here, is to use the full Nyquist range defined by the integration time. A smaller search window can permit a lower SNR threshold to be set, but can also result in lost data due to failed fringe searches. For the VLBA, a DPARM(3) = 200 window is usually adequate.

> DPARM(4) 2  C R

to specify the correlator integration time in seconds; use DTSUM to find the correct value. For data from the VLBA correlator, DPARM(4)=0 will cause FRING to determine the correct integration time by examining the data file directly.

> DPARM(5) 0  C R

to do both the coarse and the least squares solutions; set to 1 if you require only FFT solutions.

> DPARM(6) 1  C R

to keep, for single-source files, frequencies separated in the output file; the default is to average frequencies within IFs. This parameter does not affect multi-source files.

> DPARM(7) 0  C R

to re-reference solutions to a common reference antenna; when processing polarization data, set this to 1 to avoid the re-referencing.

> DPARM(8) 0 C R

to disable the zero’ing options — see the HELP file. WARNING, DPARM(8) > 0 will discard parts of the final solution. Be sure to use this option with extreme care.

> DPARM(9) 0 C R

to allow fitting for rate. DPARM(9)> 0, causes the task to suppress rate fitting entirely rather than zeroing it after the fact as in DPARM(8).

> INP  C R

to check the inputs.

> GO  C R

to do the fit — finally.

Note that FRING finds solutions in two steps. First approximate solutions are found in the FFT step using combinations of one, two, or three baselines (see DPARM(1) above). Then, as long as DPARM(5) < 1, a least-squares algorithm uses these approximate values as a starting point for refining the solutions. Especially for weak sources, the least-square solution may wander outside narrow constraints set by DPARM(2) and DPARM(3).

Note that the SOLINT interval should be selected with consideration of the atmospheric coherence time, but must be long enough that high signal-to-noise-ratio solutions are achieved. For observations between 1.6 and 15 GHz, solution intervals of 3–6 minutes (and often longer) should be fine. At other frequencies shorter solution intervals may be required. In these cases, experiment with different length solution intervals on short sections of data. Note that solution intervals greater than the scan length will never be used; the scan lengths are listed in the NX table and may be examined using PRTAB or LISTR with OPTYPE=’SCAN.

If the source is complex, and especially if the visibility phase of the source changes during SOLINT, it is useful to divide the data by a Clean model derived from previous observations or from an earlier attempt at processing the data. This Clean model can be specified by filling in IN2NAME et al. Situations where this is useful include observations of equal doubles (where there are zeros in the amplitude and, hence, rapidly changing phases) or very large sources (of order arcseconds). If you are using multi-baseline searching (i.e.DPARM(1) > 1), then solutions may be more sensitive to source structure and an input model may be useful if the structure phases are larger than one radian on many baselines. When using a model, convergence may be improved by weighting the data by 1∕σ rather than 1∕σ2; set WEIGHTIT = 1.

You should check the SNRs found by FRING carefully; they are printed if APARM(6) > 0. The SNRs estimated during the FFT search are used to determine if the SNR of a solution is the threshold set in APARM(7). If they are not, then that solution is flagged before being passed to the more accurate least-squares routine. Users should check that the SNRs found in the LSQ routine match those expected. If the detected SNRs are too low, SOLINT may be too long or too short or other parameters may be set wrongly.

Be warned that proper scaling of the SNRs by FRING depends upon whether or not the data weights have been properly calibrated. Task FIXWT may be used to calibrate the weights, but changing the SNR threshold for FRING directly (APARM(7)) usually produces satisfactory results.

The final delay and rate solutions and their SNRs should be inspected using LISTR:

> TASK LISTR’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> OPTYPE GAIN  C R

to list gain solutions.

> INEXT ’SN’ ; INVER 2  C R

to list SN table 2 (as above).

> DPARM 6, 0  C R

to list delay; use 7 for rate, 1 for phase, and 8 for SNR.

> GO  C R

to run the program.

Alternatively, the solutions can be plotted against time to make sure they are sensible. Use SNPLT:

> TASK SNPLT’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> OPTYPE ’RATE’ ; DOBLANK 1  C R

to plot rate solutions including failed ones, OPTYPE DELAfor delay solutions.

> OPCODE ’ ’  C R

to plot each polarization and IF in separate plots.

> NPLOTS 5  C R

to plot five antennas/IFs/polarizations per page.

> INEXT ’SN’ ; INVER 2  C R

to plot SN table 2 (as above).

> GO  C R

to run the program.

It is a good idea to plot the solutions for OPTYP ’RATE’ and DELA(single-band delay) as well as the associated ’SNR’s. They should be smoothly varying functions. Delays and rates should be found only within your specified windows. Check for suspicious detections at the limits of the search windows — for instance, they could be detections of side lobes of the main fringe. If you used windows smaller than Nyquist, you may want to check your detections using bigger windows. Gaps in detections with time can occur if, e.g., tapes were bad, antennas were off source, the source visibility is in a minimum, or the reference antenna choice was bad. It pays to investigate such problems at this point before proceeding.

Discrepant SN solutions can be removed using the interactive task SNEDT or the non-interactive task SNSMO. If, in the latter, the CPARM values are set, then the SN solutions will be clipped if they differ from the running mean by amounts which you can specify. If the BPARM values are set, the solutions are then smoothed and clipped entries can be replaced with mean values based on a boxcar- or median-window-filter average. See the explain file for details. Although SNSMO allows the option of modifying the input SN table, it is safest to have it create a new one. If you have a lot of discrepant SN values, you should also consider using option INTERPOL = ’POLY’ in task CLCAL (see below).

If there isn’t enough disk space to run FRING on all the data at once (because of the large scratch file that FRING insists on creating), you can run FRING multiple times specifying time ranges and explicitly setting SNVER to the same SN table.

If, for some reason, you set the parameters of FRING or SNSMO wrongly and the resulting SN table is unusable, it is wise to avoid confusion by deleting it using EXTDEST and starting over again.


PIC    PIC

Figure 9.2: left: A POSSM plot of the uncalibrated spectrum of NRAO150 at 43 GHz on the baseline Kitt Peak to Los Alamos. The plot shows the spectrum for a single IF to show the effects of the residual delay error more clearly. The phase slope as a function of frequency is clear evidence for a small delay error in the correlator model. right: The same data as shown on the left, but corrected for a delay error of -55 nanosec and a residual fringe-rate of -2.0 milliHz. Note how the phase as a function of frequency is now flat and centered around zero degrees. These data can now be averaged in frequency, if desired.


Once a valid SN table has been produced, the next step is to interpolate the solutions found onto the finer grid of entries in a CL table using the task CLCAL with INTERPOL = ’AMBG’ as described in 9.5.1.1.

Once a final CL table is generated, its effect on the data can be viewed using tasks VPLOT and POSSM by setting DOCAL=1 and GAINUSE to the version number of the final CL table; see 9.4. Optionally, in VPLOT, one can average over spectral channels and/or IF channels before plotting. Use VPLOT to plot a time range covering a few FRING solution intervals on a strong source. Phase variations should be small with no jumps. If this is not the case, check the inputs to FRING (especially SOLINT) and CLCAL. A comparison of before and after phases is shown in Figure 9.2.

9.5.7.8 Baseline-based fringe-fitting

Baseline-based fringe-fitting, implemented in BLING and BLAPP, is an alternative to using FRING and CLCAL described above. Whereas FRING searches and solves for station rates and delays globally, BLING makes independent fits to each baseline for delays and rates, creating a BS table of baseline-based solutions.

In most cases, the global fringe-fitting described in 9.5.7.7 should be used since FRING should be able to fringe-fit weaker sources more reliably. However, there are some instances in which baseline-based fringe-fitting is to be preferred. Note that FRING may be used to do baseline-based fringe-fitting by running it many times, each time specifying only 2 antennas. BLING has not been actively maintained or used, and so may be less reliable. Amongst the advantages of the baseline-based fringe-fitting are:

  1. BLING may be more robust than FRING even in the absence of an accurate source structure model.
  2. Fringe solutions can be found for cross-polarized fringes without editing the uv header.
  3. As presently implemented, for a given number of IF and spectral channels, BLING can solve for longer scans than can FRING.
  4. BLING has the option of adjustable, non-zero centered fringe-search windows, which can be controlled from an external file. This option may be important in fringe-fitting Space VLBI data.

BLING is distinguished from FRING by the ability to directly control the fringe search on each separate baseline, and by the ability to solve for fringe acceleration if required. Separate fringe windows in delay, rate and acceleration, and different solution intervals can be set for each individual baseline. The fringe windows may have non-zero offsets and can be specified using the input adverbs or, more flexibly, by drawing up an external ASCII control file of fringe-prediction windows and BLING control parameters. The latter option allows the specification of time-variable fringe-search parameters across the observing file. The general algorithm follows that described by Alef and Porcas, 1986, (Astron. Astrophys., 168, 365); BLING also allows the stacking of data from different baselines, as discussed by Schwab and Cotton, 1983, Astron. J., 88, 688. In addition, model division is possible before the fringe-fitting is performed and cross-polarized fringe searches can also be conducted without editing the uv header. BLING writes the results to a BS table. These baseline-based solutions can be converted into antenna-based corrections using the separate task BLAPP and then applied to the data.

Acceleration may be solved for by conducting a coarse search in the specified acceleration window. The results of this search are then interpolated to estimate the final solution. Fringe acceleration searches can considerably increase the amount of CPU time it takes to run BLING. Therefore, you may wish to turn off the acceleration search (DPARM(7) to DPARM(9)) unless you need it for space VLBI.

Full details concerning BLING input parameters can be found by typing EXPLAIN BLING. This includes information concerning the format required for the external control file. Earlier versions of BLING are discussed in AIPS Memo 89 (1994, “Baseline-Oriented Fringe Searches in AIPS” by Chris Flatters). Typical input parameters to BLING are given below:

> TASK BLING’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’DA193’, ’ ’  C R

to specify the calibrator source.

> STOKES ’LL’  C R

to select the Stokes.

> TIMERANG 0, 10, 5, 0, 0, 11, 0, 0  C R

to limit the time range.

> ANTENNAS 3 ; BASELINE 0  C R

to select all baselines to antenna 3.

> SUBARRAY 1  C R

to use subarray 1.

> FREQID 1 ; BIF 1 ; EIF 0

to use frequency ID 1 with all IFs.

> BCHAN 1 ; ECHAN 0  C R

to use all spectral channels.

> DOCAL 1 ; GAINUSE clin  C R

to apply amplitude calibration before fringe fitting.

> CLR2N ; NMAPS 0  C R

to do no model division.

> SOLINT 0.5  C R

to use a 30-second fringe solution interval.

> INFILE ’ ’  C R

to use the adverbs rather than an external control file.

> APARM(1) 2 ; APARM(2) 0 C R

to set the integration time; no model division.

> APARM(3) 0 C R

to do no stacking of baselines.

> APARM(4) 0 ; APARM(5) 0 C R

to set minimum acceptable SNR to 5 and accept coherence of 20%

> DPARM 0  C R

to use the default fringe windows and no acceleration search.

> DOUVCOMP 1  C R

to use compressed scratch files.

> BADDISK 0

to use all disks for scratch files.

> GO  C R

to run the program.

Note that baseline-stacking (APARM(3)) is not implemented for data sets with unequal integration times. Also, note that the fringe-rejection criteria specified using APARM(4) and APARM(5) are important parameters. The use of compressed scratch files is recommended and is not believed to have a significant impact on precision. Note, if model division is required, APARM(2) should be set and the source should be entered explicitly.

BLING will execute with a summary line marking the start of each baseline processed. The resulting BS table can be examined using task BSPRT, with input parameters:

> TASK BSPRT’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> INVERS bsin  C R

to specify the BS table version number.

> DOCRT -1  C R

to send output to an external file.

> OUTPRINT ’FITS:BSPRT.LIS’  C R

to define the output file name.

> GO  C R

to run the program.

For printing to the screen, select DOCRT=1.

The BS table output includes the estimated fringe parameters and their associated errors. Note that due to changes in FFT interpolation the errors may be an overestimate. The BLING solutions are interpolated and factorized into antenna-based gain solutions using BLAPP. This task either writes a solution (SN) table which can be applied using CLCAL, or allows a CL table to be updated with the calibration information directly. These options are selected using OPCODE=’SOLV’ or OPCODE=’CAL’ respectively. BLAPP can interpolate solutions with unequal time sampling and includes the acceleration term in interpolation if it is available. Typical inputs to BLAPP are:

> TASK BLAPP’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> INVERS bsin  C R

to specify the input BS table version number.

> SOURCES ’ ’ ; STOKES ’LL’  C R

to do all sources and a specific Stokes.

> FREQID 1  C R

to select frequency ID 1.

> TIMERANG 0 ; ANTENNAS 0  C R

to do all times and antennas.

> SUBARRAY 1 ; REFANT 3  C R

to do subarray 1 with reference antenna 3.

> ANTWT 0  C R

to use equal antenna weights.

> OPCODE ’SOLV’  C R

to solve for a SN table.

> GAINVER clin  C R

to specify the input CL table which defines the times for which solutions are desired.

> BADDISK 0  C R

to use all disks for scratch files.

> GO  C R

to run the program.

The resulting solution (SN) table can be plotted using SNPLT in the standard fashion. For OPCODE=’CAL’ the output CL table also needs to be specified using GAINUSE. If an SN table is generated, it can be smoothed or clipped using task SNSMO and applied using CLCAL as described in 9.5.1.1.

9.5.7.9 SVLBI-specific techniques

An alternative approach to direct fringe detection of each individual baseline to the orbiting antenna is to first calibrate the ground array using conventional fringe-fitting techniques, then coherently combine all ground antennas to improve the fringe detection sensitivity to the spacecraft. Several incarnations of this approach exist within AIPS. The AIPS tasks FRING, BLING, and KRING all allow baseline stacking which can be used to fringe fit the space baseline using composite baselines. It was shown in VLBA Scientific Memo No. 13 (1996, “Global ground VLBI network as a tied array for space VLBI”, by L. Kogan) that the method of phasing a group of ground-based antennas and the method using global fringe fitting with baseline stacking give the same minimum detectable flux density. Therefore, baseline stacking with DPARM(1)=3 in FRING should yield the best possible sensitivity. There are other options which also may be explored. The adverb DOFIT in FRING and KRING can be used to solve for subsets of the available antennas in order to find good solutions for the ground antennas in a dual round of fringe-fitting. The exhaustive baseline search mode, used by default in BLING and KRING and activated in FRING by setting APARM(9)=1, allows more baselines to the spacecraft to be searched.

9.5.7.10 Spectral-line fringe-fitting

The determination of the delay and fringe-rate calibration is a two- or three-step process for spectral-line VLBI data. First, the residual delay and fringe-rates are estimated for each antenna from the continuum calibrators. Then, residual fringe-rates must be determined again for the line source using a “strong” channel or range of channels. As an intermediate step, the phases of the line source should be examined to check that the calibrator’s residual fringe-rates haven’t destroyed phase coherence; if so, then the calibrator’s residual fringe-rates should not be applied to the line source.

If computer memory is limited, FRING must trade off the number of spectral channels against the length of the solution interval. For continuum calibrators in a spectral-line dataset, the large number of spectral channels may force FRING to require too short a solution interval. (FRING now allocates memory dynamically and may be able to handle large cases so long as the computer is adequately equipped with real and swap memory.) This limit can be overcome by running UVCOP to extract the continuum calibrators into a separate data file and then running AVSPC with AVOPTION SUBSto average spectral channels coherently within each IF. INDXR should be run to regenerate an NX table. FRING will then allow more reasonable solution intervals.

Run FRING as follows only on the continuum calibrators to determine residual delays and fringe-rates:

> TASK FRING’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’BLLAC’,’DA193’  C R

to select continuum calibrator sources.

> DOCALIB 1  C R

to apply the current calibration.

> GAINUSE clin

to specify which CL table to use.

> SMODEL 0  C R

to use the null source model (points at the origin).

> FLAGVER 0  C R

to apply the most recent flag table.

> BCHAN 10 ; ECHAN 115  C R

to exclude the edges of the band; normally the data in these channels are corrupted by the bandpass filters.

> REFANT 5  C R

to select a reference antenna (see continuum discussion).

> SOLINT 6  C R

to set the solution interval in minutes. It should not exceed the coherence time.

> APARM(6) 1  C R

to get some useful, but limited, printout; gives SNR.

> APARM(7) 7  C R

to avoid false detections by setting the minimum acceptable SNR. Warning: solutions with lower SNR will be flagged as bad which will ultimately flag the affected data.

> DPARM(1) 1  C R

to use one-baseline combination in initial, coarse fringe search (FFT). This provides starting points for the least-squares solutions.

> DPARM(2) 10000  C R

to select a delay window in nsec, centered around 0(!). The default is to use the Nyquist range. For a 250kHz-bandwidth observation, setting this value to 10000 nsec is equivalent to setting the search window to 5 delay channels, which is usually sufficient.

> DPARM(3) 200  C R

to select a fringe-rate window in mHz.

> DPARM(4)= 1  C R

to tell FRING the correlator integration time.

> DPARM(5) 0  C R

to do the least-squares solution.

> SNVER 0  C R

to write solutions in a new SN table.

> GO  C R

to do the fit.

If the calibrators had been extracted to a separate data set, use TACOP to copy the resultant SN table back to the line data set. SNCOP may be used when the number of IFs in the two data sets is different. This is more likely to arise when you use a strong line signal in one IF to solve for the delays of a larger data set.

Run CLCAL to apply the delay and fringe-rate solutions to all sources, as is described in 9.5.1.1, and then carefully examine the phase coherence of the line source in a suitable line channel (or group of channels) using POSSM or COHER before and after applying the new CL table. It may be that the fringe-rate solutions have made the phase coherence worse. In this case, you must run SNCOR using the ’ZRAT’ option to zero the fringe-rates and then re-run CLCAL.

After this point, the calibrator data is usually of little or no interest. But, if you do plan to use the calibrator data further, remember to be careful to juggle the SN and CL tables correctly. Even if you decide not to apply the calibrator fringe-rates to the line-source, they are still applicable for the calibrator itself. The CL table created using the un’ZRAT’-ed SN table contains the proper corrections for the calibrator data while the CL table created using the ’ZRAT’-ed SN table contains the proper corrections for the line source.

Now re-run FRING to determine the residual fringe-rates for the line source, this time selecting a suitable line channel or group of channels:

> TASK FRING’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’OH127.8’ , ’   C R

to select the spectral-line source.

> DOCALIB 1  C R

to apply the previous amplitude and delay/rate calibration.

> GAINUSE clin

to specify which CL table to use.

> FLAGVER 0  C R

to apply the most recent flag table.

> SNVER 0  C R

to write a new solution table.

> BCHAN 72 ; ECHAN 72  C R

to select the strongest and/or simplest spectral channel as a reference.

> REFANT 5  C R

to try to use the same reference antenna as in the previous run of FRING.

> SOLINT 6  C R

to set the solution interval in minutes. It should not exceed the coherence time.

> APARM(6) 1  C R

to get useful, but limited printout.

> APARM(7) 9  C R

to avoid false detections by setting the minimum acceptable SNR. Warning: solutions with lower SNR will be flagged as bad which will ultimately flag the affected data.

> DPARM(1) 1  C R

to use one-baseline combination in initial, coarse fringe search (FFT).

> DPARM(2) = -1  C R

to prohibit a search in the delay domain by setting the delay window to a negative number. Remember setting this to 0 means to use the Nyquist value, which is not what we want.

> DPARM(3) 0  C R

to search for fringes over the full Nyquist fringe-rate window since we don’t know where the fringes are.

> DPARM(4)= 0  C R

to let FRING automatically determine the correlator integration time (if this fails, you will have to set the proper value here — see DTSUM).

> DPARM(5) 0  C R

to do the least-squares solution.

> GO  C R

to do the fit.

Then run CLCAL again to apply these solutions to the previous calibration tables. You have then generated a full set of calibration tables and data. Remember that the calibration information for the continuum and line sources are stored in different CL tables.

9.5.7.11 Polarization-specific fringe-fitting

The phase and delay corrections obtained using RR and LL data can only remove R-R and L-L offsets between different antennas. There still may be R-L phase and multi- and single-band delay offsets. The R-L delay corrections can be determined using the RL and LR data and a task named RLDLY is available for determining these effects. This still leaves an overall R-L phase offset.

Once the cross-hand calibration has been completed, the instrumental polarization (otherwise known as the feed D-terms), can be determined. Several different methods are available for this purpose, implemented in the tasks PCAL, LPCAL and SPCAL. The last task is designed for polarization calibration of spectral-line data sets, but PCAL is now fully capable of doing a channel-dependent polarization solution. PCAL is discussed briefly below and further details for each of these tasks can be found in the appropriate EXPLAIN files.

The determination of the absolute polarization position angle is equivalent to the determination of the absolute R-L phase difference. For an unresolved source this can be measured in much the same way as for VLA data (see 4.6) using task RLDIF to determine the cross-polarized phase on the polarization calibrator. Alternatively, a source with known polarization properties can be used, e.g., 3C286 or 3C279. For a resolved polarization calibrator a sum of Clean components is required to compare to the integrated polarization position angle as measured by the VLA or single-dish observations nearby in time. Once the R-L phase correction is known it is applied using task CLCOR with OPCODE=’POLR’ or task RLCOR (see 4.6). See also VLBA Scientific Memo No. 26, “Polarization Angle Calibration Using the VLA Monitoring Program,” by G. Taylor and S. Myers, October, 2000.

After feed calibration and the determination of the absolute polarization position angle, the final Stokes Q and U images can be formed directly. Note that task PCNTR, which is used for displaying polarization images, allows an arbitrary rotation of all polarization vectors under control of input adverb ROTATE. This is only necessary if CLCOR wasn’t used to correct the R-L phase; also the polarization angle specified for PCNTR is half the R-L phase difference.

9.5.7.12 R-L delay calibration

RLDLY is a task which replaces RUN file procedures VLBACPOL and CROSSPOL. It determines R-L delay differences and produces an SN table which corrects for these effects (after CLCAL). It is best run on a set of calibrator data for which the source is at least moderately polarized (source polarization dominates instrumental polarization). Several baselines should be averaged but RL or LR fringes (or both) must be detectable on each baseline to the reference antenna. This task should leave a single R-L phase difference that must be determined from a calibrator of known polarization angle.

> DEFAULT RLDLY ; INP  C R

to set the task name and examine the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> OUTDI 1  C R

to use disk 1 for temporary files.

> FLAGVER 0  C R

to use the highest numbered flag table.

> GAINUSE CLin  C R

to use the CL table with all calibration up to this point; no default.

> SUBARRAY 0  C R

to do all subarrays.

> BASELINE 0  C R

to use all antennas.

> REFANT Aref  C R

to select the reference antenna; any antenna may be used but all baselines to it should have RL and LR fringes. REFANT 0 will loop over all possible (not necessarily good) reference antennas, averaging the result.

> APARM 6, 1, 10  C R

to use only solutions with signal-to-noise ratio above 6, to not write a CL table even if there is only one calibration scan, and to omit all solutions with rms < 10 from the average over antennas.

> CALSOUR cal1’ , ’ ’  C R

to specify the calibrator source to use.

> TIMERANGE d1 h1 m1 s1 d2 h2 m2 s2  C R

to specify a time range with high SNR for RL and LR.

> SOLINT 0  C R

to specify the minimum integration time in seconds; 0 causes it to be found from the data.

> GO  C R

to run the task.

RLDLY should be done after parallel-hand instrumental delays are removed (VLBAPCOR). It may be done before or, with a slight preference, after fringe fitting (VLBAFRNG, VLBAKRNG, VLBAFRGP, or VLBAKRGP). The corrections should be checked with VLBACRPL, by setting STOKES to ’RL’ and/or ’LR’. The RL and LR phases should be continuous across the bandpass on each baseline and be flat if the RR and LL phases are flat (no residual delays).

9.5.7.13 Feed D-term calibration

The feed D-terms, or instrumental polarization terms, can be determined using PCAL. SOLTYPEs ’ORI-’ and ’RAPR’ are appropriate for VLBI data. ’ORI-’ uses a non-linear orientation-ellipticity feed model and is appropriate if instrumental polarization exceeds a few percent (e.g., EVN, or VLBA at 18 or 13 cm). ’RAPR’ uses a linearized “D-term” model — this is faster but less accurate.

Typical inputs for PCAL would be:

> TASK PCAL’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CALSOUR ’DA193’ , ’   C R

to select the source.

> TIMERANG 0 C R

to use all times.

> SELBAND 0; SELFREQ 0; FREQID -1 C R

to select all frequencies.

> BIF 0; EIF 0 C R

to select all IFs.

> ANTENNAS 0; UVRANGE 0  C R

to select all antennas and baselines.

> SUBARRAY 0 C R

to select all subarrays.

> FLAGVER 0  C R

to apply the most recent flag table.

> DOCALIB 1  C R

to apply the previous amplitude and delay/rate calibration.

> GAINUSE clin

to specify which CL table to use.

> IN2DISK n; GET2N ctn C R

to specify Clean images as models for the I, Q, and U polarizations.

> INVERS 1 C R

to select a CC table version.

> REFANT 1  C R

to use the same reference antenna as in the previous run of CALIB.

> NCOMP 77; NMAPS 1 C R

to specify the number of Clean components to use and to explicitly set the number of Clean images supplied.

> SOLINT 6  C R

to set the solution interval in minutes. It should not exceed the coherence time.

> SOLTYPE ’RAPR’ C R

to specify the type of feed model.

> PRTLEV 0 C R

to print minimal information

> BPARM(1) 0 C R

to use the initial feed model if found in the AN table.

> BPARM(3) 0 C R

to not fit for R-L phase difference.

> BPARM(4) 0 C R

to not specify the initial R-L phase.

> BPARM(5) 0 C R

to not solve for Vpol.

> BPARM(6) 0; BPARM(7) 0 C R

to solve for the orientations of both polarizations of the reference antenna.

> BPARM(8) 0 C R

to solve for all orientations.

> BPARM(9) 0 C R

to solve for all ellipticities.

> BPARM(10) 0 C R

to fit for the source polarization model parameters.

> CPARM(1) 0 C R

to find separate solutions for each IF.

> CPARM(8) 0 C R

to not limit the number of iterations.

> CPARM(9) 0 C R

to use the default convergence tolerance.

> CPARM(10) 0 C R

to use default convergence criterion.

> BADDISK 0  C R

to specify which disks to avoid for scratch.

> GO  C R

to run the program.

The instrumental polarization may vary rapidly with frequency and independent solutions may be necessary in each IF. Both ’ORI-’ and ’RAPR’ model the source Q and U as scaled versions of I which is generally only true in the limit of unresolved or unpolarized sources. The D-terms can be determined iteratively by subtracting estimates of source polarization (Q, U Clean components) in UVSUB. Note: this should be done on data for which instrumental polarization corrections have not been applied.

Tasks LPCAL and SPCAL also can be used to compute D-term corrections for continuum and spectral-line polarization data respectively. Be forewarned that both of these tasks use linearized D-term models.

9.5.8 Complex Bandpass

For spectral line experiments and continuum observations where a high dynamic range is required, it is be a good idea to do a complex bandpass at this point. In 9.5.4.5 a scalar bandpass was done; i.e., only the amplitude was calibrated but not the phase. Now that the phases have been calibrated in time (by fringe-fitting), a complex bandpass may be solved for. This will take out any dependence of the phase on frequency. To do this, run BPASS, again applying the CL table that includes all the calibration. With the inputs we recommend here, the phases must be stable in time over the entire bandpass calibrator scan(s). Check this with VPLOT before proceeding. Then

> TASK BPASS’ ; INP  C R

to review the inputs.

> INDISK n1 ; GETN ctn1  C R

to select the multi-source visibility data as the input file.

> CALSOUR ’BLLAC’ , ’DA193’  C R

to specify the continuum source(s) which were observed for the purpose of bandpass calibration.

> DOCALIB 1  C R

to apply calibration.

> GAINUSE CLin  C R

to indicate the CL table with all calibration up to this point.

> BPVER -1  C R

do not apply previous bandpass table

> SOLINT 0  C R

to average data over whole scans before determining the bandpass.

> BPASSPRM 0  C R

to do a complex bandpass and set rest to 0.

> BPASSPRM(5) 1  C R

to not divide by “channel 0.”

> BPASSPRM(9) 1  C R

to interpolate over flagged channels.

> BPASSPRM(10) 6  C R

to normalize the amplitude and phase of the bandpass solutions, using power rather than voltage for amplitudes.

> ICHANSEL chanbeg, chanend, 1, IFnum, ...  C R

to set channels for entire bandwidth for normalization, if this left 0 then the inner 75% is used and can cause up to 15% error in the amplitude.

> GO  C R

to run the program.

As recommended in 9.5.4.5, you should look at the bandpass with POSSM and BPEDT. If necessary, use BPEDT to flag channels in your bandpass calibration data and re-make the BP table. This is the bandpass that should be applied when the data is calibrated and averaged (e.g., with SPLIT).

Note, if your bandpass calibrator is not stable or strong enough during the observation (your bandpass calibrator data should have a better S/N than the data you’re trying to correct with the bandpass), you could consider using the phase reference source (if there is one) and use SOLINT = -1 (include all scans to make one bandpass solution). If the bandpass calibrator is strong enough, but the average phase varies through the scan, then divide each record by “channel 0” by setting BPASSPRM(5) = -1 to adjust phase only. You should select a range of channels that have similar phases to be averaged as channel 0 using adverb ICHANSEL.

9.5.9 Baseline-based errors

Baseline-based non-closing phase and amplitude errors can limit the dynamic range of the final images. One way to proceed is to try to solve directly for the non-closing effects using bright, point-like calibrator observations and the task BLCAL. This task writes a BL table containing the estimated non-closing baseline-based errors which can later be applied in SPLIT, or any of the other calibration tasks. To use BLCAL the noise in the calibrator-source images should approach the theoretical limit. Furthermore, the signal-to-noise ratio in the visibility data must be at least 100:1 on baseline-averaged data. BLCAL will divide your data by your best model and then write a BL table containing the baseline-based corrections. Use this task carefully only after reading the EXPLAIN file thoroughly. As an example:

> TASK BLCAL’ ; INP  C R

to review the inputs.

> INDISK n1 ; GETN ctn1  C R

to select the multi-source visibility data as the input file.

> IN2DISK n2 ; GET2N ctn2  C R

to select your best image as the input model file.

> SOURCE ’DA193’  C R

to select your calibration source.

> DOCALIB 1 ; GAINUSE clin  C R

to select the CL table to use.

> BLVER 1  C R

to create BL table version 1.

> SOLINT 1440  C R

to determine one complex gain correction per baseline for the whole observation.

> GO  C R

to run the program.

Set ICHANSEL to select only the most desirable spectral channels to average. An experimental task BLCHN is available to compute baseline-based errors on a channel-by-channel basis. It writes a BD table which can be plotted by POSSM and BPLOT, but the calibration itself is applied only in the output file produced by BLCHN.