%Id $Id: antsol.doc,v 1.33 1998/11/11 07:48:56 sanjay Exp sanjay $ rantsol (Robust Antsol) Task to compute the antenna gains from a point source visibility in LTA format. Two passes per data record are performed. After the first pass, antennas with amplitude gain less than user defined threshold are marked as bad for the second pass. Antennas which are found to be bad in this manner are assigned a complex gain of (1,0). The task writes the following in the output file: antenna gains, the residual gains (Amp,Phs), the input gains (Amp,Phs), and the model gains (Amp,Phs) as function of hour angle (HA). Two filters named "getamp" and "getphs" are available which will produce the amplitudes and phases respectively of the antenna gains in a QDP readable format. The input to these filters should be the output of rantsol, containing at least the "#" and "G:" lines (described below). The output format is as follows. o A line beginning with "P:" contains some parameter from the LTA database (for e.g. RF frequency of observation, the channel width etc.). o A line beginning with "#" is a list of names of the antennas for which the solution exist. The names are appended with the index (in square brackets ('[' and ']')) of the physical sampler numbers to which the named antenna is connected. o A line beginning with "G:" has the following fields: (1) Source name (2) Channel No. (3) HA (Hr) (4) Dec (deg) (5) IST (hr) followed by a list of antenna gains (amp,phs) for the various antennas listed in the line beginning with "#" (in the same order). o A line beginning with "R:" has the baseline based "residuals" (defined as the ratio of the observed visibility and the modeled visibility). Such lines have the following fields: (1) Source Name (2) Sampler 1 (3) Sampler 2 (4) HA(Hr) (5) Dec (deg) (6) Residual Amp. (7) Residual Phase (deg) (8) Observed Amp. (9) Observed Phase (deg) (10) Modeled Amp. (11) Modeled Phase (deg) (12) U (Lambda) (13) V (Lambda) A mean residual amplitude of ~1.0 and mean residual phase of ~0 for a point source is an indicator of good solutions. The task works on one polarization at a time. Author Sanjay Bhatnagar (sanjay@ncra.tifr.res.in) in (default=stdin) The name of the input GMRT LTA format file. out (default=stdout) The name of the output file. obj (default ==> ALL) Name of the source on which the solver will be invoked. By default it will work on all sources in the file. scans (default ==> ALL) List of scans of the selected object on which the solver is to be invoked. The scans are the logical scan numbers of the selected sources. For e.g. if the source selected via keyword "obj" has physical scan numbers 2,5,7, the corresponding list of logical scan numbers would be 0,1,2. mode (default = 2) The mode of operation. Mode = 0 ==> solve only for phases Mode = 1 ==> solve only for amplitudes Mode = 2 ==> solve for Amp and Phs simultaneously flux (default=1.0) The flux (in Jy.) of the source used to solve for antenna gains. resid (default=10 (percent)) The maximum acceptable residual error as a percentage of the source flux. A residual error of more than resid implies a bad solution and the corresponding solutions are discarded. refant (default = First antenna in use) The name of the antenna to be used for phase referencing. The name should be one of those listed in the antenna file. If this name matches more than one antenna present in the database, the first match is accepted as the reference antenna. Type "explain baselines:xtract" for more on antenna name construction. badbase (default=None) List of bad baselines which are to be flagged while solving for antenna gains. This could be given as just the antenna name, all baselines of which are to be flagged, baseline number or a fully qualified baseline names which alone is to be flagged (type "explain baselines:xtract" for more on antenna name construction). Antennas which are fully flagged due the selection of bad baselines, will be omitted in the output. timerange (default=All time stamps) This keyword is intended to specify time range in units of time as well as in terms of time stamps (indices) and apply the solver only on this selected data. However, currently it means the following: The start and end time stamp numbers. Records in the database are counted linearly from beginning of the first selected scan to the end of the last selected scan. Hence the selected time range may span more than one scan. integ (default = 0) The number of seconds for which integration should be done before invoking the solver. Currently if the data is input via a pipe, any value other than the default will result into run-time error. Integration will always stop at the scan boundaries. The program will stop processing after the total number of records used for gain solutions is greater than or equal to the number of records requested via the timerange keyword. poln (default = -1 ==> 130 MHz channel) The polarization to be used. The only other value it can take is 1 ==> 175 MHz. channel. chan (default = 100) The channel number to be used. This keyword optionally takes 3 values: start_channel, stop_channel, step. If only one value is given, the task will work on the given channel. If two values are given, the task will work from start_channel to stop_channel in steps of 1. If the third value is given, it will be treated as the step. avgmode (default = vector) Mode of averaging the visibilities before solving for antenna based gains. Default averaging is vector averaging. If the value of this keyword is set to 'scalar', scalar averaging will be done. Any other value will revert to vector averaging. Note that with scalar averaging, it only makes sense to set mode=1. threshold (default = 5E-3) [dbg class keyword] Antenna based amplitude threshold below which the antenna is marked as bad. This keyword is of the "dbg" class and hence to set it's value (to something other than default), one has to run the application as "rantsol help=dbg". The default value is picked up from the $GDEFAULTS/rantsol.def file. skip (default = 1m) [dbg class keyword] The length of time (in seconds if supplied without units) for which initial data in each scan is skipped (actually eaten, to be precise). This is "dbg" class keyword and its default value is picked up from $GDEFAULTS/rantsol.def.