O.2 Old VLBI format data

For data from a MkIII correlator, run MK3TX, MK3IN, MSORT, DBCON, UVAVG, TAMRG, SBCOR, and INDXR as needed (O.2.1.1O.2.1.7). However, observations which require multiple passes through the correlator (including MkIII Modes A, B, and C observations) will have one file per observing mode per correlation pass. Data from separate correlator passes can be concatenated using task VBGLU and/or merged with task VBMRG.

O.2.1 Loading data from a MkIII/MkIV correlator

O.2.1.1 Running MK3IN

Data from a MkIII correlator, such as that in Bonn, Germany or Haystack, Massachusetts, can also be read into AIPS. To do this you need to be supplied with the so called “A” tape output, also known as “type 52’s.” These data tapes can be read and translated by the task MK3IN. The process of reading MkIII correlator data into AIPS and preparing it for further processing is more cumbersome than the equivalent process for VLBA correlator data. This simply reflects the manner in which data are generated on a baseline-based correlator with a limited number of playback drives. MkIII data may also appear in the form of a Unix tar file. For such data, use M3TAR and TFILE rather than MK3IN and AFILE, respectively.

Before running MK3IN, run the task MK3TX to extract the text files from the MkIII archive tape. These text files contain information about the correlated scans in the data set. MK3TX will first provide an index of all the text files and then ask you to select files for loading onto disk. It then asks you interactively for the desired destination of the text files. It is important to load and concatenate all the “A” files, i.e., those files having names like Atttt. The meaning of the other text files is described in the MK3TX Explain file. Sometimes the text files are not on the tapes, which means that you cannot select sub-sets of the data using the A-files, but is not otherwise catastrophic.

If the A-files are present and have been loaded onto the disk, use AFILE to sort and edit these files to produce a list of scans to be loaded by MK3IN. Use APARM settings in AFILE to establish criteria for selecting between any duplicate scans which may appear on the archive. If the data set contains data at multiple frequencies, you should edit the resulting output text file so that there is a version for each frequency, containing only those scans at that frequency.

The final step before running MK3IN is to create another text file which provides the commands for the task. This step is necessary since some information that is needed by AIPS is not present on the tape. Ideally, in this text file (as shown below), the parameter STATIONS should be a list of all the stations correlated, with the exact name used at correlation. If you do not have such a list, you can instead specify a list containing STATIONS ‘ANY’, ‘ANY’ Note that there must be at least as many ‘ANY’ entries as there are stations in the data set or some of the stations will not be loaded. The parameters in this text file are:

STOKES=’RR’,’LL’

the Stokes range of the output file. The standard abbreviations are used to select the polarization range. The largest consistent range is used. For example: STOKES=’RR’,’LL’ will cause only RR and LL to be written. STOKES=’LL’ will cause just LL to be written. STOKES=’RR’,’LR’ will cause all four circular polarization combinations to be in the output file, since RR and LR span the range of allowed AIPS Stokes values.

FREQCODE=’R’,’L’,’r’,l’

the polarization codes used by MkIII correlators are anything but standard and they need to be supplied to MK3IN using the parameter FREQCODE. The one character polarization identifiers are expected in the order RR, LL, RL, and LR. The usual correlator convention is ’R’=RR, ’L’=LL, ’r’=RL, ’l’=LR and this is the default assumed by MK3IN. However, other codes are possible. For example FREQCODE = ’A’, ’B’, ’C’, ’D’ will interpret ’A’ as RR, ’B’ as LL and so forth, while FREQCODE = ’R’, ’C’, ’r’, ’l’ will use the default abbreviations except that ’C’=LL. If MK3IN encounters an unidentified polarization code the task will report: AT20XX: Unidentified Stokes parameter: ’X. In this case, modify the FREQCODE parameter to include this polarization identifier. This will ensure that polarizations are not misidentified inadvertently.

NO_POL=2

the number of polarization correlations (e.g., RR, LL, RL and LR), the default is 1.

STATIONS=’NRAO’,’VLA’,’OVRO’,’FDVS’,’MPI’

station names.

/

keyin style delimiter.

Then, from inside AIPS, mount the tape (3.9) and run MK3IN:

> TASK MK3IN’ ; INP  C R

to review the inputs.

> INFILE ’MYVLB:PARAM.LIS’  C R

to define the text control file.

> IN2FILE ’MYVLB:AFILE.LIS  C R

to point to a file containing a list of scans to be loaded as produced by AFILE

> INTAPE 4  C R

to specify the tape drive number.

> NFILES 0 C R

to skip no files on tape.

> OUTNA EXP 86-34’  C R

to select the output file name.

> OUTCL MK3IN  C R

to select the default output class name.

> REFDATE ’12/11/89’  C R

to tell MK3IN the start date of the observations — get this right or you may get negative times.

> SOURCES  C R

to accept all sources found.

> TIMERANG 0 C R

to accept data from all times found.

> DOUVCOMP 1  C R

to write data on disk in compressed format.

> APARM 1, 0  C R

to set the time increment in the CL table entries in minutes.

> APARM(7) 1  C R

to separate sidebands into separate AIPS IFs; the default is to store both USB and LSB in the same IF.

> GO  C R

to run the program.

If the data are contained on more than one Exabyte or DAT tape, load the second tape and re-run MK3IN, setting DOCONCAT = 1  C R so that the data are appended to the previous output file. Before running MK3IN a second time, it is important to set the list of STATIONS in the control file to exactly those found when loading the first tape; use PRTAN on the output file to obtain this list. Also leave additional ‘ANY’ entries after the list for any stations that are on the second tape but which were not on the first tape. The use of DOUVCOMP = 1 is recommended for most data sets, see Appendix F.

