MK3MERGE MK3MERGE is a special version of MERGE to translate data on Export tapes from the Haystack Mark-III Processor into the Caltech MERGE format. The required files must first be copied from the tape to disk (see below). This program is under development, and is not guaranteed to work under all circumstances! Eventually it will probably be integrated with MERGE. To run the program use the command MK3MERGE (defined in VLB:LOGIN.COM): $ MK3MERGE The program asks for 1. Output file name, for the new MERGE file (eg 3C84.MRG). 2. Control parameters: free-format, ended with /. The parameters are the same as for MERGE; the important ones are SOURCE, STATIONS and TITLE. The station names must be the single-letter abbreviations used at Haystack; you may want to use parameter NEWSTAT to provide different names for the output file (see MERGE). 3. Input file names. MK3MERGE will ask you to supply two file names (see below). MK3MERGE requires input from two sources: (1) A "header" file in the Mark-3 SKED format. This is an ASCII file, and is divided into several sections. Each section is identified by a $ sign in column 1 followed immediately by the name of the section. Any line with a * sign in column 1 is treated as a comment (ie, it is ignored by MK3MERGE). The sections may occur in any order. MK3MERGE recognises the following sections (it only looks at the first three characters of the section name): (1.1) $EXP The whole line is copied into the history of the output merge file. Normally this line specifies the experiment name. (1.2) $SOU A list of sources. Each line in this section should contain at least 9 fields, separated by one or more blanks: Field 1: IAU source name. Field 2: Alternative source name (or $ if there is no other name). Field 3,4,5: Hours, minutes, and seconds of RA. Field 6,7,8: Degrees, minutes, and seconds of Dec. Field 9: Epoch of the coordinates. MK3MERGE requires that this be 1950.0. MK3MERGE copies the RA and Dec into the output merge file if either MK3MERGE Page 2 the IAU name or the alternative name matches the requested source name. (1.3) $STA A list of station locations. Each line in this section should contain at least 7 fields, separated by one or more blanks: Field 1: Single-character station identifier. Field 2: Long station name (ignored by MK3MERGE). Field 3: (ignored by MK3MERGE). Field 4: Coordinate code (must be 0, indicating XYZ). Field 5: X (meters). Field 6: Y (meters). Field 7: Z (meters). MK3MERGE copies the XYZ coordinates of all the stations requested by the user into the header of the output file. The sign of Y is changed to conform with the Caltech convention (left-handed coordinates). (2) One or more data files, as generated by FRINGX. These are ASCII files in which each record corresponds to one coherent integration on one baseline. MK3MERGE does not care what order the records are in. It extracts the following data from each record: Field Columns Format Explanation 7 34:35 I2 Year (-1900) 8 37:44 A8 Scan ID (ddd-hhmm) 9 46:53 A8 Source name 10 55:57 A2,1X Baseline identifier 11 59:66 F5.1,3X Decimal seconds of center time 12 68:75 F8.2 Frequency (MHz) 14 81:86 F6.0 Correlated amplitude x 1E4 15 88:91 I4 SNR (integer) 16 93:97 F5.1 Residual phase (degrees) 21 127:129 I3 Coherent integration (sec) MK3MERGE copies the data if the source name (field 9) matches either the SOURCE or the ALIAS name requested by the user, and if both stations in the baseline identifier (field 10, a single character for each station) are in the list of requested stations. The sign of the phase is changed if the order of the two stations in the baseline identifier is not the same as their order in the list of requested stations. Transferring the files from the HP-1000 to the VAX The files should be written to tape with one ASCII record in each physical tape block. There is a potential problem: if any records in the HP-1000 file are shorter than 14 characters, the VAX will be unable to read these records (it will ignore them). Make sure the records are extended with sufficient spaces to make them at least 14 characters long before copying to tape. The procedure for writing the tape is said to be the following: MK3MERGE Page 3 Hang a magtape. The LU of the tape is 8 ST,&FILE,8 CN,8,EO [Write EOF] CN [Rewind] I am not sure how to write multiple files on the same tape. The VAX would very much like to see only one EOF mark between each pair of files, with at least 2 consecutive EOFs after the last file. Transferring the files from tape to VAX disk The procedure is the following (example assumes drive is MTA0) $ ALLOCATE MT: [Allocate a tape drive] [Put the tape on the drive] $ MOUNT MTA0:/FOREIGN [Mount it] $ COPY MTA0: FILE1.DAT [Copy one file] $ COPY MTA0: FILE2.DAT [repeat until you have copied all the files] $ DISMOUNT MTA0: $ DEALLOCATE MTA0: If the tape contains empty files (ie two consecutive EOFs) the corresponding disk files will also be empty. The files (FILE1.DAT etc) can be typed or printed. T.J. Pearson, 1983 February 3