Starting at 4.3 WEIGHT/SIGMA_SPECTRUM will be used (if present) in addition to the flags to compute a weighted average. The calculation is done in the same way as for the channel average case but across the time axis (see section 1.5). Otherwise (if WEIGHT/SIGMA_SPECTRUM are not present) mstransform will use WEIGH/SIGMA instead, as in split. The output WEIGHT_SPECTRUM is defined as the sum of the weights of all un-flagged input rows contributing to one output row. Also, in a similar way as for channel average, when all the input rows contributing to one output row are flagged, then mstransform will calculate and store the average of all the flagged rows, and set the output row flag to True. The same applies to WEIGHT_SPECTRUM but using a sum instead of and average.
The output row-level WEIGHT value is defined and set as the average of WEIGHT_SPECTRUM across the channel axis. A median algorithm was considered, but finally ruled out to actually account for the impact of reduced weights in the regions with significant systematic errors.
If the keepflags parameter is set to False, then only partially flagged rows will be used in the average calculation.
The especial case of baseline-dependent time average is described in the following paper: ftp://ftp.cv.nrao.edu/NRAO-staff/bcotton/Obit/BLAverage.pdf