CAL Program CAL is used to apply calibration corrections to the amplitudes in a MERGE-format visibility data file in order to convert data from correlation coefficient to correlated flux density. Calibration is based on system temperatures and antenna sensitivities (or source antenna temperatures) measured during the observations. General Remarks 1. Convert the uncalibrated visibility data (correlation coefficients) into the Caltech MERGE format. For data fringe-fitted with PHASOR, use program MERGE. For data fringe-fitted with the AIPS global-fringe-fitting procedures (CALIB) make a FITS file from the AIPS data using task FITTP, then use program FITSMERGE to convert to MERGE format. Use AVERAGE (METHOD=S) to coherently average the data to a reasonable integration time (less than or equal to the coherence time; 60 s is typical) and to estimate the errors. 2. Run IED and VLBEDIT to edit the correlation coefficients to remove data recorded while antennas were off source or other obviously "bad" amplitude points. Alternatively, this can be done after calibration. 3. Depending on the fringe-fitting procedure, it may be necessary to correct at this point for biases introduced by fringe-fitting. There are no standard procedures for this. 4. Run CAL, to convert data from correlation coefficient to correlated flux density. If this correction has already been made during the AIPS fringe-fitting procedure, then this step is not necessary. 5. Verify the calibration using unresolved calibrators, UV crossing points, etc. Techniques for doing this include visual inspection of VPLOT or VISPLOT plots and use of program UVCROSS. If you have a good model for the source (e.g., you know it to be close to an unresolved point source: check that the closure phases are zero), use AMPHI with the SCALE option to estimate station-based calibration corrections. You can be quite confident of in these corrections if two or more calibration sources give similar numbers. You can also look at the closure amplitudes using VISPLOT and CLAMP; they should be 1 for a point source. In some cases, you may find "closure errors" of a few per cent in the closure amplitudes. If these are not due to source structure, they may be indicative of baseline-dependent errors (e.g., mismatched bandpasses), and you may want to modify the BFAC factors in CAL to correct for these. If they are not constant through the run, corrections can only be made with VLBEDIT. CAL Page 2 6. Run AVERAGE (METHOD=I), if desired, to average data incoherently. This process destroys the visibility phases in the data file, but should not damage the closure phases. It is often necessary to reduce the size of the dataset by incoherent averaging prior to model-fitting, but it is usually better to use the unaveraged dataset when making an image with AMPHI and INVERT. 7. If you have done an incoherent average, run PHASE to regenerate a set of visibility phases consistent with the closure phases (see PHASE and AMPHI help files). Note that several iterations of calibration may be needed. It is strongly advised that you use command procedures to do all this, both to keep a record of what you have done and so that you can make changes later. Some calibration errors may not be apparent until you start model-fitting or mapping. Running CAL To run CAL use the command CAL (lower-case in Unix!). The program asks you to supply file names: $ CAL Input file name: [name of MERGE file] Output file name: [name for new MERGE file] Parameter file name: [name of a file containing the control parameters: e.g., P98G1.calparm; see below] Listing file name: [name of a file to receive the summary of the calibration, P98G1.clist] Plot device/type: [a PGPLOT graphics specification, or a blank line to suppress plots] The Parameter File The control parameter file is organized in Groups and Tables. GROUPS: The control parameters are arranged in Groups, each Group starting on a new line and ending with a slash (/). The Groups are identified by keywords FLUX, BASELINE, TSYS, TSCURV, TANT, GAIN, and GTABLE. The first group must be the FLUX group. This is followed by BASELINE, TSYS, TSCURV, TANT, GAIN and GTABLE groups which can be arranged in any order. The parameters within each Group (including the keyword) are in free format and may occur in any order. There should be either a TSYS group+table or a TSCURV group for each antenna. There should also be either a TANT group+table, GAIN group, or GTABLE group+table for each antenna. In addition there may be one BASELINE group for each baseline. The baseline groups are only required if you want to specify different b-factors for different baselines. CAL Page 3 TABLES: TSYS, TANT, and GTABLE groups call for tables. TSYS and TANT tables are lists of times and system temperatures or antenna temperatures. Each entry in a table consists of three numbers: day number, UT (hh:mm), and temperature. It is usual to have one such entry per line, but the format is entirely free. Comments starting with "!" can be included anywhere. The Table may be inserted inline following the corresponding TSYS or TANT group, in which case it must be terminated with a slash; or it can be in an external file (specified by the TABLE parameter), in which case the slash is optional. It should be possible to use VLBA calibration files directly as tables without editing (except perhaps to remove an e-mail header). 1. FLUX group: e.g. SOURCE=3C84 FLUX=57.3 HISTORY="Revised calibration of expt C22" BDEFAULT = 1.239 / The parameters in this group are the following: SOURCES=name, name...: A list of up to 10 source names. The source name in the input file must match one of these names. FLUXES=flux,flux...: A list of up to 10 flux densities (in Jy) corresponding to the list of sources. The flux value for the source in the input file is added to the header of the output file and used for visibility calculations; it is also used in the calibration process if you use TANT tables. Specify 0.0 if the input file already has the flux density in the header and you do not want to change it. HISTORY = 'text': text to be written into the history records of the output file; optional. BDEFAULT=value: a default b-factor for baselines not specified in BASELINE groups (see below); must always be specified. LONG : (no value) if specified, long tables of the supplied system temperatures and of the values actually used in the calibration are included in the listing file; not recommended. UNBIAS : (no value) if specified, CAL will do a crude correction for the noise bias at low signal-to-noise ratios. There is no good evidence that this correction is ever the right thing to do, so UNBIAS should always be omitted. BW = bandwidth (Hz): may be used to supply the bandwidth if this parameter is not recorded in the file header; it is used for computing estimated noise levels. TAVG = average time (s): may be used to supply the coherent CAL Page 4 integration time if this parameter is not recorded in the file header; it is used for computing estimated noise levels. 2. TSYS group: TSYS [FT] [TCAL] [DELTAT] [TABLE=filename] / e.g. TSYS NRAO FT=1.03 / TSYS NRAO TCAL=79 / Provides system temperature data. Identify the station by its name (e.g., NRAO). FT is a factor by which the system temperature values are to be multiplied (default 1). TCAL is the CAL temperature, used when the data are entered as dB (see below). DELTAT is a correction to the times in the table. CAL works with UTC. To correct the times in the table to UTC, the value of parameter DELTAT (seconds) is subtracted from the table times. Typically this is used to convert atomic time (TAI) to UTC, in which case DELTAT=TAI-UTC. TABLE gives the name of a file containing the TSYS data Table for this station. If the parameter is not specified, the Table must be included inline, followed by a slash. Each entry in the TSYS Table is three numbers, day-number, UT (hh:mm), Tsys or dB. Normally the numbers are values of Tsys, but if TCAL is specified they are ratios (Tsys+Tcal)/Tsys in dB. For higher precision, decimal fractions of minutes may be included in the times (e.g., 14:33.5), but for historical compatibility reasons you cannot use two colons to get hh:mm:ss. TSYS NRAO / 143 01:00 273 143 02:00 270 etc... / Some stations provide system temperatures in Jy instead of K. In this case, include these values in the table but specify DPFU=1 in the GAIN group for that antenna. 3. TSCURV group: e.g. TSCURV HCRK EQUAT TSZ=81.0 TSPOLY=1.0,0.23e-4,0.12e-5 TANTFT=2.0 / Specify the station name and either EQUAT or ALTAZ. TSZ is the off-source system temperature at zenith. TSPOLY gives the coefficients of a polynomial fit to the off-source system temperatures (up to 6). TSCURV is an alternative to TSYS: it specifies system temperature as a function of the antenna CAL Page 5 and off-source system temperatures: Tsys = Tant*TANTFT + TSZ*(tc0 + tc1*x + tc2*x*x + ...) where tc0,tc1,tc2,... are the TSPOLY polynomial coefficients, x is HA in hours for EQUAT antennas or zenith angle in degrees for ALTAZ antennas, Tant is the antenna temperature computed in the TANT or GAIN group, and TANTFT is a factor by which the antenna temperatures are to be multiplied IN THIS TSYS COMPUTATION ONLY. The default is TANTFT = 1.0. 4. TANT group: TANT [FT] [DELTAT] [TABLE=filename] / e.g. TANT NRAO FT=1.00 / Provides Antenna temperature data in the same format as the TSYS group and table. The fudge-factor FT is applicable, but the word TCAL is not. It is important that the temperature scale for any station for TSYS and TANT are the same. In the absence of TANT data, GAIN or GTABLE should be used. 5. GAIN group: GAIN DPFU POLY / e.g. GAIN HCRK EQUAT DPFU=0.052 POLY=1.0,0.05e-6,0.04e-3 / Specify the station name and the mount type (EQUAT, ALTAZ, or GCNRAO). DPFU (degrees per flux unit) is the antenna temperature of a 1-Jy source at maximum efficiency. POLY gives the coefficients of a polynomial fit to the gain curve (up to 7). GAIN is an alternative to TANT: it specifies the antenna temperature as a function of antenna attitude: Tant = S * DPFU * (c0 + c1*x +c2*x*x + ...) where S=total flux, c0,c1,c2... are the polynomial coefficients, x is HA in hours for EQUAT antennas or zenith angle in degrees for ALTAZ antennas. The default for POLY is 1,0,0,0,0,0,0. GCNRAO is a special form of gain curve for the NRAO 140-ft antenna (spherical harmonic expansion). In this case: Tant = S * DPFU * (c0 + c1*cos(theta) + c2*sin(theta)*cos(ha) + c3*sin(theta)*sin(ha) + c4*(1.5*cos(theta)2 - 0.5) + c5*3*sin(theta)*cos(theta)*cos(ha) + c6*3*sin(theta)*cos(theta)*sin(ha) ) where theta=(pi/2-dec). In the notation used by NRAO: c0=A00, c1=A10, c2=A11e, c4=A20, c5=A21e. CAL Page 6 Note that the gain curve should reflect the actual sensitivity of the antenna, including the effects of pointing errors and atmospheric attenuation, at the time of observation. At high frequencies a standard polynomial is unlikely to be a good representation. In this case, use a GTABLE table or TANT table instead of a GAIN polynomial. Even if antenna temperatures were not measured during the observations, you may be able to construct a TANT table from other information (e.g., a standard gain curve plus atmospheric attenuation estimates from a water-vapor radiometer). CAL does not attempt to automate this process. 6. GTABLE group: GTABLE [FT] [TABLE] / e.g. GTABLE HCRK EQUAT / Specify the station name and the mount type (EQUAT or ALTAZ). This is an alternative to TANT or GAIN: you provide a table of antenna gain (antenna temperature in degrees per Jy) as a function of either ZA in degrees (ALTAZ) or HA in hours (EQUAT). FT is a factor by which the tabulated gain values are to be multiplied (default 1). TABLE gives the name of a file containing the GTABLE data Table for this station. If the parameter is not specified, the Table must be included inline, followed by a slash. Each entry in the GTABLE Table is two numbers: ZA or HA, and Gain. 7. BASELINE group: e.g. BASELINE NRAO OVRO BFAC=1.239 / Identify the baseline by two station names (e.g., NRAO OVRO). BFAC is the b-factor; its value depends on how the fringe-fitting was done. See BFACTOR (below) for the appropriate value of BFAC. If no baseline group is provided for any baseline, the default b factor specified by BDEFAULT in the FLUX group is used. WARNING: this option allows you to introduce baseline-dependent rather than station-dependent amplitude factors. Do not do this without very good reason! CAL Page 7 Plots If you give it a PGPLOT device specification, CAL will produce plots of the applied calibration factors. For each station, a plot of "system temperature in Jy" versus UT is produced. The system temperature in Jy is a useful quantity for characterizing the sensitivity of each antenna; it is the ratio of system temperature (K) to antenna gain (K/Jy). The numbers plotted are those actually applied to each visibility amplitude by CAL, after interpolation in the supplied system temperature tables and antenna temperature tables or gain curves. Amplitudes on baselines involving this antenna are multiplied by the square root of this factor in the calibration process (see HINTS). This factor includes all the effects of calibration except the B-factor. The graphs show the system temperature in Jy as crosses (green) and the antenna zenith angle as a dashed line (red). Example CAL can be run from a command file, as in the following examples, or it can be run interactively: supply five filenames in response to the prompts (input file, output file, parameter file, listing file, and plot specification): $! VMS # UNIX (csh) $ CAL cal <