UV_GAIN UV_GAIN computes a table of phase and/or amplitude gains from the self- calibration of an observed UV table on a model UV table. The table of self-calibrated visibilities is also output. The table of gain can then be applied to another UV table through the UV_CAL task. This is useful for instance to calibrate a line UV table from reference to the gain de- rived from the self-calibration of the high signal-to-noise ratio con- tinuum UV table of the same source. Only one channel of the observed UV table can be calibrated at a time. It is STRONGLY ADVISED to self-calibrate the phase first, then the am- plitude using a longer smoothing time. You can choose between baseline- based and antenna-based method to determine the gain. The antenna-based method takes the closure relationships into ac- count. You may thus iterate the self-calibration using this method to try to converge. However, for this method to work, decorrelation on the duration of each observed scan must be small to avoid the loss of the amplitude closure relationships in the averaging. In particu- lar, the atmospheric phase contribution must be stable on the scan du- ration. Similarly, the source structure should be small enough so that visibili- ties take during the averaging time represent the same measurement (within the Nyquist sampling). This can be ensured to first order by centering the image on the strongest source.