MRT Programs

This website provides links to programs written to help journal readers extract and plot the data in machine-readable tables. The ultimate goal is to have programs for different needs and in various languagues.

    • Python
      • The astropy project can read (but not currently write) CDS MRT files.  We provide a wrapper script aasmrt.py in our GitHub Tools repository that can inspect MRT files and convert them to comma delimited files.  A typical code snippet for working with these files might be:
              from astropy.table import Table
              data = Table.read("ajaad1f1t1_mrt.txt", format="ascii.cds")
        • CDS now provides a beta python version of their anafile C-code that works with astropy to write out the VizieR ReadMe fixed-width table headers. This gets you 90% of the way to the AAS MRT format. The python package is co-located with the C-code on the CDS development site.
      • IDL
      • A perl extraction program.
      • Fixed width format files like MRTs can be straightforwardly read in using the OpenRefine tool.
      • MS EXCEL tips.
        • Open the machine readable file with EXCEL (1998 or later) and the import wizard should appear.
        • On the import wizard’s first screen choose the fixed width option for import. This window also lets you set the row at which to begin the import so you can easily skip all the meta-data header information at the beginning.
        • The next screen is a GUI interface for setting the field boundaries. Click on the position of each boundary. It is possible to scroll through an input file with the boundaries marked and check the boundaries against the data. The major negative is that the GUI window is fairly of small and not adjustable but you can scroll horizontally and vertically to see the full data set.
        • The last window lets you pick the data format for each column. The default is “general” which takes anything numerical as a number and interprets the presence of any other characters as text fields, however, you should use the format values given in the meta-data header. Finally, be careful in defining the column boundaries and check enough records to be fairly confident that the whole thing has been done right (Hat tip to Bob Milkey for the EXCEL advice).