madgui.util.table module

Utility functions to load numpy tables from files.

Functions

read_tfsfile(filename)

Read TFS table.

read_table(filename)

Read a data file that defines the column names and units in a comment.

madgui.util.table.read_table(filename)[source]

Read a data file that defines the column names and units in a comment.

Simple example file:

# s[mm] env[mm] envy[mm] 0 1 1 1 2 1 2 1 2

For which this function returns a dictionary:

‘s’ -> np.array([0, 1000, 2000]) ‘envx’ -> np.array([1000, 2000, 1000]) ‘envy’ -> np.array([1000, 1000, 2000])

madgui.util.table.read_tfsfile(filename)[source]

Read TFS table.