### On the CASA side

The proper exportation is done by invoking the casagildas() tool. 3. casagildas() scans the Measurement Set using the listobs() tool, then uses a Python script that parses the output of listobs() to prepare a Python script named casa_uvfits.py.

It is then up to the user to execute this Python script, using the casagildas("Do") command that creates one UVFITS file per Source and Spectral window in the input Measurement Set. Thus, the sequence

      vis='MyMeasurementSet.ms'   # Setup the input Measurement Set filename
      casagildas()                # List its content and create the export script
      casagildas("Do")            # Execute the export script

will create a set of

      Source-Frequency.uvfits

files, where Source is the source name and Frequency is the central frequency of the spectral window in MHz, for all combinations of sources and spectral windows.