Skip to content
Derek Fujimoto edited this page Mar 11, 2021 · 1 revision

[source]

mud-data object. The mdata object is a data container designed for easy reading of any MUD file, regardless of experiment type or measurement method.

Signature

mdata(filename)

Example: mud = mdata('filename.msr')

Functions

Signature Description
set_description(mode) Mode is one of "TD" or "TI".
write(filename) Write to file

Misc Features

Representation

Representation has been nicely formatted so that typing the object name into the interpreter produces nice output.

Operators

mvar, mscaler, and mhist objects allow for arithmatic or logic operators to be used, where the value used in the operation is the mean, count, or data array respectively.

Example: mud.ivar['BNMR:HVBIAS:POS:RDVOL'] + 1 is equivalent to mud.ivar['BNMR:HVBIAS:POS:RDVOL'].mean + 1

Special Rules For Attributes

If an attribute is not found in mdata, it will look for the attribute in the mdict objects in the order: hist, ivar.

mdict objects all allow assignment and fetching of dictionary keys as if they were attributes. Note that one can replace + with p, and - with m to allow fetching of histograms.

Example: mud.hist.Bp, mud.hist['B+'], mud.Bp all have the exact same output, with the last being much slower than the others.

Clone this wiki locally