MERGEFITS MERGEFITS converts a standard MERGE-format VLB visibility file into AIPS-compatible FITS format. The FITS format for visibility data is defined in "An extension of FITS for groups of small arrays of data" by E.W. Greisen and R.H. Harten, Astr. Astrophys. Suppl. v44, pp371-374 (1981). The disk file produced by MERGEFITS should be copied to tape following the procedure described below. The dataset can be read from tape or disk into AIPS using the AIPS task UVLOD. It can be translated back into MERGE format with FITSMERGE. FITS-format tapes and disk files can be examined with program FITSLIST. Example $ MERGEFITS INPUT = "0108.MRG" OUTPUT = "0108.UVF" STOKES = -1 OBSERVER = "PEARSON" WTPOWER = 1 TAI-UTC = 17 / Parameters Parameter INPUT must be specified; the others are optional. Parameter names may be abbreviated. End the list of parameters with a slash (/) or end-of-file. INPUT = "filename" : the name of the input MERGE-format file, which must exist. OUTPUT = "filename" : a name for the new FITS-format file. If this is not specified, a filename of the form xxxx.UVF is used, where xxxx is the first part of the input file name. STOKES = n : as the MERGE-format files do not specify the polarization of the data, but AIPS does, you should specify the polarization with this parameter. Possible values for circularly-polarized feeds are: -1 (RR), -2 (LL), -3(RL), and -4 (LR). See the AIPS programmer's manual for other options. The default is STOKES=-2 as most VLB network experiments are observed in LCP. OBSERVER = "name" : may be used to give the name of the observer. The default is the login name of the person running MERGEFITS. USERNO = n : may be used to specify the AIPS user number, if desired. This is rarely if ever needed. IMNAME = "name" MERGEFITS Page 2 IMCLASS = "class" IMSEQ = n : these three parameters can be specified to indicate to UVLOD what the AIPS filename should be. If they are not specified, their values are taken from the file name, file type, and version number of the input file. You can change these when you run UVLOD if you wish. WTFACTOR = f WTPOWER = p : these parameters control how MERGEFITS computes weights for each data point from the amplitude error. The computed weight is WTFACTOR/(err**WTPOWER) or 1000, whichever is smaller. If WTPOWER = 0 all points are equally weighted with weight given by WTFACTOR. The defaults are WTPOWER=1 and WTFACTOR=1. TAI-UTC = m : specifies the Delta-AT correction, the difference TAI minus UTC, where TAI is International Atomic Time and UTC is Universal Coordinated Time. The time-tags on the data from in the input file are UTC, while those on the data in the FITS file are TAI, as required by AIPS. The default value used by MERGEFITS is the correct value (see table on page K9 of the Astronomical Almanac), but you can provide a different value in order to modify the time tags. AIPS weights and error bars The parameters WTPOWER and WTFACTOR are used to convert amplitude error bars into the "weights" used by AIPS: weight = WTFACTOR/(err**WTPOWER) For importing data to AIPS, you should usually set WTPOWER=2 (weight proportional to inverse variance) and adjust WTFACTOR to give weights if a convenient size. Most AIPS programs do not (usually) attach meaning to the absolute values of the weights, only their relative values. For many applications, WTPOWER=1 gives a more reasonable range of weights. The values of WTPOWER and WTFACTOR actually used are recorded in the header of the FITS file. This enables FITSMERGE to reconstruct the errors from the weights, unless WTPOWER=0 was used. Copying a FITS-format file to tape (VMS) Use the following procedure, or a similar one: $ ALLOCATE MTA0: (mount your tape on MTA0:) $ MOUNT/FOREIGN/DENSITY=1600/BLOCK=2880/RECORD=2880 $ COPY 0108.UVF MTA0: $ COPY 3C273.UVF MTA0: ... $ DISMOUNT MTA0: $ DEALLOCATE MTA0: MERGEFITS Page 3 Limitations (some of these may be lifted in due course) 1. Up to 40 stations are accepted. 2. Deleted data are not entered in the output file. 3. Closure phases, if present, are not entered in the output file. 4. The (u,v,w) coordinates are not precessed back to 1950, so AIPS will make maps in RA/Dec of the epoch of observation, not of 1950.0. This can affect position angles near the north pole. 5. The output FITS file is sorted in 'T*' order, and it will usually have to be resorted using the AIPS task UVSRT before it can be used in AIPS. History Version 1.0: 1984 Mar 19 - new program (TJP). Version 2.0: 1986 Apr 22 - use FITS format for antenna table. Version 2.1: 1988 Jul 9 - higher precision in time tags; add weight and TAI-UTC parameters; correct time calculation. Version 2.2: 1988 Jul 20 - change sign convention for phase, uvw. Version 2.3: 1988 Nov 22 - force IMNAME etc to upper case. Version 2.4: 1989 Feb 14 - correct error in SORT ORDER; reduce amount of history. Version 2.5: 1990 Feb 6 - put additional info in "CIT" keywords. Version 2.6: 1990 May 22 - use correct TAI-UTC by default; record B1950.0 position in header. Version 2.7: 1991 Feb 13 - increase to 30 stations. Version 2.8: 1991 Apr 22 - increase to 40 stations. Version 2.9: 1991 Aug 11 - add WT keywords for fitsmerge; default WTPOWER=1.