Apply gain solution computed by MODEL and SOLVE (which are called implicitely by SELFCAL) or obtained by READ CGAINS to the current UV data. The optional arguments indicate whether this should be an AMPLITUDE, DELAY or PHASE gain, and what Gain value is used (in range 0 to 1). A DELAY gain is derived from a Phase self-calibration assuming the Phase errors represent pathlength changes (i.e. delays): phase solution is scaled with the Frequency ratio of the self-calibration and UV data to be calibrated.
If no argument is given, the current SELF_MODE (see HELP SELFCAL) is used, and the gain is 1.0.
The /FLAG option controls whether data without a valid gain solution are kept unchanged or flagged. You can actually flag data on this basis even without applying the self-calibration solution.