In CASA

The steps in CASA involve
  1. Separating spectral windows and different sources into independent (temporary) MS
  2. Getting rid of flagged data
  3. Setting the velocity reference frame and correcting for Doppler motions
  4. Exporting to UVFITS
  5. Removing the intermediate MS
The intermediate MS is created using mstransform, with keepflags=False, regridms=True, outframe='LSRK'. Source and spectral window identification is done using keywords spw and field, and an appropriate rest frequency is specified (in MHz) using restfreq. Finally, exportuvfits is used on the simple intermediate MS. IMAGER provides to CASA a tool named casagildas() that scans the content of the Measurement Set (using listobs() to automatically do this on all combinations of spectral windows and sources.

BUG: Since version 4.7, CASA occasionally leaves the UVFITS file incomplete (until at least 6.8.1 unfortunately). Solving this issue may require some manual handling. In this case, it is recommended to set SPACESAVING = 0 before launching casagildas("Do") to preserve the intermediate .ms.tmp files in order to recover the missing information (pointing coordinates) manually. See Section A.5 below for complementary details.