I am trying to export the UV wavelengths, visibilities and weights from a measurement set in CASA, but I haven't been able to find the right commands to do this.

'exportuvfits' might be what I am looking for, but I can't find a clear explanation of what this format really is.

Any CASA users out there that can help me?

  • $\begingroup$ Have you tried it to see what happens? If so, can you add to your question a description of the results and if they are not suitable, what you need instead? Thanks! $\endgroup$
    – uhoh
    Jan 30 at 0:41
  • $\begingroup$ What is CASA? More details/links please. $\endgroup$
    – ProfRob
    Jun 14 at 12:23
  • $\begingroup$ @ProfRob CASA is the Common Astronomy Software Application, and is used for data processing of ALMA/VLA data (casa.nrao.edu) $\endgroup$
    – jm22b
    Jun 21 at 9:47

UVFITS is a file format that has a history of use in AIPS, so it likely won't be much use here.

It looks like an easy way to get what you're looking for is to use the export_uvtable task of uvplot (see documentation here). Since uvplot is not a standard CASA library, you'll have to install it with pip from within CASA (if you are using a mac and CASA 5 or above):

pip install uvplot

Then run split to isolate the visibilities you wish to extract, e.g.:

split(vis='FULL.ms', field="0", spw="0~2", outputvis="TEST.ms", datacolumn="data") 

And finally run export_uvtable

from uvplot import export_uvtable
export_uvtable("uvtable.txt", tb, vis="TEST.ms", datacolumn="DATA")

The resulting uvtable.txt file contains columns of u, v, Real(V), Im(V), and weight.

  • 1
    $\begingroup$ Thank you for your answer - this looks like a good way to achieve what I was looking for. In the meantime, I was able to write some python within CASA to do what I needed (with some help from a colleague). $\endgroup$
    – jm22b
    Jun 21 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.