BCDA-APS / MDA_Utilities

Utilities for acessing and converting EPICS saveData MDA data files.
Other
2 stars 1 forks source link

MDA Utilities v1.4.3 June 2021

Written by Dohn A. Arms, Argonne National Laboratory

See LICENSE.txt file for licensing of these programs and code.

The location of these utilities on the Internet is: https://epics.anl.gov/bcda/mdautils

There is also a github repository at: https://github.com/BCDA-APS/MDA_Utilities


These utilities are used for accessing MDA files generated by the saveData routine in EPICS, and can handles MDA files of any dimension. The MDA file versions handled with this code are 1.2, 1.3, and 1.4.

The command line utilities all give help with the "-h" option, and show version information with the "-v" option. Documentation is also included in the "doc" subdirectory. Each utility has a man page (with a PDF version included), while the library comes with a manual in PDF form.

Utilities:

Only the first four apply to Windows.

1) mda2ascii - This program converts MDA files to ASCII files, with various options, so the data can be read directly into a plotting/fitting program.

2) mda-info - This program will print to the screen information about an MDA file. It shows things such as the time, the dimensionality, positioners, detectors, and triggers used.

3) mda-ls - This program print to the screen a listing of all the MDA files in the current or a specified directory. It shows the name, dimensionality, positioners, and optionally the time for each file. It is possible to filter the listing to those files including a certain positioner, detector, or trigger.

4) mda-dump - This program will dump to the screen the entire contents of an MDA file, exactly as how they appear in the file. This program can be useful for debugging purposes, as it prints out information immediately after loading it. It does not use the mda-load library, instead using direct functions for reading the file.

5) mdatree2ascii - This script converts a directory tree of MDA files into a new parallel directory tree populated by ASCII files, ignoring all non-MDA files. It uses the program mda2ascii to do the actual conversion.

6) mda-load library - This is the engine used for reading the MDA files. The library functions are relatively simple, as there are very few. Accessing the data -- due to the arbitrary dimensional nature of the MDA files -- can be complicated, and familiarity with structures and pointers in C is a must. The manual for it is mda-load.pdf, and reading mda-load.h can be helpful. It could be built as a shared library, but since it is rather small and different systems utilize shared libraries differently, this isn't enabled.