Digging Into MUD With Python: mudpy, bdata, and bfit
Used to store the results of $\mu$SR measurements at TRIUMF, the Muon Data (MUD) file format serves as a useful and flexible scheme that is both lightweight and self-describing. The application programming interface (API) for these files is written in C and FORTRAN, languages not known for their ease of use. In contrast, Python is a language which emphasizes rapid prototyping and readability. This work describes three Python 3 packages to interface with MUD files and analyze their contents: mudpy, bdata, and bfit. The first enables easy access to the contents of any MUD file. The latter two are implemented specifically for the implanted-ion $\beta$-detected NMR ($\beta$-NMR) experiment at TRIUMF. These tools provide both an API and graphical user interface (GUI) to help users extract and fit $\beta$-NMR data.