O.2.1.2 Sorting MkIII/IV data

The AIPS data files created by MK3IN will be in an arbitrary sort order. Use UVSRT or MSORT to sort them into time-baseline order:

> TASK UVSRT’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to select the input file.

> OUTNA INNA ; OUTCL ’TBSRT’  C R

to specify the output file.

> SORT ’TB’  C R

to sort to time-baseline order.

> GO  C R

to make the sorted uv file.

O.2.1.3 Concatenating MkIII/IV data

If you did not set DOCONCAT=1 when running MK3IN and as a result several files were loaded from tape for one observation, use DBCON to concatenate them together. In order to have the concatenated data all appear in a single subarray, both input files for DBCON must have the same reference day number and identical antenna numbers. That is, the antennas extension (AN) files with each input uv data file must be the same. MATCH may be used to repair discrepancies.

You may list the contents of AN files using PRTAN. To run DBCON:

> TASK DBCON’ ; INP  C R

to review the inputs.

> INDISK n1 ; GETN ctn1  C R

to select the 1st input file.

> IN2DISK n2 ; GET2N ctn2  C R

to select the 2nd input file.

> OUTNA INNA ; OUTCL DBCON  C R

to specify the output file.

> DOARRAY 1  C R

to force DBCON to mark the output data records as being in the same sub-array. For this to work properly, both of the input files must have the same reference day and have identical antennas files.

> GO  C R

to concatenate the two files.

In 31DEC14, task DBAPP may be used to avoid the 2n proliferation of files, but only if the files are fairly similar in antennas, subarrays, and frequency IDs.

O.2.1.4 Labeling correlator polarization data

Most MkIII and MkIV VLBI setups reverse the polarizations and assign odd-numbered bands to LCP and even-numbered bands to RCP. In this case BANDPOL should be set to ’*(LR) ’ and the output data set will again be of equal size to the input data with two polarizations and half the number of IFs. This case normally applies if LISTR shows pairs of IFs with the same frequency and QHEADER shows one pixel on the STOKES axis with coordinate value LL, but there may be exceptions to this rule when non-VLBA antennas are used.

To use FXPOL directly, typical inputs are:

> TASK FXPOL’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> BANDPOL ’*(LR)’  C R

to specify the normal MkIII and MkIV polarization structure.

> GO  C R

to run the program.

Consult HELP FXPOL for further information about more complicated cases. Note that FXPOL has to write a new output file since the structure of the data is being changed. All standard extension files are also converted, but it is still a good idea to run FXPOL before running the calibration tasks.

O.2.1.5 Merging MkIII/IV data

MkIII VLBI correlators usually produce redundantly correlated data. You must merge the data using UVAVG:

> TASK UVAVG’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> OUTNA INNA ; OUTCL ’UVMRG’  C R

to specify the output file.

> YINC 4.0  C R

to set the averaging interval of the input data records (in seconds).

> OPCODE MERG  C R

to direct the task to perform the merge operation.

> GO  C R

to run the program.

The CL table should only contain one entry for each antenna at each time stamp. But, due to the merging process described above and the fact that redundant correlations may have been performed, there is one step to follow before you have consolidated your database fully. You must run TAMRG to remove the redundant CL entries:

> TASK TAMRG’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> INEXT ’CL’  C R

to specify the table type to merge.

> INVER 1; OUTVER INVER  C R

to process the input table in place.

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

to control the merging: don’t ask why, just do it!

> BPARM 1, 4  C R

to set compared columns — again, don’t ask.

> CPARM 1.157e-5, 0.2  C R

to set degree of equality — ditto.

> GO  C R

to run the program.

O.2.1.6 Correcting MkIII/IV sideband phase offsets

If your observation contains a mixture of VLBA and non-VLBA antennas and you have not stored the sidebands as separate IFs, there will be a phase offset of about 130 between the upper and lower sidebands on baselines from VLBA to non-VLBA antennas. A correction for this offset is achieved using the task SBCOR:

> TASK SBCOR’ ; INP  C R

to review the inputs.

> INDISK n1 ; GETN ctn  C R

to specify the input file.

> OUTNA INNA ; OUTCL SBCOR  C R

to specify the output file.

> BCHAN 1  C R

to specify the lowest channel of lower sideband.

> ECHAN 4  C R

to specify the highest channel of lower sideband.

> APARM(1) 0  C R

to apply the default phase offset (i.e.-130deg.)

> ANTENNAS =  VLBA ; INP  C R

to specify the VLBA antenna numbers; the = sign is required here. The verb VLBA reads the antenna file to find VLBA antennas.

> GO  C R

to run the program.

If you have loaded the VLBAUTIL procedures, then you may use a procedure called ANTNUM to translate a station name into a station number. Thus ANTENNAS = ANTNUM(’BR’), ANTNUM(’FD’), . The verb VLBA in is easier.

O.2.1.7 Indexing MkIII/IV data

Next, you must index your data. The NX table is useful as a summary of the file for you, and is also used by the calibration programs to provide quick access for reading data. Create this file with INDXR:

> TASK INDXR’ ; INP  C R

to review the inputs.

> INDISK n ; GETN ctn  C R

to specify the input file.

> CPARM 0, 30, -1  C R

to allow 10-minute time gaps within scans, to limit scans to 30 minutes, and to not create a new CL table.

> GO  C R

to run the program.

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

Other than these initial loading and merging steps, the reduction of MkIII and MkIV correlator data is identical to that of VLBA correlator data.

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.