4.6.1 On the CASA side

The proper exportation is done by invoking the casagildas() tool. 4. 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")          # 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.

Important note: Because, contrary to e.g. tclean, CASA task exportuvfits only accept one Measurement Set at a time, if you have several observing blocks with the same spectral setup, you should concatenate all relevant measurement sets into a single one, and use the casagildas() tool on it.

Caution: The recipe above does not work?