opcal works by computing the brightness and opacity of the atmosphere. This is estimated from a model of the atmosphere, given the observing frequency and elevation, as well as meteorological data. Opacity correction is probably not warranted if the fluctuations in opacity are small and the calibrator is quite close to the program source. However opacity correction will not be damaging in these instances (it would be just an unnecessary extra step). At frequencies above 15 GHz, opacity correction is generally recommended.
To correct for atmospheric opacity, opcal scales up the measured visibility data to account for this attenuation. It also scales the system temperature data to an ``above atmosphere'' value.
opcal can also estimate and correct for a miscalibration in the flux calibration scale. The miscalibration might arise from incorrect value assumed for the on-line calibrator source (noise diode), or an incorrect conversion to system temperature. opcal works by comparing its computed estimates of the sky brightness with the measured values of system temperature. In estimating a miscalibration factor, it assumes that the measured system temperature is a result of the the atmosphere and CMB, plus a constant (i.e. contributions to system temperature from the receivers, spillover, astronomical source, etc, are assumed constant). A scale factor to correct the measured system temperature is then computed. Using this procedure should only be attempted when the observation samples an appreciable range of elevations.
NOTE: The model sky brightnesses are just that - models, not reality. They will probably be quite inaccurate in cloudy weather, and very inaccurate in rainy weather. Do not use this except in clear weather.
NOTE: This procedure to estimate flux calibration factor is not necessarily correct. The system temperature scale may differ from with the model data because the system efficiency used in the conversion process (the telescope Jy/Kelvin) was wrong, and the system temperature scale may have been adjusted to account for this.
tsky Expected sky brightness, in Kelvins trans Expected atmospheric transmissivity (i.e. a fraction, with 1 indicating a transparent atmosphere). airtemp Measured air temperature, in celsius. pressmb Measured air pressure, in millibars. relhumid Measured relative humidity, as a percent. antel Antenna elevation, in degrees. airmass Airmass - cosec(antel)